[Paper Review] Memory-Efficient Topic Modeling
This paper proposes Tiny Belief Propagation (TBP), a memory-efficient algorithm for training Latent Dirichlet Allocation (LDA) by integrating message passing with non-negative matrix factorization (NMF) to eliminate the need to store previous messages. TBP achieves state-of-the-art topic modeling accuracy with significantly reduced memory usage, enabling LDA on massive corpora—such as 7 GB of PubMed data—on standard desktops with only 2 GB RAM.
As one of the simplest probabilistic topic modeling techniques, latent Dirichlet allocation (LDA) has found many important applications in text mining, computer vision and computational biology. Recent training algorithms for LDA can be interpreted within a unified message passing framework. However, message passing requires storing previous messages with a large amount of memory space, increasing linearly with the number of documents or the number of topics. Therefore, the high memory usage is often a major problem for topic modeling of massive corpora containing a large number of topics. To reduce the space complexity, we propose a novel algorithm without storing previous messages for training LDA: tiny belief propagation (TBP). The basic idea of TBP relates the message passing algorithms with the non-negative matrix factorization (NMF) algorithms, which absorb the message updating into the message passing process, and thus avoid storing previous messages. Experimental results on four large data sets confirm that TBP performs comparably well or even better than current state-of-the-art training algorithms for LDA but with a much less memory consumption. TBP can do topic modeling when massive corpora cannot fit in the computer memory, for example, extracting thematic topics from 7 GB PUBMED corpora on a common desktop computer with 2GB memory.
Motivation & Objective
- Address the high memory consumption of traditional message-passing algorithms in LDA, which scales linearly with the number of documents or topics.
- Overcome the limitation of running LDA on massive corpora that exceed main memory capacity, especially on standard desktop systems.
- Develop a training algorithm that maintains high topic modeling accuracy while drastically reducing memory usage compared to existing methods like VB, GS, and BP.
- Enable topic modeling on large-scale data such as 7 GB PubMed corpus using only 2 GB of RAM on a standard desktop computer.
- Demonstrate that the proposed method can be extended via block optimization to handle data that do not fit in memory.
Proposed method
- Reformulate message passing in LDA as a non-negative matrix factorization (NMF) process, absorbing message updates directly into the passing mechanism to avoid storing previous messages.
- Use multiplicative update rules from NMF (Lee & Seung, 2001) to iteratively optimize topic distributions and document-topic proportions without maintaining historical message states.
- Minimize the Kullback-Leibler (KL) divergence between the approximate and true posterior distributions, aligning with the perplexity metric used in LDA evaluation.
- Introduce two variants: aTBP (adaptive update with division) and sTBP (simplified update without division), both designed to reduce computational overhead.
- Apply block optimization to extend TBP to data sets larger than main memory, enabling processing of the full 7 GB PubMed corpus on a 2 GB RAM machine.
- Formulate the training objective as minimizing perplexity via KL divergence minimization, directly optimizing for a widely used evaluation metric in topic modeling.
Experimental results
Research questions
- RQ1Can message passing in LDA be restructured to eliminate the need for storing previous messages, thereby reducing memory complexity?
- RQ2How does the integration of NMF principles into belief propagation affect the accuracy and convergence of topic modeling?
- RQ3To what extent can TBP reduce memory usage while maintaining or improving topic modeling performance compared to VB, GS, and BP?
- RQ4Can TBP effectively process massive corpora—such as 7 GB of PubMed data—on standard desktop hardware with only 2 GB of RAM?
- RQ5How does TBP compare in training speed and perplexity to state-of-the-art online algorithms like OVB when applied to large-scale data?
Key findings
- TBP achieves comparable or better topic modeling accuracy than VB, GS, and BP, with significantly reduced memory usage, enabling LDA on massive corpora that exceed main memory capacity.
- On the 7 GB PubMed corpus with 10 topics, TBP successfully extracted topics using only 2 GB of RAM on a standard desktop computer, a task infeasible for conventional LDA training algorithms.
- TBP converges faster than OVB, an online topic modeling algorithm, and achieves lower predictive perplexity due to direct optimization of the KL divergence metric.
- The sTBP variant is slightly faster than aTBP due to the absence of division operations at each iteration, while aTBP achieves marginally lower perplexity due to more aggressive matrix updates.
- Extensive experiments confirm that TBP maintains high topic quality, with top-10 word lists across topics being highly consistent with those from VB, GS, and BP, indicating meaningful thematic structure.
- The proposed method demonstrates that NMF-based optimization can be effectively applied to LDA training, suggesting broader applicability of NMF-inspired algorithms to complex topic models.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.