DeepLLM Quiz
Deep Learning

Adaptive learning rates: AdaGrad, RMSProp and Adam

10 questions on per-parameter learning rates, AdaGrad, RMSProp, Adam, bias correction and the settings that remain to choose. With explanations.

  • 10 questions
  • Stopwatch
  • Instant feedback

Shown publicly with your score. Don’t use your full real name.

Sample questions

Play now ↑

Answers stay hidden. Start the quiz to play them.

  1. Sample 1

    A colleague says that since Adam adapts the step for every parameter, you no longer need to think about the learning rate. How should you respond?

    • Agree, since the method sets all steps by itself
    • Agree, but only for networks with fewer than a hundred weights
    • Disagree: the learning rate is still an input of the method and needs a sensible value
  2. Sample 2

    In typical Adam settings, one smoothing constant is 0.9 and the other is 0.99. Which statement is right?

    • Both averages have the same memory
    • The average of gradients has the longer memory
    • Neither average remembers anything
    • The average of squared gradients, with the constant closer to one, remembers further back

How it works

  • One question per screen. An answer is final once sent.
  • You see right away whether you were right, with a short explanation.
  • The stopwatch runs: on equal scores, the faster player ranks first.
  • Only your best attempt counts, so replaying is never risky.

About this quiz

If you open the training code of almost any modern network, you will probably find an optimiser called Adam. It is the default choice of countless practitioners, often selected with no more thought than a drop-down menu deserves. Yet it is built from a few plain ideas, each answering a specific weakness of simpler methods, and knowing them turns Adam from a magic word into a sensible tool whose behaviour you can predict.

The starting point is a problem you may recognise from other quizzes: one learning rate rarely suits every direction of the error surface. Weights that sit on steep slopes need small steps, and weights on gentle slopes can take big ones. Adaptive methods give each parameter its own step size and adjust it automatically from the gradients seen so far. This quiz walks through the three best-known members of that family in the order in which they improved on each other, starting with the one that adds up squared gradients, then the one that averages them with a fading memory, and finally the one that also borrows momentum.

You will practise telling them apart through situations, not through formulas. What happens to a parameter that has received large gradients for a long time? Why might a method run out of steam after a million steps? Why does an optimiser need a correction early on? Two parameters whose gradients differ in size by a factor of ten thousand are fed to the same rule: how do their steps compare? And what still has to be chosen by hand when a method calls itself adaptive?

There are some common beliefs the quiz gently challenges. One is that an adaptive optimiser removes the need to think about the learning rate. Another is that the intuition behind per-parameter rates is exact, whereas it depends on assumptions about the shape of the surface that real networks rarely satisfy. A third is that the three methods are unrelated, when in fact each is a small modification of the one before. Knowing the family tree pays off when something goes wrong. If a run stalls, the cause may be an accumulating denominator. If a run is jittery, the averaging constants may be too short-lived. If an optimiser behaves differently on two similar problems, the scale of the gradients may be playing a part. Each of these diagnoses starts from understanding what the method keeps in memory and how fast it forgets, which is precisely what the questions are designed to draw out. And since the same building blocks reappear in many newer optimisers, the effort of learning them here is useful well beyond these three names.

The quiz is for learners and practitioners who have heard of Adam and want to know what is inside it, and it needs only the notions of gradient, step size and average. There are 10 questions with explanations, and it takes about four minutes.

Questions and answers

›How long does the quiz take?

About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. An explanation follows each answer, so the quiz works as a compact summary of the topic.

›Do I need to know the formulas?

No. The quiz describes each method in words and, where a calculation is needed, gives you the rule in the question. It is more important to understand what each ingredient is for than to remember the symbols.

›Why give each parameter its own learning rate?

Because curvature differs from one direction to another, and the best step size depends on curvature. A single rate is a compromise that is too large for the steepest directions and too small for the flattest. Per-parameter rates let each weight take steps matched to the part of the surface it lives on. The idea is most accurate when the main directions of curvature line up with the weights themselves, which is rarely exactly true, yet the methods still work well.

›What is AdaGrad?

AdaGrad keeps, for each parameter, a running total of the squares of all the gradients it has received. The parameter's step is the ordinary step divided by the square root of that total, plus a tiny constant to avoid dividing by zero. Parameters with a history of large gradients therefore get smaller steps, while those with small gradients keep larger ones.

›What is RMSProp?

RMSProp is a variant of AdaGrad that replaces the running total with an exponentially weighted average of the squared gradients. In an average of that kind, recent gradients count more and old ones fade away at a rate set by a constant slightly below one. The step is then divided by the square root of this average, which is the root mean square of recent gradients, hence the name.

›What is Adam?

Adam is short for adaptive moments. It keeps two moving averages for every parameter: one of the gradients, which acts like momentum, and one of the squared gradients, which acts like RMSProp. The step is the first average divided by the square root of the second. It is the most widely adopted learning algorithm in deep learning, thanks to its good behaviour across a wide range of problems.

›What is bias correction in Adam?

Both moving averages start at zero, so in the first few steps they underestimate the true values. Bias correction divides them by a factor that compensates for this. As training proceeds, the factor approaches one and the correction disappears, which is why it is sometimes left out in practice.

›Which settings do I still need to choose with Adam?

Adam has four settings: a base learning rate, two smoothing constants for the averages and a small stabilising constant. Published typical values exist for the smoothing constants and the stabiliser, and they work for most problems. A practitioner should know which of the four settings are meant to be left alone, because tuning the wrong ones wastes time that a few careful experiments on the right one would save.

More quizzes