Provable Adaptivity in Adam

Bohan Wang, Yushun Zhang, Huishuai Zhang, Qi Meng, Zhi-Ming Ma, Tie-Yan Liu, Wei Chen

Abstract

While Adam is the standard optimizer for training large-scale models like Transformers and LSTMs, theoretical understanding of its success has been limited by the traditional "bounded smoothness" ($L$-smoothness) assumption. This paper introduces the first convergence analysis for Randomly Reshuffled (RR) Adam under a more realistic "non-uniform smoothness" model. We rigorously demonstrate how Adam adapts to local landscapes, explaining its empirical superiority over SGD in deep learning contexts.

The Challenge of Non-Uniform Smoothness

In optimization theory, the standard assumption is that a function is $L$-smooth, meaning its gradient changes at a rate bounded by a global constant $L$. However, modern deep learning architectures exhibit "smoothness" that fluctuates significantly, often scaling with the magnitude of the gradient itself. This paper addresses this gap by analyzing Adam under the $(L_0, L_1)$-smoothness framework, where local smoothness grows linearly with the gradient norm.

Empirical evidence for non-uniform smoothness and Adam's performance advantage over SGD.

The authors focus on Randomly Reshuffled (RR) Adam, which shuffles the dataset every epoch—a common practice that is mathematically more complex to analyze than standard IID sampling. Empirical results on the WMT 2014 dataset (Transformer) and CIFAR-10 (ResNet-110) validate that this $(L_0, L_1)$ condition holds in real-world tasks.

Theoretical Framework and Methodology

The paper provides a convergence analysis for RR Adam using a diminishing learning rate. Key technical contributions include:

  • Relaxed Smoothness: Adopting the $(L_0, L_1)$-smoothness framework to better model the Hessian behavior observed in modern architectures.
  • Trajectory-wise Convergence: Proving that Adam converges for every possible trajectory, providing a stronger and more practical guarantee than typical "in expectation" results.
  • Novel Potential Function: Developing a new auxiliary potential function to manage the misalignment between Adam's adaptive updates and the true negative gradient caused by the adaptive denominator and momentum.
  • SGD Comparison: Establishing a refined lower bound for SGD under non-uniform smoothness to facilitate a fair, "apples-to-apples" comparison.

Key Results and Insights

The analysis yields several critical insights into Adam's behavior:

  • Adaptivity: Adam’s effective learning rate automatically adjusts to local smoothness. In "flat" regions (low gradient), the step size increases; in "steep" regions (high gradient), it decreases, preventing the "gradient explosion" that can tank SGD in non-uniform landscapes.
  • Superiority over SGD: In $(L_0, L_1)$ landscapes, SGD's convergence depends on the initial gradient norm. Adam’s upper bound is independent of this factor, confirming it can be significantly faster when starting in "sharp" regions.
  • Neighborhood Convergence: The theory explains why Adam converges to a neighborhood of a stationary point in the presence of noise. This neighborhood shrinks as the hyperparameter $\beta_2$ approaches 1, justifying the standard practice of setting $\beta_2 = 0.999$.
Convergence of gradient norm to a neighborhood determined by the hyperparameter beta2.

Conclusion

This work provides a rigorous foundation for Adam's adaptivity, eliminating the need for bounded gradient assumptions that contradict non-uniform smoothness. While it explains the role of $\beta_2$ and the benefits of adaptivity, future work remains to distinguish the specific convergence benefits of the momentum term ($\beta_1$) and to explore even more volatile polynomial smoothness landscapes.

Summary updated

BibTeX
@inproceedings{wang2023provable,
  author = {Bohan Wang and Yushun Zhang and Huishuai Zhang and Qi Meng and Zhi-Ming Ma and Tie-Yan Liu and Wei Chen},
  title = {{Provable Adaptivity in Adam}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=l0mX03b3UZv},
}
Figure