This paper, presented at AAAI 2020, introduces LAGS-SGD, a distributed optimization method that solves a long-standing conflict in deep learning scaling: the trade-off between sending less data (sparsification) and hiding communication time (pipelining).
TL;DR
LAGS-SGD introduces a layer-wise adaptive gradient sparsification scheme that allows distributed training to overlap communication with backpropagation. By sparsifying gradients at the layer level rather than the model level, it achieves significant wall-clock speedups over standard SGD while maintaining identical convergence guarantees.
What Problem Does This Paper Address?
In distributed deep learning, Synchronous Stochastic Gradient Descent (S-SGD) is the standard for maintaining model accuracy. However, as clusters grow, the "communication bottleneck" becomes severe—the time spent synchronizing gradients across the network often exceeds the time spent computing them.
Researchers typically use two distinct strategies to fight this:
- Pipelining: Overlapping the communication of layer $l$ with the computation of layer $l-1$ during backpropagation.
- Gradient Sparsification: Only sending the most "significant" gradients (e.g., the Top-k largest values) to reduce data volume by 99% or more.
The problem? These two are usually mutually exclusive. Existing sparsification methods treat the entire model as a single vector. This forces workers to finish the entire backpropagation pass before they can even begin selecting and sending the Top-k gradients, completely missing the opportunity to pipeline.
Methods
The authors propose Layer-wise Adaptive Gradient Sparsification (LAGS-SGD). Instead of one global sparsification step, LAGS-SGD applies sparsification to each layer independently as soon as its gradients are computed.
Key components include:
- Layer-wise Top-k: Each worker selects the top gradients for each layer. This allows the communication for the last layer to start while the second-to-last layer is still being calculated.
- Error Compensation: To prevent accuracy loss, gradients that aren't sent in one iteration are stored in a local "residual" buffer and added to the next iteration's gradients.
- Adaptive Compression Ratios: The algorithm can adjust the compression ratio ($k$) for each layer based on its specific communication-to-computation ratio. Layers that are communication-heavy can be compressed more aggressively.
- Theoretical Convergence: The authors provide a rigorous proof that LAGS-SGD converges at a rate of $O(1/\sqrt{T})$ for non-convex smooth optimization, which is the same order as vanilla S-SGD.
Datasets
The researchers evaluated LAGS-SGD across several standard benchmarks to ensure broad applicability:
- Cifar-10: Used with ResNet-20 and VGG-16.
- ImageNet: Used for large-scale evaluation with ResNet-50 and Inception-v4.
- Penn Treebank (PTB): Used to test a 2-layer LSTM language model, showing the method works for RNNs as well as CNNs.
Key Insights and Ideas
- Breaking the "Single Vector" Assumption: The most important "aha" moment is that treating a DNN as a single vector for sparsification is a legacy of optimization theory that ignores the actual execution flow of backpropagation. Breaking the vector into layers unlocks the hardware's ability to do two things at once.
- The Sparsification-Convergence Trade-off: The theoretical analysis reveals that while higher compression ratios reduce communication time, they can technically slow down the convergence rate (requiring more iterations). This justifies the "Adaptive" part of LAGS: you should only compress as much as necessary to hide the communication latency.
- Assumption 1 (The "Better than Random" Assumption): The proof relies on a weak analytical assumption that Top-k selection is at least as good as selecting $k$ components at random. The authors empirically verify this across multiple models, showing it holds true throughout the training process.
Key Results
The experiments were conducted on a 16-GPU cluster with 10Gbps Ethernet.
- Speed: LAGS-SGD achieved a 22%–30% speedup over Dense S-SGD and was consistently faster than SLGS-SGD (single-layer sparsification).
- Pipelining Efficiency: LAGS-SGD was able to close the gap to the theoretical maximum speedup of pipelining by up to 45%.
- Accuracy: There was no significant loss in model accuracy. For example, on ResNet-20 (Cifar-10), LAGS-SGD achieved 90.24% accuracy compared to 90.92% for Dense SGD.
Limitations and Future Work
- Small Message Overhead: Layer-wise communication results in many small network packets. On some networks, the "startup time" (latency) for many small messages can outweigh the bandwidth savings. The authors suggest "tensor fusion" (grouping a few layers together) as a potential fix.
- GPU Selection Overhead: Selecting the Top-k elements on a GPU is computationally expensive. While the authors used a "double sampling" heuristic to speed this up, more efficient GPU-based selection algorithms would further improve the "r" ratio (communication-to-computation).
- Adaptive Tuning: While the paper proposes a formula for adaptive ratios, implementing this dynamically in a production environment with fluctuating network traffic remains a challenge for future systems research.
Summary updated