Universal characteristics of deep neural network loss surfaces from random matrix theory

Nicholas P. Baskerville, Jonathan P. Keating, Francesco Mezzadri, Joseph Najnudel, Diego GranziolarXiv 2022 · DOI

Abstract

This paper considers several aspects of random matrix universality in deep neural networks. Motivated by recent experimental work, we use universal properties of random matrices related to local statistics to derive practical implications for deep neural networks based on a realistic model of their Hessians. In particular, we derive universal aspects of outliers in the spectra of deep neural networks and demonstrate the important role of random matrix local laws in popular pre-conditioning gradient descent algorithms. We also present insights into deep neural network loss surfaces from quite general arguments based on tools from statistical physics and random matrix theory.

Introduction: The Geometry of Optimization

Training a deep neural network (DNN) is fundamentally a problem of high-dimensional navigation. To minimize a loss function, an optimizer must traverse a complex landscape defined by the network's parameters. The geometry of this landscape is characterized by the Hessian matrix—the matrix of second-order derivatives—which dictates the curvature and local stability of the surface.

Early theoretical attempts to model these surfaces often borrowed from the physics of "spin glasses," assuming the Hessian followed a Gaussian Orthogonal Ensemble (GOE). However, empirical evidence has consistently shown that real-world DNN Hessians are highly structured and data-dependent, diverging significantly from these "toy" distributions. This paper bridges the gap between idealized theory and empirical reality by focusing on universality: the principle that certain statistical properties of large systems emerge regardless of the specific underlying distribution.

Theoretical Framework: A Realistic Hessian Model

To move beyond the limitations of GOE models, the authors propose a more flexible model for the Hessian during training:

$$H_{batch} = s(b)X + A$$

In this formulation, $A$ represents the "true" or population Hessian (the deterministic component), $X$ represents the noise introduced by sampling a finite batch, and $s(b)$ is a scaling factor determined by the batch size $b$.

The core innovation lies in the application of Quantum Unique Ergodicity (QUE). Rather than assuming the noise $X$ is strictly Gaussian, the authors assume its eigenvectors are "delocalized"—meaning they are spread across all dimensions rather than concentrated in a few. By utilizing the supersymmetric method and free probability theory, the authors demonstrate that the interaction between the noise and the true Hessian follows predictable, universal laws, even under these relaxed and more realistic conditions.

Empirical Validation and Architecture Hierarchy

The researchers validated their theoretical predictions using Lanczos power methods to compute the top eigenvalues (outliers) of Hessians across various architectures and datasets, including CIFAR-100 (VGG16, WideResNet28x10) and MNIST (MLP).

A key finding was the emergence of an architectural hierarchy in how well the theory fit the data:

  1. ResNets: Showed the strongest agreement with Random Matrix Theory (RMT) predictions.
  2. VGG: Showed moderate agreement.
  3. MLPs: Showed the weakest fit.

This hierarchy suggests that residual connections do more than just prevent vanishing gradients; they actually "smooth" the loss landscape in a way that makes it more amenable to high-dimensional statistical laws. The poor fit of the MLP suggests that smaller or less structured networks may not reach the "large $N$ limit" required for these universal properties to manifest.

Key Insights for Optimization

The Role of Damping

In second-order optimization and algorithms like Adam, a damping constant ($\delta$) is typically added to prevent division by zero. This paper reveals that $\delta$ serves a deeper theoretical purpose: it allows the pre-conditioning matrix to concentrate around a deterministic value. This concentration effectively nullifies the chaotic interaction between Hessian noise and gradient noise, allowing the optimizer to follow a more stable path.

Over-parametrization as a Simplifier

Contrary to the intuition that more parameters create more complexity, the paper suggests that over-parametrization actually simplifies the loss surface in a statistical sense. In the large-scale limit, the spectrum is dominated by a massive "spike" of eigenvalues at zero and a few distinct outliers. These outliers dominate the optimization path, making the high-dimensional problem behave more like a low-dimensional one.

Outlier Scaling

The authors derived a specific formula for how the top eigenvalues of the Hessian scale with batch size. Experimental results for ResNets showed "excellent agreement" with this power-law scaling at both the start and end of training, providing a practical metric for understanding how batch size choices impact the curvature the optimizer encounters.

Conclusion and Future Directions

By shifting the focus from specific matrix distributions to the broader concept of universality, this work provides a robust theoretical foundation for understanding why deep networks are trainable. While the assumption of Quantum Unique Ergodicity (QUE) remains a mathematical challenge to prove rigorously for specific architectures, the empirical success of the model is compelling.

Future research aims to extend these "local laws" to the Gram matrices of DNN Jacobians, potentially leading to a "Nonlinear Random Matrix Theory" that could fully characterize the convergence dynamics of modern optimizers like Adam and clarify the role of architectural choices in shaping the path to global minima.

Summary updated

BibTeX
@misc{baskerville2022universal,
  author = {Nicholas P. Baskerville and Jonathan P. Keating and Francesco Mezzadri and Joseph Najnudel and Diego Granziol},
  title = {{Universal characteristics of deep neural network loss surfaces from random matrix theory}},
  year = {2022},
  eprint = {2205.08601},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.08601},
}
Figure