Abstract
Load imbalance pervasively exists in distributed deep learning training systems, either caused by the inherent imbalance in learned tasks or by the system itself. Traditional synchronous Stochastic Gradient Descent (SGD) achieves good accuracy for a wide variety of tasks, but relies on global synchronization to accumulate the gradients at every training step. In this paper, we propose eager-SGD, which relaxes the global synchronization for decentralized accumulation. To implement eager-SGD, we propose to use two partial collectives: solo and majority. With solo allreduce, the faster processes contribute their gradients eagerly without waiting for the slower processes, whereas with majority allreduce, at least half of the participants must contribute gradients before continuing, all without using a central parameter server. We theoretically prove the convergence of the algorithms and describe the partial collectives in detail. Experimental results on load-imbalanced environments (CIFAR-10, ImageNet, and UCF101 datasets) show that eager-SGD achieves 1.27x speedup over the state-of-the-art synchronous SGD, without losing accuracy.
Introduction: The Challenge of Load Imbalance
In distributed deep learning, "load imbalance" is a silent killer of performance. It occurs when some computing nodes (processes) finish their work slower than others, creating "stragglers" that delay the entire cluster. This imbalance is often inevitable, arising from either system noise (e.g., network jitter in multi-tenant clouds) or inherent data variance (e.g., processing a batch of short sentences versus long paragraphs in NLP tasks).
Traditional Synchronous Stochastic Gradient Descent (synch-SGD) relies on a global barrier: every process must finish its computation and contribute its gradient before any node can move to the next step. As shown in Figure 6, when runtimes vary significantly, the entire cluster must wait for the slowest node, leading to wasted computational resources and increased training time.
Methodology: Eager-SGD and Partial Collectives
To address this, we propose eager-SGD, a decentralized training approach that replaces strict global synchronization with partial collective operations. The core idea is to allow the training process to move forward even if some nodes are lagging, leveraging the inherent robustness of SGD to stochastic noise.
We introduce two new types of partial collectives to accumulate gradients:
- Solo Allreduce: A wait-free operation. As soon as an initiator process finishes its local work, it triggers the collective. Other processes join if they are ready; if not, the operation proceeds using their previous (stale) data or null values.
- Majority Allreduce: A more robust version where the operation only proceeds once at least half of the participants have contributed their current gradients. This provides a better statistical guarantee for convergence in cases of extreme imbalance.
As illustrated in Figure 1, eager-SGD eliminates the "idle" periods characteristic of synch-SGD. To implement this efficiently, we developed fflib2, a communication library that allows these partial collective schedules to be offloaded and executed asynchronously, avoiding the bottlenecks of central parameter servers.
Experimental Results
We evaluated eager-SGD across several standard benchmarks to prove its versatility and effectiveness in handling both system-level and data-driven imbalance:
- ImageNet (ResNet-50): Eager-SGD achieved a 2.64x speedup over asynchronous centralized SGD and a 1.29x speedup over state-of-the-art synchronous decentralized frameworks like Horovod.
- UCF101 (LSTM): In this video processing task with high inherent workload variance, eager-SGD delivered a 1.27x speedup while maintaining the same accuracy as synchronous methods.
- Accuracy Preservation: Across all tests, including CIFAR-10 and WMT16, final Top-1 and Top-5 accuracies remained within the margin of error compared to synchronous baselines. This confirms that the model can tolerate the "noise" of missing straggler data provided the majority of the cluster continues to advance.
Conclusion
Eager-SGD demonstrates that global synchronization is not a requirement for high-quality deep learning models. By relaxing synchronization constraints through partial collectives, we can significantly improve training throughput in real-world, imbalanced environments. Future work will investigate dynamic quorum tuning to further optimize the balance between training speed and convergence stability.
Summary updated