DaSGD: Squeezing SGD Parallelization Performance in Distributed Training Using Delayed Averaging

Qinggang Zhou, Yawen Zhang, Pengcheng Li, Xiaoyong Liu, Jun Yang, Runsheng Wang, Ru HuangarXiv 2020

Researchers from Alibaba Group and Peking University have introduced DaSGD (Local SGD with Delayed Averaging), a novel distributed training algorithm designed to overcome the "communication wall" in large-scale deep learning. By overlapping communication with computation, DaSGD achieves near-perfect parallelization efficiency.

Abstract

In distributed deep learning, synchronization overhead often becomes a bottleneck as the number of workers increases. Standard synchronous methods require workers to halt computation during gradient aggregation. DaSGD addresses this by allowing workers to continue local training while global weight updates are processed in the background. This "delayed averaging" approach hides 100% of communication overhead and maintains the same theoretical convergence rate as standard Stochastic Gradient Descent (SGD).

The Communication Bottleneck in Distributed Training

Data parallelism is the standard approach for distributed training: data is split across multiple workers (GPUs), each calculates gradients, and they synchronize to update the model. However, the synchronization phase creates a significant bottleneck. In standard Synchronous Mini-batch SGD (S-SGD), workers must stop their forward and backward passes to wait for the network to aggregate gradients. As more workers are added, the communication overhead grows while computation time per worker shrinks, leading to poor "scaling efficiency."

While "Local SGD" (periodic averaging) reduces the frequency of communication, it still suffers from "stop-and-wait" delays during synchronization steps. DaSGD aims to make the network essentially "invisible" by ensuring that compute units never stop.

Comparison of synchronization overhead in Mini-batch SGD, Local SGD, and DaSGD.

Methodology: Delayed Averaging

DaSGD builds upon Local SGD but introduces Delayed Averaging to eliminate idle time. The algorithm operates through four key components:

  1. Local Iterations ($\tau$): Workers perform $\tau$ local updates on their own data before triggering a global sync.
  2. Non-blocking Communication: Instead of waiting for the global average, a worker initiates communication and immediately proceeds to the next batch of local work.
  3. Delayed Update ($d$): Global averaged weights are received and merged into the local model after a delay of $d$ steps.
  4. Weighted Merging ($\xi$): An auxiliary parameter $\xi$ controls the fusion of the "stale" global model with the current local model.
The DaSGD training workflow showing overlapping communication and computation with delayed updates.

Theoretical analysis confirms that despite the introduced delay, DaSGD maintains a convergence rate of $O(1/\sqrt{K})$, mathematically consistent with standard SGD.

Experimental Evaluation

The researchers evaluated DaSGD using the CIFAR-10 dataset across various architectures, including ResNet-50/101, VGG-16/19, DenseNet, and MobileNetV2.

Key Results

  • Linear Scaling: Simulations of up to 256 GPUs (using the PALEO performance model) showed that DaSGD maintains near-linear speedup, whereas S-SGD and Local SGD experience significant performance degradation due to communication bottlenecks.
  • Accuracy Preservation: On CIFAR-10 with ResNet-50, DaSGD achieved 90.88% accuracy, slightly outperforming standard Mini-batch SGD (90.37%) and Local SGD (90.62%). The authors suggest that the local updates may act as a form of regularization.
  • Communication Hiding: Experiments confirmed that 100% of communication time can be hidden if the time to compute $d$ local batches exceeds the time required for a global all-reduce operation.

Discussion and Future Work

DaSGD balances hardware utilization by keeping both the compute units and the network busy simultaneously. The "sweet spot" for the delay parameter $d$ can be calculated based on specific hardware FLOPs and network bandwidth.

However, challenges remain. As the number of workers grows into the thousands, the effective global batch size becomes very large, requiring specific hyper-parameter strategies like learning rate warmup. Additionally, while DaSGD is robust, it introduces new parameters ($\tau, d, \xi$) that require calibration based on network topology. Future research will likely focus on testing DaSGD on massive datasets like ImageNet and extremely large language models.

Summary updated

BibTeX
@misc{zhou2020dasgd,
  author = {Qinggang Zhou and Yawen Zhang and Pengcheng Li and Xiaoyong Liu and Jun Yang and Runsheng Wang and Ru Huang},
  title = {{DaSGD: Squeezing SGD Parallelization Performance in Distributed Training Using Delayed Averaging}},
  year = {2020},
  eprint = {2006.00441},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.00441},
}
Figure