Optimization

Learning Rate Schedules: Warmup, Decay & Cycling

Schedule shapes that change the scalar learning-rate scale over training, with sourced CLR/range-test and SGDR cosine-restart examples plus caveated warmup/decay teaching patterns.

status: publishedimportance: importantdifficulty 3/5math: undergraduateread: 14mlive demo
Editorial optimization illustration of warmup, decay, and cycling learning-rate curves over training steps.

Concept Structure

Learning Rate Schedules: Warmup, Decay & Cycling

01Intuition

Start with the picture, metaphor, or geometric mechanism.

02Math

Make the objects explicit and connect them with notation.

03Code

Mirror the equations with runnable implementation details.

04Interactive Demo

Manipulate the mechanism and watch the idea respond.

2prerequisites
1next concepts
2related links

Learning map

Learning Rate Schedules: Warmup, Decay & Cycling
BeforeAdam OptimizerNow4/4 sections readyTryManipulate one control and predict the visible change.NextScaling Laws & Emergent Abilities

Object flow

4/4 sections readyAsk about thisResearch room
ConceptLearning Rate Schedules: Warmup, Decay & CyclingOptimization
2 sources attachedLocal snapshot ready
concept:optimization/learning-rate-schedules

Conceptual Bridge

What should feel connected as you move through this page.

Carry inAdam Optimizer

Bring the mental model from Adam Optimizer; this page will reuse it instead of restarting from zero.

Work hereLearning Rate Schedules: Warmup, Decay & Cycling

Schedule shapes that change the scalar learning-rate scale over training, with sourced CLR/range-test and SGDR cosine-restart examples plus caveated warmup/decay teaching patterns.

Carry outScaling Laws & Emergent Abilities

The next edge should feel earned: use the demo prediction here before following Scaling Laws & Emergent Abilities.

Test the linkManipulate one control and predict the visible change.Then continue to Scaling Laws & Emergent Abilities
01

01

Intuition

Build the mental picture first so the rest of the page has something to attach to.

Section prompt

The learning rate is the step size of training. It is also one of the most sensitive knobs in deep learning: the same model can diverge, crawl, or converge depending on the schedule.

Two page-local teaching patterns, treated here as extensions beyond the listed Smith/SGDR sources:

  • Warmup: start small, then ramp up. This page uses warmup as a teaching pattern for smaller early update scale, but the listed Smith/SGDR sources do not by themselves source large-model warmup practice or Adam warmup rationale.
  • Decay: reduce the learning-rate multiplier later so the scalar update scale is smaller late in training.

This page includes warmup followed by decay as a teaching shape, but this source-checked claim focuses only on learning-rate range tests, cyclical policies, and cosine annealing/restarts.

02

02

Math

Translate the story into symbols, assumptions, and a derivation you can inspect.

Section prompt

Let ηt\eta_t be the learning rate at step tt.

Linear warmup to a peak ηmax\eta_{\max} over TwT_w steps:

ηt=ηmaxtTw,tTw.\eta_t = \eta_{\max}\cdot \frac{t}{T_w},\qquad t\le T_w.

Cosine decay from ηmax\eta_{\max} to ηmin\eta_{\min} over TT total steps (after warmup):

ηt=ηmin+12(ηmaxηmin)(1+cos(πtTwTTw)),tTw.\eta_t = \eta_{\min} + \tfrac12(\eta_{\max}-\eta_{\min})\left(1+\cos\left(\pi\,\frac{t-T_w}{T-T_w}\right)\right),\qquad t\ge T_w.

A simple classical alternative is:

ηt=η0t+1.\eta_t = \frac{\eta_0}{\sqrt{t+1}}.

Schedules can interact with curvature and sharpness: if the learning rate is too high relative to local curvature, training can become unstable. The edge-of-stability connection is background context, not checked by the Smith/SGDR claim here.

03

03

Code

Keep the implementation aligned with the notation so the algorithm is legible.

Section prompt
import numpy as np

def warmup_cosine(T, Tw, eta_max, eta_min):
    lr = np.zeros(T)
    for t in range(T):
        if t < Tw:
            lr[t] = eta_max * (t + 1) / max(1, Tw)
        else:
            u = (t - Tw) / max(1, T - Tw - 1)
            lr[t] = eta_min + 0.5 * (eta_max - eta_min) * (1 + np.cos(np.pi * u))
    return lr

lr = warmup_cosine(T=10000, Tw=500, eta_max=3e-4, eta_min=3e-5)
print("lr[0], lr[Tw], lr[-1]:", lr[0], lr[500], lr[-1])
print("avg lr:", float(lr.mean()))
04

04

Interactive Demo

Use direct manipulation to connect the explanation to a moving system.

Section prompt

Use the demo to tune warmup length and decay style, and build intuition for how "big early steps" vs "small late steps" show up as different curves.

Live Concept Demo

Explore Learning Rate Schedules: Warmup, Decay & Cycling

The stage is code-native and interactive. Use it to test the explanation against the mechanism.

difficulty 3/5undergraduatecode-aligned
Demo Prediction Checkpoint

Manipulate one control and predict the visible change.

Commit to what Learning Rate Schedules: Warmup, Decay & Cycling should make visible before reading the result.

After The First Pass

Turn the concept into an inspected object.

Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.

Mechanism Storyboard

See the idea move before the page explains it

Schedule shapes that change the scalar learning-rate scale over training, with sourced CLR/range-test and SGDR cosine-restart examples plus caveated warmup/decay teaching patterns.

Prediction open01 / Intuition
Editorial optimization illustration of warmup, decay, and cycling learning-rate curves over training steps.
Prediction lens

Start with the picture, metaphor, or geometric mechanism.

Commit first

Before reading further, choose the kind of change Learning Rate Schedules: Warmup, Decay & Cycling should make visible.

Visual Inquiry

Make the image answer a mathematical question

Schedule shapes that change the scalar learning-rate scale over training, with sourced CLR/range-test and SGDR cosine-restart examples plus caveated warmup/decay teaching patterns.

4/4 stages readyLive demo connected
Prediction

Which visible object should carry the first intuition?

Commit first

Pick the cue that should make Learning Rate Schedules: Warmup, Decay & Cycling easier to reason about before the page gives the answer.

Source Grounding

Canonical references for the mechanism on this page.

paper · 2015Cyclical Learning Rates for Training Neural NetworksSmith

Grounds LR range tests and cyclical policies that vary the global learning rate between lower and upper bounds.

Open source
paper · 2016SGDR: Stochastic Gradient Descent with Warm RestartsLoshchilov and Hutter

Grounds cosine annealing within SGD warm-restart runs, where restarts are emulated by increasing the learning rate while keeping the current parameters.

Open source

Claim Review

Schedule shapes that change the scalar learning-rate scale over training, with sourced CLR/range-test and SGDR cosine-restart examples plus caveated warmup/decay teaching patterns.

Status1 substantive review recorded

Claims without a substantive review badge still need exact source-support review.

Sources2 references

smith-2015-cyclical-learning-rates, loshchilov-2016-sgdr

Witnesses4 local objects

Use equation, code, and demo objects to check whether the source support is operational.

Substantively reviewedLearning-rate schedules change the scalar learning rate over training. Smith supports LR range tests and cyclical policies that vary LR between bounds; SGDR supports cosine annealing with warm restarts. Warmup, inverse-sqrt decay, and LLM-oriented framing here are teaching extensions, not sourced by these papers.Claim metadata: source checked

Smith treats LR as a key hyperparameter, describes CLR varying between boundary values, and gives an LR range test for bounds. SGDR defines warm restarts by increasing LR after each run and decaying LR inside a run by cosine annealing. Page equations/code/demo render schedule curves but do not source warmup or LLM practice.

Sources: Cyclical Learning Rates for Training Neural Networks, SGDR: Stochastic Gradient Descent with Warm RestartsDoes not check large-model warmup practice, Adam bias-correction warmup rationale, edge-of-stability claims, inverse-sqrt schedules, convergence guarantees, or universal schedule superiority; support is limited to LR range tests/CLR and SGDR cosine warm restarts.A bounded review summary is present; still check caveats and exact source scope.

Smith supports scalar LR as a key hyperparameter, CLR between min/max bounds, and an LR range test that linearly increases LR to choose bounds. Loshchilov and Hutter support SGDR restarts as LR increases while reusing parameters, plus cosine annealing from eta_max to eta_min within a run. Warmup, inverse-sqrt, LLM practice, Adam warmup, edge-of-stability, convergence, and universal-superiority material remains caveated teaching context.

Reviewer: codex+oracle; reviewed 2026-05-07

Practice Loop

Try the idea before it explains itself

Schedule shapes that change the scalar learning-rate scale over training, with sourced CLR/range-test and SGDR cosine-restart examples plus caveated warmup/decay teaching patterns.

Readiness0/3 checks ready
Predict

Before touching the demo, predict one visible change that should happen in Learning Rate Schedules: Warmup, Decay & Cycling.

Hint 1

Reveal when your model needs a nudge.

Hint 2

Reveal when your model needs a nudge.

Hint 3

Reveal when your model needs a nudge.

Object research drawerClose
ConceptLearning Rate Schedules: Warmup, Decay & CyclingOptimization

Research Room

Attach the question to an exact object

Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.
Next local actionNo local draft saved yet

Open the draft below to save one note and next action in this browser.

conceptOptimization

Learning Rate Schedules: Warmup, Decay & Cycling

Anchored question

What is the smallest example that makes Learning Rate Schedules: Warmup, Decay & Cycling click without losing the math?

Local action draftNo local draft saved yetExpand only when ready to capture one local next action
Local action draft

This draft stays locally in this browser for concept:optimization/learning-rate-schedules.

No local draft saved.
Evidence to inspect
  • Source ids to inspect: smith-2015-cyclical-learning-rates, loshchilov-2016-sgdr
  • Definition, prerequisite, and contrast concept links
  • The equation or code witness that makes the concept operational
  • One demo state that shows the invariant instead of a slogan
What would resolve this
  • The learner can state the mechanism in their own words
  • The learner can name the prerequisite that would repair confusion
  • The learner can predict how the mechanism changes under one perturbation
Grounded AI handoff

I am working in Continuous Function's research reading room. Object: concept - Learning Rate Schedules: Warmup, Decay & Cycling Object key: concept:optimization/learning-rate-schedules Context: Optimization Anchor id: concept/concept-notebook/optimization/learning-rate-schedules Open question: What is the smallest example that makes Learning Rate Schedules: Warmup, Decay & Cycling click without losing the math? Evidence to inspect: - Source ids to inspect: smith-2015-cyclical-learning-rates, loshchilov-2016-sgdr - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.

Open source object
concept/concept-notebook/optimization/learning-rate-schedules concept:optimization/learning-rate-schedules