- Introduced by
- Lee, D. D. & Seung, H. S. (NMF base); domain adaptation extensions by the NLP community
- Year
- 1999 (NMF); domain adaptation variants ~2010s
- Type
- Unsupervised topic model with domain adaptation
- Family
- Deep learning / NLP / CV
What does it do?
Domain-adaptive NMF topic modeling applies Non-negative Matrix Factorization (NMF) to text from several domains to find latent topics.
It uses a regularization term or shared basis constraints to carry topic structure from a source domain with more data to a target domain with less. Because the factors stay non-negative, the resulting topics can be read as additive word weightings, but how consistent the adapted topics are across domains depends on the shared vocabulary and on how the adaptation term is set.
The intuition behind the method
NMF factorizes a non-negative term-by-document matrix V into two non-negative factors, W (term-topic weights) and H (topic-document weights), so that V ≈ WH. Each column of W is a topic expressed as a weighted set of words, and each column of H gives the topic mixture of one document. In a domain-adaptive setting, the basis W learned from a data-rich source corpus is used to initialize or constrain the factorization of a sparser target corpus, so that target topics stay anchored to source word patterns. Because the factors are non-negative and additive, the transferred topics keep word distributions that a reader can inspect directly. The trade-off is that the transfer is only as useful as the vocabulary the two domains share.
History
The base factorization comes from Lee and Seung's 1999 Nature paper, "Learning the parts of objects by non-negative matrix factorization", which is the primary reference for NMF itself. Its use for topic modeling of text applies the same factorization to term-by-document data and is not tied to one originating publication. Domain-adaptive variants, usually described as regularization, pivot-feature or shared-basis extensions, likewise have no single originating reference. Identify and cite the primary paper for the specific variant before using it.
When to use it
Use domain-adaptive NMF when you need interpretable topics for a target corpus that is too small to factorize reliably on its own, and a related source corpus with more data is available. It suits work where word-level topic readings are the main output and an opaque model would be hard to justify, as in social science, digital humanities and NLP studies. Do not use it when the two domains are semantically distant with little shared vocabulary, since the transfer then has nothing to act on. It is also a poor choice when the target corpus is large enough for standalone NMF or LDA, when a dense-embedding topic method fits the task better, or when the question needs probabilistic topic proportions with full Bayesian uncertainty rather than point estimates.
Limitations and considerations
- Requires a meaningful shared vocabulary between source and target domains; very distant domains yield poor transfer.
- The number of topics k must be chosen manually; neither domain adaptation nor NMF itself provides an automatic criterion.
- The non-negative, additive decomposition can under-represent rare or highly specific target-domain terms.
- Sensitive to initialization: different seeds or anchor-word choices can yield different topic solutions.
- The strength of the adaptation term is an extra setting. Too strong a transfer suppresses target-specific topics, and too weak a transfer reduces the model to ordinary NMF on the target corpus.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Non-negative, additive factors give topic-word distributions that can be read directly as weighted word lists.
- Source-domain factors can stabilize topics in a target corpus that is too small to factorize reliably alone.
- Adaptation needs no labeled target documents, since the target corpus is used unlabeled.
- A shared vocabulary gives the alignment step a common basis for matching source and target topics.
Applications
- Cross-domain sentiment topic discovery (e.g., product reviews adapted to social media posts).
- Biomedical literature mining where a general scientific corpus supplements a small clinical text collection.
- News topic tracking across outlets with different editorial vocabularies.
- Digital humanities studies where historical corpus topics are adapted to contemporary language.
- Multilingual topic modeling when a pivot language with rich resources seeds topic bases for a low-resource language.
- Adaptive document clustering for information retrieval across heterogeneous text collections.
How it works
How it works
Separate term-by-document matrices (the transposes of document-term matrices) are built for the source and target corpora over a shared vocabulary, with terms as rows and documents as columns. TF-IDF is the recommended default weighting. Raw counts can be used when there is a stated reason, but they let high-frequency words dominate the topics. Low-frequency words and stop words are removed. A joint or coupled matrix can be assembled so that both domains are factorized together.
Topic bases are initialized from source-domain data, either by running standard NMF on the source corpus first or by using anchor-word methods that identify words characteristic of a single topic. These anchors give the target-domain factorization stable starting points.
NMF solves for non-negative W and H in V ≈ WH by minimizing a reconstruction loss, commonly the Frobenius norm or the Kullback-Leibler divergence. Multiplicative update rules or projected gradient descent iteratively refine W and H while keeping all entries non-negative. Because the objective is not convex in W and H jointly, the solution depends on the starting point and is a local optimum.
Formula
V \approx W H, \quad W, H \geq 0
A domain-adaptation term is added to the reconstruction objective. Common choices are a W shared across domains with only H domain-specific, or pivot-word regularization. The term penalizes large divergence between source and target topic-word distributions, and its strength controls how much source structure the target topics inherit.
After factorization, source and target topics are matched by comparing their word distributions with cosine similarity or Hungarian matching. Misaligned or spurious target topics are pruned or re-initialized. The final topic set is meant to balance cross-domain consistency with target-domain specificity.
Common pitfalls
- Choosing k without coherence evaluation (e.g., NPMI or topic coherence score) leads to over-split or merged topics.
- Ignoring vocabulary mismatch between domains and using a source-only vocabulary that omits key target-domain terms.
- Trusting topic labels without human validation; NMF labels should always be reviewed by domain experts.
- Reporting only reconstruction loss and not downstream coherence or task performance metrics.
- Using raw term frequency without any normalization, which lets high-frequency words dominate all topics.
Frequently asked questions
How is this different from simply running NMF on the combined source and target corpora?
Pooling corpora ignores domain shift and can let source-domain patterns dominate, suppressing target-domain nuances. Domain-adaptive NMF controls how much source knowledge is transferred through its regularization, so the target corpus can shape its own topic proportions while still benefiting from source-derived word bases.
How do I choose the number of topics k?
A practical starting point is to train models across a range of k, for example 5 to 50. This range is a heuristic starting point, not a recommendation, because the suitable range depends on corpus size. Select the value that maximizes topic coherence (NPMI or CV coherence) on a held-out subset of the target corpus, then check by inspection that the topics remain semantically distinct.
Is domain-adaptive NMF better than domain-adaptive LDA?
Neither is universally better. NMF produces non-negative, additive factors whose word weights can be read directly, which is why it is often preferred when interpretability is the priority. LDA provides a full probabilistic generative model with posterior uncertainty, so LDA-based adaptation is more natural when uncertainty quantification or Bayesian downstream analysis matters. Their relative speed depends on implementation and corpus size.
What if the source and target domains share very little vocabulary?
When the two domains share little vocabulary, transfer through shared words is weak. Pivot-word regularization, which uses words common to both domains as bridges, is the usual way to strengthen transfer in that case. Two checks help. First, measure the proportion of target-corpus vocabulary that also appears in the source vocabulary. Second, compare topic coherence on a held-out target sample with and without adaptation, and keep adaptation only if coherence improves and the topics remain specific to the target. No published threshold for acceptable overlap is established, so these comparisons should decide the question for a given pair of corpora. If overlap is very low, a neural domain-adaptation approach may fit better.
Do I need labeled data in the target domain?
No. Domain-adaptive NMF is fully unsupervised in the target domain: it adapts topic structure using the unlabeled target corpus. Labeled target data can optionally be used to guide topic alignment or evaluate topic quality, but is not required.
Related methods
Sources
Lee, D. D., & Seung, H. S. (1999). Learning the parts of objects by non-negative matrix factorization. Nature, 401(6755), 788–791.
Open DOI referenceNon-negative matrix factorization. Wikipedia.
Open publication reference