Source-linked AI summary

Improving Distributed Gradient Descent Using Reed-Solomon Codes

Wael Halbawi, Navid Azizan-Ruhi, Fariborz Salehi, Babak Hassibi

arXiv:1706.05436v1cs.ITcs.DC

TL;DR

Large-scale learning often requires distributed computation, but stragglers can delay recovery and undermine its benefits. The paper proposes a deterministic Reed–Solomon-coded gradient scheme with efficient online decoding and a delay model for selecting parameters. For the same training time, the method achieves better test errors than the compared approaches on MNIST.

  • Problem

    Large datasets make single-machine learning computationally or memory intensive, while heterogeneous machine delays can make distributed computation slow.

  • Method

    The paper uses a deterministic Reed–Solomon coding scheme to distribute gradient iterations, recover gradients from f returning machines, decode online in O(f^2) time, and optimize parameters under heavy-tailed delays.

  • Results

    For the same training time, the scheme achieves better test errors than ignoring stragglers, waiting for all machines, and GradientCoding on MNIST.

  • Takeaways & Limitations

    The scheme combines recovery from the smallest theoretically possible number of machines with efficient decoding and delay-aware parameter selection.

  • Takeaways & Limitations

    The analysis models machine-return delays as Pareto-distributed random variables and includes decoding time in the computation-time model.

Abstract

from arXiv · show

Today's massively-sized datasets have made it necessary to often perform computations on them in a distributed manner. In principle, a computational task is divided into subtasks which are distributed over a cluster operated by a taskmaster. One issue faced in practice is the delay incurred due to the presence of slow machines, known as \emph{stragglers}. Several schemes, including those based on replication, have been proposed in the literature to mitigate the effects of stragglers and more recently, those inspired by coding theory have begun to gain traction. In this work, we consider a distributed gradient descent setting suitable for a wide class of machine learning problems. We adapt the framework of Tandon et al. (arXiv:1612.03301) and present a deterministic scheme that, for a prescribed per-machine computational effort, recovers the gradient from the least number of machines $f$ theoretically permissible, via an $O(f^2)$ decoding algorithm. We also provide a theoretical delay model which can be used to minimize the expected waiting time per computation by optimally choosing the parameters of the scheme. Finally, we supplement our theoretical findings with numerical results that demonstrate the efficacy of the method and its advantages over competing schemes.

1 Introduction

Distributed learning reduces sequential computation time but remains vulnerable to heterogeneous machine delays, motivating coded schemes that recover results from a few returning machines. This paper introduces a deterministic Reed–Solomon-based gradient scheme with efficient decoding, delay-aware parameter selection, and favorable numerical results.

  • Large datasets often require distributed computation because their computational and memory demands make single-machine learning impractical or too slow.
  • Stragglers can make distributed computation slow because the taskmaster traditionally waits for all machines to recover the desired computation.
  • The central design challenge is recovering the computation from a few machines regardless of which machines return.
  • The paper distributes gradient iterations using a deterministic Reed–Solomon construction and compares it with three straggler-handling approaches on MNIST.The comparison includes ignoring stragglers, waiting for all machines, and GradientCoding.
  • The scheme recovers gradients from the smallest theoretically possible number of returning machines for a fixed per-machine computational effort.
  • The online decoder has time complexity O(f^2), improving on the O(f^3) decoding time reported for previous methods.
  • The paper models heavy-tailed delays, includes decoding time, and uses the resulting analysis to choose coding parameters and minimize expected running time.

2 Preliminaries

The paper formulates coded distributed gradient descent around partial gradients assigned redundantly to workers, aiming to recover the full gradient from any fastest set of f machines. The scheme balances straggler tolerance, per-worker computation, waiting time, and decoding cost.

  • Problem setup: Large datasets motivate distributing gradient-based learning across a taskmaster and n workers, where the loss and full gradient decompose over disjoint data chunks.Each worker computes assigned partial gradients and returns a prescribed linear combination of them.
  • Problem setup: Each worker is assigned w data partitions, introducing redundant computation so the master can recover the gradient from the fastest f machines.The design tolerates s := n − f stragglers without prior knowledge of which workers will be slow.
  • Coding requirements: The construction achieves the maximum straggler tolerance permitted for fixed k and w, so the gradient is recoverable from the smallest theoretically possible number f of machines.This is equivalent to recovering from the f machines that return fastest.
  • Coding requirements: The encoding matrix B must have row weight w and ensure that any f rows span the all-one vector, enabling recovery from any f returning workers.The workers’ coded partial gradients are linear combinations determined by the rows of B.
  • Computational trade-offs: Increasing redundancy raises each worker’s computation load, creating a trade-off that can be optimized through a sweet spot in w/k to minimize expected total waiting time.The proposed delay model accounts for this parameter choice, while online decoding avoids precomputing vectors for every returning-worker combination.
  • Decoding: An online decoder computes the decoding vectors for the first f responding workers using an efficient algorithm based on Vandermonde-matrix inversion.This addresses the storage and computational burden of precomputing decoding vectors for all possible worker subsets.

3 Code Construction

The code construction combines a balanced binary mask with Reed–Solomon codewords whose supports follow the mask. Polynomial interpolation properties then enable the encoding matrix and its decoding-related structure to be constructed deterministically.

  • Mask construction: The encoding scheme begins with a binary mask M whose every row has weight w, indicating which data partitions are assigned to each worker.The mask is used to prescribe the support pattern of the encoding matrix B.
  • Mask construction: A balanced matrix keeps row or column weights within one of each other, supporting evenly distributed assignments in the mask.The construction illustrates this property for specified n, k, and w, with a general result available beyond the integer case.
  • Mask construction: RowBalancedMaskMatrix generates the mask using a column weight and offset parameter, with row indices formed modulo n.The jth column of B subsequently uses a Reed–Solomon codeword supported on the corresponding mask column.
  • Reed–Solomon codes: A Reed–Solomon code RS[n, f] consists of evaluations of degree-less-than-f polynomials at n distinct complex points, including roots-of-unity evaluation points.Any f generator rows are invertible, so f evaluations determine the polynomial.
  • Encoding matrix: The encoding matrix B selects Reed–Solomon codewords whose nonzero supports match the mask columns, allowing zeros imposed by the mask to determine polynomial factors.The paper uses this property to construct B for the desired sparsity pattern.
  • Decoding: After B is specified, decoding vectors are characterized from the returning workers so their coded partial gradients can be combined to recover the full gradient.The procedure is generalized through the encoding-matrix construction and associated decoding characterization.

4 Efficient Online Decoding

The decoder exploits Reed–Solomon structure to recover the gradient from any f surviving machines in O(f^2) time, with space-efficient computation enabled by roots of unity.

  • O(f^2) decoding follows because the relevant f × f Vandermonde matrix is invertible in quadratic time.This improves on prior O(f^3) decoding methods.
  • The decoding vector is obtained from the first row of the inverse Vandermonde matrix.
  • Each inverse-matrix column corresponds to a polynomial that vanishes at the other surviving machines’ evaluation points.
  • The decoding vector entries are the constant terms of these polynomials, evaluated at zero.
  • Choosing α as a primitive nth root of unity enables precomputed lookup values for space-efficient decoding.

5 Analysis of Total Computation time

The analysis models total gradient-computation time as computation, delay, and decoding components, then uses the model to optimize coding parameters under memory constraints.

  • The delay component is modeled with a Pareto distribution to capture heavy-tailed machine-return times.The model includes a fundamental minimum delay t0.
  • Total time combines the fth response-time order statistic, per-machine computation, and taskmaster decoding time.
  • The expected fth Pareto order statistic converges as the number of machines grows.
  • Decoding takes cm(f −1)f time, approximately cm(1−α)^2n^2, when Algorithm 3 is used.
  • The optimal computation fraction α is selected by minimizing total time subject to per-machine memory constraints.
  • The closed-form parameter choice is valid only when t0/(cgNξ) < 1, an assumption supported when N is large and ξ is near one.

6 Numerical Results

Numerical simulations evaluate the coded distributed-gradient scheme on MNIST using a Pareto-distributed delay model and accelerated gradient methods.

  • The experiment trains softmax regression on 80 machines to classify 10000 MNIST handwritten digits.
  • Artificial machine delays are sampled from a Pareto distribution with ξ = 1.1 and t0 = 0.001.
  • Knowledge of the full gradient permits use of accelerated gradient methods such as Nesterov’s method.

7 Conclusion

The paper proposes Reed–Solomon-coded distributed gradient descent that recovers gradients from theoretically minimal returning machines and supports efficient, delay-aware execution.

  • The Reed–Solomon scheme waits for fRS = 68 machines, while the compared coded MDS scheme waits for fMDS = 33 in Figure 2’s MNIST setup.
  • For fixed per-machine computational effort, the scheme recovers the full gradient from the smallest theoretically possible number of returning machines.
  • The method combines an efficient space- and time-decoder with a heavy-tailed delay model that includes decoding time.

8 Appendix

The appendix analyzes row-balanced mask matrices used in the coding construction and derives their weight properties. It also develops the asymptotic delay expression and the relation between the number of retained machines and the straggler fraction.

  • Mask-matrix row weights: Algorithm 1 produces mask matrices whose row weights are characterized for both t = 0 and the general shifted case.The t = 0 case is treated in Proposition 2, while Corollary 1 extends the row-weight characterization.
  • Mask-matrix row weights: The nonzero mask positions are formed from consecutive index blocks reduced modulo n, with their distribution determining row weights.The index set S collects the nonzero positions across columns, and divisibility of kd by n determines whether weights distribute evenly.
  • Column-balanced construction: Positive straggler tolerance requires the component parameter d_l to satisfy d_l ≥ 2.The appendix explicitly states this condition in connection with the construction's straggler tolerance.
  • Column-balanced construction: Algorithm 4 combines two row-balanced matrices so that heavy and light rows align, producing a column-balanced mask with uniform row weight w.The shift t aligns heavy rows of one component with light rows of the other; the construction relies on equal counts of the two row types.
  • Delay analysis: The asymptotic delay analysis uses f = (1 − α)n returned machines and obtains the limiting expression by letting n tend to infinity.The derivation uses the expected fth ordered statistic of a Pareto distribution and evaluates the limiting product terms.

9 Offline Decoding

Figure 3 plots the delay function for a specified training and Pareto-delay setting and marks the optimizer predicted by equation (22).

  • Figure 3: For N = 12000, cg = 3 × 10−6, t0 = 0.001, and ξ = 1.1, the predicted optimizer is α∗ = 0.1477.The parameter choice gives Ncg = 0.035, and the star symbol marks the optimizer in the plot.
Loading 1706.05436v1…