CS PAPERS DEEP-READ · PAPER 49

Adam: The Default Solver for Stochastic Optimization

Kingma & Ba · University of Amsterdam / University of Toronto · ICLR 2015

中文 →

What did this paper do?

In late 2014, two researchers (Kingma and Ba) proposed an "optimizer" called Adam. Training a neural network (say the model behind ChatGPT) is really about turning billions of "knobs" to just the right settings, one step at a time — and the optimizer is the set of rules that decides which way to turn each knob and by how much on every step. Adam's contribution: it makes this work almost tuning-free — with default settings it just runs, steadily. It is simple, stable, and useful enough that today nearly every deep model is trained with it.

First, an annoyance

Picture training as walking downhill blindfolded: you can only feel the slope under your feet and take a step downhill. How big a step is the "learning rate." The catch — the whole mountain forces you to use one fixed stride. But some directions are cliffs where a slightly-too-big step overshoots and bounces you back and forth; others are long gentle slopes where a small step means crawling forever. One stride can't serve both cliffs and plains, so it's always wrong somewhere. Tuning that stride becomes a chore, a tightrope walk: a hair too big and you oscillate and diverge, a hair too small and it's hopelessly slow.

The idea

Adam fuses two plain ideas. First, "momentum": don't just look at this one step's slope (jittered left and right by random noise) — remember "which way have I mostly been heading lately" and follow that averaged direction, the way a ball rolling downhill has inertia and isn't stopped by every little bump. Second, "give every direction its own stride": instead of one stride for the whole mountain, let each direction set its own step size automatically — a direction that keeps swinging wildly takes small, careful steps; a direction that barely moves takes big, bold ones.

How does it pull that off?

Adam keeps two little ledgers for each knob. The first records "which way am I heading on average in this direction" (an inertia-smoothed average of the recent slopes, erasing the jitter). The second records "how big and how jittery has the slope been here" (an average of the recent slope magnitudes). To take a step, it heads in the direction of the first ledger, but scales the stride using the second: a direction that's always steep and jittery gets its step divided down to stay steady; a calm direction gets a bigger stride.

The beauty: whether the slopes are large or small overall — and in what units — cancels out in that one division. You no longer hand-tune a stride per direction or per stage; every step covers roughly "a sensible distance." One thoughtful extra: those two ledgers start out empty, which would bias you toward "afraid to move" early on, so Adam applies a tiny start-up correction that erases the bias and gets even the first few steps right.

What it brought

The result: training a new model went from "spend a few days tuning the learning rate" to "just run it with Adam's defaults." It isn't fussy about settings, works out of the box, and is both fast and stable — so it became the default of deep learning's last decade. Nearly every big model you've heard of was trained with Adam (or an improved variant).

One honest note: it's no cure-all. On some tasks, a simpler method tuned carefully actually reaches a model that generalizes a touch better; and Adam keeps two extra ledgers per knob, so it eats a good chunk of extra memory — which stings more the bigger the model gets.

Remember one thing

Training a model is walking downhill blindfolded, deciding each step's direction and size. Adam keeps two ledgers per direction — "which way on average" (momentum) and "how big and jittery is the slope here" (magnitude) — heads in the average direction and scales the stride by the magnitude, so it's fast and stable with almost no hand-tuning. It's the default optimizer behind nearly every modern deep model.

Want the update formula, the two "moments," bias correction, and the convergence flaw found later? → switch to the deep read