Abstract
Traditional training of deep neural networks relies on decaying the learning rate to ensure convergence and generalization. However, this approach necessitates a high number of parameter updates, creating a communication bottleneck in distributed environments. This paper introduces Stagewise Enlargement of Batch Size (SEBS), a novel training strategy that geometrically increases the batch size at each training stage while maintaining a constant learning rate. We demonstrate that SEBS achieves a logarithmic iteration complexity $O(\log(1/\epsilon))$, significantly reducing the total number of updates and communication overhead without sacrificing accuracy on benchmarks like CIFAR-10 and ImageNet.
Introduction
Stochastic Gradient Descent (SGD) is fundamental to machine learning, yet it presents a trade-off between computational speed and model generalization. Small batch sizes provide the stochastic noise necessary for better generalization but require frequent parameter updates, which are computationally expensive and hinder scalability in distributed systems. Conversely, while large batch sizes utilize hardware more efficiently, they often suffer from a "generalization gap."
Existing solutions, such as linear scaling rules, often lack theoretical guarantees and require manual tuning. The proposed SEBS framework addresses these issues by providing a theoretically-backed method to transition to large batches during training, optimizing both speed and accuracy.
Methodology: Stagewise Enlargement of Batch Size (SEBS)
The core innovation of SEBS is the replacement of stagewise learning rate decay with stagewise batch size enlargement. Instead of reducing the learning rate by a factor (e.g., 0.1) at specific intervals, SEBS increases the batch size by a factor $\rho$ (e.g., 12) at each stage.
Theoretical Equivalence
A major contribution of this work is the theoretical proof that decreasing the learning rate and increasing the batch size have an equivalent effect on the training error. The authors show that the "optimal" batch size is inversely proportional to the distance between the current parameters and the global optimum. As the model converges, the batch size can be safely increased to maintain the signal-to-noise ratio of the gradients.
Penalty SGD (pSGD)
To stabilize training within each stage and improve generalization, SEBS incorporates Penalty SGD (pSGD). This variant includes a quadratic penalty term that encourages the model to remain within a stable region of the loss landscape. The framework is further extended to include momentum (mSEBS) and adaptive methods (AdaSEBS).
Hardware Efficiency and Throughput
A primary motivation for SEBS is the exploitation of modern GPU architectures. As batch sizes increase, the overhead of kernel launches and communication is amortized over more data points, leading to higher throughput.
As illustrated in Figure 1, the computation time per epoch for ResNet20 and ResNet56 on an NVIDIA V100 GPU drops sharply as the batch size increases from 32 to over 1000. SEBS leverages this trend by pushing the batch size into these high-efficiency regimes as training progresses, maximizing hardware utilization.
Experimental Results
The authors evaluated SEBS across multiple architectures and datasets, comparing it against standard stagewise SGD and other large-batch heuristics.
- CIFAR-10: On ResNet20, SEBS (with $\rho=12$) achieved a test accuracy of 91.7%, matching standard SGD. Crucially, SEBS required only 32.6k parameter updates, a nearly 50% reduction from the 62.5k updates required by the baseline.
- ImageNet: For large-scale training on ResNet50, mSEBS achieved a test accuracy of 75.87%. This result matched standard momentum SGD while saving approximately 64% of the total parameter updates. Furthermore, SEBS outperformed other dynamic batching methods like DB-SGD and heuristics like LARS, which saw accuracy drops of up to 2.4% in similar large-batch settings.
Conclusion and Future Work
SEBS provides a principled approach to large-batch training, offering a significant leap in iteration complexity from polynomial to logarithmic. By reducing the frequency of parameter updates, it directly addresses the communication bottleneck in distributed training.
Future research may focus on automating the selection of the enlargement factor $\rho$ and managing the transition of momentum buffers more seamlessly. Additionally, exploring hardware-aware batch size caps could prevent performance plateaus when GPU memory limits are reached.
Summary updated