Step-Ahead Error Feedback for Distributed Training with Compressed Gradient

An Xu, Zhouyuan Huo, Heng Huang

Abstract

Distributed deep learning faces a significant communication bottleneck when synchronizing gradients across nodes. While gradient compression and Error Feedback (EF) mitigate this, they introduce a "gradient mismatch" due to stale model states. We present Step-Ahead Error Feedback (SAEF), which aligns gradients with the actual model trajectory by computing them on a compensated model state. Our results on CIFAR-100 and ImageNet show that SAEF significantly reduces communication costs while achieving higher accuracy and faster convergence than standard EF and full-precision baselines.

Introduction: The Communication Bottleneck

Training massive neural networks requires distributed systems where multiple worker nodes compute gradients and synchronize with a central server. The massive volume of data exchanged creates a significant communication bottleneck. To address this, researchers employ gradient compression—sending only the most critical bits of data. However, compression inherently loses information, which can degrade model performance.

Local Error Feedback (EF) was developed to fix this by saving the "leftover" compression error and adding it to the next batch. Despite its popularity, we identify a hidden flaw in EF: Gradient Mismatch. Because the error is added after the gradient is calculated, the gradient is always computed on a slightly "stale" version of the model. This one-iteration lag prevents compressed training from reaching the peak performance of full-precision training.

Methodology: Step-Ahead Error Feedback (SAEF)

We propose Step-Ahead Error Feedback (SAEF) to eliminate the mismatch problem. Instead of calculating the gradient on the current model parameters ($x_t$), the worker node first subtracts the local compression error ($e_t$) to create a "step-ahead" model state ($x_{t+1/2} = x_t - e_t$). The gradient is then calculated on this adjusted model. This ensures the gradient is aligned with the direction the model is actually moving, effectively canceling out the staleness.

To further enhance performance, we introduce:

  1. Error Averaging: Periodically averaging local errors across nodes to maintain synchronization during aggressive compression.
  2. Double-Way Compression: Support for compressing data both from worker to server and server to worker, maximizing bandwidth savings.

Experimental Results

We evaluated SAEF using ResNet-56 on CIFAR-100 and ResNet-50 on ImageNet across various worker configurations.

Communication Efficiency

SAEF demonstrates exceptional efficiency compared to standard baselines. As shown in Figure 1, SAEF variants (red) reach high testing accuracy with a fraction of the data transfer required by standard SGD with Momentum (blue) or traditional Error Feedback (green). This efficiency is particularly pronounced under aggressive compression schemes like Top-1% or SignSGD.

SAEF achieves higher testing accuracy with significantly lower communication costs compared to standard baselines.

Convergence and Accuracy

In several experiments, SAEF converged to a low training loss faster (in terms of epochs) than vanilla SGD with no compression at all. On CIFAR-100 with Top-1% compression, standard Error Feedback reached approximately 50% accuracy, while SAEF reached ~65.9%—a massive improvement that brings it close to full-precision results. Figure 2 illustrates that SAEF maintains superior testing accuracy throughout the training process.

SAEF demonstrates faster convergence and superior final accuracy over standard error feedback methods.

Conclusion

SAEF effectively resolves the gradient mismatch problem in compressed distributed training. By aligning gradient computation with the error-compensated model state, it enables aggressive compression without the typical performance penalties. Future work will explore its application to decentralized topologies and adaptive optimizers like Adam.

Summary updated

BibTeX
@inproceedings{xu2021step,
  author = {An Xu and Zhouyuan Huo and Heng Huang},
  title = {{Step-Ahead Error Feedback for Distributed Training with Compressed Gradient}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i12.17254},
}
Figure