Dynamically Adjusting Transformer Batch Size by Monitoring Gradient Direction Change
Not on the map. Why?
Abstract (arXiv)
The choice of hyper-parameters affects the performance of neural models. While much previous research (Sutskever et al., 2013; Duchi et al., 2011; Kingma and Ba, 2015) focuses on accelerating convergence and reducing the effects of the learning rate, comparatively few papers concentrate on the effect of batch size. In this paper, we analyze how increasing batch size affects gradient direction, and propose to evaluate the stability of gradients with their angle change. Based on our observations, the angle change of gradient direction first tends to stabilize (i.e. gradually decrease) while accumulating mini-batches, and then starts to fluctuate. We propose to automatically and dynamically determine batch sizes by accumulating gradients of mini-batches and performing an optimization step at just the time when the direction of gradients starts to fluctuate. To improve the efficiency of our approach for large models, we propose a sampling approach to select gradients of parameters sensitive to the batch size. Our approach dynamically determines proper and efficient batch sizes during training. In our experiments on the WMT 14 English to German and English to French tasks, our approach improves the Transformer with a fixed 25k batch size by +0.73 and +0.82 BLEU respectively.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). First posted on arXiv 5 May 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 2; 2023: 0; 2024: 0; 2025: 1; 2026: 1.
4 papers.
- 2025A Langevin sampling algorithm inspired by the Adam optimizercited by 3
- 2022Small Batch Sizes Improve Training of Low-Resource Neural MTcited by 2
- 2026Adaptive Batch Sizes Using Non-Euclidean Gradient Noise Scales for Stochastic Sign and Spectral Descentcited by 2
- 2022Optimizing Deep Transformers for Chinese-Thai Low-Resource Translationcited by 0
- 2026Adaptive Batch Sizes Using Non-Euclidean Gradient Noise Scales for Stochastic Sign and Spectral Descent3 Feb 2026
- 2025A Langevin sampling algorithm inspired by the Adam optimizer26 Apr 2025
- 2022Optimizing Deep Transformers for Chinese-Thai Low-Resource Translation24 Dec 2022
- 2022Small Batch Sizes Improve Training of Low-Resource Neural MT20 Mar 2022