[论文解读] LightLDA: Big Topic Models on Modest Compute Clusters
LightLDA 使得在仅 8 台标准机器上训练包含 100 万个主题和 100 万个词典词汇(1 万亿参数)的大型主题模型成为可能,其采用了一种新型的 O(1) Metropolis-Hastings 采样器、面向结构的模型并行化方法以及一种差异性数据结构。该方法实现了最先进的收敛速度与内存效率,将训练时间从 180 小时(8 台机器)缩短至 60 小时(24 台机器),使在普通计算集群上运行万亿参数模型成为可能。
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.
研究动机与目标
- 在普通计算集群上而非工业级集群上,实现对包含万亿参数的大型主题模型的训练。
- 克服大规模机器学习系统对大多数研究人员和实践者而言成本过高且难以访问的问题。
- 在不牺牲模型质量的前提下,实现分布式 LDA 推断的高收敛速度与内存效率。
- 证明高效的算法设计与系统优化能够使大型模型在小型集群上变得可行。
提出的方法
- 提出一种经过精心设计的、与模型规模无关的 O(1) 均摊 Metropolis-Hastings 采样算法,其收敛速度优于 Gibbs 采样器。
- 采用面向结构的模型并行化方法,利用主题模型中的依赖关系,最大限度减少内存和通信开销。
- 引入一种差异性数据结构,将高频词与低频词分离,以实现最优的内存使用和高推理速度。
- 通过参数服务器实现有界异步数据并行方案,以高效处理大规模数据的分布式计算。
- 在 Petuum 框架上实现系统,利用其模型与数据并行的编程模型,支持通用的分布式机器学习。
- 结合在文档与词之间交替的循环提议策略,以改善模型空间探索,并平衡文档与词汇的表征。
实验结果
研究问题
- RQ1能否在仅 8 台机器的集群上高效训练出参数量达 1 万亿的主题模型?
- RQ2O(1) Metropolis-Hastings 采样器是否能在收敛速度与内存效率方面超越最先进的 Gibbs 采样器?
- RQ3如何设计模型并行化方法,以在大规模主题模型中最小化通信与内存使用?
- RQ4针对高频与低频词的混合数据结构能否在保持高性能的同时,实现大规模模型的内存存储?
- RQ5有界异步数据并行化是否能在集群规模增加时实现成比例的加速,同时保持收敛性?
主要发现
- LightLDA 在仅 8 台机器上训练了一个 100 万主题、100 万个词典词汇的 LDA 模型(1 万亿参数),使用了 2000 亿个词元,耗时 180 小时。
- 系统在每台 20 核机器上实现了每小时处理 5000 万篇文档(每篇 200 个词元)的吞吐量,优于以往系统。
- LightLDA 的 O(1) Metropolis-Hastings 采样器在实际时间上比最先进的 Gibbs 采样器快近一个数量级。
- LightLDA 的循环提议策略在模型质量上几乎与 SparseLDA(黄金标准)相当,但速度显著更快。
- 训练时间随集群规模成比例缩短,从 8 台机器的 180 小时降至 24 台机器的 60 小时。
- 差异性数据结构使模型能够完全驻留内存,同时保持高推理速度,避免了同质结构带来的性能损失。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。