Abstract
Distributed training of large-scale Deep Neural Networks (DNNs) often faces a communication bottleneck, particularly on commodity networks with limited bandwidth. While gradient sparsification techniques like Top-k selection reduce data volume, their communication costs typically scale linearly with the number of workers. This paper presents gTop-k, a novel algorithm that identifies the globally most significant gradients across a cluster. By utilizing a tree-based aggregation strategy, gTop-k reduces communication complexity from $O(kP)$ to $O(k \log P)$. Experimental results on a 32-node GPU cluster demonstrate speedups of up to 12.8x over dense Synchronous SGD (S-SGD) without compromising model accuracy.
Introduction
Training modern DNNs requires massive computational resources, usually distributed across multiple GPUs. The standard approach, Synchronous Stochastic Gradient Descent (S-SGD), requires workers to synchronize gradients at every iteration. However, as GPU processing speeds outpace network bandwidth improvements, the time spent on communication becomes a dominant factor, especially on 1Gbps Ethernet.
Existing Top-k sparsification methods reduce the number of gradients sent but often rely on AllGather operations. In an AllGather setup, every worker receives the top-k gradients from every other worker, leading to a total communication volume that grows linearly with the number of workers ($P$). On low-bandwidth networks, this linear scaling quickly negates the benefits of sparsification.
Methodology: Global Top-k (gTop-k)
To address the scaling bottleneck, we propose Global Top-k (gTop-k). Unlike local Top-k methods that aggregate all workers' significant gradients, gTop-k identifies only the $k$ largest absolute values across the entire cluster.
Tree-based Aggregation
The core of gTop-k is the gTopKAllReduce primitive. Instead of a flat communication structure, we employ a binary tree for aggregation. In each round, pairs of workers exchange their local top-k gradients. They merge these sets, perform a new Top-k selection to keep the best $k$ out of $2k$ elements, and pass the result up the tree.
This hierarchical approach ensures that the communication complexity is $O(k \log P)$, making the system significantly more scalable than linear $O(kP)$ methods.
Residual Accumulation
To maintain convergence accuracy, gradients not selected in the current global top-k set are not discarded. Instead, they are stored locally as "residuals." These residuals are added to the gradients calculated in the subsequent iteration. This mechanism ensures that even small gradient updates eventually accumulate enough magnitude to be transmitted, preserving the overall direction of the optimization.
Experimental Evaluation
We evaluated gTop-k on a 32-node GPU cluster using 1Gbps Ethernet. The benchmarks included standard models such as VGG-16, ResNet-20, AlexNet, ResNet-50, and LSTMs across datasets like Cifar-10, ImageNet, and Penn Treebank.
Performance and Convergence
gTop-k achieved substantial throughput improvements, ranging from 2.7x to 12.8x compared to dense S-SGD. For AlexNet, which has a high parameter count relative to its computation, gTop-k was 12.8x faster than the dense baseline and 1.7x faster than standard Top-k implementations.
Crucially, this reduction in communication does not come at the cost of model quality. As shown in the training loss curves, gTop-k tracks the convergence of standard S-SGD very closely, proving that the global subset of gradients is sufficient for effective training.
Discussion and Future Work
While gTop-k significantly reduces network overhead, it introduces some local computation costs. Selecting top-k elements on a GPU can be inefficient due to the non-parallel nature of sorting/selection on SIMD architectures. Future work will focus on optimizing these GPU kernels and exploring layer-wise sparsification to overlap communication with the computation of preceding layers.
In conclusion, gTop-k provides a scalable solution for distributed deep learning on budget-constrained network hardware, decoupling communication costs from cluster size while maintaining high model accuracy.
Summary updated