Why are Adaptive Methods Good for Attention Models?
Jingzhao Zhang, Sai Praneeth Karimireddy, Andreas Veit, Seungyeon Kim, Sashank J Reddi, Sanjiv Kumar, Suvrit Sra
TL;DR
<3-5 sentence high-level summary> The paper investigates why adaptive methods like Adam outperform SGD on attention models by examining heavy-tailed stochastic gradient noise, proposing clipping as a principled stabilization technique. It introduces GClip and the adaptive coordinate-wise clipping ACClip, provides convergence bounds under heavy-tailed noise with $\alpha \in (1,2]$, and establishes lower bounds showing optimality. Through online moment estimation and coordinate-wise clipping, ACClip achieves faster convergence and outperforms Adam on BERT pretraining and fine-tuning, demonstrating practical improvements for transformer training. The findings illuminate how gradient noise structure influences optimizer performance and offer a practical, theoretically-grounded approach for robust deep learning optimization.
Abstract
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.
