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

On the Variance of the Adaptive Learning Rate and Beyond

RAdam rectifies Adam's adaptive learning rate variance to stabilize early training

  • Problem Adam can converge to bad local optima early in training, and warmup is used without a theory of when it helps.
  • Method RAdam keeps Adam's moving averages but multiplies the adaptive step by a rectification term that corrects its variance. Early on, when that variance is too large, it takes a plain momentum step.
  • Results On CIFAR10 with ResNet-20, RAdam scored 91.38 against 90.54 for Adam.

Why warmup is used with Adam

Adaptive methods such as Adam can converge to bad or suspicious local optima when they start at full step size, so practitioners add a warmup phase that uses a small learning rate over the first few epochs. On De-En IWSLT'14 with Transformers, removing warmup raised the training loss from 3 to around 10. Without a theory, nothing says when warmup will help or how long it should last, so the choice is made by trial and error.

The adaptive factor inside Adam

In Adam, each update multiplies a momentum term by an adaptive factor, and that factor is built from the squared gradients through an exponential moving average. \[ \hat\psi(g_1,\dots,g_t)=\frac{\sqrt{1-\beta_2^t}}{\epsilon+\sqrt{(1-\beta_2)\sum_{i=1}^{t}\beta_2^{t-i}g_i^2}} \] The constant epsilon in the denominator is added for numerical stability and is typically a small value such as 1× 10−8.

Because the average at step t uses only t gradients, the factor rests on very few samples early in training, and the authors place the source of the problem there.

Warmup can then be read as a way to limit the step size while the factor is still estimated from few samples. The authors treat this as a variance problem: under their Gaussian model the variance of the first-step factor is divergent, and a smaller step size scales that variance down quadratically.

Controlled tests that shrink the early variance

Two variants of Adam were built to reduce the variance of the adaptive factor without any warmup stage. Adam-2k updates the adaptive factor only during the first two thousand iterations, with momentum and parameters held fixed, and its iterations are indexed from -1999 so that they line up with the other runs. Adam-eps raises epsilon to 10−4, where vanilla Adam uses 10−8.

Adam-2k removes the convergence problem seen in the vanilla run and keeps the gradient histogram from distorting, which the authors read as support for the sample-count explanation. Adam-eps also avoids the serious convergence problem and keeps the gradient distribution undistorted, which the authors take as evidence that cutting the variance is enough.

Adam-eps trains much worse than Adam-2k and Adam with warmup, and the authors conjecture that a large epsilon adds bias to the adaptive factor and slows optimization. That result is why they move to a more principled way of controlling the variance.

How the variance depends on the sample count

Each gradient is modelled as an independent zero-mean Gaussian, so the reciprocal of a single squared gradient is scaled inverse chi-squared and its square root has divergent variance. The key approximation replaces the exponential average with a simple average, so the factor is treated as scaled inverse chi-squared with ρ degrees of freedom.

Theorem 1 states that the variance of ψ decreases monotonically as ρ increases, with the proof covering ρ > 4.

Under the first-order approximation the variance takes the closed form below. \[ \mathrm{Var}[\psi(\cdot)]\approx\frac{\rho_t}{2(\rho_t-2)(\rho_t-4)\sigma^2} \] It decays roughly at the speed of O(1/ρ_t), so the variance at ρ_t = 5 is more than 100 times the variance at ρ_t = 500. The authors check this first-order form against the exact expression in a simulation.

Estimating ρ_t and computing the correction

The degrees of freedom are estimated from t by matching the center of mass of the exponential average to a simple average of length f(t, β2), and this length is taken as ρ_t. ρ_∞ is the limit of ρ_t as t grows, and it is the length at which the variance reaches its smallest value, C_var.

To hold the variance of the adaptive step constant over time, the method rescales the adaptive factor by r_t, the square root of C_var divided by the variance at step t. \[ r_t=\sqrt{\frac{(\rho_t-4)(\rho_t-2)\rho_\infty}{(\rho_\infty-4)(\rho_\infty-2)\rho_t}} \] The exact variance expression is numerically unstable, so the authors use the first-order approximation to obtain this closed form for r_t.

The RAdam update step

RAdam keeps Adam's two moving averages and the bias-corrected first moment, computes ρ_t at every step, and uses the adaptive factor only when ρ_t is above 4. When ρ_t exceeds 4, the bias-corrected momentum is multiplied by r_t and by the adaptive factor; otherwise the update uses the un-adapted momentum alone, which is an SGD-with-momentum step.

With β2 at or below 0.6, ρ_∞ is at most 4, so the adaptive branch is never reached and RAdam reduces to SGD with momentum.

How RAdam relates to linear warmup

The rectification term resembles linear warmup, whose factor can be written as min(t, T_w)/T_w, and the authors read this match as evidence that warmup acts as a variance reduction technique. RAdam has no warmup length T_w to tune, and it switches the adaptive step off while its variance is divergent.

The authors regard the correction as orthogonal to gradient clipping, to smoothing the adaptive rate by increasing epsilon or adding range constraints, to initialization and to normalization, so these can be combined with it. The issue is framed as one of adaptive optimizers in general and is independent of model architecture.

Results against vanilla Adam

Table 1 reports 91.51 for SGD, 90.54 for Adam and 91.38 for RAdam on CIFAR10 with ResNet-20. On ImageNet with ResNet-18 the same table gives 69.86 for SGD, 66.54 for Adam and 67.62 for RAdam. RAdam is therefore ahead of Adam on both datasets and behind SGD.

Training accuracy on ImageNet was 69.57 for SGD, 69.12 for Adam and 70.30 for RAdam, so RAdam leads Adam on training accuracy as well, while its test accuracy still trails SGD.

On One Billion Word with LSTMs, RAdam is slower than Adam in the first few epochs and then converges faster, which the authors take as the effect of the variance reduction. Across learning rates 0.1, 0.03, 0.01 and 0.003 on CIFAR10 with ResNet-20, the RAdam curves overlap, while Adam and SGD are more sensitive to the choice.

Results against Adam with warmup

On IWSLT'14 EN-DE the figures are 28.56 ± 0.067 for Adam with warmup and 28.48 ± 0.054 for RAdam, and on WMT'16 EN-DE they are 27.03 and 27.27. The IWSLT runs use five random seeds, and the table reports their mean and spread. Vanilla Adam converges to a training perplexity around 500 in these runs, which is the failure that warmup removes.

On CIFAR10, Adam with warmup reached 91.29, close to the 91.38 of RAdam. With learning rate 0.1, Adam with 100 warmup steps scored 90.13, while RAdam scored 91.06 with β1 = 0.9 and β2 = 0.999. The authors conjecture that the gap comes from RAdam avoiding the regime where the variance diverges.

Simulation checks of the approximations

With τ = 1, the exact variance from Equation 2 and the first-order Equation 5 nearly overlap for degrees of freedom from 5 to 500, and their difference is much smaller than the values.

A second simulation draws gradients from a normal distribution with mean µ and unit variance, using β2 = 0.999, 5000 trajectories and 6000 iterations, for µ values from 0 to 10. In all six settings the original adaptive rate has larger variance early on, while the rectified rate has a more consistent variance.

Limitations

The only run count stated in these units is five random seeds for the IWSLT'14 translation runs, and no seed counts are given for the image or language-modeling results. On CIFAR10 and ImageNet, RAdam's test accuracy stays below SGD's.

The language-modeling comparison covers only LSTMs on One Billion Word, and RAdam is slower early in that run. The rectification relies on a zero-mean Gaussian gradient assumption, which the authors justify at initialization and check by simulation. Setting β2 at or below 0.6 turns RAdam into SGD with momentum.

Paper info

Authors
Liyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, Jiawei Han
Venue
arXiv · Preprint
First published
2019-8-8
Added
2026-11-12
Updated
2021-10-26
Version
v4
arXiv
1908.03265
Category
cs.LG · cs.CL · stat.ML
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

Liyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, Jiawei Han (2019). On the Variance of the Adaptive Learning Rate and Beyond. arXiv:1908.03265v4. https://arxiv.org/abs/1908.03265v4

BibTeX
@misc{liu2019variance,
  title = {{On the Variance of the Adaptive Learning Rate and Beyond}},
  author = {Liyuan Liu and Haoming Jiang and Pengcheng He and Weizhu Chen and Xiaodong Liu and Jianfeng Gao and Jiawei Han},
  year = {2019},
  eprint = {1908.03265},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.03265v4}
}

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