PLAIN/TEXT — ISSUE 211/456 COMPUTER SCIENCE · FOUNDATION / AI TRAINING · ~4 MIN READING DATE: 2027-04-30 ARCHIVE: https://plaintext.click/newsletter/ SUBJECT: Why does an optimizer remember its previous step? Why does an optimizer remember its previous step? ================================================= / START HERE A noisy measurement can suggest left on one attempt and right on the next. An optimizer is a rule that adjusts a prediction program's numbers to reduce its chosen error score. A momentum optimizer is an update rule that combines the newest error sensitivity with a fading memory of earlier adjustments. Its next adjustment therefore depends on recent history as well as the newest evidence. / WHY NOW Reacting only to the latest small group of training examples can make learning zigzag. Memory lets consistently supported directions accumulate influence while some back-and-forth variation cancels, although it can also carry the model too far. / THE IDEA A gradient is a collection of local sensitivities describing how loss changes when adjustable numbers change slightly. Ordinary gradient-based updates follow the current sensitivity toward a locally lower loss. Momentum introduces another stored quantity, often called velocity, that retains part of the preceding update before adding the new correction. Despite the physical name, no object has to move. Velocity is a numerical memory with the same shape as the adjustable settings. A retention factor controls how quickly old corrections fade. Consistent corrections build on one another; contradictory corrections partially cancel. The learning rate still controls the scale of each new contribution. / THE FORMAL IDEA v_t = βv_(t−1) − ηg_t; w_t = w_(t−1) + v_t - v_t is the current stored update; v_(t−1) is the previous one. β, pronounced beta, retains a fraction of that memory, with 0 ≤ β < 1. - η is learning rate, the multiplier on a new correction; g_t is current loss sensitivity; w is one adjustable weight. t counts update steps. All toy values are dimensionless. This is one common momentum convention. / RUN THE TINY EXAMPLE Change one thing. Predict what happens. Start v₀ = 0, β = 0.5 and η = 0.1; use sensitivity g = 2 twice. First update: v₁ = 0−0.2 = −0.2. Second: v₂ = 0.5×(−0.2)−0.2 = −0.3. Change only the second sensitivity to −2: v₂ = −0.1+0.2 = +0.1. The two runs agree on the first step. At the second, memory reinforces a repeated direction but partly offsets a reversal. Without memory, those second updates would have been −0.2 and +0.2. The current batch therefore does not uniquely determine the update; the optimizer's stored history matters too. / SO WHAT? This explains why resuming training can require saving optimizer state as well as model weights. Two runs starting from identical predictions can take different next steps if their stored velocities differ. A complete description of a training checkpoint includes the update machinery's memory when exact continuation is important, not only the numbers used to make predictions. / ONE CAVEAT Momentum can overshoot or amplify persistent misleading directions, and its effects depend on learning rate and retention. Other optimizers keep different histories. The constant sensitivities here isolate the rule rather than model a whole real training run. / KEEP THIS Momentum makes a training step depend on recent history, reinforcing consistent signals while carrying some inertia when the newest signal reverses. / SOURCE TRAIL [1] Goodfellow, Bengio and Courville — Momentum https://www.deeplearningbook.org/contents/optimization.html NEXT: Why a straw appears to bend at the water --- HARD IDEAS. PLAIN TEXT. You are receiving this because you asked for one clear computer-science or physics idea each day. Unsubscribe: https://plaintext.click/unsubscribe View in browser: https://plaintext.click/newsletter/2027/04/2027-04-30-optimizer-momentum.html From: Plain/Text / Brickston Consulting · 30 N Gould St Ste N, Sheridan, WY 82801 US · knowledge@plaintext.click