Provable Adaptivity of Adam under Non-uniform Smoothness

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

TL;DR

This paper provides the first theoretical convergence analysis of Adam (specifically, randomly reshuffled Adam) under a more realistic "non-uniform smoothness" condition, which better reflects deep learning landscapes. The authors prove that Adam can adapt to local smoothness and outperform SGD in certain scenarios, offering a theoretical explanation for Adam's practical success.

What Problem Does This Paper Address?

Adam is a ubiquitous optimizer in deep learning, known for its fast convergence. However, existing theoretical analyses of Adam often rely on the "L-smooth" condition, which assumes that the curvature (smoothness) of the objective function is bounded everywhere. This assumption is frequently violated in real-world deep learning tasks, such as those involving Transformers and LSTMs. Furthermore, the L-smooth condition masks a key adaptive feature of Adam: its ability to adjust its step size based on local gradient information. This paper aims to bridge this gap by providing a theoretical framework that explains Adam's effectiveness under more relaxed, realistic smoothness conditions, specifically the "(L0, L1)-smooth" condition, and by comparing its performance to SGD.

Methods

The core of this paper is a novel convergence analysis of randomly reshuffled Adam (RR Adam) under the (L0, L1)-smooth condition. This condition allows the Lipschitz constant of the gradient to grow linearly with the gradient norm, i.e., $|| \nabla^2 f_i(w) || \leq L_0 + L_1 || \nabla f_i(w) ||$. The authors develop a trajectory-wise convergence analysis, which is stronger than typical "convergence in expectation" results. They also introduce a refined lower bound for SGD under the same (L0, L1)-smooth condition, enabling a direct and rigorous comparison between Adam and SGD. The analysis involves constructing specific potential functions and carefully bounding various terms related to gradients, adaptive learning rates, and momentum.

Datasets

The paper mentions using the WMT 2014 dataset for experiments with the Transformer model (Figure 1). They also refer to experiments on CIFAR 10 with ResNet 110 (Figure 3) and cite previous work that used these datasets. No new datasets were introduced.

Key Insights and Ideas

  • Adam's Adaptivity is Key: The paper argues that Adam's ability to adapt its step size based on local gradient information is crucial for its performance, especially in non-uniformly smooth settings. The L-smooth assumption obscures this benefit.
  • Beyond L-smoothness: The (L0, L1)-smooth condition is a more realistic and weaker assumption that better captures the behavior of deep learning loss landscapes.
  • Adam Can Outperform SGD: The theoretical analysis and refined lower bound for SGD suggest that Adam can converge faster than SGD, particularly when the objective function exhibits non-uniform smoothness.
  • Neighborhood Convergence is Intrinsic: For non-zero $D_0$ (related to gradient noise), Adam inherently converges to a neighborhood of stationary points, not necessarily the exact stationary points. This is shown to be an intrinsic property, not a limitation of the proof.

Key Results

  • First Provable Convergence for RR Adam under Non-uniform Smoothness: The paper establishes the first convergence guarantee for randomly reshuffled Adam under the (L0, L1)-smooth condition.
  • Trajectory-wise Convergence: The analysis provides trajectory-wise convergence, a stronger guarantee than expected convergence.
  • Improved Convergence Bounds: The convergence neighborhood for Adam is refined, and a tighter lower bound for SGD is derived.
  • Adam vs. SGD Comparison: The analysis shows that Adam can be slower than SGD when $D_0=0$ (no gradient noise) but can converge faster when $D_0 > 0$, especially in non-uniform smoothness scenarios. This is demonstrated through a theoretical comparison and experimental results.

Limitations and Future Work

  • Momentum's Role Unclear: The current analysis for Adam with $\beta_1=0$ (effectively RMSProp) shows the same convergence rate as Adam with $\beta_1 > 0$. The theoretical benefits of momentum in Adam remain elusive and are left for future research.
  • More Severe Smoothness Conditions: Exploring Adam's convergence under even more challenging smoothness conditions (e.g., polynomial bounds) is suggested.
  • Neighborhood Convergence: While Adam's convergence to a neighborhood is shown to be intrinsic, the paper acknowledges that for some applications, convergence to exact stationary points might be desired. However, they argue this is a minor issue in practice due to the shrinking neighborhood size with higher $\beta_2$ and the nature of machine learning tasks.

Summary updated

BibTeX
@inproceedings{wang2022provable,
  author = {Bohan Wang and Yushun Zhang and Huishuai Zhang and Qi Meng and Ruoyu Sun and Zhi-Ming Ma and Tie-Yan Liu and Zhi-Quan Luo and Wei Chen},
  title = {{Provable Adaptivity of Adam under Non-uniform Smoothness}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2022},
  url = {https://openreview.net/forum?id=qVGPBG32pf},
}
Figure