Abstract
This paper presents APS-LDA, a distributed topic modeling framework that scales Latent Dirichlet Allocation (LDA) to massive datasets by integrating an asynchronous parameter server with Apache Spark. By decoupling model synchronization from task scheduling, APS-LDA overcomes the limitations of the map-reduce paradigm, enabling the training of a 1,000-topic model on a 27-terabyte Web corpus—a 135× increase in data scale over standard Spark implementations—without compromising model quality.
Introduction
Topic models like Latent Dirichlet Allocation (LDA) are essential for uncovering latent themes in large-scale text corpora. However, scaling these models to Web-scale datasets presents significant challenges. Traditional distributed LDA approaches often require specialized hardware or custom network protocols, making them difficult to integrate into standard data processing pipelines. Conversely, default implementations in frameworks like Apache Spark are limited by the map-reduce paradigm, which struggles with the massive, mutable state required for topic modeling, often failing on datasets exceeding 200GB due to shuffle write limits.
System Architecture
To address these scalability issues, the authors developed APS-LDA (Asynchronous Parameter Server LDA). The core of the system is Glint, an open-source asynchronous parameter server designed to work seamlessly with Spark.
Glint decouples task scheduling from parameter management. While Spark handles data partitioning, fault tolerance, and task execution, Glint manages the high-frequency, mutable state synchronization. It provides two primary operations:
- Asynchronous Pull: Retrieves model parameters with an exponential back-off retry mechanism for reliability.
- Asynchronous Push: Updates parameters using a hand-shaking protocol with unique transaction IDs to ensure "exactly-once" delivery.
By exploiting the commutative and associative nature of LDA updates (simple increments/decrements), Glint uses atomic integers to avoid complex distributed locking, significantly improving performance.
Experimental Evaluation
The system was evaluated using the ClueWeb12 dataset, a 27-terabyte Web crawl containing 733 million documents. Benchmarking was performed on smaller subsets (50GB to 200GB) to compare APS-LDA against Spark MLlib's EM and Online LDA algorithms.
Key Results
APS-LDA demonstrated superior scalability and performance compared to standard Spark implementations. While baseline algorithms crashed on datasets larger than 200GB, APS-LDA scaled to the full 27TB corpus, training a 1,000-topic model in approximately 80 hours on a 30-node cluster.
As shown in the evaluation, APS-LDA maintains model quality (perplexity) comparable to existing algorithms while offering significantly faster runtimes. The asynchronous nature of the updates allows workers to see global model changes within the same iteration, reducing "staleness" and accelerating convergence.
Conclusion
APS-LDA successfully bridges the gap between high-performance parameter servers and general-purpose data processing frameworks. By decoupling state management from task scheduling and leveraging asynchronous updates, it enables topic modeling at a scale previously unattainable in Spark. Future work includes implementing sparse data representations to further reduce memory and network overhead, as well as extending the architecture to other large-scale machine learning tasks like factorization machines and deep learning.
Summary updated