The 6 Learning Rate Schedules: How to Accelerate Training Without Crashing
From the publisher’s feed, collected in the ZeroLabs newsroom.
Image generated by Author using AIUnderstanding Warmup, Decay, Cosine Annealing, and the schedules that power modern AIIntroductionThe learning rate controls how much to adjust model parameters during training — it’s the most critical hyperparameter in deep learning.Set it too high, training explodes. Too low, learning grinds to a halt. But the optimal learning rate isn’t constant — it should change during training.Learning rate schedules dynamically adjust the learning rate, dramatically improving convergence speed and final quality. This article explores six essential schedules, explaining how each works and when to use which.The Core Problem: Finding the Right Learning RateThe Goldilocks ChallengeHIGH LR (1.0):Step 1: Loss = 2.5Step 2: Loss = 15.7 (jumped over optimal!)Step 4: NaN (exploded!)Result: Training failsMEDIUM LR (0.1):Step 1: Loss = 2.5Step 1000: Loss = 0.9Step 10000: Loss = 0.3Result: Good convergenceLOW LR (0.0001):Step 1: Loss = 2.5Step 10000: Loss = 2.3Result: Too slowThe Dynamic InsightDifferent training phases need different learning rates:EARLY: Far from optimal → Need large steps → High LR (0.1-1.0)MID: Refining → Need medium steps → Medium LR (0.01-0.1)LATE: Near optimal → Need precision → Low LR (0.001-0.01)Constant LR: Must compromiseScheduled LR: Get benefits of all phases!The 6 Learning Rate Schedules1. CONSTANT - No schedule (baseline)2. STEP DECAY - Drop by factor at intervals3. EXPONENTIAL DECAY - Smooth exponential reduction4. COSINE ANNEALING - Smooth cosine curve5. LINEAR WARMUP - Gradual increase at start6. WARMUP + COSINE - Modern standardType 1: Constant Learning Rate — The BaselineHow It WorksLR stays fixed throughout trainingStep 1: LR = 0.1Step 5,000: LR = 0.1Step 10,000: LR = 0.1Visualization:LR│0.1 ├────────────────────────── └─────────────────────► StepsWhen to UseWorks for: Simple problems, small models, baseline experimentsLimitations: Suboptimal convergence, may overshoot near end, slower than scheduledType 2: Step Decay — The StaircaseHow It WorksLR drops by fixed factor at predetermined intervals.CONFIGURATION:Initial LR: 0.1Decay factor: 0.1Decay every: 30 epochsSCHEDULE:Epochs 0-29: LR = 0.1Epochs 30-59: LR = 0.01 (÷10)Epochs 60-89: LR = 0.001 (÷10)Epochs 90-120: LR = 0.0001 (÷10)Visualization:LR│0.1 ├──────┐0.01│ └──────┐0.001 └──────┐ └──────────────────► EpochsWhy It’s NeededPhase Separation:Phase 1 (LR=0.1): Rapid explorationPhase 2 (LR=0.01): RefinementPhase 3 (LR=0.001): Fine-tuningPhase 4 (LR=0.0001): Final convergenceBenefits & LimitationsAdvantages:✓ Simple and effective✓ Faster than constant✓ Works well empiricallyLimitations:✗ Requires manual tuning (when to decay?)✗ Abrupt changes can cause instability✗ Not smoothUsed In: AlexNet, VGG, early deep learningType 3: Exponential Decay — The Smooth CurveHow It WorksLR decreases smoothly following exponential function.CONFIGURATION:Initial LR: 0.1Decay rate: 0.96Decay every: 1000 stepsSCHEDULE:Step 0: LR = 0.1Step 1,000: LR = 0.096Step 2,000: LR = 0.092Step 10,000: LR = 0.066Formula: LR = Initial_LR × (decay_rate)^(step/decay_steps)Visualization:LR│0.1 ├╮ │ ╲__ │ ╲___0.05│ ╲____ └──────────────────► StepsBenefits & LimitationsAdvantages:✓ Smooth, continuous decay✓ No abrupt changes✓ Works well in practiceLimitations:✗ Decays forever (no plateau)✗ Can become too small too fastUsed In: TensorFlow default, many applicationsType 4: Cosine Annealing — The Smooth RestartHow It WorksLR follows cosine curve, smoothly decreasing from max to min.CONFIGURATION:Max LR: 0.1Min LR: 0.0001Total steps: 10,000SCHEDULE:Step 0: LR = 0.1 (max)Step 2,500: LR = 0.05Step 5,000: LR = 0.0001 (min)Step 10,000: LR = 0.0001 (end)Formula: LR = min + (max - min) × 0.5 × (1 + cos(π × step/max_steps))Visualization (with restart):LR│0.1 ├╮ ╭╮ ╭╮ │ ╲ ╱ ╲ ╱ ╲ │ ╲╱ ╲╱ ╲0.0001 ╱ ╱ └──────────────────► StepsWhy It’s NeededSmooth Convergence:Step Decay: Sharp drops → instabilityExponential: Can get too smallCosine: Perfectly smooth curveWarm Restarts (optional):Periodic LR increasesEscape local minimaFind better solutionsBenefits & LimitationsAdvantages:✓ Very smooth decay✓ Strong empirical performance✓ Optional restarts for better solutions✓ State-of-the-art resultsLimitations:✗ Slightly complex formula✗ Restart timing requires tuningUsed In: Modern CNNs, ResNets, state-of-the-art models (2016+)Type 5: Linear Warmup — The Gradual StartHow It WorksLR gradually increases from zero to target value over initial steps.CONFIGURATION:Target LR: 0.1Warmup steps: 1,000SCHEDULE:Step 0: LR = 0.0Step 100: LR = 0.01Step 500: LR = 0.05Step 1,000: LR = 0.1 (target reached)Step 1,001+: LR = 0.1 (or apply another schedule)Formula: LR = (target_LR / warmup_steps) × current_stepVisualization:LR│0.1 ├ ┌──────────── │ ╱ │ ╱ │ ╱ 0 ├─╱ └──────────────────► Steps 0 1k 10kWhy It’s NeededStability at Training Start:PROBLEM: Large LR with random initializationStep 1: Random parameters, unreliable gradientsApply LR=0.1: Massive updates based on noiseResult: Wild parameter jumps, divergenceSOLUTION: WarmupSteps 1-1000: Gradual LR increase (0 → 0.1)Effect: Stable early training, parameters stabilizeTransformer Necessity:Transformers without warmup: Often failAdam + large LR: Unstable earlyWarmup: Critical for deep models (24+ layers)Benefits & LimitationsAdvantages:✓ Prevents early instability✓ Enables higher peak LR✓ Critical for Transformers✓ Works with any optimizerLimitations:✗ Adds warmup duration✗ Requires tuningUsed In: BERT, GPT, all Transformers (2017+)Typical Settings: 1,000–10,000 steps (1–10% of training)Type 6: Warmup + Cosine — The Modern StandardHow It WorksCombines linear warmup with cosine annealing — state-of-the-art.CONFIGURATION:Max LR: 0.001 (Adam)Warmup steps: 4,000Total steps: 100,000Min LR: 0.00001PHASE 1 - WARMUP (0-4,000):Step 0: LR = 0.0Step 2,000: LR = 0.0005Step 4,000: LR = 0.001 (peak)PHASE 2 - COSINE (4,000-100,000):Step 4,000: LR = 0.001Step 50,000: LR = 0.0005Step 100,000: LR = 0.00001Visualization:LR│0.001├ ┌╮ │ ╱ ╲___ │╱ ╲___0.00001 ╲____ └──────────────────► Steps 0 4k 50k 100kWhy It’s The BestCombines All Benefits:Warmup: Stable initialization, prevents divergenceCosine: Smooth convergence, strong final performanceTogether: State-of-the-art resultsEmpirical Superiority:BERT Training:Constant LR: FailsStep Decay: 85%Exponential: 87%Cosine: 88%Warmup + Cosine: 89.5% ← Best!GPT-3: Standard is Warmup + Cosine (essential)Benefits & LimitationsAdvantages:✓ State-of-the-art performance✓ Stable and smooth✓ Industry standard✓ Proven for TransformersLimitations:✗ Two hyperparameters to tune✗ Requires knowing total training stepsUsed In: GPT-2, GPT-3, BERT, T5, all modern LLMsSettings: Peak LR 0.0001–0.001 (Adam), Warmup 1–5% of steps, Min LR 10% of peakComparison SummaryChoosing the Right ScheduleDecision FrameworkSmall model, quick experiment → Constant LRCNN, image classification → Step Decay or CosineGeneral deep learning → Exponential or CosineTransformer / LLM → Warmup + Cosine (essential!)Very deep model (50+ layers) → Warmup + CosineLimited compute → Cosine (efficient convergence)Real-World ExamplesResNet-50 (2015): Step Decay — 0.1 every 30 epochs, 90 totalBERT (2018): Warmup + Cosine — 10k warmup, 1M total, peak 0.0001GPT-3 (2020): Warmup + Cosine — Standard for all variantsVision Transformer (2021): Warmup + Cosine — Even for vision!Why Schedules MatterThe NumbersImageNet (ResNet-50):Constant (0.1): 74.2% accuracyStep Decay: 76.1% (+1.9%, 5% faster)Cosine: 76.8% (+2.6%, 8% faster)Transformer (BERT):No warmup: Divergence, NaNWarmup + Cosine: 89.5% (essential!)Convergence Speed:Constant: 2.5 → 0.38 (slow final improvement)Warmup + Cosine: 2.5 → 0.08 (2-3× faster)Practical TipsTuning GuidelinesWarmup Duration: 1–5% of total training (too short: unstable, too long: wasted time)Peak Learning Rate:SGD: 0.01–1.0Adam/AdamW: 0.0001–0.001Start conservative, increase if stableCommon Mistakes:No warmup for Transformers → Training divergenceFix: Always use 1,000+ warmup stepsToo aggressive decay → Learning stops earlyFix: Gentler decay or longer scheduleWrong schedule for optimizer → Poor performanceSGD: Higher LR, aggressive decay OKAdam: Lower LR, gentler decayFix: Match schedule to optimizerConclusionLearning rate schedules are the difference between mediocre and state-of-the-art performance. The six schedules serve different purposes:Constant — Baseline for simple problems Step Decay — Classic CNN approach Exponential — Smooth continuous decay Cosine Annealing — Modern smooth convergence Linear Warmup — Essential deep model stability Warmup + Cosine — State-of-the-art for TransformersThe evolution from constant (pre-2012) to warmup+cosine (2017+) shows continuous improvement in training methodology. Modern deep learning relies on scheduled learning rates — no major model trains without them.For Transformers and LLMs, warmup + cosine isn’t optional — it’s essential. The combination enables training of models with billions of parameters reliably.Understanding and correctly applying learning rate schedules can mean the difference between training failure and achieving state-of-the-art results.Disclaimer: I used AI to help refine and structure my research for the content. The insights are from my direct experience and my own work.Enjoyed this article?I write about AI, system design, startups, and the real lessons from building products.The 6 Learning Rate Schedules: How to Accelerate Training Without Crashing was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.