Abstract
Current topic models often suffer from discovering topics not matching human intuition, unnatural switching of topics within documents and high computational demands. We address these concerns by proposing a topic model and an inference algorithm based on automatically identifying characteristic keywords for topics. Keywords influence topic-assignments of nearby words. Our algorithm learns (key)word-topic scores and it self-regulates the number of topics. Inference is simple and easily parallelizable. Qualitative analysis yields comparable results to state-of-the-art models (eg. LDA), but with different strengths and weaknesses. Quantitative analysis using 9 datasets shows gains in terms of classification accuracy, PMI score, computational performance and consistency of topic assignments within documents, while most often using less topics.
Introduction
Traditional topic models, such as Latent Dirichlet Allocation (LDA), typically rely on the "bag-of-words" assumption, which treats documents as unordered sets of terms. This approach introduces several practical limitations:
- Topic Jitter: Consecutive words are often assigned different topics, leading to thematic inconsistency that feels unnatural to human readers.
- The "Common Word" Trap: Generative models often prioritize high-frequency words that may not be characteristic of a specific topic.
- The K Problem: Users must pre-specify the number of topics ($K$), risking overfitting if $K$ is too high or losing granularity if it is too low.
- Computational Complexity: Standard inference methods like Gibbs sampling are computationally expensive and difficult to parallelize effectively.
Methodology: The Topic Keyword Model (TKM)
The Topic Keyword Model (TKM) addresses these issues by shifting from generative probabilities to characteristic keyword scores.
Keyword Scoring and Context
Instead of asking how likely a word is to be generated by a topic, TKM calculates a score $f(w, t)$ reflecting how characteristic a word is of a topic. This score combines frequency with a concentration measure based on inverse entropy, ensuring that "anchor" words—those appearing frequently in one topic but rarely in others—receive higher weights. To ensure spatial consistency, TKM employs a sliding window. High-scoring keywords "pull" neighboring words into the same topic, significantly reducing topic jitter.
Self-Regulation and Efficient Inference
TKM features an automatic pruning mechanism. Starting with an upper bound of topics, the model uses symmetrized Kullback–Leibler (SKL) divergence to identify and remove redundant topics during learning. This allows the model to "self-regulate" its complexity.
The resulting EM-like inference algorithm is simpler than Gibbs sampling and highly parallelizable, offering substantial performance gains.
Evaluation and Results
The model was rigorously tested against eight diverse datasets, including news (20Newsgroups), reviews (BookReviews), and medical abstracts (Ohsumed).
Quantitative Performance
TKM demonstrated superior performance across several key metrics. It achieved a 2x to 30x speedup in training and inference compared to models like BTM and WNTM. Furthermore, TKM consistently outperformed competitors on the Pointwise Mutual Information (PMI) score, a standard metric for topic coherence.
Qualitative Insights
Qualitative analysis revealed that TKM identifies more specific and meaningful top words (e.g., "BMW," "HIV," "GIF") compared to the more generic terms often surfaced by LDA. The Topic Change (ToC) metric confirmed that TKM produces much more stable topic assignments within documents, matching human intuition for thematic "stickiness."
Conclusion
TKM provides a robust alternative to traditional topic models by leveraging local context and keyword distinctiveness. While it faces challenges with datasets featuring highly overlapping vocabularies (like medical abstracts), its speed, coherence, and self-regulating nature make it a powerful tool for large-scale text analysis. Future work may explore integrating word embeddings to further refine contextual understanding.
Summary updated