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 , , and of its square, . Both start at 0, so early on they are too small: with a steady gradient, . Dividing by (and by ) removes this bias.
Steps
- Write the full update. All operations act on each parameter separately. , , . The defaults are , and ; only prevents division by zero.
- Show the bias by unrolling the recursion: . If every has mean , then , using the geometric series. The same holds for with .
- See what goes wrong without correction at . and , so . The step is about three times too large, because is more biased than .
- With correction, and , so the first step is (ignoring ). Every parameter moves by exactly , whatever the size of its gradient.
- 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
- Forgetting the square root on .
- Saying bias correction matters throughout training. is negligible after a few thousand steps ().
- Adding to the gradient and calling it weight decay. With Adam this is not the same as decoupled weight decay, which is why AdamW exists.
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 related to the eigendecomposition of ? What are the singular values of , and what is the error of its best rank-1 approximation?
Next in Linear algebra and optimisation: How do you solve subject to using the KKT conditions, and what does each condition mean?