TL;DR
DeAR (Decoupled All-Reduce) accelerates distributed deep learning by breaking down the monolithic all-reduce communication primitive into two distinct phases: reduce-scatter and all-gather. This decoupling allows communication to be hidden behind both backpropagation and the subsequent iteration's feed-forward computations, yielding up to an 83% training speedup without introducing extra communication overhead.
What Problem Does This Paper Address?
In distributed deep learning, data-parallel Synchronous Stochastic Gradient Descent (S-SGD) is widely used to train large models across multiple GPUs. However, as clusters scale, aggregating gradients across workers via the all-reduce architecture becomes a massive communication bottleneck.
Modern frameworks mitigate this using Wait-Free Backpropagation (WFBP), which pipelines gradient communication with gradient computation during the backward pass. While effective, WFBP leaves a major optimization opportunity on the table: it completely ignores the feed-forward (forward pass) stage, which typically accounts for about one-third of the total iteration time.
Previous attempts to utilize the forward pass (like ByteScheduler) partition and re-order communication tasks. However, in all-to-all architectures, re-ordering requires expensive coordination and negotiation among all workers to ensure correctness. Furthermore, partitioning large tensors into smaller ones introduces significant startup latency overheads. DeAR tackles these challenges by enabling fine-grained pipelining across both forward and backward passes without task re-ordering or extra negotiation overhead.
Methods
DeAR introduces three core techniques to achieve fine-grained pipelining:
- Decoupling All-Reduce: The authors exploit the mathematical nature of ring-based all-reduce, which is inherently composed of a
reduce-scatteroperation followed by anall-gatheroperation. DeAR splits all-reduce into these two continuous operations ($OP_1$ and $OP_2$) with zero theoretical time overhead. - Bi-directional Pipelining (BackPipe & FeedPipe): Instead of waiting for a full all-reduce to finish, DeAR pipelines $OP_1$ (reduce-scatter) with backpropagation computing tasks (BackPipe). It then pipelines $OP_2$ (all-gather) with the feed-forward computing tasks of the next iteration (FeedPipe). Crucially, because the operations maintain a strict First-In, First-Out (FIFO) order, workers require zero runtime negotiation.
- Bayesian Optimization-Based Tensor Fusion: Fusing small tensors reduces network startup latency, but over-fusing limits the granularity of feed-forward pipelining. To find the sweet spot, DeAR employs a dynamic Bayesian Optimization (BO) tuner at runtime to automatically discover the optimal fusion buffer size without any prior knowledge of the model architecture or cluster configuration.
Datasets
The authors evaluated DeAR using two standard, heavy-duty deep learning benchmarks:
- Image Classification: Trained on the ImageNet dataset using ResNet-50, DenseNet-201, and Inception-v4.
- Natural Language Processing (NLP): Evaluated using BERT-Base and BERT-Large configurations during pre-training.
Key Insights and Ideas
- The "Free" Split: All-reduce isn't an indivisible atomic block. Splitting it into its constituent parts costs nothing in terms of communication complexity but completely changes the scheduling landscape by bridging the boundary between training iterations.
- FIFO is a Feature, Not a Bug: While other state-of-the-art schedulers try to optimize performance by re-ordering tensors based on priority, DeAR proves that keeping a strict FIFO order avoids the costly multi-worker synchronization penalties that ruin performance on high-latency networks like 10Gb/s Ethernet.
- Asymmetric Hiding: Pipelining reduce-scatter ($OP_1$) behind backpropagation hides more communication time than pipelining all-gather ($OP_2$) behind feed-forward. This is because backpropagation computations are inherently slower (often up to 2x) than feed-forward computations, providing a larger "window" to hide network transfer times.
Key Results
The system was evaluated on a dense 64-GPU cluster under two network configurations: a high-latency 10Gb/s Ethernet network and a low-latency 100Gb/s InfiniBand network.
- 10Gb/s Ethernet: DeAR achieved a 6% to 83% training speedup (averaging 36%) over state-of-the-art frameworks like PyTorch-DDP, Horovod, and ByteScheduler.
- 100Gb/s InfiniBand: Even on ultra-fast networks where communication bottlenecks are less severe, DeAR still delivered up to a 15% speedup (averaging 8%).
- Proximity to Theoretical Max: Across all experiments, DeAR achieved 72.3% to 99.2% of the theoretical maximum possible speedup under perfect communication-computation overlapping conditions.
Limitations and Future Work
While DeAR significantly mitigates communication overhead, massive models like BERT-Large trained over slower networks (10GbE) still suffer from low scaling efficiency due to an inherently high communication-to-computation ratio.
The authors note that DeAR currently focuses purely on system-level scheduling. To address extreme communication bottlenecks, future work will involve integrating algorithmic-level optimizations, such as gradient compression or quantization, directly into DeAR's decoupled pipelining framework. Additionally, they plan to extend the decoupling methodology to other non-ring all-reduce topologies, such as double-binary trees.
Summary updated