Abstract
In distributed machine learning (ML) applications, shared parameters are usually replicated among computing nodes to minimize network overhead. Therefore, a proper consistency model must be carefully chosen to ensure algorithmic correctness and provide high throughput. Existing consistency models used in general-purpose databases and modern distributed ML systems are either too loose to guarantee correctness or too strict, failing to fully exploit the computing power of distributed systems. Many ML algorithms are iterative convergent algorithms that are robust to a bounded amount of inconsistency. This property allows distributed ML to relax strict consistency models to improve system performance while theoretically guaranteeing algorithmic correctness. In this paper, we present several relaxed consistency models—CAP, VAP, and CVAP—for asynchronous parallel computation, theoretically prove their correctness, and evaluate them in the context of topic modeling.
Introduction: The Consistency Dilemma
Distributed machine learning relies on "Parameter Servers" to act as a central repository for model weights. To avoid massive network latency, worker nodes keep local copies (replicas) of these parameters. The fundamental challenge lies in consistency: how often should these replicas synchronize?
Historically, systems chose between two extremes:
- Strict Consistency (e.g., Bulk Synchronous Parallel): Every worker waits for all others to finish an iteration before proceeding. While mathematically safe, this creates "straggler" problems where the slowest node bottlenecks the entire cluster.
- Loose Consistency (e.g., Eventual Consistency): Workers update whenever they want. This is fast but provides no guarantee that the algorithm will converge to the correct answer; it might diverge into nonsense.
The authors aim to find the "sweet spot"—consistency models that are loose enough to be fast but strict enough to remain mathematically sound.
Proposed Consistency Models
The authors propose three relaxed consistency models for asynchronous parameter servers:
- Clock-bounded Asynchronous Parallel (CAP): Based on the idea of "staleness," it ensures no worker gets too far ahead of others in terms of iterations (clocks). If a worker is more than $s$ iterations ahead of the slowest worker, it is blocked.
- Value-bounded Asynchronous Parallel (VAP): Instead of counting iterations, this model bounds the magnitude of the difference between replicas. A worker can keep computing locally as long as its accumulated, unsynchronized updates do not exceed a threshold ($v_{thr}$).
- Clock-Value-bounded Asynchronous Parallel (CVAP): A hybrid model that enforces both clock and value bounds to provide the strongest guarantees for sensitive algorithms.
As illustrated above, the system distinguishes between updates visible to all workers and unsynchronized local updates. A worker is blocked when its current update exceeds the allowed bounds, and it can only proceed once the update is acknowledged and synchronized.
System Architecture and Implementation
The proposed models were implemented in Petuum PS, a custom parameter server written in C++ using ZeroMQ for communication. To minimize network traffic, the system employs a hierarchical caching strategy.
As shown in the architecture diagram, updates flow from individual Client Threads into a Thread Cache, then to a Process Cache, and finally to the Server. This multi-level approach allows for efficient local aggregation of updates before they are broadcast across the network, significantly reducing the frequency of global synchronization events.
Theoretical Analysis and Key Insights
A core contribution of this work is the theoretical proof that Stochastic Gradient Descent (SGD) still converges under the VAP model. The researchers treat system-level inconsistency as a form of bounded noise and demonstrate that the "regret" (a measure of cumulative error) remains manageable. This highlights a key insight: ML is robust to noise. Because iterative ML algorithms are inherently stochastic, system-level inconsistency can be treated exactly like algorithmic noise. As long as that noise is bounded by the consistency model, the mathematical convergence remains intact.
Empirical Evaluation
The researchers evaluated their implementation using the 20News dataset, a standard text dataset for topic modeling containing 11,269 documents and 1.3 million tokens. Using Latent Dirichlet Allocation (LDA), the system demonstrated:
- Scalability: The "weak VAP" model achieved near-linear speedup as the number of cores increased from 8 to 32 across a distributed cluster.
- Throughput: By avoiding global barriers (unlike BSP), the asynchronous nature of CAP and VAP allowed for much higher CPU and network bandwidth utilization.
Conclusion
By decoupling system implementation from algorithm logic, these consistency models allow developers to tune performance via simple thresholds ($s$ or $v_{thr}$). While future work is needed to automate hyperparameter tuning and test on terabyte-scale datasets, this paper provides a rigorous foundation for high-performance, theoretically sound distributed machine learning.
Summary updated