Skip to main content
issue 2026-07-06ML Math45 minICLR 2015interactive

Adam: A Method for Stochastic Optimization

This research paper explains how combining momentum-like first moments with RMSProp-style second moments, plus bias correction, yields a robust default optimizer for deep networks.

Adam adapts each parameter step from biased-corrected moments m and vGradient g feeds exponential moving averages of the first moment m and second moment v. Bias-corrected estimates scale the learning-rate step per coordinate.gₜGRADIENTmₜ1ST MOMENTvₜ2ND MOMENTθ ←α · m̂ / (√v̂ + ε)MOMENTUM + RMS SCALING + BIAS CORRECTIONDEFAULT β₁=0.9 · β₂=0.999 · ε=10⁻⁸Adam: m and v momentsMobile flow from gradient to adaptive update.ADAM UPDATEgₜ → mₜ , vₜEMA of gradient and squared gradientBIAS-CORRECT → STEPθ ← θ − α · m̂ / (√v̂ + ε)PER-PARAMETER ADAPTIVE RATES

Stochastic gradients are noisy, scaled differently across parameters, and change as training progresses. A single global SGD step size is a blunt instrument: too large and some coordinates explode; too small and sparse features crawl. Adam combines two successful ideas — momentum (first moment) and RMSProp-style scaling (second moment) — into one update with bias correction for the fact that exponential averages start at zero.

The punchline: per-parameter adaptive rates with defaults that “just work” across many deep-learning problems, which is why Adam became a default optimizer for a decade of training recipes.

What this paper explains

Let gtg_t be the minibatch gradient at step tt. Adam maintains:

mt=β1mt1+(1β1)gt,vt=β2vt1+(1β2)gt2m_t = \beta_1 m_{t-1} + (1-\beta_1) g_t, \qquad v_t = \beta_2 v_{t-1} + (1-\beta_2) g_t^{2}

with default β1=0.9\beta_1 = 0.9, β2=0.999\beta_2 = 0.999. Because m0=v0=0m_0 = v_0 = 0, early estimates are biased toward zero. Bias-corrected moments:

m^t=mt1β1t,v^t=vt1β2t\hat{m}_t = \frac{m_t}{1-\beta_1^{t}}, \qquad \hat{v}_t = \frac{v_t}{1-\beta_2^{t}}

Parameter update (learning rate α\alpha):

θt=θt1αm^tv^t+ε\theta_t = \theta_{t-1} - \alpha \frac{\hat{m}_t}{\sqrt{\hat{v}_t} + \varepsilon}

with ε\varepsilon a small constant (paper default 10810^{-8}).

Adam update stagesGradient feeds m and v EMAs, bias correction, then adaptive parameter step.gₜmₜ, vₜm̂ₜ, v̂ₜΔθbias correction undoes m₀ = v₀ = 0 warm-up bias
Dividing by 1 − βᵗ restores unbiased estimates while the exponential averages are still warming up — especially important for β₂ = 0.999.

Prior limits

  • SGD — simple, but learning-rate schedules and gradient scaling are fragile.
  • Momentum / Nesterov — accelerate in consistent directions but still one global scale.
  • AdaGrad — accumulates squared gradients forever; effective rates can shrink too aggressively.
  • RMSProp — uses an exponential second moment but lacks Adam’s first-moment + bias-correction packaging.

The mechanism

First moment mtm_t smooths the gradient direction (momentum-like). Second moment vtv_t estimates a per-coordinate curvature/noise scale; dividing by vt\sqrt{v_t} down-weights steps where gradients have historically been large. Bias correction matters most while tt is small — especially for β2\beta_2 close to 1, where vtv_t warms up slowly.

Adam is invariant to diagonal rescaling of the gradients in a useful practical sense: if you multiply a coordinate’s gradients by a constant, the ratio m^/v^\hat{m}/\sqrt{\hat{v}} adjusts accordingly.

Interactive

Bias correction vs β₂

At step t = 10, the second-moment debias factor is 1 − β₂ᵗ. Larger β₂ means slower warm-up — and a smaller factor without correction.

Without dividing vₜ by this factor, early √v̂ estimates would be far too small and steps too large when β₂ is close to one.

Algorithm / figure walkthrough

  1. Initialize θ\theta, m=0m=0, v=0v=0, t=0t=0.
  2. Sample minibatch; compute gt=θft(θt1)g_t = \nabla_\theta f_t(\theta_{t-1}).
  3. Update mtm_t, vtv_t with β1\beta_1, β2\beta_2.
  4. Form m^t\hat{m}_t, v^t\hat{v}_t.
  5. Apply the scaled step; optionally add weight decay outside this paper’s original algorithm (AdamW is later work).

The opening visual shows dual EMA meters feeding a single adaptive step.

What to notice when reading

  • Bias correction is not optional trivia — it is why early steps are well-scaled with β2=0.999\beta_2=0.999.
  • Adam estimates uncentered second moments (g2g^{2}), not (gm)2(g-m)^{2}.
  • The paper’s theory section sketches regret-style arguments under standard online-convex assumptions; practice on deep nets is broader than the theorems.

Results and evidence

Kingma & Ba demonstrate competitive or better training curves vs SGD variants, AdaGrad, and RMSProp on logistic regression, multi-layer nets, and convolutional models in the paper’s experiments. They emphasize robustness to hyperparameter choices with the quoted defaults. Later literature debated generalization vs SGD on some vision tasks — that debate is downstream; this paper’s claim is efficient, robust stochastic optimization with adaptive rates.

Limitations

  • Adaptive methods can underperform carefully tuned SGD on some generalization benchmarks (later empirical literature).
  • Original Adam interacts awkwardly with L2 regularization → AdamW decouples weight decay.
  • Second-moment EMA can be slow to react when gradient noise statistics shift abruptly.
  • Memory: stores mm and vv (two extra buffers per parameter) — relevant for sharded optimizers like ZeRO.

How to read the paper

  1. Abstract + §1–2 — motivation vs AdaGrad/RMSProp.
  2. §2 — algorithm box (the whole method fits on one page).
  3. §2.1 — bias correction derivation.
  4. §4 — experiments.
  5. §3 — convergence discussion (read with calibrated expectations).

Knowledge check

What do mtm_t and vtv_t estimate in Adam?

Why divide mtm_t by 1β1t1-\beta_1^{t}?

In the Adam step, what role does vt\sqrt{v_t} play?

Keep reading

  1. Original paper (arXiv:1412.6980)
  2. Related Fanout Daily: ZeRO (optimizer-state memory), modern training stacks.

Sources

  • Kingma & Ba, Adam: A Method for Stochastic Optimization, ICLR 2015 — arXiv:1412.6980

Practice this paper

All challenges