Summary (Overview)
- This paper introduces Power-Law Random Feature (PLRF) models—simple quadratic models with heavy-tailed, power-law distributed inputs—that can replicate the mysterious "training spikes" observed during LLM pre-training.
- The authors develop a theoretical framework and simulation algorithm that aligns each DNN layer with a Random Feature model, enabling lightweight simulation of per-layer training dynamics.
- Key finding: the power-law exponent of the data distribution is critical; a larger (heavy-tailed data) is a necessary condition for training spikes to occur.
- The paper demonstrates that stochastic gradient noise (captured by 2nd-order Taylor expansion) is the driving mechanism behind spikes, not 3rd-order terms as previously believed for full-batch training.
- In a case study on a 1.3B parameter Transformer LM, the simulation successfully predicts spiky behavior from a given checkpoint, and the authors derive a schedule for Adam that avoids spikes and empirically improves performance.
Introduction and Theoretical Foundation
Background and Motivation
Training spikes—temporary, sharp surges in loss during LLM pre-training—are a well-documented empirical phenomenon (Chowdhery et al., 2023; Molybog et al., 2023). These spikes are considered pathological because they may indicate:
- Training instability
- Sub-optimal hyperparameters
- Reduced final model predictive power
- Numerical issues in low-precision arithmetic
A crucial observation is that training spikes are sensitive to both data shuffling AND model initialization, unlike normal loss fluctuations which remain consistent under identical data shuffles regardless of initialization (Figure 1). This extra randomness complicates the study and mitigation of training spikes.
Key Theoretical Foundation: The Random Feature Model
The paper builds on the Random Feature model with quadratic loss:
Here, is the -dimensional trainable weights, is a fixed random matrix, is a scalar label function, and is a constant.
The Power-Law Random Feature (PLRF) model assumes inputs where i.i.d., and is the power-law exponent of the input data.
The Divergence Threshold
For SGD with small batch size (), the learning-rate threshold of divergence is given by:
where are the eigenvalues of the Hessian. In particular:
Key insight: Unlike full-batch gradient descent (where the threshold is simply ), stochastic optimization has a different divergence threshold due to gradient noise—this is where spikes originate.
Methodology
Layer-wise Quadratic Loss Framework
The authors define a layer (Definition 3.2) as a subset of model parameters such that:
- acts as matrix multiplication:
- The forward pass to input does not depend on
- The backward pass to output gradient does not depend on
For such a layer, the per-example gradient is:
The layer-wise quadratic loss is defined via 2nd-order Taylor expansion:
Key Prediction (Prediction 3.5)
Under Assumption 3.4 (i.i.d. Gaussian inputs after linear transformation), the expected gradient covariance satisfies:
where are the -th column vectors of , and comes from the eigen-decomposition .
This leads to:
Simulation Algorithm (Algorithm 3.1)
The simulation algorithm synthesizes pseudo-gradients by sampling Gaussians to match the average and 2nd moment of real gradients:
- Inputs required: eigenvalues/eigenvectors of , average gradient , mean squared-norm of per-batch gradients , and Hessian trace
- Key steps:
- Set constant to match Hessian trace
- Compute equivalent batch factor
- Initialize
- At each step: sample stochastic noise , synthesize gradient, call optimizer
Theoretical Explanation of Spikes
The authors decompose SGD updates into:
Mechanism: The stochastic noise accumulates as a random walk. When the eigenvalues of the quadratic loss function are heavy-tailed, the validation loss suddenly surges when randomly points toward directions of large eigenvalues—a "spike" occurs. Concentration of measure breaks down precisely when the eigenvalue distribution is too heavy-tailed.
Empirical Validation / Results
PLRF Model Experiments
The paper demonstrates training spikes in PLRF models (Figure 2):
| Setting | ||
|---|---|---|
| SGD | Diverges without spikes | Shows spikes before divergence |
| Adam | Diverges without spikes | Shows spikes before divergence |
Conditions for training spikes in PLRF:
- Heavy-tailed data (large )
- Near divergence (large learning-rate)
Transformer LM Case Study
The authors trained a 1.3B parameter Transformer decoder (24 blocks) on the C4 dataset with AdamW, changing from 0.95 (Normal) to 0.999 (Spiky1, Spiky2).
Compute requirements (Table 1):
| Experiment | Data size | Time |
|---|---|---|
| Train | 25.5B tokens | 40 hrs (TPUv4×32) |
| Eval | 336M tokens | 1.1 hrs |
| Eval | 336M tokens | 8 min |
| & | 336M tokens | 15 min |
| Tr | 336M tokens | 1.7 hrs |
| Simulation | 1500 steps | 5 sec (CPU) |
Simulation Results
The simulation from step 21k to 22.5k showed:
- Clear bumps for Spiky1 and Spiky2 configurations (e.g., block_{0,4,8} at step ~22k for Spiky1, block_{0,12} at step ~21.5k for Spiky2)
- Smooth trajectory for the Normal configuration
- Spiky positions differ between random seeds, demonstrating the random nature of training spikes
The empirical error of equation (3.4) was mostly within 5%, even though both sides simultaneously vary multiple magnitudes across different layers and training steps.
Key Observations on Limitations
- 2nd-order terms exhibit "jumps" rather than "spikes" (not resuming to previous level), suggesting correlations across layers and higher-order terms matter
- 1st-order terms decrease much faster than expected from a layer-wise quadratic model, indicating the DNN's non-linear nature accelerates feature learning
- The equivalent batch factor for Transformer LM training was found to be , meaning gradient noise cannot be ignored despite large batch sizes
Theoretical and Practical Implications
Theoretical Implications
- Training spikes can occur in convex quadratic models—contrary to previous belief that 3rd-order terms are necessary (Cohen et al., 2021; Damian et al., 2023; Cohen et al., 2025)
- Concentration of measure breaks down for heavy-tailed data distributions (), even at massive scales
- Sharpness is only distantly relevant to stochastic optimization dynamics; the full eigenvalue distribution matters
- Natural language Zipf's Law ( for token unigram probabilities) connects directly to the power-law framework
Practical Implications
- schedule for Adam: The authors derive an appropriate increasing schedule that avoids spikes and empirically improves performance (§ C.5)
- Monitoring metrics: The power-law exponent of eigenvalue distributions of forward activation correlation matrices serves as an indicator of healthy training
- Lightweight simulation: The algorithm runs in 5 seconds on CPU per layer, requiring only one pass over a validation set—enabling rapid testing of optimization techniques
Connection to Related Work
The paper connects to several research streams:
- Edge-of-Stability (Cohen et al., 2021, 2022): stochastic optimization introduces noise that changes the dynamics
- Gradient noise analysis (Mandt et al., 2016; Li et al., 2019): SDE approaches, but with explicit variance calculation instead of assuming constant noise
- Double Descent (Adlam and Pennington, 2020): similar distinction between data-oriented and model-oriented randomness
- "Stochastic edge-of-stability" (Agarwala and Pennington, 2025): differences in learning-rate thresholds between full-batch and SGD
Conclusion
The paper demonstrates that simple quadratic models with heavy-tailed inputs can replicate training spikes, challenging the assumption that spikes require complex non-convex dynamics. The key mechanism is stochastic gradient noise interacting with heavy-tailed eigenvalue distributions, causing concentration of measure to break down.
Main takeaways:
- PLRF models provide a minimal, reproducible setting for studying training spikes (code runs in 2 minutes on Google Colab)
- The simulation algorithm enables lightweight prediction of spiky behavior from a given checkpoint
- The schedule recipe improves training stability and performance
Future directions:
- Understanding how correlations across layers and Taylor expansions beyond 2nd order contribute to the full validation loss dynamics
- Investigating why the 1st-order terms decrease faster than quadratic models predict
- Exploring how optimization hyperparameters like affect the eigenvalue distribution of the Hessian
- Moving from worst-case bounds to average-case analysis of stochastic optimization with heavy-tailed inputs
Final remark: "Given the apparent similarity between empirical training spikes and our simulations, we believe quadratic models at least partially reveals the essence of underlying mechanism."
Related papers
- AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents
AutoCompact trains coding agents to decide when and how to compact context, improving SWE-bench Verified pass rates by 9.2% over the base model.
- Towards Easier-to-Tune Training Algorithms: New Results from AlgoPerf
Schedule-Free AdamW v2 wins AlgoPerf v1 self-tuning, but step-efficient methods like Muon need systems optimizations to match wall-clock performance.
- Compute-Optimal Scaling Laws for Spiking Language Models
Compute-optimal scaling for spiking language models matches dense Transformers (exponent 0.56 vs 0.50), with the apparent deviation explained by parameter-counting conventions.