Low Rank Gradients and Where to Find Them

Rishi Sonthalia, Michael Murray, Guido Montúfar

TL;DR

This paper reveals that gradients in two-layer neural networks are fundamentally rank-two matrices when trained on realistic, ill-conditioned data. By breaking down this rank-two structure into task-fitting and data-adaptive components, the authors show how activation functions, scaling regimes, and regularizers precisely steer the direction of feature learning.

What Problem Does This Paper Address?

Feature learning—the ability of a neural network to discover underlying structures in data—is often characterized by the emergence of low-rank weight matrices, where many neurons align in a few dominant directions. However, existing theoretical explanations for this phenomenon rely heavily on idealized assumptions, such as perfectly uniform ("isotropic") data and independent weight matrices.

Real-world data is rarely so well-behaved; it is typically anisotropic and ill-conditioned, meaning some directions in the data space have vastly higher variance than others. This paper bridges the gap between theory and practice by answering two key questions:

  1. How do low-rank gradient phenomena arise and behave under realistic conditions of anisotropy and ill-conditioning?
  2. How do common regularizers (like weight decay or input noise) selectively modulate these gradient components?

Methods

The authors analyze a shallow two-layer neural network using a spiked data model. In this model, the data covariance matrix is split into an anisotropic "bulk" (modeling general ill-conditioned data) and a prominent rank-one "spike" (modeling a dominant feature direction).

They evaluate the gradient of the loss function with respect to the inner-layer weights after gradient descent updates. Crucially, they mathematically decompose the full gradient matrix into three distinct rank-one matrices:

  • $S_1$ (Residue Spike): Driven by the input bulk and the target residue (the remaining error of the model).
  • $S_2$ (Data Spike): Driven by the leading eigenvector (the spike) of the data covariance.
  • $S_{12}$ (Interpolant): A bridging term connecting the two.

The analysis is conducted across two major network scaling regimes: Mean-Field (MF), which is closely tied to active feature learning, and the Neural Tangent Kernel (NTK), which represents the "lazy training" regime.

Datasets

The theoretical predictions are validated using both synthetic and real-world datasets:

  • Synthetic Data: Generated using a "triple-index model" target function to precisely control the data spike magnitude ($\nu$) and bulk spectral decay ($\alpha$).
  • MNIST: A standard handwritten digit dataset, which the authors show is highly ill-conditioned in practice.
  • CIFAR-10: Evaluated by extracting 512-dimensional embeddings from a pretrained ResNet-18 architecture to simulate realistic feature spaces.

Key Insights and Ideas

  • Rank-Two is the New Rank-One: Prior literature under idealized settings concluded that gradients are approximately rank-one. This paper proves that under realistic, spiked data distributions, the gradient is generically well-approximated by a rank-two matrix containing both a task-fitting component ($S_1$) and a data-adaptive component ($S_2$).
  • ReLU Shuts Down the Task Component: Non-smooth activations like ReLU heavily suppress the task-specific residue component ($S_1$) compared to smooth alternatives like Swish, ELU, or Softplus. This forces ReLU networks to align more aggressively with the data's geometric spikes.
  • MF vs. NTK Trajectories Diverge: At initialization, the dominant gradient direction in Mean-Field scaling aligns closely with the target labels ($X_B^T y$), whereas in NTK scaling, it aligns with the initial residues ($X_B^T r$). Furthermore, the MF gradient direction remains highly stable during early training, while the NTK gradient direction evolves rapidly and oscillates.

Key Results

  • Spike Size Dictates Rank: For small data spikes ($\nu < 0.25$), the gradient behaves as a rank-one matrix dominated by the residue. For moderate spikes ($\nu \in [0.25, 0.5)$), a clear rank-two structure emerges.
Singular value distribution showing the transition to a rank-two gradient structure across different activations and moderate spike sizes.
  • Regularization as a Control Knob: The authors demonstrate that regularizers act as selective filters for feature learning. For instance, adding a small amount of isotropic input noise can "rescue" the suppressed residue spike in ReLU networks, causing it to re-emerge.
The effect of activations and input noise on gradient spectra, demonstrating how ReLU suppresses $S_1$ and how noise can bring it back.
  • Phase Transitions During Training: In the moderate spike setting, the network undergoes a distinct phase transition during training, where the gradient alignment smoothly shifts from the task residue over to the data spike.
Alignment evolution during training showing a clear phase transition from residue alignment to data spike alignment for medium spike sizes.

Limitations and Future Work

While this work significantly relaxes data assumptions, it is still primarily restricted to two-layer shallow networks and focuses heavily on the first or early steps of gradient descent. Extending this rigorous spectral analysis to deep, multi-layer architectures remains an open challenge. Additionally, while the authors document the fascinating mid-training phase transitions between task and data alignment, a complete, long-term dynamical characterization of this behavior is left for future research.

Summary updated

BibTeX
@inproceedings{sonthalia2025low,
  author = {Rishi Sonthalia and Michael Murray and Guido Montúfar},
  title = {{Low Rank Gradients and Where to Find Them}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=de3kwOXQ9e},
}
Figure