AI Research Scientist · Scaling Laws & Stability
Training instability diagnosis
Training instability diagnosis
Loss spike
A loss spike is a sudden, sharp jump in training loss over just one or a few steps, followed by the loss returning toward its prior trend. It’s transient: the curve bounces, not breaks.- Stays finitethe loss value is still a real, readable number, just large.
- Transientusually recovers within tens of steps as gradients settle.
- Non-finiteloss or gradients become NaN or Inf, no longer a usable number.
- Permanentonce weights update with NaN gradients, the model state is corrupted and won’t self-recover.
Recall check from the same lesson
In a training log, loss is 2.9 at step 800, becomes NaN at step 801, and stays NaN for the rest of the run. This should be diagnosed as a loss spike because the value jumped sharply at step 801.
Review the explanation
Answer: False. NaN is a non-finite value, not simply a large finite number, so this is a NaN/Inf failure rather than a spike. It also never recovers — the loss stays NaN for the rest of the run, whereas a genuine spike is transient and returns to a valid, finite value within a handful of steps.
Training instability diagnosis
Learning rate as root cause
An inappropriately high or unstable learning rate produces instability because each update step overshoots the loss landscape’s curvature, pushing weights past a good minimum into a region of higher loss. If the overshoot compounds step after step, the result is a spike or outright divergence rather than steady descent.- 1Note when the blowup starts.WhyInit-driven failures appear almost immediately, in the first few dozen steps, because oversized weights inflate activations before LR has warmed up enough to be doing meaningful damage on its own.
- 2Check whether the instability persists even with LR near zero.WhyIf lowering LR further doesn’t help, LR isn’t the driver — the fault must be in the starting weight magnitudes themselves.
- 3Inspect activation and gradient norms at step 1.WhyPoor initialization inflates forward activations and backward gradients before any optimizer step runs, confirming the problem originates at initialization, not from the update rule.
Recall check from the same lesson
A loss spike that occurs during the very first 20 steps of training, while warmup is still holding the learning rate near zero, is most likely explained by a learning-rate spike rather than by initialization scale.
Review the explanation
Answer: False. With LR still near zero during warmup, the optimizer can't be taking large enough steps to overshoot on its own — LR isn't the driver yet. Instability that shows up this early instead points to initialization: oversized starting weights inflate activations and gradients before any meaningful LR step has even occurred.
Sources
One sitting · 20–30 minutes
A focused session on your AI Research Scientist interview
LearnBench starts from what you already know — skip what you have, master what you’re missing.
Start now