[Paper Review] Streaming Gibbs Sampling for LDA Model
This paper proposes Streaming Gibbs Sampling (SGS), an online extension of collapsed Gibbs sampling for Latent Dirichlet Allocation (LDA), which achieves perplexity close to batch CGS while maintaining low computational overhead. With weight decay, SGS outperforms streaming variational Bayes (SVB) and enables scalable distributed inference via sparse communication, significantly improving upon prior online Monte Carlo methods for LDA.
Streaming variational Bayes (SVB) is successful in learning LDA models in an online manner. However previous attempts toward developing online Monte-Carlo methods for LDA have little success, often by having much worse perplexity than their batch counterparts. We present a streaming Gibbs sampling (SGS) method, an online extension of the collapsed Gibbs sampling (CGS). Our empirical study shows that SGS can reach similar perplexity as CGS, much better than SVB. Our distributed version of SGS, DSGS, is much more scalable than SVB mainly because the updates' communication complexity is small.
Motivation & Objective
- To address the lack of effective online Monte Carlo methods for LDA, which previously underperformed compared to batch methods like collapsed Gibbs sampling (CGS).
- To develop a streaming Gibbs sampling (SGS) algorithm that extends CGS to online learning while preserving high inference quality.
- To design a distributed version, DSGS, that leverages sparsity for low communication bandwidth and high scalability on large-scale datasets.
- To empirically validate that SGS achieves perplexity comparable to batch CGS and surpasses SVB in performance.
- To enable real-time model updates with consistent learning quality over time, even as new data arrives incrementally.
Proposed method
- SGS extends collapsed Gibbs sampling by maintaining sufficient statistics (topic-word and topic-document counts) and updating them incrementally as new mini-batches arrive.
- The algorithm uses a decay factor on historical counts to balance prior knowledge and new data, improving long-term inference stability.
- Topic assignments are sampled using the standard CGS conditional probability: $ p(z_{di}=k|\bm{Z}^{-di},\bm{W}) \propto (N_{kd}^{-di} + \alpha) \frac{N_{kv_{di}}^{-di} + \beta}{N_k^{-di} + V\beta} $.
- The method exploits sparsity in word-topic and document-topic counts to reduce computational and communication costs, especially in distributed settings.
- DSGS distributes the sampling process across multiple nodes, where each node maintains local sufficient statistics and communicates only sparse updates to reduce bandwidth.
- Weight decay is applied to historical counts to prevent overfitting to early data and improve generalization over time.
Experimental results
Research questions
- RQ1Can an online Monte Carlo method for LDA achieve perplexity close to that of batch collapsed Gibbs sampling?
- RQ2How does the inclusion of a decay factor affect the performance and stability of online Gibbs sampling in LDA?
- RQ3Can a distributed version of streaming Gibbs sampling maintain high inference quality while scaling efficiently on large datasets?
- RQ4How does the computational efficiency of SGS compare to streaming variational Bayes (SVB) and batch CGS?
- RQ5Does the learning process of SGS show consistent improvement over time, even with incremental data arrival?
Key findings
- With an optimal decay factor of 0.7, SGS achieves a perplexity of 4640 on the NYT dataset, close to the batch CGS perplexity of 4300, significantly outperforming SVB’s 6511.
- The non-decayed SGS version still outperforms SVB, with a perplexity of 5240 on the NYT dataset, indicating inherent advantages over variational methods.
- SGS converges faster than SVB per mini-batch and maintains better initial performance, showing superior learning dynamics.
- DSGS achieves higher throughput than SVB—especially on large datasets like PubMed—due to sparse communication, enabling better scalability.
- Perplexity of DSGS remains stable or slightly degrades with more cores, but consistently outperforms SVB across all configurations on both NYT and PubMed datasets.
- The learning process of SGS shows consistent improvement over time, with testing perplexity decreasing steadily across mini-batches, unlike the initial overfitting bursts seen in SVB.
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.