Implicit Self-Regularization in Deep Neural Networks: Evidence from Random Matrix Theory and Implications for Learning

Charles H. Martin, Michael W. Mahoney

TL;DR

This paper uses Random Matrix Theory (RMT) to reveal that deep neural networks (DNNs) implicitly regularize themselves during training, shaping their "energy landscape" in predictable ways. They identify 5+1 "phases of training" characterized by the statistical properties of weight matrices, showing how this implicit regularization evolves from simple Tikhonov-like behavior in smaller networks to complex "Heavy-Tailed" self-organization in state-of-the-art models.

What Problem Does This Paper Address?

Deep neural networks (DNNs) achieve remarkable performance, yet their training and generalization behavior often defy traditional machine learning theory, particularly VC theory. This gap makes it hard to understand why they work, how to best tune their numerous hyperparameters, and how to interpret their learned representations. Specifically, the authors highlight that standard optimization and learning theories struggle to explain how DNNs generalize so well without explicit regularization, and why phenomena like the "large-batch generalization gap" occur. They aim to bridge this gap by developing a practical, operational theory for DNN regularization that is grounded in empirical observations and advanced mathematical tools.

Methods

The core of the paper's methodology lies in applying Random Matrix Theory (RMT) to analyze the weight matrices of DNNs. Specifically, they focus on the Empirical Spectral Density (ESD) of correlation matrices derived from these weight matrices.

  • Standard RMT: They leverage the Marchenko-Pastur (MP) distribution, which describes the ESD of random matrices, as a baseline.
  • Heavy-Tailed RMT: Crucially, they extend this to incorporate Heavy-Tailed Universality classes of RMT, which are better suited for modeling matrices with strong correlations, a characteristic they observe in well-trained DNNs.
  • Capacity Control Metrics: They introduce and utilize metrics like Matrix Entropy, Hard Rank, and Stable Rank to quantify the structure and complexity of weight matrices.
  • MP Soft Rank: A novel metric is introduced, the MP Soft Rank, which specifically captures the degree to which MP theory can describe the ESD, serving as a key indicator of self-regularization.
  • 5+1 Phases of Training: Based on these RMT analyses, they develop a visual taxonomy of training phases, each characterized by distinct ESD signatures and corresponding levels of implicit self-regularization.

Datasets

The paper analyzes a variety of pre-trained and custom-trained models.

  • Pre-trained Models:
    • AlexNet
    • InceptionV3
    • VGG16, VGG19, ResNet50 (from PyTorch)
    • NLP models from AllenNLP (including models for Machine Comprehension, Constituency Parsing, Semantic Role Labeling, Coreference Resolution, and Named Entity Recognition)
  • Custom-Trained Models:
    • LeNet5 (retrained)
    • MLP3 (a simple 3-layer Multi-Layer Perceptron)
    • MiniAlexNet (a smaller version of AlexNet)

No new benchmarks were introduced; the focus was on analyzing existing, production-quality models and smaller models for controlled experiments.

Key Insights and Ideas

  • Implicit Self-Regularization is Ubiquitous: DNNs don't just learn functions; their training process itself sculpts a more regularized "energy landscape" through implicit self-regularization. This happens even without explicit regularization terms like Dropout or Weight Norm.
  • RMT as a Diagnostic Tool: RMT, particularly its heavy-tailed extensions, provides a powerful framework to characterize the complex statistical properties of DNN weight matrices, revealing insights into their learned structure.
  • Evolution of Regularization: The nature of implicit self-regularization evolves during training and across different network architectures. Smaller/older models exhibit Tikhonov-like regularization (a "size scale" separates signal from noise), while state-of-the-art models display a novel "Heavy-Tailed Self-Regularization" arising from correlations at all scales.
  • Batch Size as a Regularization Knob: The batch size is not just an optimization parameter; it's a powerful knob that can dramatically influence the implicit self-regularization phase of a DNN, even inducing all 5+1 phases in a single model. This offers a potential explanation for the large-batch generalization gap.
  • Heavy-Tailed ESDs Signal Strong Correlations: Observing heavy-tailed ESDs in weight matrices is a strong indicator of highly correlated, non-random structure, suggesting the network has learned complex, scale-free relationships in the data.

Key Results

  • 5+1 Phases of Training: The authors identify and characterize five main phases (RANDOM-LIKE, BLEEDING-OUT, BULK+SPIKES, BULK-DECAY, HEAVY-TAILED) plus a pathological RANK-COLLAPSE phase, ordered by increasing implicit self-regularization.
  • Model-Specific Signatures: Different DNNs (e.g., LeNet5 vs. AlexNet/Inception) exhibit distinct phases, with older/smaller models often showing BULK+SPIKES (Tikhonov-like) and modern, large models showing HEAVY-TAILED behavior.
  • Batch Size Control: By varying the batch size from 500 down to 2, they demonstrated the ability to transition a MiniAlexNet model through all 5 main phases of training, with decreasing batch sizes generally leading to more implicitly self-regularized models and improved test accuracy.
  • Explicit Regularization Effects: Explicit regularization (L2 Weight Norm, Dropout) further enhances complexity reduction (lower entropy, stable rank) and can pull eigenvalues to larger values, making spikes more well-separated from the bulk.

Limitations and Future Work

  • "Practical" Theory: The authors emphasize that their goal is a "practical theory" for DNNs, not formal mathematical theorems. This means their analysis relies on empirical observations and fitting, rather than strict proofs for all cases.
  • Convergence Diagnostics: For DNNs, defining and verifying "convergence" is non-trivial due to non-convexity. The authors acknowledge that their experiments might not have reached full convergence in all cases, but argue that their findings are robust and consistent across runs and longer training.
  • Overtraining and Non-Self-Averaging: The paper notes that RMT's applicability might be challenged in cases of severe overtraining, where models might become non-self-averaging. This is left as a subtle point for future work.
  • Generalizability to Other Architectures/Data: While initial results suggest applicability to convolutional layers and NLP data, the authors acknowledge that the situation is more complex and warrants further investigation.
  • Automating Choices: The process of fitting RMT parameters (like bulk edge and variance) can be challenging, and the best automated methods for these choices remain an open question.
  • Theoretical Niceties: The paper touches on subtle issues regarding the limits of RMT (e.g., aspect ratio Q) and the relationship to statistical mechanics theories, suggesting deeper theoretical connections to explore.

Summary updated

BibTeX
@article{martin2021implicit,
  author = {Charles H. Martin and Michael W. Mahoney},
  title = {{Implicit Self-Regularization in Deep Neural Networks: Evidence from Random Matrix Theory and Implications for Learning}},
  journal = {J. Mach. Learn. Res.},
  year = {2021},
  url = {https://openreview.net/forum?id=jhLMTNHJKd},
}
Figure