Abstract
Training modern deep neural networks on massive datasets like ImageNet is a computationally grueling process. This paper investigates the trade-offs between synchronous and asynchronous strategies for scaling deep learning across multiple GPUs. We introduce Gossiping SGD, a decentralized asynchronous method that avoids central server bottlenecks. Our empirical evaluation discovers a surprising trend: asynchronous methods often outperform synchronous ones at smaller scales (up to 32 nodes), while synchronous methods remain the gold standard for massive clusters.
Introduction
The demand for training deep neural networks on massive datasets has led to the widespread adoption of distributed training across clusters of nodes. However, scaling efficiency is often hampered by communication "taxes." Traditional approaches include:
- Synchronous All-Reduce SGD: Requires all nodes to synchronize at every step, leading to the "straggler effect" where the slowest node dictates the cluster speed.
- Asynchronous Parameter-Server SGD: Nodes update a central server independently. While this avoids waiting, it creates a massive communication bottleneck at the central server.
This study explores whether a decentralized approach, Gossiping SGD, can mitigate these issues and how different scaling strategies perform across various cluster sizes.
Methods
We compare three primary distributed Stochastic Gradient Descent (SGD) strategies:
- Synchronous All-Reduce: The baseline where all nodes compute gradients and average them collectively before updating.
- Elastic Averaging SGD (EASGD): An asynchronous method where local nodes are "pulled" toward a central "center parameter" elastically.
- Gossiping SGD: Our proposed decentralized method. It removes the central server; instead, each node periodically averages its parameters with a random neighbor.
Experiments were conducted using the ImageNet dataset with a ResNet-18 architecture, implemented with MPI and optimized GPU kernels.
Key Results and Insights
Our experiments revealed a "Small Scale Surprise": at scales of 8 and 16 nodes, asynchronous methods like Gossiping SGD and EASGD converged faster in wall-clock time than synchronous All-Reduce.
As shown in the figure above, for $p=8$ and $p=16$ nodes, Gossiping SGD and EASGD ($\tau=10$) consistently reached lower validation error faster than Synchronous All-Reduce in terms of wall-clock time. However, when looking at training epochs, the methods perform similarly, indicating that the wall-clock advantage comes from reduced communication overhead per iteration.
Key findings include:
- Asynchrony and Learning Rates: Asynchronous benefits are most pronounced early in training when learning rates are large. As the learning rate is annealed, the noise from asynchrony becomes a liability.
- Scaling Limits: The advantage of asynchronous methods evaporates at 32 nodes. At 64 and 128 nodes, Synchronous All-Reduce becomes the clear winner, achieving higher peak accuracy (~68.7% top-1 on ResNet-18).
- Communication Efficiency: Gossiping SGD spreads the communication load across the network fabric, avoiding the central server bottleneck of EASGD.
Conclusion
While asynchronous and decentralized methods offer significant speedups at smaller scales, Synchronous All-Reduce remains more robust for very large clusters. Future work should focus on closing the "generalization gap" for asynchronous methods at high node counts and exploring these dynamics on newer hardware architectures and different model types.
Summary updated