A Stability Analysis of AdamW: Unstable Equilibria and Non-Convergence

Baiyu Su, Lizhang Chen, qiang liuNeurIPS 2026

TL;DR

AdamW is the default engine behind nearly all modern deep learning, yet we surprisingly lack a general mathematical proof that it actually converges. By viewing AdamW through the lens of dynamical systems, the authors uncover what mathematical landscape it is secretly trying to minimize—and reveal that it can get trapped in endless oscillations around the very valleys it is supposed to settle into. Better yet, they fix this instability with a tiny, one-line tweak called AdamMe that guarantees convergence without changing where the optimizer wants to go.

What Problem Does This Paper Address?

If you train a large language model or a vision transformer tonight, you are almost certainly using AdamW. Its secret sauce is decoupled weight decay: instead of baking an $L_2$ penalty into the loss function's gradient, AdamW gently shrinks the weights directly at every step.

In practice, this works wonders for generalization. Theoretically, however, it breaks our understanding of optimization. Because the weight decay is disconnected from the gradient, AdamW is no longer purely descending a standard loss surface. Under standard, constant hyperparameters, there has been no general convergence proof for AdamW. What problem is AdamW actually solving, and can we trust it to settle down at a solution?

Methods

To isolate the fundamental nature of AdamW from messy step-size quirks and stochastic gradient noise, the authors take a classic physics approach: they shrink the step size to zero and model the discrete algorithm as a smooth, continuous-time system of Ordinary Differential Equations (ODEs).

Using tools from control theory, they perform two main analyses:

  • Linearization (Routh–Hurwitz stability): In 1D, they examine the Jacobian matrix around equilibrium points (where updates stop) to derive exact algebraic rules for whether small nudges will settle back down or blow up.
  • Lyapunov Functions: Think of a Lyapunov function as a measure of total mechanical energy in a system with friction; if you can prove energy strictly decreases over time, the system must eventually come to rest. They use this to find sufficient stability rules in higher dimensions, and to design AdamMe—a novel modification that rescales the weight decay term $\lambda \mathbf{x}$ by $(|\mathbf{m}| + e)/(\sqrt{\mathbf{v}} + e)$, matching the adaptive scaling of the gradient update.

Datasets

Not discussed in the main text of the paper. The theoretical counterexamples are evaluated on synthetic 1D mathematical functions (a simple convex quadratic and a non-convex quartic). For a real-world sanity check, the authors train a GPT-2-Small (124M) language model following the experimental configuration of Amsel et al. (2025), though the specific underlying text corpus is not named in the main paper.

Key Insights and Ideas

  • AdamW has a static "Implicit Objective": Previous work viewed AdamW's weight decay as a shifting penalty that depends on optimizer states. The authors prove that AdamW’s resting points actually correspond to the stationary points of a fixed, static optimization problem $F(\mathbf{x})$: the original loss plus a log-barrier regularizer that strictly forces every weight to stay bounded inside $\|\mathbf{x}\|_\infty < 1/\lambda$.
Implicit objective F(x) showing the barrier wall at 1.0 and a clear minimum at x*=0.99
  • Finding a valley doesn't mean you can stay there: For standard gradient flow, every strict local minimum is stable. For AdamW, local minima of its own implicit objective $F(\mathbf{x})$ can be unstable. Stability requires an extra Goldilocks condition on the curvature ($f''$) of the original loss, dictated by the tug-of-war between momentum parameters $\beta_1$ and $\beta_2$.
  • Limit cycles in 1D: Even in the standard deep learning regime ($\beta_1 < \beta_2$, e.g., $0.9$ and $0.99$), a simple 1D non-convex objective can violate this curvature bound. Instead of converging to the minimum, AdamW gets trapped in a persistent, periodic orbit—a limit cycle—oscillating forever.
Phase portrait showing AdamW trapped in a 3D limit cycle around an unstable equilibrium
  • The culprit is a scaling mismatch: Why does AdamW oscillate? The gradient momentum $\mathbf{m}$ is adaptively divided by $\sqrt{\mathbf{v}} + e$, whereas the weight decay $\lambda \mathbf{x}$ is applied raw. At equilibrium, $|\mathbf{m}| = \sqrt{\mathbf{v}}$, meaning AdamMe's rescaling factor $(|\mathbf{m}| + e)/(\sqrt{\mathbf{v}} + e)$ equals $1$. Thus, AdamMe keeps the exact same implicit objective and solutions as AdamW, while smoothing out the journey so bounded trajectories provably converge whenever $1 - \beta_2 \le 4(1 - \beta_1)$.

Key Results

  • Exact 1D Counterexamples: On a simple convex parabola $f(x) = (x - 0.5)^2$ with $\beta_1 = 0.99, \beta_2 = 0.9$, AdamW fails to converge to the unique minimum in both continuous and discrete time. On a 1D non-convex quartic under standard settings ($\beta_1 = 0.9, \beta_2 = 0.99$), the equilibrium at $x^* = 0.99$ has curvature $f''(x^*) \approx -1.20$, violating AdamW's stability threshold of $-0.22$ and triggering endless oscillations.
Continuous-time trajectory oscillating persistently around x*=0.99 instead of converging
  • GPT-2-Small Pre-training: With tuned hyperparameters for both optimizers on a 124M-parameter GPT-2 run, AdamMe closely mirrors AdamW's training dynamics while achieving a lower final validation loss (3.317 vs. 3.355).

Limitations and Future Work

The authors are candid about the scope of their theory. First, in high dimensions, matrices don't commute, so their multi-dimensional stability criterion is only sufficient, not exact. Second, their cleanest closed-form math lives in continuous time; the exact discrete-time stability boundaries are much messier (relegated to the appendix). Finally, there is a fascinating gap between theory and practice: neural networks routinely generalize well without ever truly converging to a point, so it remains an open question how much AdamW's microscopic instabilities actually hurt—or perhaps subtly help—large-scale foundation model training.

Summary updated

Abstract

AdamW is ubiquitous in deep learning, yet its behavior remains poorly understood. We analyze its dynamics through the lens of dynamical systems and show that AdamW admits an \emph{implicit fixed-point objective}: its fixed points coincide with the stationary points of a constrained and regularized optimization problem. However, not all of these fixed points are stable under AdamW’s dynamics, and stability depends sensitively on curvature, weight decay, and momentum parameters. Even in simple one-dimensional settings, AdamW can exhibit surprisingly complex behavior: equilibria may be unstable, and numerical trajectories can exhibit persistent oscillations rather than convergence to them. We further extend the analysis to higher dimensions, deriving sufficient conditions for local stability of the continuous-time dynamics, and propose a convergent modification that preserves AdamW's fixed points. These results clarify what optimization problem AdamW is associated with, when its convergence can be expected, and how its dynamics could inspire more reliable optimizers.
BibTeX
@inproceedings{su2026stability,
  author = {Baiyu Su and Lizhang Chen and qiang liu},
  title = {{A Stability Analysis of AdamW: Unstable Equilibria and Non-Convergence}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=bGprJAGt6w},
}
Figure