From SGD to Spectra: A Theory of Neural Network Weight Dynamics

Brian Richard Olsen, Sam Fatehmanesh, Frank Xiao, Adarsh Kumarappan, Anirudh Gajula

TL;DR

This paper bridges the gap between the microscopic updates of Stochastic Gradient Descent (SGD) and the macroscopic evolution of a neural network's weight spectra. By modeling weight updates as a matrix-valued Stochastic Differential Equation (SDE), the authors prove that singular values undergo Dyson Brownian motion with eigenvalue repulsion, naturally producing the characteristic "bulk+tail" distribution observed in well-trained networks.

What Problem Does This Paper Address?

At initialization, neural network weight matrices behave like random matrices, adhering to well-known statistical laws like the Marchenko-Pastur distribution. However, training radically transforms this structure into a "bulk+tail" distribution—where most singular values stay clustered in a main "bulk," but a few large values grow into a heavy "tail" that correlates strongly with good generalization.

While empirical studies have noted this phenomenon, existing theoretical frameworks fail to explain how or why the microscopic, step-by-step randomness of SGD drives this macroscopic spectral shift. Current SDE models of SGD typically oversimplify weights as scalars or low-rank models, missing the full matrix-valued dynamics.

Methods

The authors develop a continuous-time, matrix-valued Stochastic Differential Equation (SDE) framework to track weight matrix evolution:

  • Theorem 3.1 (Singular Value SDE): Under the assumption of negligible gradients (e.g., near plateaus or local minima), they derive exact SDEs showing that squared singular values follow Dyson Brownian motion with a parameter of $\beta=1$. This mathematically proves that singular values act like interacting particles that repel one another, causing the spectrum to spread out rather than collapse.
  • Theorem 3.2 (Stationary Distribution): In the non-negligible gradient regime, they apply mean-field theory to decouple the interacting system. They prove that the limiting stationary distribution follows a Gamma-type density with power-law tails, providing the first rigorous theoretical justification for the "bulk+tail" structure.
  • Bootstrapped Drift Forecasting: They introduce an algorithm (Algorithm 1) that uses minimal gradient information to forecast how singular values will evolve over time without needing to recompute a full Singular Value Decomposition (SVD) at every step.

Datasets

The framework was validated using controlled experiments across three canonical architectures:

  • GPT-2 (Transformer) trained on Shakespeare text.
  • Vision Transformer (ViT) trained on MNIST and CIFAR-100.
  • Multilayer Perceptron (MLP) trained on MNIST and CIFAR-100.

No new datasets or benchmarks were introduced.

Key Insights and Ideas

  • SGD as a "Spectral Sculptor": Instead of being purely destructive or isotropic, the stochastic noise from mini-batch sampling is systematically aligned with the geometry of the loss landscape. It actively pushes eigenvalues apart via repulsion, acting as a sophisticated form of implicit regularization that reinforces beneficial training dynamics.
  • Diminishing Effective Matrix Size: As training progresses, growing correlations within the weight matrix diminish its "effective" size as a random matrix. This amplifies edge statistics and causes learned features to pop out past standard Random Matrix Theory thresholds.
  • Layer-Dependent Sensitivity: Increasing the learning rate amplifies spectral spreading unevenly across a network. For instance, in ViTs, the second feed-forward projection layer is highly sensitive to learning rate scaling, whereas the output head remains relatively stable.

Key Results

  • Empirical Validation of the Bulk+Tail: At initialization (Batch 0), the weights perfectly match the Marchenko-Pastur law. By Batch 400, a clear heavy tail emerges outside the random matrix support, confirming the transition to highly correlated learned features.
Figure 1. Singular-value histograms at batches 0, 200, and 400, overlaid with the Marˇcenko–Pastur (MP) bulk law (red dashed) and the Tracy–Widom (TW) edge curve (green).
  • Accurate Trajectory Forecasting: The proposed forecasting algorithm accurately tracks the top 8 singular values of an MLP layer over the first ~300 batches of training before anisotropic noise causes the empirical paths to diverge slightly from the isotropic prediction model.
Figure 2. Predicted singular values (dashed) versus true.
  • Qualitative Tail Matching: The Gamma-type stationary distribution derived in Theorem 3.2 successfully captures the qualitative shape of the heavy tails observed in trained networks.
Figure 3. Predicted heavy tails via Theorem 3.2.

Limitations and Future Work

  • Isotropic Noise Idealization: The primary limitation is the assumption of isotropic (uniform in all directions) SGD noise. Real-world SGD noise is highly anisotropic and parameter-dependent. This idealization causes the model to underpredict the exact count of singular values in the heavy tail and diverge after the initial training phase.
  • Future Extensions: The authors point to extending this framework to full anisotropic covariance structures (sketched out in Proposition 6.17) as a crucial next step. This could unlock more precise forecasting tools, spectral-aware initialization schemes, adaptive learning rate schedules, and novel optimizers that treat large singular value directions differently from the bulk.

Summary updated

BibTeX
@inproceedings{olsen2025from,
  author = {Brian Richard Olsen and Sam Fatehmanesh and Frank Xiao and Adarsh Kumarappan and Anirudh Gajula},
  title = {{From SGD to Spectra: A Theory of Neural Network Weight Dynamics}},
  booktitle = {MOSS @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=PAcc7wfxZd},
}
Figure