Abstract
Finishing 90-epoch ImageNet-1k training with ResNet-50 on a NVIDIA M40 GPU takes 14 days, requiring $10^{18}$ single precision operations. While modern supercomputers can theoretically complete this in one minute, algorithmic bottlenecks—specifically small batch sizes (e.g., 512)—prevent efficient processor utilization. This paper focuses on large-batch data-parallel synchronous SGD to scale training without accuracy loss. Using the Layer-wise Adaptive Rate Scaling (LARS) algorithm, we scaled batch sizes to 32K. We completed 100-epoch AlexNet training in 11 minutes on 1024 CPUs and 90-epoch ResNet-50 training in 20 minutes on 2048 KNLs. Our approach achieved 74.9% top-1 accuracy for ResNet-50 in just 14 minutes (64 epochs), significantly outperforming previous benchmarks in both speed and accuracy at extreme scales.
Introduction
Training deep neural networks (DNNs) on massive datasets like ImageNet-1k is a major computational bottleneck. To reduce training time from weeks to minutes, researchers employ data parallelism, distributing workloads across thousands of processors. However, this introduces a critical trade-off: to maintain high hardware efficiency and minimize communication overhead, the batch size must be increased.
Historically, scaling the batch size beyond 8K led to a "generalization gap," where model accuracy plummeted. This study addresses the "8K barrier," demonstrating that with the right optimization algorithms, synchronous Stochastic Gradient Descent (SGD) can scale to 32K batches while maintaining state-of-the-art accuracy.
Methodology: Layer-wise Adaptive Rate Scaling (LARS)
The primary challenge in large-batch training is that standard SGD uses a single global learning rate. This often causes training to diverge or stall because different layers have vastly different weight and gradient magnitudes. To solve this, we utilized the LARS algorithm, which calculates a local learning rate for each layer based on the ratio of the weight norm to the gradient norm.
LARS acts as a stabilizer, allowing the model to handle the aggressive gradients generated by 32K-image batches. We implemented this within a synchronous SGD framework to ensure sequential consistency and stability. For hardware, we utilized Intel Knights Landing (KNL) and Skylake CPUs, which provide the high-bandwidth memory necessary for intensive DNN workloads.
Key Results and Performance Scaling
Our approach successfully broke the 8K batch size barrier, maintaining high accuracy even at 32K. For ResNet-50, we achieved 74.9% top-1 accuracy in 14 minutes (64 epochs) or 20 minutes (90 epochs) using 2048 KNL nodes. For AlexNet, we reached 58.6% accuracy in 11 minutes using 1024 CPUs.
As shown in the results, when the batch size increases above 16K, our LARS-based approach maintains significantly higher accuracy than previous state-of-the-art methods. This efficiency is driven by a better communication-to-computation ratio, allowing for effective "weak scaling" across massive clusters.
Discussion and Conclusion
By combining the LARS algorithm with high-performance many-core processors, we have demonstrated that ImageNet training can be accelerated by orders of magnitude. While our initial results used weaker data augmentation, subsequent tuning allowed us to match and exceed existing accuracy benchmarks.
Future work will explore the interaction between large-batch training and complex data augmentation strategies, as well as the generalization of LARS to more diverse architectures like Transformers. Our results suggest that the theoretical "five-second" training limit on current supercomputers is an attainable goal for the near future.
Summary updated