Sub topic 17
Choosing between LDA and BERTopic
Assume you know tokenisation, stop words, TF-IDF, basic probability, and the idea of a vector embedding. You should also be able to inspect Python model output and judge whether a discovered theme makes sense for your task.
LDA and BERTopic use different meanings of the word topic:
- In LDA, a topic is a probability distribution over words. A document usually contains a mixture of topics.
- In BERTopic, a topic is a cluster of documents that have similar embeddings. c-TF-IDF then finds words that describe that cluster.
This difference affects both the results and the tuning process.
Main decision criteria
| Criterion | LDA | BERTopic |
|---|---|---|
| Input representation | Word counts | Document embeddings |
| Similarity captured | Shared words | Shared meaning |
| Topic shape | Every document can mix topics | Documents belong to clusters, with possible outliers |
| Main tuning choice | Number of topics and priors | Embedding model, UMAP, and HDBSCAN settings |
| Compute cost | Usually lower | Usually higher because of embeddings |
| Short or sparse text | Often weak | Often better if embeddings are suitable |
| Reproducibility | Often easier to control | Sensitive to embedding, UMAP, and clustering settings |
Choose LDA when word usage itself carries the signal. It works well for larger, reasonably long documents, especially when you need a simple probabilistic model or document-topic proportions. LDA also gives a direct representation of uncertainty: a document can be 70% about elections and 30% about economics.
Choose BERTopic when semantic similarity matters more than exact word overlap. For example, “car repair” and “vehicle maintenance” may be close in embedding space even though they share few words. BERTopic is useful for support tickets, reviews, or short documents where word counts are sparse.
Common failure modes
LDA can produce topics dominated by frequent words, near-duplicate topics, or themes that are difficult to name. The selected number of topics strongly shapes the result. Increasing it does not automatically reveal better structure.
BERTopic can create too many small clusters, place many documents in topic -1, or produce unstable topics when UMAP or HDBSCAN settings change. Its labels also depend on the embedding model and vectoriser. A general-purpose embedding model may miss specialist meanings.
Use topic coherence and manual inspection for either method. Read the top words, then read representative documents. A topic is useful only if its words and documents form a coherent theme that supports your goal.
A practical rule
Start with LDA when you need low cost, word-level explanations, and document-topic mixtures. Start with BERTopic when semantic similarity, short texts, or flexible clustering matters more. If the choice is uncertain, run small experiments with both methods and compare coherence, human interpretability, downstream usefulness, and runtime.
Exercise
A corpus contains short customer messages that use different words for the same problem. Which method is the stronger first choice, and what should you inspect?
Show answer
Start with BERTopic because embeddings can capture semantic similarity despite vocabulary differences. Inspect cluster coherence, representative messages, the number of outliers, and whether the embedding model understands the domain.