The idea, before the math
Before embeddings did the talking, and before a research team could pay an LLM to label a million support tickets, the standard tool for asking "what is this corpus actually about" was a topic model. The flagship one, Latent Dirichlet Allocation, published in 2003, is still shipped inside scikit-learn and gensim, and you still find it in the methods section of papers that were written when it was the new thing. Large language models have since taken most of its jobs. The story of how LDA worked, where it broke, and what replaced it is the clearest case study in how the field moved from statistics to neural systems for reading text.
LDA starts from one observation about how people write. Documents are not about one thing. A paper about the economics of vaccine distribution is partly about epidemiology, partly about cost modeling. If you force every document into exactly one category, you lose the interesting part. LDA instead assumes every document is a mixture of several topics, and every topic is a probability distribution over words. Both mixtures are hidden, or "latent": you never observe them, you infer them from the pattern of word co-occurrences shared across the whole corpus. The word "allocation" in the name refers to the model's bookkeeping: every word slot in every document is allocated to some topic behind the scenes.
The generative story
Formally, Blei, Ng and Jordan described LDA as "a three-level hierarchical Bayesian model, in which each item of a collection is modeled as a finite mixture over an underlying set of topics." The generative recipe is short. Pick a number of topics, K. For each document, draw a distribution over topics from a Dirichlet distribution controlled by a hyperparameter alpha. For each word slot in that document, first draw a topic from the document's mixture, then draw the word from that topic's distribution over the vocabulary, which is itself Dirichlet-controlled by a beta. The Dirichlet distribution is simply a distribution over probability vectors: it generates the sets of weights (they must be non-negative and sum to one) that make up both the document mixtures and the topic word lists. It is named for the 19th-century mathematician Peter Gustav Lejeune Dirichlet.

Two knobs decide what the model produces. Alpha controls how mixed documents are: a small alpha pushes each document to lean on one or two topics, a large alpha makes every document sample from every topic, which washes the signal out. Beta controls how peaked a topic's word distribution is. Learning runs the recipe in reverse: the words are observed, everything else is inferred, so the algorithm hunts for topic mixtures and word lists that jointly explain the corpus. The bag-of-words assumption is total: LDA is indifferent to word order and even to document boundaries beyond the counts.
An inherited model
LDA was not a first draft. Thomas Hofmann's probabilistic latent semantic indexing (1999) had already reframed Latent Semantic Analysis, the 1990s workhorse of information retrieval, in probabilistic terms: each document picks a latent class, the class picks a word. pLSI had a known defect. It gave each document its own free parameters, so the model's capacity grew with the corpus size, it overfit, and it had no principled way to assign likelihood to a document it had never seen. Blei, Ng and Jordan fixed this by placing Dirichlet priors on both levels, which makes a document a draw from a shared, finite-dimensional process instead of a bag of independent parameters.
The odd part is that the text model was not even original in that form. The same generative scheme appeared three years earlier in population genetics, where Pritchard, Stephens and Donnelly used it to infer ancestry: swap documents for individuals, topics for populations, words for alleles. An individual is a mixture of populations; LDA's document is a mixture of topics, as the Wikipedia account of the model records. Blei, Ng and Jordan wrote the version for machine learning.
Making it run
Inference is the hard part. The original paper contributed a variational expectation-maximization algorithm, approximating the intractable posterior with a simpler family; its abstract also notes an EM algorithm for the priors. A more influential practical recipe came from Griffiths and Steyvers in a 2004 PNAS colloquium paper that introduced Gibbs sampling to the audience: rather than optimizing, repeatedly resample each word's topic assignment given everything else. Their worked example ran LDA on a decade of PNAS abstracts, used Bayesian model selection to pick the number of topics, and then mined the results for rising and falling research areas. Climate change, gene knockout techniques and apoptosis were among the hottest detected topics; sequencing and cloning, structural biology and immunology were among the coldest. They fixed the priors at the values that became folklore: beta at 0.1, alpha at 50 over K.
Scale came from Hoffman, Blei and Bach in 2010. Online LDA replaced batch fitting with streaming stochastic optimization, and demonstrated it by fitting a 100-topic model to 3.3 million Wikipedia articles in a single pass, reaching quality as good as batch variational inference in a fraction of the time. That is the moment LDA becomes the default tool for web-scale corpora, and the decade where nearly every "we topic-modeled N million tweets" paper in the social sciences appeared.
Where it broke
Two disappointments ended LDA's run as the frontier. The first was evaluation. The field graded topic models on held-out likelihood, and in 2009 Chang et al. showed the grade was wrong. Their "Reading Tea Leaves" studies put humans on the tasks that actually mattered, including topic intrusion: show a person ten top words from a topic where one word is foreign, and see whether they can spot the impostor. The result is the sentence that soured a generation of practitioners: "topic models which perform better on held-out likelihood may infer less semantically meaningful topics." The metric everyone trusted was measuring something other than the thing everyone wanted, which should ring a bell for anyone watching reward-model overoptimization debates in RLHF today.
The second was the representation itself. Topics are lists of words with no notion of synonymy; a corpus that says "laptop" on Monday and "notebook computer" on Tuesday splits a topic in two. You must also choose K before seeing anything, and no criterion reliably tells you the right K. The PNAS tutorial's own model selection was a search over likelihoods, and picking the granularity of "a topic" stayed closer to judgment than to mathematics.
What replaced it, and what survived

The neural successor arrived quietly. BERTopic, a 2022 procedure, swaps the probabilistic machinery for document embeddings plus clustering, then uses a class-based TF-IDF step to turn each cluster into interpretable words. It keeps the output shape researchers wanted, a topic per document plus top words, while fixing the bag-of-words blindness.
Then the LLMs came for the whole task. A 2024 comparison ran LDA and BERTopic against LLMs prompted to generate topics from scratch and found the language models a "robust substitute" on human-rated quality, with no training step at all. A NIST follow-up posed the replacement question directly. A 2025 evaluation study rated LDA, ProdLDA, CombinedTM and BERTopic using LLM judges and found something quieter: LDA remains "surprisingly competitive, particularly in lexical precision and low redundancy," even as the neural models win on coherence and fluency.
The economics explain the persistence. LDA fits on commodity CPUs; the 2010 online variant processed 3.3 million Wikipedia articles in one pass. An LLM pass has to push every token of the corpus through the model, so its API bill scales linearly with corpus size, and its answers carry the usual hallucination risk. LDA also gives a deterministic document-by-topic matrix you can audit line by line. That is why it still shows up wherever a corpus is too big, too private, or too boring to route through an API.
The short version
LDA is the model that turned "what is this corpus about" from a human reading project into a parameter estimation problem, borrowed from population genetics, scaled to Wikipedia, and eventually displaced by two things better at the same job: neural topic models that see synonyms, and language models that can simply be asked. Its durable lesson is the one from 2009. When your metric and your purpose disagree, the model will learn to please the metric.
Sources
- Blei, Ng, Jordan, Latent Dirichlet Allocation, JMLR 3:993-1022, 2003
- Wikipedia, Latent Dirichlet allocation
- Wikipedia, Probabilistic latent semantic analysis
- Wikipedia, Dirichlet distribution
- Pritchard, Stephens, Donnelly, Inference of Population Structure Using Multilocus Genotype Data, Genetics, 2000
- Griffiths, Steyvers, Finding Scientific Topics, PNAS, 2004
- Hoffman, Blei, Bach, Online Learning for Latent Dirichlet Allocation, NeurIPS 2010
- Chang et al., Reading Tea Leaves: How Humans Interpret Topic Models, NeurIPS 2009
- Grootendorst, BERTopic: Neural topic modeling with a class-based TF-IDF procedure, 2022
- Large Language Models Offer an Alternative to the Traditional Approach of Topic Modelling, 2024
- NIST, From Traditional Topic Models to LLM Topic Models
- Toward Purpose-oriented Topic Model Evaluation enabled by Large Language Models, 2025
