Behind the Scenes of Gradient Descent: A Trajectory Analysis via Basis Function Decomposition

Jianhao Ma, Lingjun Guo, Salar Fattahi

Gradient Descent (GD) is the undisputed workhorse of modern machine learning. Yet, despite its ubiquity, our theoretical understanding of why it works so well on the highly non-convex landscapes of deep neural networks (DNNs) remains incomplete. While classical theory focuses on finding stationary points, it often fails to explain how GD navigates complex models to find solutions that generalize well.

In this paper, researchers from the University of Michigan propose a new lens through which to view optimization: Basis Function Decomposition. By projecting the chaotic-looking path of a training model onto the "right" mathematical coordinate system, they reveal a surprising underlying order: GD learns complex functions by steadily and monotonically building up coefficients of specific basis functions.

TL;DR

The authors introduce a unifying framework that analyzes gradient descent trajectories by decomposing them into orthonormal basis functions. They prove that under certain conditions, GD learns these basis coefficients monotonically, leading to improved convergence results for matrix and tensor factorization and providing a new explanation for the success of deep learning optimizers.

What Problem Does This Paper Address?

Classical optimization theory struggles with the non-convexity of deep learning. It tells us GD might get stuck in local minima or saddle points, but in practice, GD usually finds excellent solutions. Existing research has tried to explain this by either assuming the "landscape" is benign (no bad local minima) or by performing very specific trajectory analyses for simple models like linear networks.

However, these landscape views don't always hold, and model-specific analyses don't generalize. The gap is a unifying framework that can explain the optimization trajectory across different architectures—from simple kernel regression to massive Vision Transformers (ViT).

Methods

The core idea is to decompose a model $f_\theta(x)$ into a set of orthonormal basis functions $\{\phi_i(x)\}$ and their corresponding coefficients $\{\beta_i(\theta)\}$.

  1. Theoretical Framework: The authors establish conditions—Gradient Independence (the gradients of different coefficients don't interfere) and Gradient Dominance (the gradient norm scales with the coefficient)—under which GD is guaranteed to converge globally.
  2. Application to Classical Problems: They apply this framework to simplify the analysis of Kernel Regression, Symmetric Matrix Factorization (SMF), and Orthogonal Symmetric Tensor Decomposition (OSTD).
  3. The "After-Kernel" Basis for DNNs: For complex neural networks, the authors propose using the Conjugate Kernel evaluated after training (A-CK). By performing a Singular Value Decomposition (SVD) on the features of the penultimate layer at the final epoch, they derive a basis that represents the "features" the network eventually decided were important.

Datasets

The authors validated their framework using a mix of synthetic and real-world data:

  • Synthetic Data: Used for verifying theoretical results on Kernel Regression, SMF, and OSTD.
  • MNIST: Used for training various Convolutional Neural Network (CNN) architectures (2-block to 4-block).
  • CIFAR-10 & CIFAR-100: Used to test realistic architectures including AlexNet, VGG-11, ResNet-18/34/50, and Vision Transformers (ViT).

Key Insights and Ideas

  • Hidden Monotonicity: If you look at the raw parameters of a network during training, they move in complex, non-monotonic ways. However, if you project the model's output onto the A-CK basis, the learning process looks remarkably smooth. As shown in Figure 1, a random basis yields "noisy" trajectories, while the A-CK basis reveals steady, monotonic growth of the most important components.
Comparison of trajectories projected onto a random basis (top) vs. the A-CK basis (bottom). The bottom row shows clear monotonicity.
  • Incremental Learning: The framework explains the "incremental learning" phenomenon, where GD learns larger, more significant components (like the principal eigenvalues in matrix factorization) before smaller, finer details.
  • Generality: The monotonicity isn't just a quirk of SGD; it holds across different optimizers like AdamW and LARS, and across vastly different architectures like ResNets and Transformers.

Key Results

  • Symmetric Matrix Factorization: The authors improved the known convergence rates, showing a better dependency on the initialization scale.
  • Tensor Decomposition: They provided the first-ever convergence result for GD with large step-sizes on orthogonal symmetric tensor decomposition.
  • Empirical Consistency: Across all tested DNNs on CIFAR-10, the top basis coefficients consistently behaved monotonically. This suggests that the "basis function decomposition" view captures a fundamental truth about how neural networks learn.
Experimental verification showing monotonic trajectories and decreasing estimation errors for KR, SMF, and OSTD.

Limitations and Future Work

  • Small Step-size Assumption: Much of the general theory (Theorem 1) relies on a conservative, small step-size. While empirical results show the phenomenon holds for larger, practical step-sizes, the theory needs to catch up.
  • The "Chicken and Egg" Problem: The A-CK basis is calculated after training. While this is excellent for analysis, it doesn't yet allow us to predict the basis before we start training.
  • Stochasticity: The current theoretical framework focuses on vanilla Gradient Descent. Extending the rigorous proofs to stochastic (SGD) and adaptive (Adam) variants is a key next step for the researchers.

In summary, this work provides a powerful new set of "glasses" through which we can watch a neural network learn, turning a chaotic high-dimensional dance into a steady, predictable climb.

Summary updated

Abstract

This work analyzes the solution trajectory of gradient-based algorithms via a novel basis function decomposition. We show that, although solution trajectories of gradient-based algorithms may vary depending on the learning task, they behave almost monotonically when projected onto an appropriate orthonormal function basis. Such projection gives rise to a basis function decomposition of the solution trajectory. Theoretically, we use our proposed basis function decomposition to establish the convergence of gradient descent (GD) on several representative learning tasks. In particular, we improve the convergence of GD on symmetric matrix factorization and provide a completely new convergence result for the orthogonal symmetric tensor decomposition. Empirically, we illustrate the promise of our proposed framework on realistic deep neural networks (DNNs) across different architectures, gradient-based solvers, and datasets. Our key finding is that gradient-based algorithms monotonically learn the coefficients of a particular orthonormal function basis of DNNs defined as the eigenvectors of the conjugate kernel after training. Our code is available at https://github.com/jianhaoma/function-basis-decomposition.
BibTeX
@inproceedings{ma2023behind,
  author = {Jianhao Ma and Lingjun Guo and Salar Fattahi},
  title = {{Behind the Scenes of Gradient Descent: A Trajectory Analysis via Basis Function Decomposition}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=TPiwkItUSu},
}
Figure