Communication Compression for Decentralized Training

Hanlin Tang, Shaoduo Gan, Ce Zhang, Tong Zhang, Ji Liu

Training large-scale machine learning models across multiple GPUs or servers is frequently throttled by network constraints. To mitigate this, researchers typically employ two distinct strategies: decentralization to combat high latency by having workers communicate only with immediate neighbors, and data compression (quantization) to overcome low bandwidth by sending lower-precision data.

This paper explores a natural but challenging question: can we combine both techniques to create a system robust to both latency and bandwidth limitations? The authors introduce two novel algorithms, DCD-PSGD and ECD-PSGD, that successfully merge decentralized communication with data compression, achieving a convergence rate that matches full-precision centralized training while drastically reducing network overhead.

The Challenge: Why Naive Combinations Fail

While combining decentralization and compression seems straightforward in theory, they do not naturally play well together. In a standard centralized setup, a central server can help manage the errors introduced by compressing data (e.g., reducing 32-bit floats to 8-bit integers).

However, in a decentralized network, if workers simply compress the models they swap with neighbors, the quantization errors do not stay local. Instead, these errors propagate and accumulate across the network over time. As a result, the training process often diverges or fails to converge to the correct solution.

Training loss comparison showing the divergence caused by naive compression in decentralized networks.

The realization that we must communicate changes or estimates rather than raw, naively compressed model states is the foundational insight of this work.

Proposed Methods: Managing the Error Budget

To handle the error introduced by compression without sacrificing the benefits of a decentralized topology, the authors propose two distinct algorithmic strategies:

  • DCD-PSGD (Difference Compression): Instead of workers exchanging their entire local models, they exchange the compressed difference between their current model and the model from the previous iteration. This "delta" approach effectively prevents quantization error from spiraling out of control.
  • ECD-PSGD (Extrapolation Compression): This method uses an extrapolation of the last two local models to estimate what a neighbor's model looks like. It is specifically designed to be more robust to "aggressive" quantization, such as very low bit-widths.

Theoretical Contribution: The authors mathematically prove that both algorithms achieve a convergence rate of $O(1/\sqrt{nT})$, where $n$ is the number of workers and $T$ is the number of iterations. Crucially, this matches the theoretical performance of full-precision, centralized parallel SGD. In practice, this means the system gains massive communication savings "for free" in terms of iteration complexity.

Experimental Setup

The researchers evaluated their algorithms using the CIFAR-10 image classification dataset and a ResNet-20 deep convolutional neural network architecture. Experiments were conducted on 8 to 16 Amazon EC2 instances, each equipped with an Nvidia K80 GPU, connected in a ring topology.

Key Results and Performance

The empirical results strongly support the theoretical claims, demonstrating that these compressed, decentralized methods provide a "linear speedup." As more nodes are added, training time decreases proportionally, even though the communication is lossy and restricted to neighbors.

Training loss over time demonstrating the efficiency of the 8-bit decentralized approach compared to centralized and 32-bit baselines.
  • Efficiency in Harsh Networks: In simulated environments with high latency (20ms) and low bandwidth (1.4Gbps to 5Mbps), the decentralized 8-bit approach significantly outperformed standard centralized 32-bit approaches in terms of training loss over time.
  • The 8-bit Sweet Spot: The authors found that 8-bit quantization—reducing data transfer sizes by 4x—provides a massive speedup without any noticeable loss in final model accuracy.
  • Algorithm Trade-offs and Limits: DCD-PSGD generally converges faster when data across nodes is highly heterogeneous. However, both algorithms have limits: at extreme 4-bit compression, DCD-PSGD converged much more slowly, and ECD-PSGD diverged, highlighting the theoretical constraints on how much "noise" decentralized systems can handle.

Limitations and Future Work

While promising, the current framework has a few limitations. The theory and algorithms currently rely on unbiased compression, meaning the expected value of the compressed data must equal the original. Popular "biased" compression techniques, like Top-K sparsification, are not yet supported. Additionally, while the theory applies to any connected graph, experiments focused primarily on ring topologies. Future work will need to explore how more complex or dynamic network shapes affect these algorithms, as well as how to simplify the tuning of hyperparameters like learning rates and consensus weights for broader adoption.

Summary updated

BibTeX
@inproceedings{tang2018communication,
  author = {Hanlin Tang and Shaoduo Gan and Ce Zhang and Tong Zhang and Ji Liu},
  title = {{Communication Compression for Decentralized Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=r1VgQv-OWr},
}
Figure