Adam maintains two moving averages:
tracks gradient direction; tracks squared magnitude.
1. Bias correction
Both averages start at zero, so early values are biased toward zero. Adam corrects them:
\hat v_t=\frac{v_t}{1-\beta_2^t}.$$ Then $$\theta_t=\theta_{t-1}-\eta\frac{\hat m_t}{\sqrt{\hat v_t}+\epsilon}.$$ ## 2. Why Adam is popular It often works well with little tuning, handles sparse/noisy gradients reasonably, and adapts scales per parameter. This made it a common default, especially for Transformers. ## 3. Adam is not “always better” Optimizer quality depends on task, model, schedule and regularization. SGD with momentum remains competitive in many vision settings. AdamW decouples weight decay from Adam's adaptive gradient update and is widely used in modern deep learning. ## 4. State cost Adam stores first- and second-moment tensors for each parameter, adding optimizer memory beyond weights and gradients. ## What to Remember Adam = momentum-like first moment + RMSProp-like second moment + bias correction. **Next → Learning-Rate Schedules: even with a smart optimizer, should step size stay constant from the first update to the last?**