[Paper Review] LightLDA: Big Topic Models on Modest Compute Clusters
LightLDA enables training of massive topic models with 1 million topics and 1 million vocabulary words (1 trillion parameters) on just 8 standard machines, using a novel O(1) Metropolis-Hastings sampler, structure-aware model parallelism, and a differential data structure. It achieves state-of-the-art convergence speed and memory efficiency, reducing training time from 180 hours (8 machines) to 60 hours (24 machines), making trillion-parameter models feasible on modest clusters.
When building large-scale machine learning (ML) programs, such as big topic models or deep neural nets, one usually assumes such tasks can only be attempted with industrial-sized clusters with thousands of nodes, which are out of reach for most practitioners or academic researchers. We consider this challenge in the context of topic modeling on web-scale corpora, and show that with a modest cluster of as few as 8 machines, we can train a topic model with 1 million topics and a 1-million-word vocabulary (for a total of 1 trillion parameters), on a document collection with 200 billion tokens -- a scale not yet reported even with thousands of machines. Our major contributions include: 1) a new, highly efficient O(1) Metropolis-Hastings sampling algorithm, whose running cost is (surprisingly) agnostic of model size, and empirically converges nearly an order of magnitude faster than current state-of-the-art Gibbs samplers; 2) a structure-aware model-parallel scheme, which leverages dependencies within the topic model, yielding a sampling strategy that is frugal on machine memory and network communication; 3) a differential data-structure for model storage, which uses separate data structures for high- and low-frequency words to allow extremely large models to fit in memory, while maintaining high inference speed; and 4) a bounded asynchronous data-parallel scheme, which allows efficient distributed processing of massive data via a parameter server. Our distribution strategy is an instance of the model-and-data-parallel programming model underlying the Petuum framework for general distributed ML, and was implemented on top of the Petuum open-source system. We provide experimental evidence showing how this development puts massive models within reach on a small cluster while still enjoying proportional time cost reductions with increasing cluster size, in comparison with alternative options.
Motivation & Objective
- To enable training of massive topic models with trillions of parameters on modest compute clusters instead of industrial-scale clusters.
- To overcome the high cost and inaccessibility of large-scale ML systems for most researchers and practitioners.
- To achieve high convergence speed and memory efficiency in distributed LDA inference without sacrificing model quality.
- To demonstrate that efficient algorithmic design and system optimization can make big models accessible on small clusters.
Proposed method
- Proposes an O(1) amortized Metropolis-Hastings sampling algorithm with carefully designed proposals, independent of model size and achieving faster convergence than Gibbs samplers.
- Employs structure-aware model-parallelism that exploits dependencies in topic models to minimize memory and communication overhead.
- Introduces a differential data structure that separates high- and low-frequency words for optimal memory usage and high inference speed.
- Uses a bounded asynchronous data-parallel scheme via a parameter server to enable efficient distributed processing of massive data.
- Implements the system on the Petuum framework, leveraging its model-and-data-parallel programming model for general distributed ML.
- Combines cycle proposals alternating between document and word proposals to improve model space exploration and balance document and vocabulary representation.
Experimental results
Research questions
- RQ1Can a topic model with 1 trillion parameters be trained efficiently on a cluster of only 8 machines?
- RQ2Can an O(1) Metropolis-Hastings sampler outperform state-of-the-art Gibbs samplers in convergence speed and memory efficiency?
- RQ3How can model-parallelism be designed to minimize communication and memory usage in large-scale topic models?
- RQ4Can a hybrid data structure for high- and low-frequency words maintain high performance while enabling in-memory storage of massive models?
- RQ5Does bounded asynchronous data parallelism allow proportional speedup with increasing cluster size while maintaining convergence?
Key findings
- LightLDA trained a 1M-topic, 1M-vocabulary LDA model (1 trillion parameters) on 200 billion tokens using only 8 machines, completing in 180 hours.
- The system achieved a throughput of 50 million documents (200 tokens each) per hour per 20-core machine, outperforming prior systems.
- LightLDA's O(1) Metropolis-Hastings sampler converged nearly an order of magnitude faster in real time than state-of-the-art Gibbs samplers.
- The cycle proposal in LightLDA achieved nearly the same model quality as SparseLDA (gold standard) while being significantly faster.
- Training time scaled proportionally with cluster size, dropping from 180 hours (8 machines) to 60 hours (24 machines).
- The differential data structure enabled the model to fit in memory while maintaining high inference speed, avoiding the performance penalty of homogeneous structures.
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.