Adam Moment Bias Correction
Inspect biased moving moments and the correction that changes Adam's early steps.
Free theory articleInspect biased moving moments and the correction that changes Adam's early steps.
Concept & interpretation
The Adam optimizer computes individual adaptive learning rates for different parameters from estimates of first and second moments of the gradients. However, because these moving averages are initialized as zero vectors, they are biased towards zero, especially during the initial timesteps. This bias correction step addresses this issue.
Experiment
You can interact with these dynamics directly using the Adam Moment Bias Correction module.
- Set the Gradient stream to "Constant", Beta 1 to 0.9, Beta 2 to 0.999, and Step size to 0.1.
- Set Updates to 1. Notice how the Uncorrected position jumps much further than the Corrected position due to the uncorrected moving averages being close to 0.
- Increase Updates to 4. The corrected position changes by approximately −0.1 per update for this constant gradient. The uncorrected steps are not constant: its first two positions are approximately −0.316 and −0.741, so the second step is larger than the first.
- Change the Gradient stream to "Alternating". Compare how the corrected moments adapt to the changing sign.
- On a narrow screen, scroll the visualization panel to reach all six result cards. Keep the decay rates fixed when comparing successive updates; changing a gradient stream, decay rate or step size rescales the plot to its four-update range.