A Distributed SGD Algorithm with Global Sketching for Deep Learning Training Acceleration

LingFei Dai, Boyu Diao, Chao Li, Yongjun XuarXiv 2021

Abstract

Distributed training of large-scale deep learning models often faces a significant communication bottleneck during gradient synchronization. This paper introduces gs-SGD (global-sketching SGD), a decentralized algorithm that leverages the Count-Sketch data structure to compress gradients. By utilizing the mergeable property of sketches within a tree-structured All-Reduce pattern, gs-SGD reduces communication complexity and improves throughput without sacrificing model accuracy.

Introduction

As deep learning models scale to billions of parameters, training requires massive parallelism across multiple nodes. However, the constant synchronization of gradients often becomes a fatal bottleneck, where network latency and bandwidth limitations dwarf computation time. While sparsification techniques like Top-k help, they often rely on centralized parameter servers, creating scalability issues. The proposed gs-SGD aims to provide a decentralized, highly compressed, and mathematically robust alternative.

Methods: Global Sketching and Tree-Structured All-Reduce

The core of gs-SGD lies in two primary innovations:

  1. Count-Sketch Compression: Gradients are compressed into a probabilistic Count-Sketch data structure. Because Count-Sketches are linear ($S(a+b) = S(a) + S(b)$), they are inherently mergeable.
  2. Tree-Structured All-Reduce: Leveraging mergeability, the algorithm implements a recursive halving and doubling tree. Workers exchange and sum sketches in logarithmic rounds, reducing communication complexity to $O(\log d \cdot \log P)$, where $d$ is the parameter count and $P$ is the number of workers.
Tree-structured All-Reduce patterns for various node configurations.

Following aggregation, the HEAVYMIX Recovery method extracts the most significant gradient updates ("heavy hitters") to update model weights globally. This approach captures a "global" view of gradient importance across the entire cluster, leading to better convergence than methods that sparsify locally.

Experimental Evaluation

The researchers evaluated gs-SGD using ResNet-20 and VGG-16 architectures on the CIFAR-10 dataset. To highlight the impact of communication overhead, a 4-GPU cluster with 1Gbps Ethernet was used, representing a relatively low-bandwidth environment.

Key Results

The experimental results highlight significant improvements in both convergence speed and system throughput:

  • Faster Convergence: On ResNet-20, gs-SGD reached convergence in approximately 70 epochs, outperforming the gTop-k method which required 85 epochs.
  • Higher Throughput: gs-SGD achieved a 1.3x to 3.1x throughput increase over gTop-k and was 1.1x to 1.2x faster than the original Sketched-SGD.
  • Accuracy Preservation: Despite high compression ratios, the algorithm maintained the same final accuracy as vanilla SGD.
Training loss comparison on ResNet-20.

Conclusion

By combining the mathematical properties of Count-Sketches with efficient decentralized communication patterns, gs-SGD effectively addresses the communication bottleneck in distributed training. The algorithm demonstrates that it is possible to achieve high compression and fast convergence simultaneously. Future work will focus on scaling the algorithm to hundreds of nodes and testing on more diverse, modern architectures beyond standard CNNs.

Summary updated

BibTeX
@misc{dai2021distributed,
  author = {LingFei Dai and Boyu Diao and Chao Li and Yongjun Xu},
  title = {{A Distributed SGD Algorithm with Global Sketching for Deep Learning Training Acceleration}},
  year = {2021},
  eprint = {2108.06004},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.06004},
}
Figure