Slow and Stale Gradients Can Win the Race

Sanghamitra Dutta, Jianyu Wang, Gauri Joshi · DOI

Introduction

In distributed machine learning, a central parameter server aggregates gradients from multiple worker nodes to update a global model. Traditionally, practitioners face a binary choice between two extremes: Synchronous SGD and Asynchronous SGD. Synchronous SGD ensures accurate updates by waiting for all workers but is bottlenecked by "stragglers"—the slowest machines in the cluster. Asynchronous SGD allows workers to submit updates immediately, significantly increasing speed but introducing "gradient staleness," where updates are based on outdated model versions, potentially hindering convergence.

This paper introduces a novel theoretical framework that shifts the focus from iteration counts to wallclock time. By analyzing the fundamental trade-off between the random delays of hardware and the mathematical error caused by staleness, the authors provide a unified characterization of distributed training efficiency.

Methodology: The AdaSync Strategy

The authors analyze variants of SGD based on the number of workers ($K$) the server waits for out of a total ($P$). They demonstrate that while asynchronous methods ($K=1$) converge faster initially, they hit a higher "error floor." Conversely, synchronous methods ($K=P$) are slower but reach higher final precision.

The AdaSync strategy adaptively increases synchronicity (K) to follow the optimal error-runtime envelope.

To exploit this, the authors propose AdaSync, an adaptive heuristic that increases $K$ over time. By starting with a small $K$, the algorithm makes rapid initial progress. As the model nears the error floor of the current $K$, the synchronicity is increased to lower the floor, effectively following the lower envelope of all possible fixed-$K$ strategies. This approach treats staleness as a tunable resource rather than a bug.

Empirical Results

The theoretical findings were validated using the CIFAR-10 dataset on a local cluster with 8 NVIDIA TitanX GPUs. The experiments compared various fixed-$K$ strategies against the adaptive AdaSync approach.

Empirical results on CIFAR-10 show that the Adaptive (AdaSync) strategy achieves lower test error faster than fixed synchronicity levels.

Key results include:

  • Theoretical Speedup: Under common exponential delay distributions, asynchronous SGD is theoretically $O(P \log P)$ times faster per iteration than fully synchronous SGD.
  • Superior Performance: AdaSync outperformed all fixed-$K$ strategies, achieving the same training loss faster than synchronous SGD and reaching a lower test error than purely asynchronous methods.
  • Robustness to Stragglers: The benefits of smaller $K$ (higher asynchrony) become more pronounced as delay variability among workers increases.

Conclusion and Future Work

This work demonstrates that "winning the race" early with stale gradients saves valuable time that can be reinvested in precision later in the training process. However, the current analysis assumes identically distributed data (i.i.d.) across workers. Future research could extend this "wallclock-time-first" analysis to non-i.i.d. settings common in Federated Learning, as well as decentralized or elastic averaging frameworks. By moving beyond fixed synchronization protocols, distributed training can become significantly more efficient in real-world cloud environments.

Summary updated

BibTeX
@article{dutta2020slow,
  author = {Sanghamitra Dutta and Jianyu Wang and Gauri Joshi},
  title = {{Slow and Stale Gradients Can Win the Race}},
  journal = {IEEE J. Sel. Areas Inf. Theory},
  year = {2020},
  doi = {10.1109/jsait.2021.3103770},
}
Figure