Abstract
The performance and efficiency of distributed training of Deep Neural Networks highly depend on the performance of gradient averaging among all participating nodes, which is bounded by the communication between nodes. There are two major strategies to reduce communication overhead: one is to hide communication by overlapping it with computation, and the other is to reduce message sizes. The first solution works well for linear neural architectures, but latest networks such as ResNet and Inception offer limited opportunity for this overlapping. Therefore, researchers have paid more attention to minimizing communication. In this paper, we present a novel gradient compression framework derived from insights of real gradient distributions, and which strikes a balance between compression ratio, accuracy, and computational overhead. Our framework has two major novel components: sparsification of gradients in the frequency domain, and a range-based floating point representation to quantize and further compress gradients frequencies. Both components are dynamic, with tunable parameters that achieve different compression ratio based on the accuracy requirement and systems' platforms, and achieve very high throughput on GPUs. We prove that our techniques guarantee the convergence with a diminishing compression ratio. Our experiments show that the proposed compression framework effectively improves the scalability of most popular neural networks on a 32 GPU cluster to the baseline of no compression, without compromising the accuracy and convergence speed.
Introduction: The Communication Bottleneck
In data-parallel distributed training, every worker computes a gradient based on its local data batch. These gradients must be averaged across all workers before the next training step can proceed. As neural networks grow in complexity, these gradient arrays become massive, often reaching hundreds of megabytes. Even with high-speed interconnects like InfiniBand, the repetitive transfer of this data creates a severe bottleneck.
Historically, systems attempted to hide this latency by overlapping communication with computation. However, modern architectures like ResNet utilize smaller convolution kernels, which significantly reduces the computation time available to mask communication overhead.
As shown in Figure 2, communication latency often exceeds computation time, particularly in the later layers of deep networks. This necessitates lossy gradient compression—sending smaller, approximate gradients—to maintain training efficiency.
Methodology: FFT-Based Compression Pipeline
The authors propose a two-part compression pipeline designed to aggressively shrink gradient size while preserving their mathematical integrity.
1. FFT-based Sparsification
Instead of dropping the smallest gradient values directly (spatial Top-k), the framework treats the 1D gradient array as a signal and applies a Fast Fourier Transform (FFT). It then drops low-energy (near-zero) frequency components. By sparsifying in the frequency domain, the reconstructed gradients retain the overall shape and trend of the original data much better than simple spatial pruning.
2. Range-based Quantization
Standard 32-bit floats (IEEE-754) are often inefficient for gradients, which typically occupy a very narrow numerical range. The authors introduce a custom $N$-bit floating-point format that dynamically adjusts its representable range using an offset/base to tightly fit the actual distribution of gradients at any given time.
3. Fast Packing
To make this practical for real-time training, the system employs a highly optimized, GPU-friendly parallel packing algorithm. This algorithm compresses the resulting sparse, quantized vectors into dense arrays for efficient network transmission.
Experimental Results
The framework was evaluated on standard image classification benchmarks, including ImageNet (AlexNet) and CIFAR-10 (ResNet32).
- Speedup: On an 8-GPU InfiniBand cluster, the FFT-based framework accelerated AlexNet training by 2.26x and ResNet32 by 1.33x compared to standard 32-bit uncompressed SGD.
- Comparison with State-of-the-Art: The method outperformed existing lossy algorithms such as QSGD, TernGrad, and Top-k in both end-to-end wall time and final Top-1 accuracy. For AlexNet, it was 1.31x faster than QSGD and 1.47x faster than Top-k.
- Compression Efficiency: By combining an 85% frequency drop-out with 10-bit quantization, the system achieved an effective compression ratio of 21.3x while maintaining baseline accuracy.
Key Insights
- Frequency Domain Sparsification: Dropping 85% of data in the frequency domain results in lower reconstruction error than spatial pruning. FFT preserves the "descent direction" of gradients, ensuring smooth convergence.
- Dynamic Precision: Gradients evolve during training. By dynamically tuning exponent and mantissa allocation, the framework maximizes precision with only 8 to 10 bits.
- Theoretical Convergence: The authors mathematically prove that FFT-sparsified SGD converges. They demonstrate that convergence to baseline accuracy can be guaranteed by gradually decreasing the compression ratio (diminishing $\theta$) as training progresses.
Limitations and Future Work
A primary limitation is the lack of native system-level support for sparse data in current communication libraries like MPI. Standard allreduce operations are not optimized for sparse arrays, forcing the use of allgather, which scales linearly with the number of GPUs. Future work should focus on developing bandwidth-efficient allreduce primitives that natively support sparse data to fully unlock the potential of lossy gradient compression.
Summary updated