Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Adam: A Method for Stochastic Optimization

  • Problem Stochastic objectives with high-dimensional parameters need first-order optimizers that stay cheap in memory and cope with noisy, sparse and non-stationary gradients.
  • Method Adam keeps exponential moving averages of the gradient and of its square, corrects both for their zero initialization, and divides the first by the square root of the second to set a per-parameter step.
  • Results On CIFAR-10 convolutional networks, Adam and SGD with Nesterov momentum converged considerably faster than Adagrad over 45 epochs, and on MNIST logistic regression Adam matched SGD with Nesterov momentum and beat Adagrad.

Why a cheap first-order optimizer is needed

Many training problems reduce to optimizing a scalar objective over its parameters, and for a differentiable objective the first-order partial derivatives cost about as much to compute as one evaluation of the function. When the objective is a sum over data subsamples, or carries other noise such as dropout, taking steps along the gradients of individual pieces is the usual route, and this stochastic gradient descent has underpinned many recent deep learning results.

The target here is noisy objectives with high-dimensional parameter spaces, where higher-order methods are judged ill-suited, so the discussion stays with first-order methods. Adam is meant to use only first-order gradients and little extra memory, and it computes a separate adaptive learning rate for each parameter from running estimates of the first and second moments of the gradients.

The moment-based update rule

At each timestep the gradient \(g_t\) of the stochastic objective \(f_t\) is evaluated at the previous parameters \(\theta_{t-1}\), and two exponential moving averages are updated: \(m_t = \beta_1 m_{t-1} + (1-\beta_1) g_t\) for the gradient and \(v_t = \beta_2 v_{t-1} + (1-\beta_2) g_t^2\) for its elementwise square. Both averages start at zero, and the decay rates \(\beta_1, \beta_2 \in [0,1)\) decide how quickly older gradients are forgotten; the first average estimates the mean of the gradient and the second estimates its uncentered second moment.

Because both averages start at zero, they are rescaled by \(\hat m_t = m_t/(1-\beta_1^t)\) and \(\hat v_t = v_t/(1-\beta_2^t)\) before use. The parameter update is then \(\theta_t = \theta_{t-1} - \alpha \hat m_t/(\sqrt{\hat v_t} + \epsilon)\), so the step direction comes from the averaged gradient and its size is scaled by the averaged squared gradient.

A reordered form folds the bias correction into a step size \(\alpha_t = \alpha\sqrt{1-\beta_2^t}/(1-\beta_1^t)\), which is cheaper to compute though less transparent.

How the step size behaves

With \(\epsilon = 0\), the effective step in parameter space is \(\Delta_t = \alpha \hat m_t/\sqrt{\hat v_t}\), and the paper gives two upper bounds on its size that depend on whether \(1-\beta_1\) exceeds \(\sqrt{1-\beta_2}\). The first bound applies only in the most extreme sparsity, when a gradient has been zero at every timestep except the current one; with less sparse gradients the effective step is smaller.

The ratio \(\hat m_t/\sqrt{\hat v_t}\) is called the signal-to-noise ratio, and when the gradient is consistent its magnitude is close to one, so the step size is roughly \(\alpha\) in size. A small ratio means the direction of \(\hat m_t\) is uncertain, and the step shrinks accordingly; the authors note that this ratio typically moves toward zero near an optimum, which gives an automatic annealing effect.

Since \(\alpha\) bounds the typical step, it gives a trust region around the current parameters, which makes the right order of magnitude for \(\alpha\) easier to guess in advance. Scaling the gradient by a factor \(c\) scales \(\hat m_t\) by \(c\) and \(\hat v_t\) by \(c^2\), so for \(c > 0\) the ratio \(\hat m_t/\sqrt{\hat v_t}\) is unchanged and the effective step does not depend on the gradient scale.

Why the moments are bias-corrected

Unrolling the recursion writes \(v_t\) as a weighted sum of all past squared gradients with weights \((1-\beta_2)\beta_2^{t-i}\). Taking expectations gives \(E[v_t] = E[g_t^2](1-\beta_2^t) + \zeta\), where \(\zeta\) vanishes if the second moment of the gradient is stationary, so the factor \(1-\beta_2^t\) is the part caused by starting from zeros.

Dividing by \(1-\beta_2^t\) therefore removes that bias, and the authors argue that \(\zeta\) can be kept small by choosing the decay rate so that old gradients receive little weight. The correction matters most when \(\beta_2\) is small, which is the setting needed for reliable second-moment estimates under sparse gradients, because without it the first steps would be much larger.

Regret bound in the online convex setting

The analysis uses the online learning framework of Zinkevich, where an arbitrary sequence of convex costs \(f_1, \ldots, f_T\) is revealed and the learner must choose \(\theta_t\) before seeing \(f_t\). Performance is measured by regret, \(R(T) = \sum_{t=1}^{T}[f_t(\theta_t) - f_t(\theta^*)]\), where \(\theta^* = \arg\min_{\theta \in X} \sum_{t=1}^T f_t(\theta)\) is the best fixed parameter in the feasible set \(X\).

The main theorem assumes bounded gradients in the \(\ell_2\) and \(\ell_\infty\) norms, bounded distances between iterates, and \(\beta_1^2/\sqrt{\beta_2} < 1\), which is written as \(\gamma\) in the analysis.

The bound has three terms: one that depends on \(D\), \(\alpha\), \(\beta_1\) and the final \(\hat v_{T,i}\) scaled by \(\sqrt{T}\); one that depends on \(G_\infty\), the gradient norms \(\|g_{1:T,i}\|_2\) and \((1-\gamma)^2\); and one that depends on \(D_\infty\), \(G_\infty\) and \((1-\lambda)^2\). When the data features are sparse, the sum of gradient norms can be far below its worst-case value \(dG_\infty\sqrt{T}\), so the adaptive methods Adam and Adagrad reach \(O(\log d\sqrt{T})\) regret, an improvement over \(O(\sqrt{dT})\) for a non-adaptive method.

Decaying \(\beta_{1,t}\) toward zero is central to this analysis, and it agrees with the observation of Sutskever et al. that reducing the momentum coefficient late in training can help convergence. Corollary 4.2 combines the theorem with the bound \(\sum_{i}\|g_{1:T,i}\|_2 \le dG_\infty\sqrt{T}\) to show \(R(T)/T = O(1/\sqrt{T})\), so the average regret tends to zero.

Relation to AdaGrad and RMSProp

Adam resembles natural gradient descent in that \(\hat v_t\) approximates the diagonal of the Fisher information matrix, but its preconditioner is more conservative than the vanilla natural gradient, as is AdaGrad's. Its main relation to RMSProp is that RMSProp uses momentum on the rescaled gradient, whereas Adam averages the gradient and its square directly, and RMSProp has no bias correction, which matters when \(\beta_2\) is close to one.

The authors note that this correspondence breaks down without the bias-correction terms: without them, a \(\beta_2\) infinitesimally close to one would produce unboundedly large bias and parameter updates.

Logistic regression results

The MNIST experiment uses L2-regularized multi-class logistic regression on 784-dimensional image vectors, with minibatch size 128 and a stepsize decayed as \(\alpha_t = \alpha/\sqrt{t}\). Adam yields convergence similar to SGD with Nesterov momentum, and both converge faster than AdaGrad.

The sparse case uses the first 10,000 most frequent words of IMDB reviews as bag-of-words features, with 50% dropout noise applied to these inputs during training. Figure 1 shows that AdaGrad outperforms SGD with Nesterov momentum by a large margin with and without dropout, and Adam converges as fast as AdaGrad; the authors tie this to the sparse-feature advantage that AdaGrad has in theory.

Multilayer networks and the SFO comparison

The networks have two fully connected hidden layers of 1000 ReLU units each and are trained with minibatch size 128; the first comparison uses a deterministic cross-entropy objective with L2 weight decay. Against the Sum-of-Functions Optimizer, Adam makes faster progress in both iterations and wall-clock time, and SFO is 5-10x slower per iteration and needs memory linear in the number of minibatches.

With dropout, SFO failed to converge, because it assumes deterministic subfunctions. Among the stochastic first-order methods compared on the dropout-trained networks, Adam shows the better convergence.

Convolutional networks on CIFAR-10

The CNN has three alternating stages of 5x5 convolution filters and 3x3 max pooling with stride 2, followed by a fully connected layer of 1000 ReLU units, with whitened inputs and dropout on the input and fully connected layers. The architecture is c64-c64-c128-1000 on CIFAR-10, and the minibatch size is again 128.

AdaGrad and Adam both make rapid early progress, but Adam and SGD with Nesterov momentum eventually converge considerably faster than AdaGrad over 45 epochs. Adam shows only a marginal gain over SGD with momentum, but it adapts the learning rate per layer instead of requiring hand tuning as SGD does.

Bias correction on variational auto-encoders

Figure 4 compares the loss with and without bias correction after 10 and 100 epochs. Removing the correction is a version of RMSProp with momentum, as the authors note.

Values of \(\beta_2\) close to one lead to instabilities without the correction, especially in the first epochs of training. The best results came from small values of \(1-\beta_2\) with bias correction, and the authors state that Adam performed equal or better than RMSProp regardless of the hyper-parameter setting.

AdaMax and temporal averaging

Adam's per-weight scaling can be generalized from the L2 norm to an Lp norm, but these variants become numerically unstable for large p. Letting p go to infinity gives the exponentially weighted infinity norm \(u_t = \max(\beta_2 u_{t-1}, |g_t|)\) with \(u_0 = 0\), which needs no initialization bias correction.

AdaMax updates parameters as \(\theta_t = \theta_{t-1} - (\alpha/(1-\beta_1^t)) m_t/u_t\), with suggested defaults \(\alpha = 0.002\), \(\beta_1 = 0.9\) and \(\beta_2 = 0.999\). The magnitude of AdaMax parameter updates has the simpler bound \(|\Delta_t| \le \alpha\), compared with the bound on Adam's effective step.

For temporal averaging, the authors recall Polyak-Ruppert averaging for SGD and propose an exponential moving average over the parameters, \(\bar\theta_t \leftarrow \beta_2 \bar\theta_{t-1} + (1-\beta_2)\theta_t\), with bias correction \(\hat\theta_t = \bar\theta_t/(1-\beta_2^t)\). This averaging is described as a single extra line in the inner loop, and the experiments in the units do not evaluate it.

Limits of the evidence

The regret analysis requires convex losses in the online setting, and the authors state that it does not apply to the non-convex multilayer networks they test, where Adam nonetheless performed well empirically. The theorem also assumes bounded gradients, bounded distances between iterates and \(\beta_1^2/\sqrt{\beta_2} < 1\), so the guarantee holds only under those conditions.

The empirical comparisons report the best hyper-parameter setting found on a dense grid, so each method is compared at its tuned best. The experiments cover logistic regression on MNIST and IMDB, a multilayer network, one CNN architecture on CIFAR-10 and one variational auto-encoder; the bias-correction study covers only the variational auto-encoder.

The authors' explanation of AdaGrad's slower CNN convergence rests on the vanishing second-moment observation, and the units contain no separate test of that explanation.

Paper info

Authors
Diederik P. Kingma, Jimmy Ba
Venue
arXiv · Preprint
First published
2014-12-22
Added
2026-10-20
Updated
2017-1-30
Version
v9
arXiv
1412.6980
Category
cs.LG
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Diederik P. Kingma, Jimmy Ba (2014). Adam: A Method for Stochastic Optimization. arXiv:1412.6980v9. https://arxiv.org/abs/1412.6980v9

BibTeX
@misc{kingma2014adam,
  title = {{Adam: A Method for Stochastic Optimization}},
  author = {Diederik P. Kingma and Jimmy Ba},
  year = {2014},
  eprint = {1412.6980},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1412.6980v9}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up