Abstract
Generalization of deep networks has been of great interest in recent years, resulting in a number of theoretically and empirically motivated complexity measures. However, most papers proposing such measures study only a small set of models, leaving open the question of whether the conclusion drawn from those experiments would remain valid in other settings. We present the first large scale study of generalization in deep networks. We investigate more then 40 complexity measures taken from both theoretical bounds and empirical studies. We train over 10,000 convolutional networks by systematically varying commonly used hyperparameters. Hoping to uncover potentially causal relationships between each measure and generalization, we analyze carefully controlled experiments and show surprising failures of some measures as well as promising measures for further research.
Introduction
Deep neural networks are notoriously overparameterized, possessing far more capacity than required to simply memorize a training set. Despite this, they generalize remarkably well to unseen data. While numerous "complexity measures" (e.g., VC-dimension, weight norms) have been proposed to explain this phenomenon, they are often validated on limited sets of toy models. This study addresses the issue of spurious correlation, where a measure appears to predict generalization only because both are influenced by a common hyperparameter. We aim to identify measures with a more robust, potentially causal relationship with generalization across a vast landscape of architectures and training settings.
Methodology
We conducted a large-scale empirical study by training over 10,000 convolutional neural networks, systematically varying seven hyperparameters: batch size, dropout probability, learning rate, network depth, weight decay, network width, and optimizer choice. The study utilized the CIFAR-10 and SVHN datasets, chosen for their ability to exhibit complex generalization behavior while remaining computationally manageable for thousands of training runs.
To move beyond simple global correlation, we introduced two rigorous evaluation criteria:
- Granulated Kendall’s Coefficient ($\Psi$): This metric calculates correlation within "slices" where only one hyperparameter varies at a time, preventing measures from succeeding by merely tracking a single dominant hyperparameter.
- Conditional Independence Test ($K$): Based on probabilistic causality, this test determines if a measure $\mu$ provides information about the generalization gap $g$ even when the hyperparameters $\theta_i$ are known.
Key Findings and Results
Our analysis of over 40 complexity measures revealed significant discrepancies between theoretical expectations and empirical performance.
- The Failure of Norms: Many popular norm-based measures, such as those based on the product of spectral norms, performed poorly and often correlated negatively with generalization, particularly as network depth increased.
- Sharpness as a Robust Predictor: Measures based on the "flatness" or "sharpness" of the loss landscape—how the loss changes with weight perturbations—were the most consistent predictors. Specifically, magnitude-aware sharpness ($1/\alpha'$) outperformed even a "noisy oracle" baseline.
- PAC-Bayesian Bounds: These theoretically grounded measures of flatness also demonstrated exceptional performance, validating them as a promising theoretical direction.
- Optimization Signals: Measures derived from the training process, such as gradient noise variance at convergence, showed surprising efficacy in predicting generalization, likely by capturing aspects of landscape flatness.
- VC-Dimension and Parameter Counting: These traditional measures were negatively correlated with generalization, supporting the "double descent" observation that increased parameter counts often improve performance in the overparameterized regime.
Discussion and Future Work
While this study provides a comprehensive reality check, it has limitations. The models used (Network-in-Network style) are smaller than state-of-the-art Transformers, and data augmentation was excluded to ensure all models reached a specific training loss threshold (0.01 cross-entropy). Future research should focus on refining magnitude-aware sharpness measures and exploring why optimization-based signals so effectively capture generalization-relevant properties of the loss landscape.
Summary updated