Abstract
Distributed training of large-scale machine learning models is frequently bottlenecked by the communication overhead of gradient synchronization. While gradient sparsification techniques like Top-$K$ offer high accuracy, they are typically incompatible with high-performance All-Reduce primitives because each node selects different indices to transmit. This paper introduces ARC-Top-$K$, a novel compressor that utilizes a synchronized sketching mechanism to align important gradient indices globally. This alignment enables the use of hardware-optimized All-Reduce communication while maintaining the empirical benefits of magnitude-based sparsification. We demonstrate that ARC-Top-$K$ possesses the global contractive property, leading to superior theoretical convergence rates and up to a 60.7% reduction in wall-clock training time for large language models.
Introduction
In large-scale distributed machine learning, the time spent moving data between GPUs often outweighs the time spent computing gradients. To mitigate this, gradient sparsification is used to send only the most "important" components. Currently, practitioners face a trade-off between two flawed approaches:
- Rand-$K$: Randomly selects indices. It is compatible with fast All-Reduce primitives because all nodes can agree on indices beforehand, but it discards structural information, leading to poor model accuracy.
- Top-$K$: Selects the largest magnitude entries. While empirically accurate, it is system-inefficient. Because every node picks different indices, they must use slower All-Gather operations and transmit both values and indices. Furthermore, Top-$K$ lacks the "global contraction" property in distributed settings, making its theoretical convergence unpredictable.
ARC-Top-$K$ (All-Reduce-Compatible Top-$K$) bridges this gap by selecting informative components while remaining compatible with index-free All-Reduce.
The ARC-Top-$K$ Method
The core innovation of ARC-Top-$K$ is a shared sketching mechanism that aligns the importance of gradient entries across all nodes before the main communication step.
As illustrated in Figure 1, the process follows five key steps:
- Matrix Reshaping: The gradient vector is reshaped into an $m \times n$ matrix.
- Synchronized Sketching: All nodes use a shared random seed to generate an identical Gaussian projection matrix $V$. Each node multiplies its local gradient by $V$ to create a low-rank "sketch."
- Global Alignment: Nodes perform a small, fast All-Reduce on these tiny sketches. Based on the aggregated result, all nodes identify the same set of "globally important" rows.
- Index-Free Communication: Since all nodes agree on the indices, they use standard, high-bandwidth All-Reduce to sum the actual gradient values without transmitting indices.
- Error Feedback (EF21M): The algorithm integrates a momentum-based error feedback mechanism to compensate for sparsification loss, ensuring convergence to the correct solution.
Theoretical and Empirical Comparison
ARC-Top-$K$ restores mathematical rigor to magnitude-based sparsification. Unlike standard Top-$K$, ARC-Top-$K$ is provably contractive at the global level. This allows for a theoretical "linear speedup," where doubling the nodes effectively halves the training time without sacrificing convergence quality.
As shown in Figure 2, ARC-Top-$K$ achieves a transient complexity of $O(N/\sigma^2)$, a significant improvement over the $O(N^3/\sigma^2)$ complexity of standard Top-$K$. This theoretical advantage translates directly into superior empirical performance across various primitives.
Experimental Evaluation
The researchers evaluated ARC-Top-$K$ across three major domains:
- Computer Vision: Testing ResNet-18 and ResNet-50 on CIFAR-10.
- Natural Language Understanding: Fine-tuning RoBERTa-base on the GLUE benchmark.
- Large Language Models (LLMs): Pre-training LLaMA models (60M to 1B parameters) on the C4 corpus.
Key Results
- Efficiency: For a LLaMA-1B model, ARC-Top-$K$ reduced average training time per iteration by 60.7% compared to the dense baseline.
- Accuracy: On the GLUE benchmark, ARC-Top-$K$ achieved an average score of 87.42, matching or slightly exceeding the dense baseline (87.12) and outperforming Rand-$K$ (86.63).
- Scalability: In tests on up to 64 nodes, the method consistently matched dense training performance while significantly outperforming Rand-$K$ in accuracy.
Conclusion
ARC-Top-$K$ successfully combines the accuracy of magnitude-based sparsification with the system efficiency of All-Reduce communication. By aligning gradient importance through a lightweight sketching mechanism, it provides a scalable and theoretically sound solution for high-performance distributed learning. Future work may explore more sophisticated reshaping strategies for specialized architectures and further hyperparameter optimization for the sketching rank.
Summary updated