3.2.3 · D1Training Deep Networks

Foundations — Momentum and Nesterov momentum

2,441 words11 min readBack to topic

This is the foundations page for Momentum and Nesterov momentum. The parent note throws a lot of symbols at you at once — , , , , , , and an "exponentially weighted average". Here we earn every single one from zero, in an order where each piece leans on the one before it. Nothing below assumes you have seen calculus or vectors before.


0. The playground: a loss landscape

Before any symbol, picture the thing we are moving on.

Figure — Momentum and Nesterov momentum

Everything in this topic is just clever ways of walking to that red dot without falling over.


1. — the parameters (the knobs)

  • Plain words: the list of every number we are allowed to change.
  • The picture: your horizontal location on the hill in figure s01. Move → you slide sideways to a new spot with a new height.
  • Why the topic needs it: momentum is a rule for changing step by step. Without a symbol for "where we are", we can't describe "where we go next".

We write with a little subscript = "the position at step number ". So is the start, after one step, and so on. is just a counter, like frame numbers in a flip-book.


2. — the loss (the height)

  • The picture: the height of the terrain directly above position in s01.
  • Why: we can't aim for "lowest" unless we have a number that says how low we are. is that number.

The whole game: make as small as possible by choosing well. This links to Gradient Descent, the base method we're improving.


3. Slope, and why we need calculus:

Here a mathematical tool enters, so we say why this tool and not another.

Figure — Momentum and Nesterov momentum
  • In 1-D (one knob) it's just the ordinary slope: positive slope = ground rises to the right, negative = rises to the left.
  • In many knobs it's an arrow made of one slope per knob, packed together — pointing up the steepest way.
  • The picture: the orange arrow in s02 points uphill. To go down, we walk the opposite way, .
  • Why the topic needs it: every update rule in this topic starts from — it's the "which way is down" signal. Momentum will average several of these arrows instead of trusting just one.

4. — the learning rate (step length)

  • The picture: the length of one footstep. Big = long stride (risk overshooting), small = tiny careful step (slow).
  • Why: the gradient gives a direction; turns it into an actual move. Together they make the basic rule below. Choosing over time is its own subject — see Learning Rate Schedules.

Now we can read the parent's plain gradient descent rule with zero mystery:


5. The zig-zag problem: curvature, the Hessian , and

Why do we even need momentum? Because plain steps misbehave in a narrow valley.

Figure — Momentum and Nesterov momentum
  • Why the topic needs it: is the precise name for "ill-conditioned". Large is the disease; momentum is the cure. This is the reason the whole topic exists.

6. and — velocity and memory (the rolling ball)

Now the two starring symbols. First the idea, then the symbols.

  • The picture: is the ball's heaviness. Heavy ball (big ) barrels through little bumps but is slow to turn.

7. The tool behind : the Exponentially Weighted Moving Average

The velocity update hides one more tool. Name it, motivate it.

Here we make the sign bookkeeping explicit, matching the parent note's convention. The parent accumulates the raw (uphill) gradient into the velocity and puts the minus sign in the position step, so the two together still move downhill:

Unroll the first line (using ) and each past gradient carries weight — recent = heavy, old = faint. This is exactly the machinery of Exponentially Weighted Moving Average, reused inside Adam Optimizer and RMSProp too.

  • Why the topic needs it: these two lines are classical momentum. Understanding the EWMA (line 1) plus where and the minus sign go (line 2) = understanding why consistent directions add and oscillating ones cancel.

8. — the look-ahead point (Nesterov's twist)

  • The picture: before committing, peek one step ahead and read the slope at the peek-spot. If it warns "you're about to overshoot", correct early.
  • Why: this single substitution is the only difference between classical and Nesterov momentum in the parent note. The position step stays the same, ; only where the gradient is measured changes.

Prerequisite map

Loss landscape L of theta

Gradient nabla L = downhill arrow

Curvature and condition number kappa

Learning rate eta gives step size

Plain gradient descent update

Exponentially weighted average

Velocity v with memory beta

Classical momentum

Look-ahead theta tilde

Nesterov momentum


Equipment checklist

Cover the right side and test yourself. If any answer surprises you, reread that section.

What does stand for, and what picture matches it?
The collection of all tunable network numbers = your position on the loss landscape.
What does return, and what picture?
A single number = how wrong the network is = the height of the terrain above .
What does the gradient point toward — uphill or downhill?
Uphill (steepest increase); we step along to go down. Its length = steepness.
Why does calculus/the derivative enter this topic at all?
It is the tool that turns "shape of the hill near me" into "which way and how steep is down".
What role does play in the momentum update?
It scales the velocity in the position step — how far each smoothed move goes.
What is the Hessian, its symbol, and its shape?
The second-derivative "bendiness" of , written ; for knobs it is an grid.
What does a large condition number mean geometrically?
A long, thin valley: steep across, gentle along → plain steps zig-zag.
In words, what is the velocity , and its starting value?
An exponentially weighted running average of past gradients; it starts at .
Write both lines of classical momentum.
then .
Why an EWMA rather than a plain average of gradients?
It weights recent gradients most, fades old ones, and updates in one cheap line with no stored history.
What is and who uses it?
The look-ahead point where momentum alone would land; Nesterov measures the slope there.