Provable Adaptivity in Adam

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

TL;DR

While Adam consistently outperforms SGD in deep learning tasks like training Transformers, existing optimization theory could not prove Adam converges faster than SGD. This paper bridges the theory-practice gap by analyzing Adam under generalized $(L_0, L_1)$-smoothness (where landscape curvature grows with gradient norm), proving that Adam successfully adapts to sharp landscape variations while SGD can diverge or become arbitrarily slow.

What Problem Does This Paper Address?

In empirical deep learning, Adam is the optimizer of choice for architectures like Transformers, ViTs, and GANs. Yet classical optimization theory tells a confusing story: theoretical convergence bounds for Adam are historically no better than those for standard SGD.

The authors pinpoint the root cause of this disconnect: the standard $L$-smoothness assumption (a globally bounded Hessian spectral norm). In real neural networks, curvature is not globally uniform; it varies wildly across the parameter space. Under realistic conditions, the local Lipschitz constant of the gradient scales with the gradient norm itself. When local smoothness fluctuates drastically, a fixed or pre-scheduled learning rate in SGD cannot simultaneously handle flat regions (where steps are too small) and sharp regions (where steps overshoot and cause instability).

Methods

To capture this dynamic, the authors study Adam under two realistic assumptions:

  1. $(L_0, L_1)$-Smooth Condition: The local smoothness satisfies $\|\nabla f_i(w_1) - \nabla f_i(w_2)\| \le (L_0 + L_1 \|\nabla f_i(w_1)\|)\|w_1 - w_2\|$.
  2. Affine Noise Variance: $\sum_{i=0}^{n-1} \|\nabla f_i(w)\|^2 \le D_1 \|\nabla f(w)\|^2 + D_0$, which allows gradient variance to grow with gradient magnitude.

Key analytical techniques include:

  • Auxiliary Sequence / Potential Function: Momentum ($\beta_1$) introduces delayed gradient history that normally prevents descent proofs on non-convex objectives. The authors construct an auxiliary parameter sequence $u_k \triangleq \frac{w_{k,0} - \beta_1 w_{k,-1}}{1 - \beta_1}$, which strips out historical momentum terms and aligns updates directly with the true gradient.
  • Coordinate-Wise Gradient Partitioning: Dimensions are partitioned into large and small gradient sets ($L_{large}$ and $L_{small}$). Large gradients dominate the second-order expansion, while smaller components are bounded as controllable residual terms.
  • Trajectory-Wise Convergence: Unlike existing proofs relying on uniform random sampling expectations, this analysis holds for every individual parameter trajectory across random permutations.

Datasets

  • WMT 2014: Used to train standard Transformers (Vaswani et al., 2017) to empirically verify that gradient norm vs. local smoothness follows the $(0, e^{1.4})$-smooth condition.
  • CIFAR-10: Used with ResNet-110 to evaluate trajectory-wise robustness of Adam across multiple random reshuffling orders.
  • Synthetic Benchmarks: 1D and 2D non-convex and exponential objectives used to demonstrate SGD divergence vs. Adam convergence under $(L_0, L_1)$-smoothness.

Key Insights and Ideas

  • Adam as a Natural Shock Absorber: When an iterate enters a sharp, steep valley where the gradient explodes, Adam's denominator $\sqrt{v_{k,i}} + \varepsilon$ automatically increases, curbing step size and preventing divergence. When entering a flat plateau, the denominator shrinks, accelerating exploration.
  • SGD's Fundamental Failure in $(L_0, L_1)$ Regimes: The authors show that for $(L_0, L_1)$-smooth objectives, no initial diminishing learning rate $\eta_t = \eta_1 / \sqrt{t}$ protects SGD from bad initializations. If an iterate steps outside a sub-level set into an area of severe curvature, the local Lipschitz constant outgrows the decay of the learning rate, driving gradients to infinity.
  • Large $\beta_2$ is Mathematically Necessary: The convergence bound requires $\beta_2$ to be close to $1$ (e.g., $0.999$), matching standard empirical heuristics. If $\beta_2$ is too small, past gradient estimates fluctuate too rapidly to maintain stable preconditioning.

Key Results

  • Convergence Guarantee: Under $(L_0, L_1)$-smoothness and diminishing step size $\eta_k = \eta_1 / \sqrt{k}$, Adam guarantees: $$\min_{k \in [1, T]} \left\{ \frac{\|\nabla f(w_{k,0})\|}{\sqrt{D_1}}, \frac{\|\nabla f(w_{k,0})\|^2}{\sqrt{D_0}} \right\} \le \mathcal{O}\left(\frac{\log T}{\sqrt{T}}\right) + \mathcal{O}\left(\sqrt{D_0} \min\{\delta(\beta_2), \delta(\beta_2)^2\}\right)$$ where $\delta(\beta_2) \to 0$ as $\beta_2 \to 1$.

  • Mildest Theoretical Assumptions to Date: The result does not require bounded gradients ($\|\nabla f(w)\| \le C$), large stability constants $\varepsilon$, or zero momentum ($\beta_1 = 0$).

  • Provable Divergence of (S)GD: The paper restates and constructs explicit classification-like counterexamples where GD and SGD with decaying step sizes diverge to infinity from infinite-measure initialization regions, theoretically validating Adam’s separation over SGD.

Limitations and Future Work

  • Dimension Dependence: The convergence rate and neighborhood size scale polynomially with the dimension $d$. While common in Adam literature, SGD under classic smoothness lacks this dimension dependence.
  • Role of Momentum ($\beta_1$): The rate matches RMSProp ($\beta_1 = 0$), leaving theoretical acceleration from momentum itself an open question.
  • Convergence to a Neighborhood: When stochastic noise has an additive component ($D_0 \neq 0$), diminishing step sizes only guarantee convergence to a bounded neighborhood of stationary points rather than exact stationary points.
  • Comparison to Clipped SGD: While clipped SGD also handles $(L_0, L_1)$-smooth landscapes, current proofs require almost-surely bounded gradient noise; analyzing clipped SGD under affine noise variance remains an open challenge.

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},
}

Loading related content...

Figure