Bounding generalization error with input compression: An empirical study with infinite-width networks

Angus Galloway, Anna Golubeva, Mahmoud Salem, Mihai Nica, Yani A. Ioannou, Graham W. Taylor

Abstract: Estimating the Generalization Error (GE) of Deep Neural Networks (DNNs) is an important task that often relies on availability of held-out data. The ability to better predict GE based on a single training set may yield overarching DNN design principles to reduce a reliance on trial-and-error, along with other performance assessment advantages. In search of a quantity relevant to GE, we investigate the Mutual Information (MI) between the input and final layer representations, using the infinite-width DNN limit to bound MI. An existing input compression-based GE bound is used to link MI and GE. To the best of our knowledge, this represents the first empirical study of this bound. In our attempt to empirically stress test the theoretical bound, we find that it is often tight for best-performing models. Furthermore, it detects randomization of training labels in many cases, reflects test-time perturbation robustness, and works well given only few training samples. These results are promising given that input compression is broadly applicable where MI can be estimated with confidence.

Introduction

A central mystery in Deep Learning is why massive neural networks generalize so well. Classical learning theory suggests that models with millions of parameters should simply overfit the training data, yet they don't. Predicting this Generalization Error (GE)—the gap between training and test performance—without actually using a test set is a "holy grail" of the field.

Most existing theoretical bounds are "vacuous," meaning they technically hold true but are useless in practice (e.g., predicting an error rate of 100% for a task where the actual error is 5%). Furthermore, many bounds fail to track GE when we change "metaparameters" like training time or regularization. This research, published in Transactions on Machine Learning Research, investigates whether Input Compression—the idea that a network learns by stripping away irrelevant input details—can provide a tighter, more predictive bound.

Methodology

The researchers focus on the Input Compression Bound (ICB), which links the Mutual Information $I(X; Z)$ between the input $X$ and the internal representation $Z$ to the generalization error.

Infinite-Width Networks

In standard, finite-width networks, Mutual Information is notoriously difficult to calculate and often mathematically ill-defined. To bypass this, the authors use the Neural Tangent Kernel (NTK) and NNGP frameworks. These represent the "infinite-width limit" of neural networks, where the model's outputs follow a Gaussian distribution, making MI calculations tractable. They use a variational bound called InfoNCE to estimate the MI between inputs and the final layer representations.

Measuring Predictive Power

To measure how well the bound predicts trends, they use "Sign-Error" (SE). If the bound increases when the actual GE increases (and vice versa), the SE is low, indicating the bound is a good proxy for model selection. The study evaluates the bound across five standard image datasets: MNIST, FashionMNIST, SVHN, CIFAR-10, and EuroSAT.

Empirical Findings

One of the primary goals was to determine if the ICB remains "non-vacuous" during the training process. As shown in the training dynamics, the ICB provides realistic error estimates that track the actual test performance closely.

Accuracy and ICB evolution during training for varying regularization strengths.

Key Insights

  • Bigger isn't always better: From an information-theoretic perspective, a model that retains too much information about the input (low compression) is more likely to overfit. The ICB rewards models that find a "minimal sufficient statistic" for the task.
  • Detecting "Memorization": The authors found that the ICB "explodes" when labels are randomized, correctly signaling that the model has failed to find a generalizable compression of the data.
  • Robustness over Accuracy: Interestingly, the ICB often tracks Robust Generalization (performance under noise or adversarial perturbations) even better than it tracks standard test accuracy. This suggests that input compression is fundamentally linked to how "stable" a model's decision boundaries are.

Key Results

For the best-performing models, the ICB was often remarkably tight. In many cases, it provided error bounds below 50% for binary tasks—a significant improvement over many classical bounds that often exceed 100%.

Generalization error vs. ICB satisfaction across multiple datasets.

The "ICB satisfaction rate" (how often the actual GE was below the theoretical bound) was around 95% for four out of the five datasets when using Mean Squared Error. As illustrated in the scatter plots above, the bound consistently holds across different architectures (CNNs and MLPs) and datasets of varying complexity.

Furthermore, the bound was highly successful at predicting how GE would change when varying regularization, training time, and the number of training samples. It was less consistent when varying network depth or activation functions, depending on the dataset.

Limitations and Future Work

While the NTK/NNGP framework allows for precise math, real-world networks are finite. The authors acknowledge that the behavior of MI might differ in finite networks trained with SGD, where "representation learning" behaves differently than in the kernel limit. Additionally, while the methodology extends to multi-class problems, this empirical study focused heavily on binary tasks for computational efficiency. Testing the bound on 1000-class problems like ImageNet remains a significant future challenge.

Summary updated

BibTeX
@article{galloway2023bounding,
  author = {Angus Galloway and Anna Golubeva and Mahmoud Salem and Mihai Nica and Yani A. Ioannou and Graham W. Taylor},
  title = {{Bounding generalization error with input compression: An empirical study with infinite-width networks}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2023},
  url = {https://openreview.net/forum?id=txHwmLfCJ6},
}
Figure