Approximate Gradient Coding With Optimal Decoding

Margalit Glasgow, Mary Wootters

TL;DR

This paper introduces a new framework for Approximate Gradient Coding that uses expander graphs and "optimal decoding" to mitigate the impact of slow machines (stragglers) in distributed learning. Their approach is the first to achieve near-optimal error rates simultaneously in both random and adversarial straggler models, ensuring that distributed gradient descent converges quickly even when the network is unreliable.

What Problem Does This Paper Address?

In large-scale distributed machine learning, a "parameter server" assigns gradient computation tasks to multiple "worker machines." However, some machines are inevitably slower than others or fail entirely—these are called stragglers.

To prevent the entire system from waiting on the slowest node, researchers use Gradient Coding, which replicates data across multiple machines so the gradient can be reconstructed from a subset of workers.

  • Exact Gradient Coding requires high redundancy (high replication factor) to recover the full gradient perfectly.
  • Approximate Gradient Coding uses less redundancy, accepting a small error in the gradient to save on computation and storage.

The challenge is that existing approximate codes usually perform well under random straggler models (where machines fail stochastically) but fail miserably under adversarial straggler models (where the "worst" machines for the specific data distribution fail). The authors sought a "best of both worlds" code that is robust regardless of why or how machines fail.

Methods

The authors propose a novel construction based on Expander Graphs:

  1. Graph-Based Assignment: They treat data blocks as vertices in a graph and worker machines as edges. Each machine is assigned exactly two data blocks (the endpoints of its edge).
  2. Optimal Decoding: Unlike traditional methods that use fixed weights for each machine's output, this paper uses "optimal decoding." At each iteration, the parameter server identifies which machines have responded and solves a small least-squares problem to find the best coefficients ($w$) to minimize the distance between the weighted sum of available partial gradients and the true full gradient.
  3. Expander Properties: By using expander graphs (graphs that are highly connected and hard to "break" into isolated pieces), the authors ensure that even if many machines (edges) fail, the remaining graph likely contains a "giant component" that allows for a high-quality approximation of the gradient.
  4. Computational Efficiency: They demonstrate that for their specific graph-based structure, the optimal decoding coefficients can be computed in linear time ($O(m)$), making it practical for real-time use.

Datasets

The paper evaluates the proposed codes using:

  • Simulated Least Squares: High-dimensional linear regression problems where data $X$ and labels $Y$ are generated synthetically to test convergence rates.
  • Distributed Cluster (Sherlock): Real-world experiments conducted on Stanford’s Sherlock cluster using up to 24 processors to measure actual wall-clock time and performance in a non-idealized environment.

Key Insights and Ideas

  • Spectral Expansion as a Proxy for Error: The authors prove a direct link between the "spectral gap" of the assignment graph and the decoding error. Better expanders lead to lower errors.
  • The Power of Dynamism: Fixed-coefficient decoding is shown to be fundamentally limited (error decays only as $1/d$). By allowing the parameter server to pick weights after seeing who responded, the error decays exponentially ($p^d$) with the replication factor $d$.
  • Unbiasedness Matters: By shuffling data blocks before assignment, the authors ensure their gradient estimate is unbiased. This is a crucial "aha moment" that allows them to apply standard stochastic optimization proofs to guarantee convergence.
  • Robustness to Adversaries: Because expanders are difficult to disconnect, even an adversary picking the "best" machines to kill cannot easily prevent the parameter server from getting a good gradient approximation.

Key Results

  • Random Stragglers: The decoding error decays exponentially in the replication factor ($p^{d-o(d)}$). This nearly matches the theoretical lower bound.
  • Adversarial Stragglers: The error is nearly twice as small as the previous state-of-the-art (Fractional Repetition Codes).
  • Convergence Speed: In empirical tests with a replication factor of 3, the proposed method achieved a 3x to 10x improvement in mean squared error compared to uncoded or fixed-weight approaches after 50–150 iterations.
  • Real-world Performance: On the Sherlock cluster, the "Expander Code" converged significantly faster than the "FRC" (the previous theoretical leader), likely because real-world stragglers aren't perfectly i.i.d. random, and the expander's adversarial robustness helps in practice.

Limitations and Future Work

  • Fixed Load per Machine: The current framework assumes each machine holds exactly two data blocks. The authors note that extending this to a larger number of blocks per machine is an open and interesting challenge.
  • The Adversarial Gap: While their code is better than previous ones for adversarial stragglers, there is still a gap between their results and the absolute theoretical lower bound for adversarial error ($1/d$).
  • Complexity of Graph Choice: While LPS expanders are used in the paper, finding the "perfect" graph for a specific number of machines $m$ and data points $N$ remains a non-trivial setup step.

Summary updated

BibTeX
@article{glasgow2021approximate,
  author = {Margalit Glasgow and Mary Wootters},
  title = {{Approximate Gradient Coding With Optimal Decoding}},
  journal = {IEEE J. Sel. Areas Inf. Theory},
  year = {2021},
  doi = {10.1109/jsait.2021.3100110},
}
Figure