Preprint
Machine Learning
Featured

Adam: A Method for Stochastic Optimization

Diederik P. Kingma(University of Amsterdam), Jimmy Ba(University of Toronto)
December 22, 2014UvA-DARE (University of Amsterdam)84,794 citations

85k

Citations

0

Influential Citations

UvA-DARE (University of Amsterdam)

Venue

2014

Year

Abstract

We introduce Adam, an algorithm for first-order gradient-based optimization of stochastic objective functions, based on adaptive estimates of lower-order moments. The method is straightforward to implement, is computationally efficient, has little memory requirements, is invariant to diagonal rescaling of the gradients, and is well suited for problems that are large in terms of data and/or parameters. The method is also appropriate for non-stationary objectives and problems with very noisy and/or sparse gradients. The hyper-parameters have intuitive interpretations and typically require little tuning. Some connections to related algorithms, on which Adam was inspired, are discussed. We also analyze the theoretical convergence properties of the algorithm and provide a regret bound on the convergence rate that is comparable to the best known results under the online convex optimization framework. Empirical results demonstrate that Adam works well in practice and compares favorably to other stochastic optimization methods. Finally, we discuss AdaMax, a variant of Adam based on the infinity norm.

Analysis

Why This Paper Matters

Adam (Adaptive Moment Estimation) revolutionized stochastic optimization by combining the benefits of two prior methods: AdaGrad's ability to handle sparse gradients and RMSprop's effectiveness in non-stationary settings. Its straightforward implementation, computational efficiency, and minimal memory requirements made it immediately practical for large-scale deep learning. The algorithm's invariance to diagonal rescaling of gradients and intuitive hyper-parameters (learning rate, beta1, beta2, epsilon) reduced the need for extensive tuning, accelerating research and deployment.

The paper's theoretical contribution—a regret bound of O(sqrt(T)) under online convex optimization—provided a rigorous foundation, while empirical results on neural networks and logistic regression demonstrated consistent superiority over SGD, AdaGrad, and RMSprop. This combination of theory and practice, along with the open-source release, led to Adam becoming the default optimizer in TensorFlow, PyTorch, and Keras, influencing virtually all subsequent work in deep learning optimization.

Technical Contributions

  • Adaptive moment estimation: Maintains exponentially decaying averages of past gradients (first moment) and squared gradients (second moment), with bias correction for initialization.
  • Hyper-parameter intuition: Learning rate alpha, exponential decay rates beta1 and beta2 (defaults 0.9 and 0.999), and epsilon for numerical stability.
  • AdaMax variant: Replaces second moment with infinity norm, simplifying updates and sometimes improving stability.
  • Theoretical analysis: Provides a regret bound of O(sqrt(T)) for convex objectives, matching the best known results for online convex optimization.
  • Computational efficiency: O(d) per-parameter update, with memory requirements of only two gradient moments per parameter.

Results

The paper reports empirical comparisons on several tasks: logistic regression on MNIST (Adam achieves faster convergence than SGD, AdaGrad, and RMSprop), multi-layer neural networks on MNIST and CIFAR-10 (Adam consistently reaches lower training loss and test error), and on a large-scale dataset (ImageNet with a convolutional network, though only preliminary results). Key metrics include training loss curves and test accuracy; Adam typically converges faster and to better final values than baselines. The paper does not provide exact numerical tables but shows plots demonstrating Adam's advantage.

Significance

Adam's impact on AI is monumental. With over 84,000 citations, it is one of the most cited papers in machine learning. It enabled faster training of deep networks, reduced the need for learning rate scheduling, and became the default optimizer in major frameworks. Subsequent variants (Nadam, AdamW, AMSGrad) built on its foundation. Adam's simplicity and effectiveness democratized deep learning, allowing practitioners to train complex models without extensive hyper-parameter tuning. Its influence extends beyond supervised learning to reinforcement learning, generative models, and natural language processing.