Communication-efficient Distributed Learning for Large Batch Optimization

Rui Liu, Barzan MozafariICML 2022

TL;DR: Researchers from the University of Michigan have introduced JOINTSPAR, a novel gradient compression method that doesn't just shrink the data sent over the network—it skips the computation of "unimportant" gradient coordinates entirely. By using a multi-armed bandit algorithm to predict which parts of the gradient are most useful, JOINTSPAR achieves up to a 4x speedup in wall-clock training time without sacrificing model accuracy.

The Hidden Inefficiency in Distributed Learning

In the world of distributed machine learning, the "communication bottleneck" is a well-known villain. To train massive models across multiple GPUs or machines, workers must constantly exchange gradient updates. To speed this up, researchers typically use gradient compression (quantizing or sparsifying the data) to reduce the amount of information sent over the wire.

However, there is a hidden inefficiency in this standard pipeline: even if a method decides to drop 90% of a gradient to save bandwidth, it usually computes the full 100% first.

As we move toward "large batch optimization" to fully saturate modern GPU power, the time spent actually calculating these gradients is no longer negligible. In many modern setups, the computation time is actually double the communication time. The authors argue that computing a full gradient only to throw most of it away is a massive waste of wall-clock time and computational resources.

JOINTSPAR: Joint Sparsification

To address this, the authors propose JOINTSPAR (and its variant JOINTSPAR-LARS for large-batch optimizers). The core innovation is identifying and computing only the gradient coordinates that are likely to be communicated.

  1. The Active Set: Instead of calculating the gradient for every parameter block, each machine selects an "active set" of blocks to compute and communicate.
  2. The Bandit Approach: How do you know which blocks are important without computing them first? The authors treat this as an adversarial multi-armed bandit problem. They use a modified EXP3 algorithm to maintain a probability distribution over all gradient blocks.
  3. Learning on the Fly: If a block consistently shows a high gradient norm (meaning it’s contributing significantly to the learning process), the bandit increases the probability of including it in the active set. If a block is "quiet," the bandit learns to skip it.
  4. Unbiased Updates: To ensure the model still converges correctly, the gradients that are computed are scaled to compensate for the skipped ones, ensuring the expected value of the update remains unbiased.

Key Results and Performance

The researchers evaluated their method across a wide range of standard computer vision benchmarks, including MNIST, Fashion-MNIST, SVHN, CIFAR-10, CIFAR-100, and ImageNet.

Testing accuracy versus wall-clock time across MNIST, CIFAR-10, and CIFAR-100 datasets.

Many papers focus on "convergence per iteration," but this paper highlights a more practical metric: wall-clock time. If an iteration takes half as long because you did half the math, you can afford more iterations. JOINTSPAR might take the same number of iterations to converge as traditional methods, but it finishes them much faster.

As shown in the training curves above, JOINTSPAR-LARS reaches target accuracies significantly faster than full-precision baselines and other state-of-the-art compression methods like QSGD, ATOMO, and TernGrad.

Heatmap detailing the wall-clock speedup of JOINTSPAR-LARS compared to various baselines across multiple datasets.

Overall, JOINTSPAR-LARS achieved close to a 2x speedup in most cases and as high as a 3.9x speedup (on Fashion-MNIST compared to QSGD). Crucially, despite skipping significant portions of the gradient computation, the models reached the same target accuracy as the full-precision baselines. Furthermore, as the number of worker machines increased, the ratio of computation time to communication time remained much healthier in JOINTSPAR than in baseline methods.

Limitations and Future Work

While JOINTSPAR offers a massive leap in efficiency, it does have a few limitations:

  • Forward Pass Overhead: Currently, JOINTSPAR still performs the full "forward pass" (calculating the model's output) for all layers. Future work could involve skipping the forward pass for certain layers as well, saving even more time.
  • Bandit Tuning: While the bandit approach is automated, users still need to set a "sparsity budget." Finding the absolute optimal budget for a brand-new architecture might require some cross-validation.
  • Architecture Specifics: The current implementation works best with layer-wise or block-wise decompositions. Extremely irregular architectures might require more complex active set logic.

By proving that redundancy in gradient computation is an opportunity rather than a necessity, JOINTSPAR paves the way for much faster, more efficient distributed training paradigms.

Summary updated

BibTeX
@inproceedings{liu2022communication,
  author = {Rui Liu and Barzan Mozafari},
  title = {{Communication-efficient Distributed Learning for Large Batch Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
}
Figure