Computing Web-scale Topic Models using an Asynchronous Parameter Server

Rolf Jagerman, Carsten Eickhoff, Maarten de Rijke

Abstract

Training Latent Dirichlet Allocation (LDA) on massive, web-scale datasets is a significant challenge due to the limitations of standard map-reduce frameworks. This paper introduces APS-LDA, a distributed framework that integrates Apache Spark with Glint, a novel asynchronous parameter server. APS-LDA enables the training of massive topic models on tens of terabytes of data without sacrificing quality or requiring highly customized hardware.

Introduction

Latent Dirichlet Allocation (LDA) is a cornerstone algorithm for discovering themes in large text corpora. However, as datasets reach the terabyte scale, traditional inference algorithms struggle. Practitioners are often forced to choose between highly specialized, hard-to-deploy systems or standard cluster computing frameworks like Apache Spark, which often fail to scale for LDA due to the constraints of the map-reduce paradigm.

The Challenge of Scale

The primary bottleneck in scaling LDA on frameworks like Spark is the need for frequent, concurrent updates to a massive shared parameter space. Collapsed Gibbs sampling, a common inference method, requires workers to constantly synchronize word-topic and document-topic counts. In a standard Spark environment, this leads to massive shuffle overheads, timeouts, and crashes when datasets exceed a few hundred gigabytes.

The APS-LDA Framework

To bridge this gap, the authors developed APS-LDA (Asynchronous Parameter Server LDA). This system utilizes the efficient $O(1)$ Metropolis-Hastings sampling strategy from LightLDA but re-engineers the communication layer for a distributed environment.

The core of APS-LDA is Glint, an open-source asynchronous parameter server designed to work alongside Spark.

Architecture of the Glint parameter server integrated with Apache Spark.

Key features of this architecture include:

  • Decoupled Design: Spark manages data partitioning and task scheduling, while Glint handles the shared model parameters.
  • Asynchronous Communication: Workers pull global counts and push updates continuously, avoiding the "stale-synchronous" bottlenecks where machines wait for the slowest peer.
  • Lock-Free Updates: Since LDA updates are simple increments or decrements, they are commutative and associative. Glint uses atomic integers to aggregate these updates, bypassing slow locking mechanisms.
  • Fault Tolerance: The system employs exponential back-off for pulls and a custom hand-shaking protocol for pushes to ensure "exactly-once" delivery.

Experimental Setup

The system was evaluated on a 30-node cluster (480 CPU cores, 3.7TB RAM) using the ClueWeb12 dataset—a 27TB web crawl containing 733 million documents. Benchmarks were also performed on smaller subsets (50GB to 200GB) to compare against Spark’s built-in EM and Online LDA implementations.

Results and Discussion

APS-LDA demonstrated superior scalability and performance compared to standard Spark implementations.

Comparison of perplexity and runtime across different dataset sizes and topic counts (K).
  • Scalability: While standard Spark MLLib implementations failed on datasets larger than 200GB, APS-LDA scaled to the full 27TB ClueWeb12 corpus.
  • Efficiency: APS-LDA processed up to 135× more data and 10× more topics than standard implementations. It successfully trained a 1,000-topic model on 27TB of data in approximately 80 hours.
  • Model Quality: Despite the asynchronous nature of the updates, APS-LDA achieved model perplexity comparable to the slower synchronous algorithms, proving that speed does not come at the cost of accuracy.

Conclusion and Future Work

APS-LDA proves that by augmenting general-purpose cluster computing with an asynchronous parameter server, it is possible to perform web-scale machine learning within standard data pipelines. Future work includes exploring sparse data representations to further reduce memory and network overhead, and extending the Glint server to support other communication-heavy tasks like deep learning and factorization machines.

Summary updated

BibTeX
@inproceedings{jagerman2017computing,
  author = {Rolf Jagerman and Carsten Eickhoff and Maarten de Rijke},
  title = {{Computing Web-scale Topic Models using an Asynchronous Parameter Server}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2017},
  doi = {10.1145/3077136.3084135},
}
Figure