Summary of "Hidden Sensitivity in LLM Pre-training: A Dynamic System View"

Summary (Overview)

  • Key finding: Small perturbations (as small as 10−510^{-5}) to LLM checkpoints can dramatically alter predictions and generations while leaving validation loss nearly unchanged, revealing a "hidden sensitivity" that loss-based evaluation overlooks.
  • Novel diagnostic: The authors formulate LLM pre-training as a non-autonomous dynamical system jointly evolving weights (θ)(\theta) and Adam optimizer states (m,v)(m, v), and define a normalized sensitivity score in optimizer-relative coordinates that identifies sensitive training checkpoints.
  • Empirical evidence: At a sensitive checkpoint, a 10−510^{-5} weight perturbation changes 35.7% of top-1 predictions and 16.2% of benchmark answers after only 200 training steps, while validation loss stays nearly constant.
  • Transferability: The sensitivity pattern recurs across independent seeds, transfers to OLMo-1B (1.485B parameters), and appears in Muon/AdamW hybrid optimizers, indicating a general phenomenon.
  • Effective control: Offline-timed stabilization based on the sensitivity score reduces top-1 disagreement to 0.83% and restores 88.3% generation exact match, at a modest cost of 0.11 nats in validation loss.

Introduction and Theoretical Foundation

Background and Motivation

The paper addresses a critical blind spot in LLM pre-training evaluation: aggregate metrics (loss, benchmark accuracy) measure average performance but not whether training preserves the state from which models emerge. Small perturbations—from batch order, dropout masks, numerical kernels, or optimizer state—can be amplified into dramatically different models even when loss curves look smooth and stable.

The authors identify this as a "Butterfly Effect for pre-training," where two runs may answer different questions correctly while appearing equivalent under standard evaluation.

Theoretical Foundation: Dynamical Systems View

The core theoretical contribution is treating LLM pre-training as a non-autonomous dynamical system where the state includes both model weights and optimizer memory:

xt=(θt,mt,vt)\mathbf{x}_t = (\theta_t, m_t, v_t)

This formulation is motivated by the observation that two checkpoints with identical weights can take different next steps if their moment memories differ. AdamW's first moment mtm_t tracks gradient direction, while the second moment vtv_t sets per-coordinate scaling.

The update equations (AdamW):

mt+1=β1mt+(1−β1)gt(1)m_{t+1} = \beta_1 m_t + (1-\beta_1) g_t \tag{1} vt+1=β2vt+(1−β2)gt2(2)v_{t+1} = \beta_2 v_t + (1-\beta_2) g_t^2 \tag{2} ut+1=m^t+1v^t+1+ϵ(3)u_{t+1} = \frac{\hat{m}_{t+1}}{\sqrt{\hat{v}_{t+1}} + \epsilon} \tag{3} θt+1=(1−ηtλw)θt−ηtut+1(4)\theta_{t+1} = (1-\eta_t \lambda_w)\theta_t - \eta_t u_{t+1} \tag{4}

The first-order perturbation dynamics are derived by differentiating the update:

qm,t+1=β1qm,t+(1−β1)ht(5)q_{m,t+1} = \beta_1 q_{m,t} + (1-\beta_1) h_t \tag{5} qv,t+1=β2qv,t+2(1−β2)gt⊙ht(6)q_{v,t+1} = \beta_2 q_{v,t} + 2(1-\beta_2) g_t \odot h_t \tag{6} qu,t+1=qm^,t+1dt−m^t+1⊙qv^,t+12v^t+1⊙dt2(7)q_{u,t+1} = \frac{q_{\hat{m},t+1}}{d_t} - \frac{\hat{m}_{t+1} \odot q_{\hat{v},t+1}}{2\sqrt{\hat{v}_{t+1}} \odot d_t^2} \tag{7} qθ,t+1=(1−ηtλw)qθ,t−ηtqu,t+1(8)q_{\theta,t+1} = (1-\eta_t \lambda_w) q_{\theta,t} - \eta_t q_{u,t+1} \tag{8}

where dt=v^t+1+ϵd_t = \sqrt{\hat{v}_{t+1}} + \epsilon and ht=Htqθ,th_t = H_t q_{\theta,t} is the gradient change via the Hessian.

This recurrence reveals a key insight: a weight difference first changes the gradient through hth_t, which enters both moment memories, changes the update direction, and produces the next weight difference. This explains why perturbing optimizer memory can influence the model even when initial weights are unchanged.

Methodology

1. Sensitivity Score in Relative Coordinates

The authors identify a critical issue with raw Euclidean norms: they mix parameters, gradients, and squared gradients in incompatible units. They propose relative state geometry:

R(a;b)2=1L∑ℓRMS(aℓ)2RMS(bℓ)2+f2(10)\mathcal{R}(a; b)^2 = \frac{1}{L} \sum_{\ell} \frac{\text{RMS}(a_\ell)^2}{\text{RMS}(b_\ell)^2 + f^2} \tag{10}

where RMS is root-mean-square, f=10−12f = 10^{-12} is a numerical floor, and LL is the number of tensor layers.

The norm used for evaluating local tangents:

N(q)2=R(qθ;θ)2+R(qu;u)2+1L∑ℓRMS(qρ,ℓ)2(12)N(q)^2 = \mathcal{R}(q_\theta; \theta)^2 + \mathcal{R}(q_u; u)^2 + \frac{1}{L} \sum_\ell \text{RMS}(q_{\rho,\ell})^2 \tag{12}

where ρ=log⁡(v^+ϵ)\rho = \log(\sqrt{\hat{v}} + \epsilon) is the log-preconditioner, measuring fractional changes in adaptive scaling:

qρ=qv^2v^⊙(v^+ϵ)(11)q_\rho = \frac{q_{\hat{v}}}{2\sqrt{\hat{v}} \odot (\sqrt{\hat{v}} + \epsilon)} \tag{11}

The three terms measure: (1) weight displacement relative to weight size, (2) change in next update direction, and (3) change in adaptive scaling.

2. Finite-Time Sensitivity

The conventional directional finite-time Lyapunov exponent (FTLE) is:

λt,K(q)=1Klog⁡∥Jt+K−1⋯Jtq∥t+K∥q∥t(9)\lambda_{t,K}(q) = \frac{1}{K} \log \frac{\|J_{t+K-1} \cdots J_t q\|_{t+K}}{\|q\|_t} \tag{9}

The authors instead propagate a Gaussian parameter-block direction through the full state and report a renormalized finite-window score.

3. Experimental Design

  • Models: LLaMA-style model (76.8M parameters) trained on C4 for 5000 steps; OLMo-2-0425-1B (1.485B parameters) continued on Dolma for 2000 steps
  • Evidence: 364 paired trajectories, with one branch unchanged and another receiving a perturbation to exactly one of θ\theta, mm, or vv
  • Perturbation magnitudes: 10−610^{-6}, 10−510^{-5}, 10−410^{-4} for the small model; 10−610^{-6}, 10−510^{-5} for OLMo
  • Readouts: Relative separation in updates/parameters/gradients, symmetric logits KL, top-1 disagreement, greedy-generation exact match, and benchmark answer disagreement (PIQA, HellaSwag, ARC-Easy)

Empirical Validation / Results

1. Checkpoint Sensitivity Varies Dramatically

  • Validation loss decreases smoothly from 5.48 to 3.92, while the sensitivity score spans 0.163 at step 4000 to 1.116 at step 2000 (a sevenfold variation)
  • At 10−510^{-5} weight perturbation, 200-step update distances are 0.960 at step 2000 vs. 0.039 at step 4000 (mean across 90 conditions: 0.505)

2. Optimizer Memory Matters as Much as Weights

At 10−510^{-5} magnitude, mean 200-step update distances across channels:

  • Weights: 0.505
  • First moments: 0.507
  • Second moments: 0.529

A checkpoint's sensitivity cannot be read from its weights alone.

3. Long-Term Behavioral Effects

At 1000 continuation steps from the sensitive checkpoint:

  • Relative parameter distances: 0.39–0.40
  • Gradient distances: ~0.85
  • Logits KL: ~0.20
  • Top-1 disagreement: ~27% (vs. 1–1.5% from insensitive checkpoint)
  • 75% of greedy generations unchanged from low-sensitivity checkpoint vs. 0% from high-sensitivity one

4. Seed Replication

SeedHigh stepLow stepHigh responseLow response
1200040000.9600.039
2150050000.9570.021
3350050000.2360.022

High-to-low response ratios range from 5× to 46×, and the sensitive windows do not follow a fixed schedule.

5. OLMo-1B Transfer

Observable200 steps1000 steps
Absolute loss difference5.61×10−45.61 \times 10^{-4}2.30×10−42.30 \times 10^{-4}
Symmetric logits KL8.75×10−48.75 \times 10^{-4}8.32×10−48.32 \times 10^{-4}
Top-1 disagreement2.27%2.30%
Generation exact match65.7%63.6%

The pattern reproduces at 1.485B parameters, confirming scale independence.

6. Mechanism: Low-Margin Predictions

The authors explain the phenomenon: average cross-entropy weights all positions equally, so changing the leading token where the model is nearly undecided moves the mean loss only slightly. Greedy generation compounds the effect: one early flip changes the prefix, and every later token is conditioned on that prefix.

7. Training Control Results

Controller comparison (response = 200-step update separation averaged over 10 checkpoints and 3 channels):

Method / scheduleResponseVal. loss
AdamW (baseline)0.5143.919
Sensitivity / basic0.4533.934
Sensitivity / tuned0.2274.030
Sensitivity / strong0.1374.143
Gradient / matched0.2444.028
Update / matched0.2454.088
Sensitivity / matched0.2274.030

Output agreement at shared sensitive checkpoint (after 200 steps, 10−510^{-5} weight perturbation):

MethodsKLTop-1 dis.Gen. EMBench. dis.
AdamW0.31999335.71%0.8%16.21%
Cautious AdamW0.37285438.55%0.0%18.45%
SPAM0.30745234.89%0.0%15.31%
Gradient schedule0.0001530.76%80.5%0.13%
Sensitivity schedule0.0001670.83%88.3%0.07%

The sensitivity-timed schedule reduces top-1 disagreement from 35.7% to 0.83% and raises generation exact match from 0.8% to 88.3%, at a cost of only 0.11 nats in validation loss.

Theoretical and Practical Implications

Theoretical Implications

  1. Loss is insufficient as a training diagnostic: The paper demonstrates that smooth loss curves can mask substantial instability, challenging the assumption that loss-based monitoring captures training health.

  2. Optimizer state is part of the model: The finding that moment perturbations matter as much as weight perturbations reframes the notion of what constitutes a "checkpoint" — the state (θ,m,v)(\theta, m, v) matters, not just θ\theta.

  3. Dynamical systems methods apply to pre-training: The successful application of finite-time sensitivity analysis and Lyapunov-style diagnostics opens a new analytical toolbox for understanding training dynamics.

  4. The bound on weight displacement provides theoretical grounding for intervention design:

∥qθ,t+1∥≤∣1−ηtλw∣∥qθ,t∥+ηt∑z∈{θ,m,v}∥Dz,t∥∥qz,t∥(14)\|q_{\theta,t+1}\| \leq |1-\eta_t \lambda_w| \|q_{\theta,t}\| + \eta_t \sum_{z \in \{\theta,m,v\}} \|D_{z,t}\| \|q_{z,t}\| \tag{14}

Practical Implications

  1. Diagnostic for training runs: The sensitivity score can identify dangerous training windows where small numerical differences (e.g., from non-deterministic kernels) could cause divergent models.

  2. Timed stabilization: Offline-computed sensitivity scores can schedule AdamW stabilization interventions more effectively than gradient-norm or update-norm heuristics, with the same budget.

  3. Reproducibility concerns: The results imply that seemingly identical training runs (differing only in floating-point rounding or batch order) may produce models that disagree substantially on individual predictions, with implications for evaluation and model comparison.

  4. Evaluation methodology: The work suggests that evaluation should include per-input agreement metrics, not just aggregate accuracy, to detect hidden divergence.

Conclusion

The paper establishes that LLM pre-training exhibits hidden sensitivity: small perturbations to weights or optimizer states can produce dramatically different predictions and generations while leaving validation loss nearly unchanged. By formulating pre-training as a dynamical system with state (θ,m,v)(\theta, m, v) and defining a normalized sensitivity score in relative coordinates, the authors:

  1. Identify sensitive training windows that recur across seeds and scales
  2. Show that optimizer memory (moments) matters as much as weights in determining sensitivity
  3. Demonstrate effective control: scheduling stabilization at high-sensitivity checkpoints reduces top-1 disagreement from 35.7% to 0.83% at a cost of only 0.11 nats in validation loss

The effect persists from 200 to 2000 steps and across amplitudes, indicating that sensitive windows are robust features of training dynamics. The authors suggest that their dynamical systems perspective opens avenues for studying stability, bifurcations, and feedback control during pre-training — bringing established analytical methods from dynamical systems and control theory into the design of large-model training.

Future directions implied by the work include: understanding why sensitivity concentrates in specific training windows, developing online (rather than offline) sensitivity detection, and exploring whether other optimizer components (e.g., learning-rate schedules, batch composition) can be tuned to avoid sensitive regimes entirely.

Related papers