Gradient Coding with Clustering and Multi-message Communication

Emre Ozfatura, Deniz Gündüz, Sennur Ulukus · DOI

Abstract

Gradient descent (GD) methods are commonly employed in machine learning problems to optimize model parameters iteratively. For massive datasets, computations are distributed across parallel workers to increase speed. However, per-iteration completion time is often limited by the slowest "straggling" workers. While existing coded distributed computing schemes mitigate this by introducing redundancy, they often discard partial computations from stragglers, wasting capacity. We propose a novel gradient coding (GC) scheme that allows multiple coded computations to be conveyed from each worker per iteration. Our numerical results demonstrate that this GC with multi-message communication (MMC) and clustering significantly improves average completion time with minimal impact on communication load.

Introduction

In large-scale machine learning, Distributed Gradient Descent (DGD) is a standard approach. A master node partitions a dataset into mini-batches and assigns them to worker nodes. Each worker computes a gradient, and the master aggregates these to update the model. The primary bottleneck in this architecture is the straggler effect: the master must wait for the slowest worker to finish before proceeding to the next iteration.

Existing Gradient Coding (GC) schemes address this by assigning redundant tasks to multiple workers, allowing the master to ignore a subset of slow nodes. However, these schemes are typically "all-or-nothing." If a worker completes a significant portion of its task but fails to finish entirely, its work is discarded. This paper introduces GC-MMC, a framework designed to utilize these "non-persistent" stragglers by allowing them to communicate partial, coded results throughout the computation process.

Methodology

The proposed framework integrates two primary strategies: Multi-message Communication (MMC) and Clustering.

Multi-message Communication (MMC)

Instead of sending a single final result, workers send multiple coded messages as they progress. Two coding designs are explored:

  1. Correlated Code Design: Workers send linear combinations of computed gradients. For instance, a worker might send the sum of two gradients as soon as they are computed.
  2. Uncorrelated Code Design: Utilizing polynomial interpolation (similar to Reed-Solomon codes), this approach treats each message as coming from a "virtual worker," allowing the application of advanced coding theory to multi-message settings.
Example coding matrix M illustrating the assignment of tasks and coded combinations.

Clustering and Hybrid Approaches

Workers are divided into independent clusters, with GC applied within each. This allows the master to recover a cluster's full gradient as soon as a local threshold is met, rather than waiting for a global completion target. Additionally, a hybrid implementation allows workers to switch between GC-MMC and simpler schemes based on their real-time performance.

Experimental Setup

The methods were evaluated using numerical simulations with $K=40$ workers and $K=40$ mini-batches. Each worker was assigned $r=10$ tasks. Computation times were modeled using a shifted exponential distribution, a standard benchmark for simulating stragglers in distributed systems.

Results and Discussion

The core insight of this work is that partial work from slow workers can significantly reduce the "order" of the code required to recover the final gradient. By sending incremental messages, the master can complete iterations much faster.

Comparison of (a) average completion time and (b) communication load across various distributed computation methods.

As shown in the results, the proposed GC-MMC schemes significantly outperform standard GC in terms of average completion time. Specifically:

  • Efficiency: GC-MMC achieves performance comparable to Lagrange Coded Computation (LCC), a high-performance but complex method, without requiring the entire dataset to be encoded upfront.
  • Communication Trade-off: While the Uncorrelated (UC-MMC) approach is the fastest, it imposes a heavy communication load. The GC-MMC-2 variant provides a "sweet spot," matching LCC's speed while maintaining a communication load of approximately one message per worker per iteration, similar to standard GC.

Conclusion

GC-MMC offers a robust and flexible solution for distributed gradient descent. By treating partial work as a valuable resource rather than waste, it mitigates the impact of both persistent and non-persistent stragglers. Future work will explore partially recoverable GC schemes, where iterations can proceed with sufficiently accurate gradient estimates to further optimize training speed.

Summary updated

BibTeX
@inproceedings{ozfatura2019gradient,
  author = {Emre Ozfatura and Deniz Gündüz and Sennur Ulukus},
  title = {{Gradient Coding with Clustering and Multi-message Communication}},
  booktitle = {DSW},
  year = {2019},
  doi = {10.1109/dsw.2019.8755563},
}
Figure