What is the Adam update, why does it need bias correction, and how large is its very first step?

Linear algebra and optimisation, Adaptive optimisers
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you know Adam beyond the name: the two running averages, why they start biased, and what the correction does in practice.

Key idea

Adam keeps a running average of the gradient gt, mt=β1mt−1+(1−β1)gt, and of its square, vt=β2vt−1+(1−β2)gt2. Both start at 0, so early on they are too small: with a steady gradient, E[mt]=(1−β1t) E[g]. Dividing by 1−β1t (and vt by 1−β2t) removes this bias.

Steps

  1. Write the full update. All operations act on each parameter separately. m^t=mt/(1−β1t), v^t=vt/(1−β2t), θt=θt−1−η m^t/(v^t+ϵ). The defaults are β1=0.9, β2=0.999 and ϵ=10−8; ϵ only prevents division by zero.
  2. Show the bias by unrolling the recursion: mt=(1−β1)∑i=1tβ1t−igi. If every gi has mean g, then E[mt]=(1−β1)g∑j=0t−1β1j=(1−β1t)g, using the geometric series. The same holds for vt with β2.
  3. See what goes wrong without correction at t=1. m1=0.1g1 and v1=0.001g12, so m1/v1=0.1g1/(0.0316∣g1∣)≈3.16sign⁡(g1). The step is about three times too large, because v is more biased than m.
  4. With correction, m^1=g1 and v^1=g12, so the first step is η g1/∣g1∣=ηsign⁡(g1) (ignoring ϵ). Every parameter moves by exactly η, whatever the size of its gradient.
  5. Interpret. Each step is roughly η times (average gradient ÷ root-mean-square gradient). This ratio is roughly bounded by η and does not change if all gradients are scaled up. Mention AdamW, which applies weight decay directly to θ instead of adding it to the gradient.

Common mistakes

How long your answer should be

Half a page; 3–4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Linear algebra and optimisation: How is the SVD of a matrix A related to the eigendecomposition of A⊤A? What are the singular values of A=(3045), and what is the error of its best rank-1 approximation?
Next in Linear algebra and optimisation: How do you solve min⁡x,y (x−2)2+(y−2)2 subject to x+y≤2 using the KKT conditions, and what does each condition mean?