[Paper Review] How to scale distributed deep learning?
This paper compares synchronous and asynchronous distributed SGD for training ResNet on ImageNet, proposing gossiping SGD—a decentralized, parameter-server-free method that replaces all-reduce with local averaging. It finds asynchronous methods (including gossiping and elastic averaging) converge faster at smaller scales (up to ~32 nodes), while synchronous all-reduce scales better beyond ~32 nodes due to superior convergence at larger scales.
Training time on large datasets for deep neural networks is the principal workflow bottleneck in a number of important applications of deep learning, such as object classification and detection in automatic driver assistance systems (ADAS). To minimize training time, the training of a deep neural network must be scaled beyond a single machine to as many machines as possible by distributing the optimization method used for training. While a number of approaches have been proposed for distributed stochastic gradient descent (SGD), at the current time synchronous approaches to distributed SGD appear to be showing the greatest performance at large scale. Synchronous scaling of SGD suffers from the need to synchronize all processors on each gradient step and is not resilient in the face of failing or lagging processors. In asynchronous approaches using parameter servers, training is slowed by contention to the parameter server. In this paper we compare the convergence of synchronous and asynchronous SGD for training a modern ResNet network architecture on the ImageNet classification problem. We also propose an asynchronous method, gossiping SGD, that aims to retain the positive features of both systems by replacing the all-reduce collective operation of synchronous training with a gossip aggregation algorithm. We find, perhaps counterintuitively, that asynchronous SGD, including both elastic averaging and gossiping, converges faster at fewer nodes (up to about 32 nodes), whereas synchronous SGD scales better to more nodes (up to about 100 nodes).
Motivation & Objective
- To evaluate the convergence performance of synchronous and asynchronous SGD in distributed deep learning at scale.
- To address the limitations of synchronous SGD (straggler effects) and asynchronous SGD (parameter server bottlenecks) in large-scale training.
- To propose and evaluate gossiping SGD, a decentralized alternative to parameter servers that reduces communication overhead.
- To determine the optimal distributed SGD strategy based on the number of available nodes.
- To provide empirical guidance for practitioners on choosing between synchronous and asynchronous training based on node count and convergence speed.
Proposed method
- Proposes gossiping SGD, an asynchronous method that replaces centralized parameter servers with local averaging using random node pairs.
- Uses a two-step update: first compute local gradients, then update parameters via stochastic averaging with a randomly selected neighbor.
- Employs a consensus-like update: $\theta_{i,t+1} = (1-\beta)\theta_{i,t}^\prime + \beta\theta_{j_{i,t},t}^\prime$, where $\theta_{i,t}^\prime$ is the gradient step and $j_{i,t}$ is a random node.
- Implements a decentralized gossip protocol that avoids synchronization barriers and central bottlenecks.
- Compares three methods: synchronous all-reduce SGD, asynchronous elastic averaging SGD, and proposed gossiping SGD.
- Employs multi-scale data augmentation using fast CUDA-based image resizing to reduce I/O overhead in training.
Experimental results
Research questions
- RQ1How does the convergence speed of asynchronous SGD compare to synchronous SGD at different numbers of nodes?
- RQ2Does gossiping SGD, a decentralized alternative, outperform centralized parameter server approaches in convergence and scalability?
- RQ3At what scale (number of nodes) does synchronous all-reduce SGD surpass asynchronous methods in convergence speed?
- RQ4How do large step sizes and small step sizes affect the performance of synchronous and asynchronous SGD?
- RQ5Can gossiping SGD achieve faster convergence than elastic averaging and all-reduce SGD at small to moderate node counts?
Key findings
- Asynchronous SGD, including both elastic averaging and gossiping, converges faster than synchronous all-reduce SGD at smaller scales (up to approximately 32 nodes).
- Synchronous all-reduce SGD scales better to larger numbers of nodes (up to about 100 nodes), achieving faster convergence at larger scales.
- Gossiping SGD achieves faster convergence than all-reduce SGD at small node counts, despite its decentralized nature and lack of synchronization barriers.
- At large step sizes, asynchronous methods converge faster, while at small step sizes, all-reduce SGD reaches higher accuracy more quickly.
- The performance trade-off between asynchrony and synchronization depends on the number of nodes: asynchrony wins at small scale, synchrony at large scale.
- The proposed gossiping SGD method avoids parameter server bottlenecks and eliminates straggler effects, making it robust and scalable in practice.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.