Adam: A Method for Stochastic Optimization
1. Research problem
SGD with a single global learning rate struggles with parameters whose gradients have very different scales and sparse gradient distributions.
2. Motivation
The authors wanted an adaptive method that combines the benefits of momentum with per-parameter scaling, without requiring manual tuning of a global step size for each layer.
3. Previous approaches
AdaGrad accumulated squared gradients but decayed learning rates too aggressively; RMSProp used a moving average but lacked bias correction and momentum-style acceleration.
4. Core contribution
Adam maintains exponentially decaying estimates of the first and second gradient moments and applies bias correction, producing an adaptive step for each parameter.
5. Mathematical formulation
m_t = beta1*m_{t-1} + (1-beta1)*g_t, v_t = beta2*v_{t-1} + (1-beta2)*g_t^2, with bias-corrected m_hat and v_hat and update w_t = w_{t-1} - alpha*m_hat/(sqrt(v_hat)+eps).
6. Methodology
Derivation from an online convex optimization regret bound, plus empirical testing on logistic regression, multilayer perceptrons, and convolutional networks.
7. Architecture
Optimizer applicable to any differentiable model; experiments on MLPs and CNNs.
8. Experimental setup
Compared with SGD, AdaGrad, and RMSProp on MNIST and CIFAR-10, including sparse-gradient and large-model settings.
9. Datasets
MNIST, CIFAR-10, and an IMDB sentiment dataset with sparse gradients.
10. Results
Adam trained quickly with little learning-rate tuning and outperformed alternatives on the tested logistic regression, MLP, and CNN setups.
11. Limitations
The original convergence proof was later found flawed for certain settings; adaptive scaling can generalize worse than SGD, and the method interacts badly with standard L2 regularization.
12. Critical analysis
Practically indispensable but theoretically subtle: its implicit regularization and interaction with weight decay motivated follow-up analyses and the AdamW variant.
13. Implementation tasks
- 1.Implement Adam from scratch in NumPy and verify it matches a framework implementation on a toy quadratic.
- 2.Ablate bias correction to see its effect during the first training steps.
- 3.Compare Adam, RMSProp, and SGD convergence curves on MNIST with a fixed learning-rate budget.
14. Follow-up work
- 1.Decoupled Weight Decay Regularization (Loshchilov and Hutter, 2019)
- 2.On the Convergence of Adam and Beyond (Reddi et al., 2019)
15. Open research questions
- 1.Why does Adam sometimes generalize worse than SGD on vision tasks?
- 2.Under what conditions does the adaptive scaling break convergence?