On Distributed Adaptive Optimization with Gradient Compression

Xiaoyun Li, Belhal Karimi, Ping Li

TL;DR

Training massive deep learning models across multiple machines is often bottlenecked by the slow process of communicating gradients. This paper introduces COMP-AMS, a distributed framework that combines the popular AMSGrad optimizer with aggressive gradient compression and "error feedback." This approach slashes communication costs by up to 100x while maintaining the same convergence speed and accuracy as full-precision training.

The Distributed Training Bottleneck

In modern AI, distributed training is a necessity: data is split across many workers to speed up the process. However, two major hurdles remain:

  1. Communication Bottleneck: Sending huge gradient vectors between workers and a central server is slow and bandwidth-intensive.
  2. Optimizer Complexity: While simple Stochastic Gradient Descent (SGD) is easy to compress, "adaptive" optimizers like Adam or AMSGrad—which adjust learning rates for every single parameter—are much trickier.

Previous attempts to compress adaptive methods often required workers to store extra copies of the model's "moments" (moving averages), doubling the memory requirement. Alternatively, they failed to show a "linear speedup," where doubling the number of workers actually halves the training time.

Introducing COMP-AMS

The authors propose COMP-AMS (Compressed AMSGrad). The workflow is elegant and memory-efficient:

  • Local Computation: Each worker calculates its local gradient based on its data batch.
  • Compression with Error Feedback (EF): Instead of sending the full gradient, workers use a compressor like Top-$k$ (sending only the largest 1% of values) or BlockSign (sending only the sign of the values in specific blocks).
  • The "Secret Sauce": To prevent the information loss from compression from derailing the model, they use Error Feedback. Any part of the gradient that was "thrown away" during compression is stored locally and added back into the next iteration's gradient. This ensures that, over time, no direction is ignored.
  • Centralized Update: The server receives these compressed, "corrected" gradients, averages them, and performs a single AMSGrad update to the global model.

Crucially, unlike some competitors, COMP-AMS keeps the adaptive moment estimation only on the server, saving precious memory on the worker nodes.

Experimental Setup and Datasets

The researchers evaluated COMP-AMS across several standard benchmarks to prove its versatility:

  • MNIST: Image classification using a Convolutional Neural Network (CNN).
  • CIFAR-10: Image classification using LeNet-5 and the more complex ResNet-18.
  • IMDB Movie Reviews: Sentiment analysis (text classification) using a Long Short-Term Memory (LSTM) network.
Training and Test Performance Across Datasets

Key Insights and Ideas

  • Linear Speedup is Preserved: The most important theoretical finding is that COMP-AMS achieves a convergence rate of $O(1/\sqrt{nT})$. This means that even with heavy compression, the training speed scales linearly with the number of workers ($n$).
  • Error Feedback is Essential: The paper proves that error feedback effectively "fixes" the bias introduced by compressors like Top-$k$. Without it, compressed adaptive methods often fail to reach the same final accuracy as their full-precision counterparts.
  • Memory Efficiency: By centralizing the AMSGrad logic, workers don't need to store local moment estimates. This makes the framework much more feasible for training massive models on hardware with limited memory.
  • Sparsity Matters: For text data (IMDB), Top-$k$ compression significantly outperformed sign-based methods. Text gradients are naturally sparse, and Top-$k$ excels at capturing those few critical "heavy" updates.

Key Results

Test Accuracy vs. Transmitted Bits on IMDB
  • Communication Savings: As shown in the IMDB evaluation, COMP-AMS with Top-$k$ (at 0.01 sparsity) achieved a 100x reduction in the number of bits transmitted while matching the accuracy of full-precision AMSGrad.
  • Accuracy Parity: On CIFAR-10, COMP-AMS with BlockSign actually slightly outperformed other compressed methods like QAdam and 1BitAdam, matching the "gold standard" of full-precision distributed AMSGrad.
  • Empirical Speedup: In tests with varying numbers of workers ($n=2$ to $n=16$), the iterations required to reach a specific loss level decreased predictably as $n$ increased, confirming the theoretical linear speedup.

Limitations and Future Work

  • Non-I.I.D. Data: The paper primarily focuses on the "centralized distributed" setting where data is shuffled uniformly. While they touch on the impact of "global variance" (different data distributions at different nodes), they note that a deep dive into Federated Learning (where data is highly non-i.i.d.) is a subject for future research.
  • Hyperparameter Sensitivity: While COMP-AMS is simpler than 1BitAdam (which requires a carefully tuned "warm-up" phase), it still relies on choosing the right compression ratio and learning rate to balance speed and stability.

Summary updated

BibTeX
@inproceedings{li2022distributed,
  author = {Xiaoyun Li and Belhal Karimi and Ping Li},
  title = {{On Distributed Adaptive Optimization with Gradient Compression}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=CI-xXX9dg9l},
}
Figure