Quantized Adam with Error Feedback

Congliang Chen, Li Shen, Hao-Zhi Huang, Wei Liu

Training massive deep learning models is a logistical nightmare. As models grow to billions of parameters, the bottleneck is no longer just raw compute power, but the communication overhead—the time spent shuffling massive weight and gradient vectors between worker machines and a central server.

In the paper "Quantized Adam with Error Feedback," researchers from the Chinese University of Hong Kong, JD Explore Academy, and Tencent AI Lab propose a way to put distributed training on a "data diet" without sacrificing the final model's intelligence.

TL;DR

The authors introduce a distributed variant of the Adam optimizer that uses "double quantization" (compressing both weights and gradients) to drastically reduce communication bandwidth. By incorporating an error-feedback mechanism to compensate for compression noise, they prove that this leaner algorithm converges just as reliably as full-precision Adam in complex, nonconvex settings.

What Problem Does This Paper Address?

Distributed training typically follows a "Parameter Server" model: workers calculate gradients, send them to a server, the server updates the weights, and then sends the new weights back to the workers. For a model like ResNet-101, this involves moving hundreds of megabytes every few milliseconds.

While quantization (reducing the precision of numbers from 32-bit floats to just a few bits) can speed this up, it introduces "quantization noise." In adaptive optimizers like Adam, where the learning rate depends on the history of gradients, this noise can accumulate and lead to biased updates, preventing the model from ever reaching its peak performance. Most prior research on quantized training focused on simple Stochastic Gradient Descent (SGD), leaving a gap for the more popular, adaptive Adam optimizer.

Methods

The authors propose QADAM (Quantized Adam), which relies on three pillars:

  1. Double Quantization:
    • Gradient Quantization: Workers compress their gradients before sending them to the server.
  2. Weight Quantization: The server compresses the updated weights before broadcasting them back to workers. This "double" approach tackles both the uplink and downlink bottlenecks.
  3. Error Feedback: This is the core innovation. Instead of simply discarding the rounding error during quantization, each worker stores that error. In the next iteration, the stored error is added back to the new gradient before the next quantization step. This ensures that the "lost" information eventually influences the model update.
  4. Theoretical Convergence Analysis: The authors provide a rigorous mathematical proof showing that QADAM converges to a first-order stationary point in nonconvex settings. Crucially, they show the convergence rate is $O(1/\sqrt{T})$, the same order as vanilla Adam.

Datasets

The researchers evaluated their method on standard computer vision benchmarks to ensure it generalizes across different architectures:

  • MNIST: Using the LeNet architecture.
  • CIFAR-10: Using the VGG16 network.
  • CIFAR-100: Using the ResNet-101 architecture.

Key Insights and Ideas

  • The Bias Fix: The "aha moment" is that error feedback effectively turns a biased, quantized update into an unbiased one over time. By "remembering" what was rounded off, the optimizer stays on the right path.
  • Adaptive Learning Rates + Quantization: This is the first work to successfully combine error feedback with the adaptive learning rate logic of Adam in a nonconvex setting. It proves that you don't have to choose between the fast convergence of Adam and the communication efficiency of quantization.
  • Storage vs. Communication: Weight quantization isn't just about speed; it's about storage. By quantizing weights on the server, the method makes it feasible to train large models on edge devices (like smartphones) with limited memory.

Key Results

The experimental results demonstrate that QADAM achieves a "best of both worlds" scenario:

  • Accuracy Maintenance: On CIFAR-100 (ResNet-101), QADAM achieved 78.36% accuracy, which is nearly identical to (and sometimes slightly better than) full-precision training, while significantly outperforming other quantized methods like TernGrad (~76%).
  • Massive Compression: The authors demonstrated that they could shrink the communication cost from 162.9 MB per iteration down to just 10.18 MB—a 16x reduction—with negligible loss in test accuracy.
  • Robustness: The error-feedback mechanism proved essential. Without it, the bias from quantization caused the model's performance to degrade significantly as the compression became more aggressive.

Limitations and Future Work

  • Centralized Focus: The paper primarily focuses on the Parameter Server (centralized) model. While they mention decentralized models, the bulk of the proof and experimentation is centralized. Extending this to peer-to-peer decentralized training is a natural next step.
  • Hyperparameter Sensitivity: While the authors provide a "simplified setting" for hyperparameters to ensure convergence, adaptive methods are notoriously sensitive. Future work could explore how to automatically tune these quantized parameters.
  • Beyond Vision: The datasets used are exclusively from the computer vision domain. Testing QADAM on Large Language Models (LLMs) or Transformer architectures would be a valuable validation of its utility in the current AI landscape.

Summary updated

BibTeX
@article{chen2021quantized,
  author = {Congliang Chen and Li Shen and Hao-Zhi Huang and Wei Liu},
  title = {{Quantized Adam with Error Feedback}},
  journal = {ACM Trans. Intell. Syst. Technol.},
  year = {2021},
  doi = {10.1145/3470890},
}
Figure