STL-SGD: Speeding Up Local SGD with Stagewise Communication Period

Shuheng Shen, Yifei Cheng, Jingchang Liu, Linli Xu · DOI

Abstract

Distributed parallel stochastic gradient descent algorithms are workhorses for large scale machine learning tasks. Among them, local stochastic gradient descent (Local SGD) has attracted significant attention due to its low communication complexity. Previous studies prove that the communication complexity of Local SGD with a fixed or an adaptive communication period is in the order of $O (N^{\frac{3}{2}} T^{\frac{1}{2}})$ and $O (N^{\frac{3}{4}} T^{\frac{3}{4}})$ when the data distributions on clients are identical (IID) or otherwise (Non-IID), where $N$ is the number of clients and $T$ is the number of iterations. In this paper, to accelerate the convergence by reducing the communication complexity, we propose STagewise Local SGD (STL-SGD), which increases the communication period gradually along with decreasing learning rate. We prove that STL-SGD can keep the same convergence rate and linear speedup as mini-batch SGD. In addition, as the benefit of increasing the communication period, when the objective is strongly convex or satisfies the Polyak-Łojasiewicz condition, the communication complexity of STL-SGD is $O (N \log{T})$ and $O (N^{\frac{1}{2}} T^{\frac{1}{2}})$ for the IID case and the Non-IID case respectively, achieving significant improvements over Local SGD. Experiments on both convex and non-convex problems demonstrate the superior performance of STL-SGD.

Introduction

In distributed machine learning, multiple clients train a model in parallel. A major bottleneck in this process is communication: synchronizing model updates across a network is significantly slower than local computation. Local SGD (or FedAvg) mitigates this by allowing clients to perform $k$ local updates before synchronizing. However, choosing a fixed $k$ is challenging. A large $k$ causes client models to drift apart, while a small $k$ leads to network congestion. This drift is particularly problematic in "Non-IID" settings where data distributions vary across clients.

STL-SGD addresses this by dynamically adjusting the communication period. By increasing the time between synchronizations as the learning rate decreases, STL-SGD slashes communication overhead while maintaining optimal convergence rates and linear speedup.

Methodology: Stagewise Adaptive Communication

The core innovation of STL-SGD is its stagewise adaptive scheme. The algorithm operates in discrete stages where:

  1. Decreasing Learning Rate ($\eta$): The learning rate is fixed within a stage but decreases (typically by half) when transitioning to the next.
  2. Increasing Communication Period ($k$): As $\eta$ drops, $k$ increases. Theoretical analysis shows that $k$ is negatively correlated with $\eta$ (specifically $k \propto 1/\eta N$ in IID cases). As updates become smaller near a solution, clients can synchronize less frequently without significant drift.

The authors propose two variants:

  • STL-SGD$^{sc}$: For strongly convex problems, increasing $k$ geometrically.
  • STL-SGD$^{nc}$: For non-convex problems, using proximal regularization at each stage to ensure stability and treat the problem as "weakly convex."

Experimental Evaluation

The researchers evaluated STL-SGD on both convex and non-convex benchmarks across IID and Non-IID scenarios with 8 to 32 clients.

  • Convex: Logistic regression on the a9a dataset and a binary subset of MNIST.
  • Non-Convex: Image classification on CIFAR-10 using ResNet-18 and VGG-16 architectures.

Key Results

STL-SGD demonstrates superior efficiency compared to standard baselines like SyncSGD and fixed-period Local SGD.

Table 1: Communication rounds required to reach target accuracy on convex tasks. STL-SGD$^{sc}$ significantly outperforms baselines.

As shown in Table 1, on the a9a (IID) dataset, STL-SGD reached the target accuracy in just 61 rounds, a 1650.5x speedup over SyncSGD and a 3x improvement over standard Local SGD (184 rounds). In the Non-IID setting, it maintained a 20.5x speedup over SyncSGD.

Figure 2: Training loss vs. communication rounds for ResNet-18 and VGG-16 on CIFAR-10 (IID and Non-IID).

For non-convex deep learning tasks (Figure 2), STL-SGD variants consistently converge faster in terms of communication rounds. Notably, it maintains the same final accuracy as Synchronous SGD, proving that communication savings do not compromise model quality. Even in difficult Non-IID settings, STL-SGD exhibits robust performance and linear speedup.

Conclusion

STL-SGD provides a theoretical and practical leap in distributed optimization by linking the communication period to the learning rate. While it introduces new hyperparameters like the growth factor for $k$, its ability to reduce communication complexity from polynomial to logarithmic in some cases is a significant advancement. Future work may explore combining STL-SGD with orthogonal techniques like gradient compression or variance reduction.

Summary updated

BibTeX
@inproceedings{shen2021stl,
  author = {Shuheng Shen and Yifei Cheng and Jingchang Liu and Linli Xu},
  title = {{STL-SGD: Speeding Up Local SGD with Stagewise Communication Period}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i11.17153},
}
Figure