Accelerating Large Batch Training via Gradient Signal to Noise Ratio (GSNR)

Guo-qing Jiang, Jinlong Liu, Zixiang Ding, Lin Guo, Wei Lin · Submission to NeurIPS 2023 · Rejected

Abstract

As models for nature language processing (NLP), computer vision (CV) and recommendation systems (RS) require surging computation, a large number of GPUs/TPUs are paralleled with a large batch (LB) to improve training throughput. Training such LB tasks often converges to sharp minimum and downgrades final precision. Adversarial learning (ConAdv) and LANS method scales ImageNet and BERT pretraining up to 96k batch size. In this work, we develop the variance reduced gradient descent technique (VRGD) based on the gradient signal to noise ratio (GSNR) and apply it onto popular optimizers such as SGD/Adam/LARS/LAMB. We carry out a theoretical analysis of VR-SGD's convergence rate to explain its fast training dynamics, and a generalization analysis to demonstrate its smaller generalization gap on LB training. Comprehensive experiments demonstrate that VRGD can remarkably accelerate training ($1.7\sim 4 \times$), narrow the generalization gap and improve final accuracy. We push the batch size limit of BERT pretraining up to 128k/64k and DLRM to 512k without noticeable accuracy loss. We improve ImageNet Top-1 accuracy at 96k by $0.52pp$ than LARS and significantly reduce generalization gap by $68.3$%.
BibTeX
@misc{jiang2023accelerating,
  author = {GUO-QING JIANG and Jinlong Liu and Zixiang Ding and Lin Guo and Wei Lin},
  title = {{Accelerating Large Batch Training via Gradient Signal to Noise Ratio (GSNR)}},
  year = {2023},
  eprint = {2309.13681},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.13681},
}
Figure