Overview
A fundamental mystery in deep learning is why massive neural networks generalize so well despite having enough capacity to simply memorize the training data. While statistical learning theory offers tools like Rademacher complexity or VC-dimension, these often produce "vacuous" bounds—values so large they are practically useless—or fail to track with actual test performance.
Recent empirical studies, such as the Predicting Generalization in Deep Learning (PGDL) competition, have shown that many popular theoretical bounds (like those based on weight norms) can actually correlate negatively with generalization. There is a significant gap between rigorous theory and the practical metrics that actually work.
To bridge this gap, this paper introduces a novel framework for predicting deep learning generalization by normalizing classification margins with Optimal Transport costs. By using a generalized notion of variance called $k$-variance, the authors derive theoretical bounds that strongly correlate with empirical performance on large-scale datasets.
Methodology: $k$-Variance Normalized Margins
The authors propose measuring how "spread out" features are in the latent space using Optimal Transport (OT) to better contextualize classification margins.
- $k$-Variance: Instead of standard variance, the authors use $k$-variance, defined as the expected 1-Wasserstein distance (Earth Mover's Distance) between two independent random subsets of the training distribution. This metric is highly sensitive to the clustering and structural geometry of the data.
- Normalized Margins: They develop generalization bounds where the classification margin is normalized by this $k$-variance. Intuitively, a "good" margin isn't just about the raw distance to a decision boundary; it must be large relative to the internal "noise" or spread of the features within a class.
- Gradient Normalization (GN): The framework is further refined by incorporating gradient-normalized margins, which approximate the distance to the decision boundary in the input or feature space.
Key Insights and Ideas
The theoretical framework reveals that generalization is driven by two primary factors: how well features of the same class are clustered (concentration) and how far apart different classes are in the Wasserstein sense (separation).
Furthermore, $k$-variance serves as a natural alternative to Rademacher complexity, capturing the "intrinsic dimensionality" and clusterability of the learned representations.
A critical "sanity check" for any generalization measure is whether it can detect when a model has simply memorized random labels. Standard margins often struggle with this, but the proposed $k$-variance measures pass this test easily.
Key Results
The researchers evaluated their approach using the PGDL competition datasets, which include eight distinct tasks covering various architectures (VGG, NiN, FCN) and datasets (CIFAR-10, SVHN, CINIC-10, MNIST, Fashion-MNIST, Oxford Pets, and Oxford Flowers).
The proposed measure, $kV$-GN-Margin, significantly outperformed classic baselines in predicting generalization error across these tasks:
- Predictive Power: In 6 out of 8 PGDL tasks, the $k$-variance normalized margins achieved higher mutual information scores with the actual generalization error than standard norm-based or margin-based bounds.
- Ordering Models: $kV$-GN-Margin proved uniquely capable of correctly and consistently ordering models by their generalization error, a task where traditional margins failed.
- State-of-the-Art Comparison: When combined with techniques like Mixup, the $kV$-GN-Margin approach outperformed the winning solution of the PGDL competition in 5 out of 8 tasks.
Limitations and Future Work
While promising, the framework has a few limitations. Computing the exact Lipschitz constant for deep ReLU networks is NP-hard, so the authors rely on an empirical approximation (the maximum norm of the Jacobian on the training set), which may not capture the true global constant. Additionally, while using random subsets helps estimate OT costs, calculating Wasserstein distances remains more computationally intensive than simple norm calculations.
For future work, the authors suggest exploring the connection between their OT-based bounds and contrastive representation learning, as well as extending the framework to study adversarial robustness.
Summary updated