ASAP.SGD: Instance-based Adaptiveness to Staleness in Asynchronous SGD

Karl Bäckström, Marina Papatriantafilou, Philippas TsigasICML 2022

Introduction

Training large Machine Learning models typically requires parallelization to be computationally feasible. While Synchronous SGD is straightforward to reason about, it suffers from the "straggler problem"—the entire system moves only as fast as its slowest worker. Asynchronous SGD (AsyncSGD) circumvents this bottleneck by allowing workers to update a shared model independently whenever they finish a task.

However, asynchrony introduces a new challenge: staleness ($\tau$). By the time a worker finishes calculating a gradient, other workers may have already updated the model several times. The worker is essentially providing "old news." If these stale updates are too frequent or too delayed, the model might converge slowly or fail to converge entirely. Existing solutions typically shrink the step size for stale updates using static heuristic rules (like $1/\tau$). The authors of this paper argue that there is no "one-size-fits-all" rule because staleness depends heavily on specific hardware, thread scheduling, and model architecture.

To address this, the authors introduce ASAP.SGD, a new framework for making AsyncSGD "instance-aware" by dynamically adjusting step sizes based on real-time staleness distributions.

Methods: The ASAP.SGD Framework and TAIL-$\tau$

The paper proposes two primary contributions to solve the staleness problem:

  1. ASAP.SGD Framework: The authors establish a set of analytical conditions for staleness-adaptive step size functions. Crucially, they introduce the concept of Mean-preservation: an adaptive strategy must ensure the average step size remains equal to a chosen baseline. This prevents the common pitfall where adaptive methods accidentally shrink the overall learning rate so much that training progress stalls.
  2. TAIL-$\tau$: A dynamic step size function that adapts to the specific "execution instance." It measures the distribution of staleness in real-time and uses its Cumulative Distribution Function (CDF) to scale updates.
  3. Fresh updates (low staleness relative to the current distribution) are prioritized and given a larger step size (a "boost").
  4. Stale updates (stragglers) are dampened.
  5. Because it relies on the CDF, TAIL-$\tau$ automatically adjusts to different hardware environments or levels of parallelism without requiring manual tuning.
Conceptual illustration of TAIL-tau adapting to a staleness distribution while preserving the mean step size.

The authors also provide rigorous convergence proofs for non-convex problems and those satisfying the Polyak-Lojasiewicz (PL) condition, a realistic assumption for modern deep learning landscapes.

Key Insights

  • Staleness is a Distribution, Not a Constant: In complex systems (especially with hyper-threading or NUMA architectures), staleness isn't just a single number; it often forms multi-modal distributions. TAIL-$\tau$ is the first method to "read" this signature to tailor its strategy.
  • Don't Just Dampen; Boost: Most prior work focused only on penalizing stale updates. ASAP.SGD shows that "reallocating" that lost learning rate to fresh updates is vital for maintaining high-speed convergence.
  • Reliability at High Precision: Standard AsyncSGD often reaches a "floor" where it can no longer improve because the asynchrony-induced noise is too high. TAIL-$\tau$ effectively lowers this noise floor, allowing models to reach higher precision levels that were previously unreachable for asynchronous implementations.

Key Results

The method was evaluated using standard Deep Learning benchmarks (MNIST, Fashion-MNIST, CIFAR-10) across different architectures (LeNet CNN, 3-layer MLP).

  • Speedup: TAIL-$\tau$ achieved persistent wall-clock speedups across the entire parallelism spectrum (up to 64 threads). On average, it provided a 1.5x to 1.8x speedup to reach 5% error on MNIST compared to constant step-size baselines.
  • Stability: In many high-parallelism tests, standard AsyncSGD implementations frequently failed to converge. TAIL-$\tau$ reached the target precision in 100% of executions, drastically reducing the risk of wasted training runs.
  • Comparison to Heuristics: When compared against common dampening rules like $1/\tau$ and exponential decay (FLeet), the older methods often converged orders of magnitude slower than TAIL-$\tau$ because they lacked the critical mean-preservation property.
Training loss over time on MNIST and Fashion-MNIST, demonstrating the faster convergence of TAIL methods (solid lines) versus baselines (dashed lines).

Limitations and Future Work

While highly effective, the approach has a few limitations. First, the theoretical analysis focuses specifically on the SGD framework; while TAIL-$\tau$ can be paired with adaptive optimizers like ADAM, the proofs do not explicitly cover them. Second, although the overhead of measuring staleness and computing the CDF is generally negligible, it might require further optimization in extremely high-throughput systems with very small gradients. Finally, the current study focuses on shared-memory systems. Extending this "instance-based" logic to distributed parameter server models with network latency represents a promising direction for future research.

Summary updated

BibTeX
@inproceedings{backstrom2022asap,
  author = {Karl Bäckström and Marina Papatriantafilou and Philippas Tsigas},
  title = {{ASAP.SGD: Instance-based Adaptiveness to Staleness in Asynchronous SGD}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
}
Figure