Abstract
Traditional topic models, such as Latent Dirichlet Allocation (LDA) and Non-negative Matrix Factorization (NMF), operate within "document-space," assuming topics are patterns of words co-occurring within predefined document boundaries. This dependency makes models sensitive to data formatting and document length. This paper introduces a "term-space" approach that utilizes word embeddings and matrix factorization to extract topics based on term similarities rather than document occurrences. Our evaluation across Swedish and English datasets demonstrates that term-space models provide superior precision, higher coherence, and better alignment with human-annotated "gold standards."
Introduction
Standard topic modelling techniques are often constrained by the "document" unit. In real-world scenarios, text data frequently arrives as continuous streams or in batches where document boundaries are arbitrary or non-existent. When documents are poorly defined, the performance of traditional models suffers. We argue that topical relationships are more effectively modeled by examining direct term-to-term interactions across a broad context, moving the modeling process entirely into term-space.
Methodology
The proposed term-space pipeline consists of three primary stages:
- Topical Word Embeddings: Word embeddings are generated using an expansive context window of 50 tokens. This wide window ensures that the embeddings capture thematic associations (topicality) rather than narrow local semantics. Four embedding methods were evaluated: Co-occurrence matrices (COOC), Random Indexing (RI), Word2Vec (W2V), and Doc2Vec (D2V).
- Similarity Space Construction: A pairwise similarity matrix is computed for all terms within the embedding space. To optimize computational efficiency and reduce noise, the matrix is pruned by removing low-similarity entries, resulting in a sparse representation.
- Factorization: Latent topics are extracted from the term-similarity matrix using standard factorization techniques, including Singular Value Decomposition (SVD), NMF, and Dictionary Learning (DL).
Experimental Setup
The methodology was tested on two distinct data sources:
- Swedish News: 895 articles manually annotated with 34 main topics by experts, providing a high-quality "truth" baseline.
- English Wikipedia: Four subsets (Small, Medium, Large, and a 100k general set) were used to evaluate scalability and robustness across varying topic sizes.
Results and Discussion
Coherence and Human Alignment
Term-space models consistently outperformed document-space baselines in semantic coherence. On the English Wikipedia dataset, the D2V+NMF model achieved a UCI coherence score of 185.88, significantly higher than the 58.55 achieved by LDA.
Furthermore, term-space models showed superior alignment with human judgment. In the Swedish News task, the Random Indexing (RI) approach reached a "Truth" score of 0.34, compared to 0.19 for LDA, indicating that term-space topics are more representative of expert-defined categories.
Precision and Robustness
Unlike document-based models that often prioritize "coverage" (accounting for every word), term-space models are more selective. This results in distinct, unique term lists for each topic with minimal overlap. Additionally, these models remain robust when identifying "small" topics that appear in few documents—a scenario where traditional models typically struggle to find a clear signal.
Computational Efficiency
The choice of factorization technique impacts performance. SVD emerged as the most efficient method, often completing tasks significantly faster than NMF or Dictionary Learning while maintaining competitive results.
Conclusion
Shifting topic modelling from document-space to term-space addresses the inherent limitations of document-dependent models. By focusing on term similarities within a broad topical window, these models achieve higher precision and better human alignment. For general applications, the authors recommend a baseline configuration of Word2Vec representations combined with NMF factorization. Future work will explore the application of these methods to complex multi-topic document decomposition.
Summary updated