[Paper Review] Why are Adaptive Methods Good for Attention Models?
The paper shows that heavy-tailed gradient noise can cause SGD to underperform relative to adaptive methods, and introduces clipping-based analyses and ACClip to improve optimization for attention models like BERT.
While stochastic gradient descent (SGD) is still the \emph{de facto} algorithm in deep learning, adaptive methods like Clipped SGD/Adam have been observed to outperform SGD across important tasks, such as attention models. The settings under which SGD performs poorly in comparison to adaptive methods are not well understood yet. In this paper, we provide empirical and theoretical evidence that a heavy-tailed distribution of the noise in stochastic gradients is one cause of SGD's poor performance. We provide the first tight upper and lower convergence bounds for adaptive gradient methods under heavy-tailed noise. Further, we demonstrate how gradient clipping plays a key role in addressing heavy-tailed gradient noise. Subsequently, we show how clipping can be applied in practice by developing an \emph{adaptive} coordinate-wise clipping algorithm (ACClip) and demonstrate its superior performance on BERT pretraining and finetuning tasks.
Motivation & Objective
- Investigate why SGD underperforms adaptive methods in attention-model training (e.g., BERT).
- Characterize the gradient-noise distribution (heavy-tailed) in relevant tasks.
- Develop and analyze clipping-based algorithms that stabilize optimization under heavy-tailed noise.
- Propose and validate an adaptive coordinate-wise clipping method (ACClip) for improved BERT pretraining and finetuning.
Proposed method
- Empirical analysis of gradient-noise distributions in ImageNet (ResNet) vs. BERT training to identify heavy-tailed behavior.
- Theoretical convergence bounds for adaptive gradient methods under heavy-tailed noise using bounded α-moment (α in (1,2]).
- Introduction and analysis of gradient clipping (GClip) to obtain optimal convergence rates under heavy-tailed noise.
- Extension to coordinate-wise clipping (CClip) to remove dimension dependence, and development of adaptive coordinate-wise clipping (ACClip) with online moment estimation.
- Empirical evaluation of ACClip on BERT pretraining and SQuAD v1.1 finetuning showing improvements over Adam.
Experimental results
Research questions
- RQ1Does heavy-tailed gradient noise explain the relative performance gap between SGD and adaptive methods in attention-model training?
- RQ2Can gradient clipping restore convergence and achieve optimal rates under heavy-tailed noise?
- RQ3Does coordinate-wise clipping outperform global clipping under realistic, high-dimensional noise?
- RQ4Can an adaptive coordinate-wise clipping algorithm (ACClip) outperform Adam on BERT pretraining and finetuning tasks?
Key findings
- Gradient noise in BERT pretraining is heavy-tailed, while in ImageNet/ResNet it is well-concentrated.
- Clipped gradient methods (GClip) achieve optimal convergence rates under heavy-tailed noise and stabilize training.
- Coordinate-wise clipping (CClip) removes dimension dependence and can outperform global clipping.
- An adaptive clipping approach with online moment estimation (ACClip) outperforms Adam in BERT pretraining and SQuAD v1.1 finetuning across model sizes.
- ACClip yields lower pretraining loss and higher masked-LM accuracy than Adam across BERT Base 6/12 layers and BERT Large 24 layers; ACClip also improves SQuAD EM/F1 scores.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.