Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Learning Rate: A Frontier-Lab Interview Deep Dive

Scope. This document is the single most important file in this folder for interviews. The learning rate is the hyperparameter most likely to make training succeed or fail, and it is the one interviewers use to probe whether a candidate actually understands optimization or just recites slogans. Every section below corresponds to a real follow-up question that has been asked in applied scientist / ML engineer screens.


1. What the learning rate actually is

In plain terms: the learning rate is just how big a step you take downhill. The reason the math below gets into Hessians and eigenvalues is that the biggest safe step is set by the sharpest direction of the loss surface — step further than that and you bounce up the opposite wall instead of down. The condition number is the ratio between the sharpest and flattest directions, and it’s what makes one global step size a compromise.

The learning rate (sometimes or lr) is the scalar that multiplies the (possibly preconditioned) gradient before it is subtracted from the parameters:

That sentence sounds trivial. The non-trivial part is: what determines a “good” ? The answer is the geometry of the loss surface in the direction the optimizer is moving. Specifically, for a quadratic approximation of the loss with Hessian , gradient descent converges if and only if:

where is the largest eigenvalue of the Hessian — i.e. the “sharpest curvature direction.” If you exceed , the iterates oscillate and grow without bound in that direction. Below you converge but you may be wasting steps in flatter directions. The optimal rate for a quadratic is , and the convergence rate is governed by the condition number . Big means slow.

The practical corollary: there is no single best . The correct learning rate depends on the curvature of the loss in the direction you’re currently moving, and that curvature changes during training, varies across layers, and varies across parameters within a layer. Every modern optimizer is some attempt to approximate per-direction step sizes.

Saying it out loud. The learning rate is how far you step, and the ceiling on it comes from curvature. If the loss looks locally like a bowl, you’re stable only while stays under — past that, the sharpest direction overshoots more each step and you diverge. But the same also has to serve the flattest direction, so how fast you converge is set by the condition number, the ratio of the two. That’s the whole reason there’s no single best learning rate: curvature varies across layers, across parameters, and across training phases, and every modern optimizer is an attempt to give each direction its own step size.


2. When the learning rate “works” vs “doesn’t”

This is the question you said is hurting you. Here is the real answer.

The learning rate “works” when:

  1. is below the stability threshold for the sharpest direction, but not so far below that flat directions move imperceptibly. In a deep network this band is roughly half a decade wide for SGD and one to two decades wide for Adam.
  2. The curvature is reasonably well-matched across parameters. For ill-conditioned problems (early-layer features, embedding tables, normalization statistics), a single global is wrong by orders of magnitude across parameters. Adam-family optimizers paper over this by dividing by per parameter. SGD does not — which is why SGD on transformers without warmup or layer-wise rates routinely diverges.
  3. The schedule matches the phase of training. Early steps need smaller updates because gradient noise dominates and the loss landscape near initialization is ill-behaved. Late steps need smaller updates because you’re fine-tuning around a local optimum. A constant is rarely correct for both.
  4. The optimizer’s noise scale matches the geometry. SGD noise per step is roughly , where is batch size and is gradient covariance. Too much noise pushes you off any narrow valley; too little makes you crawl.

The learning rate “fails” with these specific signatures:

SymptomLikely causeDiagnostic
Loss → NaN at step 1–5 is way above stability; or fp16 overflow in the first matmulPrint pre-step loss; check ; lower 10x and rerun
Loss flat then NaN around step ~100–500Warmup ends and is too high; or Adam not yet stabilizedExtend warmup; lower peak ; check
Loss oscillates with rising amplitudeAt edge-of-stability for some direction; usually layer-specificPer-layer gradient norms; lower for the offending layer
Loss decreases very slowly, plateaus too small, or stuck near a saddle, or schedule decayed too aggressivelyLR finder; check gradient norm; warm restart
Training loss good, eval loss badCould be too low at end (under-fit local) or too high throughout (over-shoots wide minima)Compare schedules; check sharpness of final solution
“Loss spike” that recoversCommon with Adam at edge of stability; one extreme batch shifts and update explodes brieflyGradient clipping; lower peak ; investigate the spike batch
Different layers learning at wildly different ratesCurvature mismatchLayer-wise LR (LARS/LAMB) or bigger in Adam
Pretrained model degrades during fine-tuning too high for transferFine-tune is typically 10–100x smaller than pretrain

The key meta-skill: read the loss curve and the gradient norm together. A flat loss with vanishing gradients means the optimizer is stuck. A flat loss with healthy gradients means is too small. A descending loss with growing gradient norm means you’re approaching instability.

Saying it out loud. A learning rate works when it’s below the stability threshold of the sharpest direction but not so far below that the flat directions crawl — and that window is maybe half a decade wide for SGD, one or two decades for Adam. When it fails, the failure has a signature you can read. NaN in the first handful of steps means the LR is wildly high or fp16 overflowed in the forward pass. NaN around step 200 is the end-of-warmup signature. A flat loss with vanishing gradients means you’re stuck at a critical point; a flat loss with healthy gradients means your steps are too small. The meta-skill is reading the loss curve and the gradient norm together, because either one alone is ambiguous.


3. The single most useful diagnostic: update-to-weight ratio

If you remember one number from this entire document, remember this one. A widely-cited empirical heuristic (most prominently popularized by Karpathy’s “A Recipe for Training Neural Networks” blog post and his lectures — note: this is folklore-level guidance, not a published theorem):

Healthy training has this ratio around per layer. If it’s , your is way too high. If it’s , your is way too low. This is more reliable than watching loss because it works per layer and reveals heterogeneity that a single loss curve hides.

This single diagnostic explains why a single global learning rate is fundamentally wrong for deep networks — the ratio differs across layers by orders of magnitude unless you adapt.

Saying it out loud. If you log one thing on a training run, log the ratio of the update size to the weight size, per layer. Healthy training sits around : at you’re rewriting the layer every step and you’ll diverge, at that layer is effectively frozen. The reason it beats staring at the loss curve is that the loss is one number for the whole model, so it happily hides a frozen embedding table and an exploding attention block averaging out to something plausible. It’s folklore rather than a theorem, but it’s the diagnostic that turns ‘training feels wrong’ into ‘layer 3 is the problem’.


4. The LR finder (Cyclical Learning Rates, Leslie Smith)

Practical recipe to find a sensible without guessing:

  1. Set very low (e.g. ).
  2. Run training, multiplying by a constant each step (e.g. by 1.1).
  3. Plot loss vs. .
  4. Pick a learning rate roughly one order of magnitude below the point where loss starts increasing.

This works because the curve shows you the practical stability boundary on your data. The optimum is not at the minimum of that curve — it’s well to the left of it, because you want headroom for the step that crosses a sharp ridge.

Interview trap. Many candidates say “pick the where the loss is minimum on this curve.” That’s wrong. Pick the where the loss is steepest downward (still decreasing strongly). The minimum point is already at the cliff edge.

Saying it out loud. The LR finder is how you get a starting point in one cheap run instead of guessing. Start absurdly low, multiply by about 1.1 every step, and plot loss against log learning rate — you’ll see a flat region, then a steep descent, then a blow-up. The trap almost everyone falls into is picking the minimum of that curve; the minimum is already at the cliff edge, and you’ll diverge later when you hit a sharp batch. You want the steepest-descent region, roughly an order of magnitude below the blow-up point, so you have headroom.


5. Schedules: what they are and when each one wins

A learning rate schedule is a function that varies the rate over training. The intuition is that the right step size depends on phase:

  • Early phase (warmup): Adam’s second-moment estimate is unreliable, residual streams are not yet calibrated, and the loss surface near random initialization can be pathologically sharp. Big steps here destabilize forever.
  • Middle phase: the optimizer is making meaningful progress; you want the highest step size that’s stable.
  • Late phase: you’re polishing; smaller steps reach a tighter minimum.

Common schedules

Linear warmup + cosine decay is the modern default for LLM pretraining:

Why it dominates:

  • Warmup avoids the initial-instability traps above.
  • Cosine smoothly decays without the sudden drops of step decay (which can shock training).
  • is typical, since pure zero learning rate doesn’t help and may hurt the late-phase fine-tuning that the cosine tail is doing.

Linear warmup + linear decay (a.k.a. trapezoid): common in newer recipes. Slightly easier reasoning about “compute saved per unit of decay” and used by recent open-weight LLMs (LLaMA-style runs sometimes use cosine; some Chinchilla-style runs use linear or trapezoidal).

Step decay: drop by 10x at predetermined epochs (e.g. ResNet on ImageNet at epochs 30, 60, 90). Old style. Brutal but reliable for tasks with clean phase boundaries.

ReduceLROnPlateau: drop when validation loss has not improved for steps. Useful for fine-tuning and for tasks where you can’t predict the right total budget.

Triangular / cyclical: sweep up and down repeatedly. Sometimes helps escape bad local minima. Less common in modern LLM training because it interferes with cosine-style budgets.

Constant: rare in pretraining, common in some online / continual settings where there is no “end of training.”

Warmup specifically — why it matters

The first few hundred steps are where most catastrophic divergences happen. The reasons compound:

  1. Adam variance estimates are noisy. With , the effective window is ~1000 steps. Before you have enough samples, is small and biased low even with bias correction, so updates are larger than they should be.
  2. Residual streams are not calibrated. In pre-LN transformers and even more in post-LN, the magnitude of activations early in training is far from steady state; gradients reflect that and are oversized.
  3. Batch normalization statistics (when used) are drifting fastest at the start, which compounds with optimizer updates.
  4. Empirically, transformer training without warmup diverges near-deterministically at modern scales.

Typical warmup is of total steps. For LLM pretraining, 2000 steps of linear warmup is a common default. Too short → instability. Too long → wasted compute at low effective LR.

Saying it out loud. A schedule exists because the right step size depends on which phase of training you’re in. Early on, the landscape near random init is pathologically sharp and Adam’s variance estimates aren’t trustworthy yet, so you warm up. In the middle you want the largest stable step, because that’s where progress happens. At the end you want small steps to settle into a tighter minimum. Linear warmup plus cosine decay to about ten percent of peak is the modern default, and warmup is the non-negotiable part — without it, large transformers diverge near-deterministically.


6. Linear scaling rule and the LR–batch size relationship

This is one of the highest-yield interview topics in this document.

The setup

When you train SGD on batches of size , each step uses an estimate of the gradient with variance roughly . If you double you halve the gradient variance per step but you’re also taking half as many steps for the same data volume. Per-token progress depends on the effective step.

The rule (Goyal et al., 2017, “Accurate, Large Minibatch SGD”)

For SGD on convolutional networks: if you scale batch size by , scale the learning rate by . With warmup. This worked on ImageNet up to batch size ~8192. The reasoning is that under SGD the per-epoch progress depends on , so to preserve trajectory you scale linearly.

The Adam version

For Adam, the correct scaling is closer to for the same batch size scaling. Rough intuition: Adam already rescales by , which is itself an estimate of the second moment of the gradient. If you change batch size, that estimate changes; the net effect is that the right scales sublinearly with .

Honest caveat. The exact scaling rule for Adam has been debated; some papers find linear scaling holds at moderate batch sizes and breaks at very large batches; others find sqrt is closer. The interview-grade answer is: for SGD use linear scaling with warmup; for Adam use sqrt scaling as a starting point and verify empirically; both rules break at very large batch sizes (above the “critical batch size”).

Critical batch size (McCandlish et al., 2018)

Beyond a certain batch size, doubling the batch stops giving proportional speedups even with optimal rescaling. This batch size is determined by the gradient noise scale, which is roughly the ratio of gradient mean magnitude to gradient covariance. Gradient noise scale grows during training, which means the critical batch size grows during training — a key reason to not pick batch size statically based on early loss curves.

The takeaway: there is a “data-parallel sweet spot” beyond which more workers don’t speed up training, regardless of how you tune . Frontier-lab interviews ask about this.

Saying it out loud. Learning rate and batch size are not independent knobs. Double the batch and your gradient is less noisy, so you can afford a bigger step — the rule of thumb is linear scaling for SGD, closer to square root for Adam because Adam already normalizes by gradient magnitude. This is why the same code that trains fine on eight GPUs diverges on sixty-four. The ceiling on all of it is the critical batch size, set by the gradient noise scale: past that point extra data parallelism buys you almost nothing no matter how you tune , and since the noise scale grows during training, that ceiling moves as you go.


7. Edge of stability (Cohen et al., 2021)

A more recent result that interviewers love because it overturns textbook intuition. For deep networks trained with full-batch GD, the largest Hessian eigenvalue grows during training until it stabilizes near . That is, the optimizer drifts toward the edge of the stability region instead of staying safely below it. Once there, training continues to make progress but with non-monotonic loss — you see local oscillation but global descent.

Implications:

  • Loss spikes during training are not necessarily bugs. They can be a feature of operating at the edge of stability.
  • The standard convex-optimization picture (“set below and converge smoothly”) is wrong for real deep learning.
  • Sharper minima have lower after training, which may explain part of the relationship between sharpness and generalization.

When asked “why does my loss occasionally spike but training is fine?” the strong answer cites edge of stability.

Saying it out loud. The textbook says pick safely below and descend smoothly. What actually happens is the opposite: sharpness climbs during training until it pins right at and hovers there. So real training rides the stability boundary rather than staying below it, and the loss bounces non-monotonically while still trending down. The practical payoff is a judgment call that separates strong candidates — occasional loss spikes are what a good learning rate looks like, so lowering the LR to smooth the curve is often just buying a prettier plot with real compute.


8. Adam-specific learning rate behavior

A few details that separate strong from weak answers.

1. Why Adam tolerates a wider LR range than SGD. Adam normalizes per-parameter by . This means parameters with large gradients get smaller effective updates and vice versa. The optimizer is implicitly computing per-direction step sizes, which removes most of the conditioning problem that SGD suffers from. Effective LR for parameter is roughly .

2. The role of . (default ) is the additive constant in . It does two things: it prevents division by zero, and it caps the maximum effective LR per parameter. When , the update is roughly , so dimensions with very small gradients can still get sensible updates. Some training recipes (e.g. embedding tables) set larger to avoid huge effective LRs on rarely-touched parameters. Some quantized-Adam variants use deliberately.

3. Bias correction matters early but only early. The corrections and are nearly 1 by step ~5000 with default . Forgetting bias correction in an Adam implementation is a common interview trap that causes very different early-training behavior.

4. , , and effective horizons. means an effective horizon of ~10 steps for the first moment; is ~1000 steps for the second moment. Larger (e.g. 0.999 rather than 0.95) is sometimes used for robustness to outlier gradients but slows the optimizer’s adaptation; conversely some long-run LLM recipes use a smaller such as 0.95 so a single outlier gradient is forgotten faster. The mismatch in horizons is intentional: you want the gradient direction to react quickly while the variance estimate stays stable.

5. AdamW vs Adam. This deserves its own section.

Saying it out loud. Adam tolerates a much wider learning rate range than SGD because it’s really setting a per-parameter step size — dividing by means a parameter with tiny gradients gets scaled up and one with huge gradients gets damped. Two details separate strong answers here. Epsilon isn’t just anti-divide-by-zero; it caps the maximum effective step, which is why recipes raise it for embeddings where rare rows have tiny second moments and would otherwise get slammed. And the two betas have deliberately different horizons — about ten steps for direction, about a thousand for the variance estimate — because you want direction to react fast and scale to stay stable.


9. AdamW vs Adam — the weight decay question

If you can answer this cleanly, you’re already ahead of most candidates.

The wrong answer: “L2 regularization adds a penalty to the loss; weight decay is a different thing.” This is correct in spirit but doesn’t show understanding.

The right answer:

Naive Adam with L2 regularization computes the gradient of , which adds to . Then Adam preconditions everything by . The effect is that for parameters with large gradient variance, the L2 penalty is divided by a large number — it’s effectively weakened. So the regularization strength is no longer uniform across parameters.

AdamW decouples weight decay from the gradient computation:

Weight decay is applied directly to , after the Adam update. Now every parameter shrinks by the same fraction per step regardless of its gradient statistics. This recovers the regularization behavior people thought they were getting from L2.

In the original “Decoupled Weight Decay Regularization” paper (Loshchilov & Hutter), AdamW substantially outperforms Adam on image classification, and it’s now the default for LLM training.

Interview trap. “If the gradient of is , isn’t L2 the same as weight decay?” For SGD, yes: SGD with L2 produces the same update as SGD with explicit weight decay. For Adam, no: the preconditioning changes the effective decay strength per parameter.

Saying it out loud. With plain Adam plus L2, the penalty term rides through the same division by as the gradient — so parameters with big, noisy gradients get less regularization than quiet ones, which is exactly backwards from the intent. AdamW pulls the decay out of the gradient path and applies it straight to the weights, so every parameter shrinks by the same fraction each step regardless of its gradient statistics. That one change is worth real accuracy, and it’s why every LLM recipe says AdamW. The trap to answer cleanly: for plain SGD, L2 and weight decay genuinely are identical — the distinction only appears once something preconditions the gradient.


10. Layer-wise and per-parameter scaling: LARS, LAMB

For very large batch training, even Adam’s per-parameter scaling isn’t enough — you also need per-layer scaling. LARS (You et al., 2017) and LAMB (You et al., 2019) compute a layer-wise trust ratio:

This explicitly enforces a constant update-to-weight ratio per layer, which is exactly the diagnostic from §3. LARS made batch sizes of 32K trainable for ResNet-50; LAMB extended it to BERT pretraining.

Modern LLM training rarely uses LARS/LAMB explicitly, but the spirit lives on in muP (maximal update parameterization, Yang & Hu, 2022), which proposes initialization and learning-rate scaling that keeps update magnitudes constant across model widths. If a question goes deep into “how do you transfer hyperparameters from a small model to a 70B?”, muP is the right answer.

Saying it out loud. At very large batch sizes even Adam’s per-parameter scaling isn’t enough, because the problem is now between layers. LARS and LAMB fix it directly: compute the ratio of each layer’s weight norm to its update norm and rescale so every layer moves by the same relative amount — which is literally enforcing the update-to-weight diagnostic as a rule. That’s what made 32K batches trainable for ResNet and BERT. Modern LLM training rarely uses them by name, but muP achieves the same effect by baking the right scaling into the parameterization instead of computing trust ratios at runtime.


11. Pretraining vs. fine-tuning learning rates

Different regimes, different rules.

RegimeTypical peak ScheduleWhy
LLM pretraining (Adam) to linear warmup + cosineLarge data, long horizon, high
LLM fine-tuning (full) to linear warmup + linear decayPretrained weights are valuable; don’t damage
LoRA / adapter fine-tuning to sometimes constantOnly training a small subset; can be more aggressive
RLHF reward model to very lowEasy to overfit; tiny dataset relative to base
RLHF PPO / DPO to constant or short warmupPolicy is fragile; KL anchor needs preserving
Vision SFT to step decay or cosineDifferent gradient statistics
Diffusion training to cosine, or constantNeeds long, stable training

Why fine-tuning needs lower LR. The pretrained model is at a useful basin. A large will move it out of that basin in a few steps. The exception is LoRA: you’re adding new low-rank matrices initialized to zero, so the initial gradients live on parameters that have nothing to lose, and you can use a higher .

Why RLHF/DPO needs even lower LR. The whole point is to nudge a model away from the SFT distribution while preserving capabilities. A high LR causes mode collapse, KL blowup, or reward hacking. Some recipes (DPO especially) report best results with as low as .

Saying it out loud. Fine-tuning learning rates are 10 to 100 times smaller than pretraining ones, and the reason is that you already have something worth protecting. The pretrained model sits in a good basin, and a pretraining-sized step will walk it out of that basin within a few updates — that’s catastrophic forgetting in one sentence. LoRA is the interesting exception: the new matrices start at zero and have nothing to lose, so you can be aggressive again. And RLHF or DPO go lower still, down around , because you’re trying to nudge behavior while preserving capabilities, and too big a step gives you mode collapse or reward hacking.


12. Why does noise help? The implicit-regularization view

In plain terms: mini-batch gradients are noisy, and that noise turns out to be useful rather than merely tolerable. It jostles the optimizer out of narrow, fragile minima and leaves it in wide ones, which generalize better. The three stories below are three ways of formalizing the same intuition, and they all agree the relevant knob is .

A real interview question: “Why does SGD generalize better than full-batch GD on the same loss?”

The serious answer involves implicit regularization. The noise injected by mini-batch sampling biases SGD toward flat minima. There are two complementary stories:

Story 1: noise as escape mechanism. Sharp minima have steep walls. Stochastic noise pushes the optimizer back and forth; in a sharp minimum the average loss visited is high (you keep hitting the walls), so the effective “potential” the optimizer feels is lower in flat minima.

Story 2: SGD as approximate Bayesian inference. Mandt et al. show that SGD is approximately sampling from a posterior over parameters, with temperature proportional to . The posterior concentrates on flat minima because they have higher marginal likelihood under the noisy update.

Story 3 (more rigorous): SGD ≈ GD on a modified loss. Smith et al. show that SGD with learning rate and batch size approximately follows GD on — i.e. with a regularizer that penalizes regions of high gradient norm. This explicitly biases the optimizer toward flat regions.

The take-home: the noise-to-signal ratio is the relevant quantity. That’s why if you scale batch size up, you generally need to scale up to maintain the same “implicit regularization.” Going to very large batches with the same removes the implicit regularization and often hurts generalization — unless you compensate.

Saying it out loud. The question is really ‘why does SGD beat full-batch GD when full-batch has the better gradient?’, and the answer is that the noise is doing regularization for free. A sharp minimum has steep walls, so noisy steps keep bouncing you out of it, while a wide flat basin is stable under perturbation — and flat solutions generalize better. There’s a Bayesian version where SGD samples a posterior at temperature , and a more rigorous one where SGD behaves like GD on the loss plus a penalty on gradient norm. All three say the same thing: the quantity that matters is , so scaling batch size up without scaling the LR silently turns the regularization off.


13. Gradient clipping

Closely related to learning rate; sometimes confused with it. Gradient clipping is:

It caps the magnitude of the gradient (or update), independent of . The two main reasons to use it:

  1. Spike protection. A single bad batch can produce a 100x typical; clipping prevents that one batch from blowing up training.
  2. RNN-specific. Vanilla RNNs/LSTMs produce gradients that grow exponentially with sequence length (the “exploding gradient” problem). Clipping is essentially mandatory.

Clip-by-norm with is the LLM-pretraining default. Clip-by-value is used less. Be aware that clipping interacts with the learning rate: a very loose clip is a no-op; a very tight clip effectively reduces .

Interview trap. Someone says “I have loss spikes; I’ll lower .” A better first move is “I’ll add gradient clipping at norm 1.0,” because that targets the spike specifically without slowing the rest of training.

Saying it out loud. Clipping is not a smaller learning rate — that’s the distinction to make. It rescales the gradient only when its norm exceeds a threshold, so on a normal step it does literally nothing, whereas lowering slows every step including the healthy ones. That’s why it’s the right first response to loss spikes: one pathological batch can produce a gradient a hundred times normal, and clipping neutralizes exactly that without costing you training speed. Norm 1.0 is the LLM default, and it’s essentially mandatory for RNNs where gradients explode with sequence length.


14. Learning-rate transfer across scales

You said you’re targeting frontier-lab roles. They will ask: how do you set the learning rate for a 70B model when you can only afford to do hyperparameter sweeps on a 1B model?

The naive answer “use the same LR” is wrong. Bigger models have lower optimal because the loss landscape changes with model width and depth.

The strong answer is muP (Yang & Hu, 2022): a parameterization that includes specific scalings for the initialization, embedding, and per-layer learning rates such that the optimal LR is width-invariant. If you tune on a small width- model under muP, the same is optimal at width , , etc.

This is why several frontier labs publicly disclose using muP: it lets them sweep on small models cheaply and then scale up with confidence. If you understand muP at a sketchy level, you’ll be in the top decile of candidates on this topic.

Saying it out loud. The question is how you set the learning rate for a 70B model when you can only afford to sweep on a 1B one, and ‘use the same value’ is wrong — optimal LR drifts as models get wider. muP is the answer: it prescribes specific scalings for initialization, embedding multipliers, and per-layer learning rates such that the optimal becomes invariant to width. So you sweep cheaply on a small proxy and transfer the number directly. Being able to say that in two sentences puts you well ahead on this topic, because the alternative is spending millions of dollars of compute on a hyperparameter search.


15. Practical interview cheatsheet

When you walk into an interview and someone says “your training is unstable, what do you do?”, here is the order of operations that signals competence:

  1. Look at the loss curve and the gradient norm together. If gradients are vanishing, the issue is too-low LR or schedule decay; if gradients are exploding, the issue is too-high LR or no clipping.
  2. Compute the update-to-weight ratio per layer. If it’s not in the to range, you have an LR problem — and which layer is offending tells you whether it’s global or per-parameter.
  3. Ensure warmup is in place. “How long is your warmup?” should always be one of your first questions.
  4. Lower peak LR by 3x and rerun. Cheap, often decisive.
  5. Add gradient clipping at norm 1.0 if not already present.
  6. Check the data. A bad batch can masquerade as an LR problem.
  7. Check the optimizer state. A corrupted Adam from a previous bad run will sabotage everything; reset and rerun.
  8. Instrument first, theorize second. Strong candidates print weight norms, gradient norms, and update norms by layer before adjusting hyperparameters.

If you internalize these eight steps, you will pass most learning-rate debugging questions.

Saying it out loud. When someone says ‘training is unstable, what do you do’, the thing being tested is whether you instrument before you theorize. So: read the loss curve and the gradient norm together, then compute the per-layer update-to-weight ratio, because that tells you whether the problem is global or one bad layer. Confirm warmup exists and is long enough. Then the cheap interventions — add clipping at norm 1.0, drop peak LR by 3x — and go actually look at the batch that spiked. The answer that scores is naming the order and admitting that a bad batch and a bad learning rate look identical on the loss curve until you check.


16. The 12 most common interview questions about learning rate

(Brief answers; full grilling in INTERVIEW_GRILL.md.)

  1. What’s the relationship between LR and batch size? Linear scaling for SGD, sqrt-ish for Adam, both break at the critical batch size.
  2. Why do you need warmup? Adam variance estimates are noisy early; residual streams are uncalibrated; the loss surface near init is sharp. Without warmup, transformers diverge.
  3. How do you choose LR? LR finder, then schedule with cosine. Verify update-to-weight ratio is .
  4. What’s edge of stability? drifts to during training; loss is non-monotonic but globally descending.
  5. Why is AdamW different from Adam with L2? Adam’s preconditioning weakens L2 for high-variance parameters; AdamW decouples decay so it applies uniformly.
  6. What does in Adam control? Numerical stability and a cap on the effective LR for low-gradient parameters.
  7. What is the critical batch size? Beyond it, more parallelism stops giving speedups; it grows during training.
  8. Why does SGD generalize better than full-batch GD? Implicit regularization via noise biases toward flat minima.
  9. Why is fine-tuning LR much lower than pretraining LR? Pretrained weights live in a useful basin; large steps destroy that.
  10. What is muP? A parameterization that makes the optimal LR width-invariant, enabling small-scale sweeps to transfer.
  11. What does loss spike → recovery look like? Often edge-of-stability behavior. Use clipping; don’t necessarily lower LR globally.
  12. What is the linear scaling rule? Scale linearly with batch size for SGD with warmup; works up to a point, breaks at large batches.

17. Further reading (high signal-per-page)

  • Goyal et al., “Accurate, Large Minibatch SGD” (2017) — linear scaling rule.
  • Smith et al., “Don’t Decay the Learning Rate, Increase the Batch Size” (2018).
  • McCandlish et al., “An Empirical Model of Large-Batch Training” (2018) — gradient noise scale and critical batch size.
  • Cohen et al., “Gradient Descent on Neural Networks Typically Occurs at the Edge of Stability” (2021).
  • Loshchilov & Hutter, “Decoupled Weight Decay Regularization” (AdamW, 2019).
  • Yang & Hu, “Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfer” (muP, 2022).
  • Smith, “A Disciplined Approach to Neural Network Hyperparameters” (LR finder, 2018).
  • Mandt et al., “Stochastic Gradient Descent as Approximate Bayesian Inference” (2017).

If you internalize these papers, the learning rate stops being a mystery and becomes a measurable, debuggable quantity.