Fundamental Limits of Approximate Gradient Coding

Sinong Wang, Jiashang Liu, Ness B. Shroff · DOI

Abstract

Distributed machine learning is frequently hindered by "stragglers"—slow worker nodes that delay the synchronization of gradients. While Gradient Coding (GC) provides a mechanism to mitigate this by introducing redundancy, exact recovery often requires prohibitive computational overhead. This paper explores the fundamental limits of Approximate Gradient Coding, demonstrating that allowing for a marginal approximation error can reduce redundancy requirements from linear to logarithmic. We propose two novel schemes, $d$-Fractional Repetition Code (FRC) and Batch Raptor Code (BRC), which achieve significant speedups and maintain robustness against stragglers in large-scale training tasks.

Introduction

In large-scale distributed learning, a master node coordinates $n$ worker nodes. The training data is partitioned, and each worker computes a gradient on its subset. However, the system is only as fast as its slowest worker. These "stragglers" can be up to 8x slower than average, causing massive idle times for the rest of the cluster.

To address this, researchers previously proposed Gradient Coding (GC). GC adds redundancy: workers compute gradients on multiple data partitions so the master can reconstruct the full gradient even if some workers fail. However, to survive $s$ stragglers, existing "exact" codes require every worker to do $s+1$ times the work. If the number of stragglers is high, the overhead defeats the purpose of distribution. This paper asks: since machine learning algorithms like Stochastic Gradient Descent (SGD) are naturally robust to noise, can we settle for approximate gradients to gain efficiency?

The Distributed Gradient Coding Framework

Proposed Methodology

The paper introduces the framework of Approximate Gradient Coding and proposes two novel coding schemes:

  1. $d$-Fractional Repetition Code (FRC): This scheme divides workers into groups and replicates data partitions across them. It is designed for "exact recovery with high probability," aiming for zero error while accepting a tiny chance of decoding failure in exchange for much lower computation loads.
  2. Batch Raptor Code (BRC): A more sophisticated two-layer approach. Data is partitioned into batches, and a "Raptor-like" fountain code is applied. It uses a graph-based "peeling decoder" that iteratively subtracts known gradients to reveal unknown ones, allowing for a controlled trade-off between computation load and reconstruction error ($\epsilon$).

Theoretical Insights: The Logarithmic Win

The most significant insight is that the required computation load drops from linear in the number of stragglers ($s+1$) to logarithmic ($O(\log n / \log(n/s))$). As a cluster grows, the cost of protecting against stragglers grows much more slowly than previously thought. The authors establish a fundamental relationship between computation load ($d$), recovery error ($\epsilon$), and the number of stragglers ($s$), proving that $d \ge O(\log(1/\epsilon) / \log(n/s))$.

Comparison of Computation Load and Error across Schemes

Empirical Results

The schemes were evaluated using a massive LIBSVM dataset ($N \approx 19.2M$ samples) on the Ohio Supercomputer Center. Key findings include:

  • 50% Speedup: FRC and BRC reduced total job completion time by approximately 50% compared to existing methods like Cyclic MDS codes.
  • Straggler Resilience: BRC proved remarkably resilient. When stragglers increased from 10% to 30%, completion time only increased by about 10%, whereas other methods slowed down significantly.
  • Improved Convergence: By allowing for more iterations in the same amount of time, the proposed codes reached higher accuracy (AUC) faster than the "forget-s" approach, which simply ignores stragglers and loses data.

Conclusion

Approximate Gradient Coding provides a scalable solution to the straggler problem in distributed learning. By moving from worst-case to average-case guarantees and tolerating minor errors, FRC and BRC achieve near-optimal efficiency. Future work will explore optimizing degree distributions for BRC and investigating communication bottlenecks in bandwidth-limited networks.

Summary updated

BibTeX
@inproceedings{wang2020fundamental,
  author = {Sinong Wang and Jiashang Liu and Ness B. Shroff},
  title = {{Fundamental Limits of Approximate Gradient Coding}},
  booktitle = {SIGMETRICS (Abstracts)},
  year = {2020},
  doi = {10.1145/3393691.3394188},
}
Figure