- Introduced by
- Ramage, D.; Andrzejewski, D.; and related NLP community
- Year
- 2009
- Type
- Probabilistic graphical model (supervised/constrained extension of LDA)
- Family
- Deep learning / NLP / CV
What does it do?
Semi-supervised topic modeling extends unsupervised topic models such as LDA by incorporating partial human supervision — seed words, labeled documents, or must-link/cannot-link constraints — to steer discovered topics toward meaningful, domain-relevant categories while still exploiting the large unlabeled corpus for statistical strength.
The intuition behind the method
Pure topic models like LDA discover latent themes automatically but often produce topics that are hard to interpret or do not align with the concepts a researcher cares about. Semi-supervised topic modeling lets the analyst inject a small amount of domain knowledge — for example, a handful of seed words per topic or a few labeled documents — and the model uses this guidance to pull its learned topics toward those human-defined directions. The rest of the corpus remains unlabeled and is used to refine topic distributions, combining the scalability of unsupervised learning with the alignment benefits of supervision.
History
Semi-supervised extensions of LDA appeared around 2009. Ramage et al. (EMNLP 2009) introduced Labeled LDA, a supervised topic model for credit attribution in multi-labeled corpora. Andrzejewski et al. (ICML 2009) proposed Dirichlet forest priors for incorporating domain knowledge as must-link and cannot-link word constraints. Later seeded and anchor-word variants, and neural models that use embedding-space information, extended the idea to newer model families.
When to use it
Choose semi-supervised topic modeling when you have a sizeable text corpus, a defined set of thematic categories the topics should reflect, and a small amount of domain knowledge in the form of seed words or labeled examples. It suits social science, digital humanities and applied NLP work, where purely unsupervised topics are often too generic to match research categories. Do not use it when you have no domain knowledge (plain LDA is the simpler choice), when you have enough labeled data to train a supervised classifier, when the corpus is too small (fewer than a few hundred documents) for reliable topic inference, or when texts are very short, since sparse word co-occurrence degrades these models.
Limitations and considerations
- Topic quality depends on seed quality: seeds that are ambiguous or that appear across several topics pull topics toward the wrong region of the vocabulary.
- The number of topics K must still be chosen by the analyst; the priors guide what the topics contain but do not determine how many there should be.
- When abundant labeled data are available, a supervised text classifier will usually outperform topic-based prediction.
- Scalability depends on the inference backend: the variational or Gibbs procedures used for LDA can be slow on very large corpora unless they are parallelised or approximated.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Aligns topics with predefined categories without requiring fully labeled data, since only seed words or a few labeled examples are needed.
- Uses unlabeled documents for word co-occurrence statistics, so the sparse supervision is combined with the rest of the corpus rather than replacing it.
- Produces topics that are easier to relate to a research question than those of unsupervised LDA when the seeds are well chosen.
- Supervision can take several forms (seed words, labeled documents, or must-link and cannot-link constraints), so the input can match what the analyst actually knows.
- Inference uses the same variational or Gibbs machinery as standard LDA, so the computational backend belongs to a family that is already well studied.
Applications
- Guided thematic analysis of corpora such as social media or news, where topics should map onto predefined research categories.
- Credit attribution in multi-labeled documents, the setting Labeled LDA was designed for.
- Policy and political science research in which topics must correspond to known discourse categories.
- Digital humanities corpus exploration organised around thematic frameworks defined by domain experts.
How it works
How it works
The analyst defines a small set of seed words or labeled documents for each desired topic. In Labeled LDA, each label corresponds to one topic; in seeded variants, seed words act as soft guidance rather than hard assignments. Guidance is kept sparse, typically 5 to 20 distinctive seed words per topic, so the model can still learn word associations from the data.
The seed knowledge is encoded in the model's priors. In Labeled LDA, each document's topic distribution is restricted to the topics matching its labels. In Dirichlet forest variants, domain knowledge is encoded as must-link and cannot-link word constraints through a Dirichlet forest prior over word distributions, so linked words are pushed toward the same or different topics.
Given these priors, the topic-word and document-topic distributions are estimated with variational inference or collapsed Gibbs sampling, the same families of algorithms used for standard LDA. In Labeled LDA, the label constraint limits the topics a document's tokens can be assigned to during estimation. Unlabeled documents still contribute word co-occurrence information, while the priors keep the learned topics aligned with the seed guidance. Results depend on the sampler, the number of iterations and convergence settings, so check that topics are stable across runs.
Each token is probabilistically assigned to a topic under the fitted model. Because the priors steer the model, the topics are usually easier to interpret than those of unconstrained LDA, although this depends on the quality of the seeds. Each document receives a topic proportion vector showing how strongly each guided theme figures in it.
Topic quality is commonly assessed with coherence metrics such as NPMI or C_v, computed over each topic's top words against a reference corpus. Alignment between topics and intended seed categories is checked by reading the top words and sample documents. Downstream performance, such as classification accuracy when topic proportions are used as features, gives an extrinsic check.
Common pitfalls
- Using seed words that are generic (for example 'good' or 'important'); seeds should be distinctive to the target topic.
- Setting K too low, which merges semantically distinct themes into a single topic.
- Judging topic quality only by reading top words, without a coherence score computed against a reference corpus.
- Ignoring document length: very short texts such as tweets or titles give sparse co-occurrence data and are poorly served by standard LDA-based variants.
- Treating document-topic proportions as hard labels rather than soft mixtures; a single document can carry several guided themes.
Frequently asked questions
How many seed words per topic are needed?
Typically 5 to 20 distinctive, domain-specific seed words per topic is a reasonable starting range. Seeds should be specific to their topic; overlapping or vague seeds across topics are the main cause of confusion, so distinctiveness matters more than the exact count.
How does this differ from plain LDA?
Plain LDA discovers topics entirely from word co-occurrence with no human input. Semi-supervised topic modeling anchors some or all topics to user-provided seeds or labels, making topics interpretable by design rather than by post-hoc inspection.
Can I use this with short texts like tweets?
Standard LDA-based variants struggle with very short texts due to sparse word co-occurrence. For short-text corpora, biterm topic models or neural topic models with pre-trained embeddings are better choices.
How do I choose the number of topics K?
One option is to set K equal to the number of predefined categories plus a small number of extra 'background' topics to absorb off-topic content. Background topics can absorb off-topic text, but they may also mask weak seeds, so inspect their top words before settling on K. Coherence metrics computed across a range of K values can guide the final choice.
Are there neural alternatives?
Yes. Neural topic models such as CTM (Contextualized Topic Models) use pre-trained contextual embeddings. Some neural topic models can incorporate prior knowledge or seed information, depending on the implementation; check the specific model's paper before relying on this. They belong to a different model family, so their coherence and alignment should be compared with the probabilistic variants on your own corpus rather than assumed to be better.
Related methods
Sources
Ramage, D., Hall, D., Nallapati, R., & Manning, C. D. (2009). Labeled LDA: A supervised topic model for credit attribution in multi-labeled corpora. Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing, 248–256. Association for Computational Linguistics.
Open publication referenceAndrzejewski, D., Zhu, X., & Craven, M. (2009). Incorporating domain knowledge into topic modeling via Dirichlet forest priors. Proceedings of the 26th Annual International Conference on Machine Learning (ICML), 25–32.
Open publication reference