Intuition The one core idea
Training a neural network means nudging its numbers ("weights") again and again to make its mistakes ("loss") smaller. Warmup is simply the rule for how big those nudges are allowed to be at the very start — tiny at first, then growing — so the model doesn't hurt itself while it's still clumsy.
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.
Before any symbol, picture the thing we are adjusting.
Definition Weights and the model
A neural network is a big machine full of adjustable knobs called weights . Feed it an input (an image, a sentence), it produces an output (a guess). Turning the knobs changes the guess. Training = finding knob settings that make good guesses.
We collect all the knob values into a single named bundle so we can talk about "the whole model's state" at once.
θ (theta)
θ is just a name for the entire list of weights — every knob in the machine, packed into one bundle. When we write θ we mean "the current setting of the whole network."
The picture: imagine a control panel of dials; θ is a snapshot of where every dial points right now.
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 θ .
L (script L)
L is a single number measuring how wrong the current guesses are. Big L = very wrong. Small L = nearly right. Training tries to make L as small as possible.
The picture: a hilly landscape. Each spot on the ground is a possible setting θ ; the height at that spot is the loss L . We want to walk downhill to the lowest valley.
Intuition Why a "landscape" picture, not just a number?
A landscape lets us reason about direction and steepness — which way is downhill, and how sharply. Warmup is entirely about not taking reckless leaps across this landscape, so the terrain metaphor is the one we will lean on constantly.
The notation L ( θ ; batch ) 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).
Definition Batch and step
A batch is a small handful of training examples looked at together. We rarely use all data at once (too slow); we grab a batch, learn a little, grab the next batch, learn a little more.
One such "grab-and-update" is called a step . The counter t (below) counts steps.
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.
B
B = how many examples are in one batch. Bigger B = a steadier, less jumpy estimate of "which way is downhill," but each step costs more compute.
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 B gets large — and warmup is what keeps that stable.
t , T w , T
t = which step we are on , counting from 0 . Step 0 is the very start.
T w = the warmup length : how many steps the "go slow" phase lasts. (The subscript w = "warmup".)
T = the total number of steps in the whole training run.
The picture: a horizontal ruler of steps. Mark 0 at the left, T w a bit in, T at the far right. Warmup lives in the segment 0 → T w ; everything after is the main schedule.
T w is in steps , never epochs
An epoch = one full pass over all data = many steps. The number of steps per epoch changes if you change the batch size B . So always measure T w in optimizer steps , or your warmup length secretly shifts when you retune B .
Why the topic needs it: every warmup formula is a function of t compared against T w . These three symbols are the timeline the whole schedule is drawn on.
Here is the tool that tells us which way is downhill .
g t and the ∇ symbol
∇ θ L (read "grad of L ") is a bundle of numbers, one per knob, that says: "if you nudge this knob a hair, does the loss go up or down, and how steeply?" Together they point in the direction of steepest uphill . We call this bundle at step t the gradient g t .
The picture: stand on the loss-landscape. The gradient is an arrow pointing straight up the steepest slope. To go down , we walk in the opposite direction, − g t .
Intuition Why an arrow, and why "opposite"?
A single number can't tell you a direction in a landscape with many dials. The gradient is the multi-dial generalization of "slope." We add the minus sign because we want to descend the hill, and the gradient points up it. That minus is the heart of the update rule in the next section.
Intuition Why early gradients are
dangerous (the whole reason warmup exists)
With random starting knobs, you're standing on a jagged cliff of the landscape. The arrow g t is huge and it swings wildly from batch to batch (each scoop of data disagrees about where downhill is). Multiply that by a big step size and one bad batch flings you off the mountain.
η (eta)
η is a small positive number that sets how big a step we take in the downhill direction. Big η = bold leaps. Small η = timid shuffles.
The picture: the gradient gives a direction ; η gives the stride length . Same direction, different η = same heading, different-sized footstep.
Now we can read the core update rule the parent uses:
θ t + 1 = θ t − η g t
Why the topic needs it: warmup is literally a rule for choosing η at each step t . Everything above was setup so this sentence makes sense.
η ( t ) — a schedule
η ( t ) means "the learning rate is not fixed — it depends on the step t ." We plan out in advance what stride length to use at each moment. Such a plan is a learning rate schedule .
The picture: a graph with step t on the horizontal axis and η on the vertical axis. The schedule is the curve you draw. Warmup is the part of that curve that rises from near-zero.
η start and η peak
η start = the stride length at the very first step (often 0 or tiny).
η peak = the biggest stride the schedule reaches, at the top of warmup.
The picture: on that t -vs-η graph, η start is where the curve begins on the left; η peak is the height it climbs to at t = T w .
Why the topic needs it: the linear-warmup formula η ( t ) = η peak t / T w is nothing but "draw a straight line from η start up to η peak ." Recognizing η ( t ) as a curve on a graph is what makes that obvious.
t / T w
This is "how far through warmup are we? ", as a number from 0 to 1 . At t = 0 it's 0 (no progress); at t = T w it's 1 (done). Multiply it by η peak and you get a straight ramp: 0 → η peak .
cos and π , just enough for the decay
After warmup, many recipes lower η smoothly using a cosine curve (Cosine annealing ). You only need two facts: cos ( 0 ) = 1 (start high) and cos ( π ) = − 1 (end low), where π ≈ 3.14 marks "halfway round." So 2 1 ( 1 + cos ( π x )) slides gently from 1 (at x = 0 ) down to 0 (at x = 1 ) as progress x goes 0 → 1 .
The picture: a smooth playground slide — flat at the top, flat at the bottom, steepest in the middle. That gentle-ended shape is why cosine is chosen over a straight drop.
Why the topic needs it: the parent's full recipe is warmup line then cosine slide . You now hold both pieces.
v t (Adam's memory of gradient size)
Adaptive optimizers like the Adam optimizer keep a running estimate, called v t , of how big the gradients have been recently (specifically an average of g t squared). They then divide the step by v t so noisy directions get smaller strides.
The picture: a running tally that says "this knob has been getting jerked around a lot — tread carefully there."
Intuition Why this matters for warmup
Early on there are too few samples to trust v t , so the effective stride η / v t jumps around wildly. Keeping η tiny during warmup tames that until v t settles — this is exactly the reasoning behind RAdam .
update rule step downhill
learning rate eta = stride
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 t gives a schedule; warmup is the opening of that schedule, with Adam's v t and the cosine slide feeding in.
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 L 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 T w measured? Optimizer steps, not epochs.
What does the gradient g t = ∇ θ L 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 θ t + 1 = θ t − η g t ? The gradient points uphill; we subtract it to move downhill.
What role does η play versus g t ? g t gives the direction; η gives the stride length.
What does η ( t ) mean and what picture is it? The learning rate as a plan over steps; a curve on a graph of t (horizontal) vs η (vertical).
What are η start and η peak ? The stride at the first step and the biggest stride reached at the top of warmup.
What is the value of t / T w at the start and end of warmup? 0 at the start (t = 0 ) and 1 at the end (t = T w ).
Why does small early η help Adam specifically? Its size-estimate
v t is unreliable with few samples, so a small
η keeps the effective step
η / v t from swinging wildly.