Does SGD really happen in tiny subspaces?

Minhak Song, Kwangjun Ahn, Chulhee Yun

Introduction

Training deep neural networks involves navigating a highly complex, high-dimensional loss landscape with millions of parameters. Curiously, previous research has observed that gradients during training are not distributed randomly. Instead, they tend to align closely with the dominant subspace—a tiny sliver of the landscape defined by the top few eigenvectors of the Hessian matrix.

This observation led to a natural and tantalizing hypothesis: if the gradient primarily lives in this tiny subspace, can we simply train the model there and ignore the rest of the high-dimensional "bulk"? If true, this could lead to massive gains in training efficiency and help explain why deep learning avoids the "curse of dimensionality."

This paper rigorously tests that hypothesis and reveals a surprising, counter-intuitive answer: the alignment is a red herring. By surgically separating updates, the authors show that training within this dominant subspace fails completely, while training in the remaining "bulk" subspace is just as effective as standard Stochastic Gradient Descent (SGD).

Isolating the Subspaces: Dom-SGD vs. Bulk-SGD

To determine where the actual "learning" occurs, the authors introduce two modified versions of SGD:

  1. Dom-SGD: At each step, the SGD update is projected exclusively onto the dominant subspace (the top-$k$ eigenvectors of the Hessian).
  2. Bulk-SGD: The update is projected onto the bulk subspace (the orthogonal complement, effectively "removing" the dominant component).

They test these modified optimizers across different optimization regimes, including the Gradient Flow (GF) regime (small learning rates) and the Edge of Stability (EoS) regime (large learning rates where sharpness hovers at the edge of divergence). The study uses several standard benchmarks, utilizing subsets to manage the high computational cost of frequent Hessian eigenvalue decomposition: MNIST-5k (MLP), CIFAR10-5k (CNN), and SST2-1k (Transformer).

Key Findings: The Illusion of the Dominant Subspace

The most striking result of the paper is that the apparent alignment between the gradient and the dominant subspace is spurious. Even though the vast majority of the gradient vector points into the dominant subspace, that component is essentially "junk" noise that does not contribute to the actual decrease in training loss.

Training loss trajectories across different architectures. Projecting updates onto the dominant subspace (Dom-SGD, orange) halts progress, while projecting onto the bulk subspace (Bulk-SGD, green) matches standard SGD (blue).
  • Dom-SGD Fails: In every test case, projecting the update onto the dominant subspace caused training to stall. The loss stopped decreasing almost immediately.
  • Bulk-SGD Succeeds: Conversely, projecting out the dominant component (Bulk-SGD) resulted in training performance nearly identical to standard SGD, despite throwing away the largest part of the gradient vector.
  • EoS Regime Confirmation: Even in the "Edge of Stability" regime, where the alignment is nearly perfect, Dom-GD still fails to decrease loss, while Bulk-GD remains highly effective.

The "Ill-Conditioned Valley" Analogy

To explain this phenomenon, the authors propose an analogy of an ill-conditioned valley. Imagine a long, narrow valley where the dominant subspace represents the steep walls, and the bulk subspace is the flat floor leading to the exit.

Stochastic noise constantly kicks the optimizer up the steep walls. The resulting gradient points sharply back down toward the floor, creating the massive "alignment" with the dominant subspace. However, the actual progress toward the minimum happens along the floor (the bulk). If you only move along the steep walls (Dom-SGD), you just bounce back and forth without moving forward.

Furthermore, the authors show that in standard training, this alignment disappears if you switch from SGD to full-batch Gradient Descent. This proves that the alignment is largely a byproduct of stochastic noise interacting with the landscape's curvature.

Momentum and Adam as "Bulk Amplifiers"

The authors extend their analysis to advanced optimizers like momentum and Adam. They find that these methods actually reduce the alignment with the dominant subspace. They work by amplifying the tiny, consistent signal hidden in the bulk subspace while dampening the oscillating noise in the dominant subspace, which explains why they so effectively speed up training.

Discussion and Future Work

While calculating the dominant subspace is currently too computationally expensive to be used as a practical training trick, this paper provides a crucial analytical tool for understanding neural network dynamics.

The authors acknowledge several areas for further exploration:

  • Theoretical Gap: While a toy quadratic model provides great intuition in the paper, a rigorous mathematical theory for why this happens in deep, non-linear networks is still missing.
  • The Sharpness Paradox: Interestingly, Dom-SGD actually decreases the sharpness of the landscape even as it fails to decrease the loss. This might be related to how noise biases SGD toward flatter regions, but the exact mechanism remains unclear.
  • Generalization: While the paper focuses on optimization (training loss), future work could investigate if the bulk subspace is also where the "features" that lead to generalization (test accuracy) are learned.

Summary updated

BibTeX
@inproceedings{song2025does,
  author = {Minhak Song and Kwangjun Ahn and Chulhee Yun},
  title = {{Does SGD really happen in tiny subspaces?}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=v6iLQBoIJw},
}
Figure