3.2.7 · D1Training Deep Networks

Foundations — Learning rate warmup

2,174 words10 min readBack to topic

This page assumes you have seen nothing. Every letter, arrow, and word used on the parent page Learning rate warmup is unpacked here, in an order where each idea leans only on the ones before it. By the end you should be able to read that page's formulas without pausing on a single symbol.


0. The scene: what is being trained?

Before any symbol, picture the thing we are adjusting.

We collect all the knob values into a single named bundle so we can talk about "the whole model's state" at once.

Figure — Learning rate warmup

Why the topic needs it: warmup controls how fast we turn the dials. To talk about turning them we first need one name for "the dials" — that name is .


1. Loss — the "how wrong am I?" number

Figure — Learning rate warmup

The notation reads as: "the loss you get when the knobs are set to and you test on this particular scoop of data." The semicolon separates what we tune () from what we happen to be looking at (the batch, defined next).


2. Batch — a scoop of the training data

The picture: a giant pile of flashcards. You don't study all million at once — you draw a stack of, say, 32, quiz yourself, adjust, then draw the next stack. Each stack is a batch; each round is a step.

Why the topic needs it: the parent's Reason 3 (large-batch training, the Linear scaling rule (large batch training)) is about what happens when gets large — and warmup is what keeps that stable.


3. The step counter and the warmup length

Why the topic needs it: every warmup formula is a function of compared against . These three symbols are the timeline the whole schedule is drawn on.


4. The gradient and the symbol

Here is the tool that tells us which way is downhill.

Figure — Learning rate warmup

5. The learning rate — the star of the show

Now we can read the core update rule the parent uses:

Why the topic needs it: warmup is literally a rule for choosing at each step . Everything above was setup so this sentence makes sense.


6. Writing as a function of time:

Figure — Learning rate warmup

Why the topic needs it: the linear-warmup formula is nothing but "draw a straight line from up to ." Recognizing as a curve on a graph is what makes that obvious.


7. Two shapes you'll meet: line and half-cosine

Why the topic needs it: the parent's full recipe is warmup line then cosine slide. You now hold both pieces.


8. One extra name to avoid a classic mix-up:


Prerequisite map

weights theta

loss L landscape

batch and size B

gradient g points uphill

update rule step downhill

learning rate eta = stride

step counter t and Tw

schedule eta of t

Learning rate warmup

second moment v in Adam

cosine and pi

Read it top-down: weights and data build the loss landscape; the gradient reads that landscape; the update rule walks it using a stride ; making depend on step gives a schedule; warmup is the opening of that schedule, with Adam's and the cosine slide feeding in.


Equipment checklist

Cover the right side and answer before revealing.

What does stand for?
The whole bundle of the network's adjustable weights (all the knobs at once).
What does the loss measure, and what picture goes with it?
How wrong the current guesses are; pictured as height on a hilly landscape we walk downhill on.
What is a batch, and what is one step?
A batch is a small scoop of training examples; one step is one update using one batch.
In what units is measured?
Optimizer steps, not epochs.
What does the gradient point toward?
The direction of steepest increase in loss — so we move in the opposite direction to go down.
Why is there a minus sign in ?
The gradient points uphill; we subtract it to move downhill.
What role does play versus ?
gives the direction; gives the stride length.
What does mean and what picture is it?
The learning rate as a plan over steps; a curve on a graph of (horizontal) vs (vertical).
What are and ?
The stride at the first step and the biggest stride reached at the top of warmup.
What is the value of at the start and end of warmup?
at the start () and at the end ().
Why does small early help Adam specifically?
Its size-estimate is unreliable with few samples, so a small keeps the effective step from swinging wildly.