Generalization bounds via distillation

Daniel Hsu, Ziwei Ji, Matus Telgarsky, Lan Wang

The Disconnect Between Theory and Practice

Deep learning models often perform brilliantly in practice despite having astronomical theoretical "generalization bounds" that suggest they should fail. In machine learning theory, generalization bounds are used to estimate how well a model will perform on unseen data. However, there is a massive disconnect between this theory and reality.

For a standard ResNet trained on CIFAR-10, traditional bounds might predict a generalization gap of $10^{15}$—a number so large it is practically useless, given that the actual observed gap is closer to $10^{-1}$. Worse yet, these traditional bounds often suggest that making a network wider or more complex should hurt generalization, even though empirical evidence shows that larger models often perform better.

This paper tackles this "looseness" problem by asking a fundamental question: if a complex model behaves like a simple one, can we use that simplicity to prove it generalizes well? The authors prove that if a complex network can be distilled into a simpler one with nearly identical predictions, the original complex network "inherits" the tighter generalization bounds of its simpler counterpart.

A Framework for Simplicity Inheritance

The authors propose a framework where the distilled network acts as a "witness" to the implicit simplicity of the original network. They achieve this through several key methodological steps:

  1. Distillation Distance: They define a metric, $\Phi_{\gamma, m}(f, g)$, that measures how close the outputs of a complex network ($f$) are to a simpler network ($g$) across a set of points.
  2. Data Augmentation as a Statistical Tool: To avoid "paying" for the high complexity of the original network in their proofs, the authors use a specific data augmentation scheme. This allows them to estimate the distillation distance using extra samples, effectively trading off computation for statistical precision.
  3. Canonical Computation Graphs: They introduce a formal way to describe modern architectures—including convolutions, skip connections, and fully connected layers—as a unified graph. This allows their proofs to apply to real-world architectures like ResNets rather than just toy mathematical models.
  4. Stable Rank Sparsification: As a secondary approach, they explore a direct uniform convergence analysis that uses "stable rank" to show that networks can be internally sparsified, though this method ultimately yields looser bounds than the distillation approach.

Key Insights and Ideas

Simplicity Inheritance: The core insight of the paper is that a high-complexity network isn't necessarily "complex" in its behavior. If it can be mimicked by a low-complexity distilled network, it is implicitly simple. The paper provides the mathematical machinery to transfer the "goodness" of the distilled model back to the original.

Width Independence: One of the most striking findings is that distillation removes the "bad" dependence on network width. While raw margin distributions vary wildly with width, the distilled margin histograms for networks of different widths are nearly identical. This suggests distillation captures the "intrinsic" properties of the predictor, regardless of how overparameterized the original model is.

Margin histograms for distilled networks of varying widths show nearly identical distributions.

The "Cautionary Tale" of Uniform Convergence: The authors provide a direct uniform convergence bound but admit it is much looser. This serves as a reminder that simply looking at the weights of a network might never be enough to explain why deep learning works; we must look at how the network actually behaves on data.

Key Results

The authors evaluated their theoretical findings using classic benchmarks like MNIST and CIFAR-10, demonstrating how distillation can drastically drop theoretical bounds while actual test error remains stable.

  • Massive Bound Reduction: For a ResNet8 on CIFAR-10, the authors showed that distillation can reduce the theoretical generalization bound from $10^{15}$ down to roughly $10^5$. While $10^5$ is still technically "vacuous" (greater than 1), a $10^{10}$ reduction is a massive leap toward more realistic theoretical guarantees.
Generalization bounds drop significantly as distillation distance increases.
  • Correlation with Generalization: Unlike standard bounds, the distillation-based bounds actually drop as the network is compressed, mirroring the intuition that simpler models are easier to reason about.
  • Label Randomization: The authors performed a "sanity check" by training on random labels. They found that the distillation-based bounds correctly reflect the difficulty of fitting random noise—the margin distributions collapse to zero, showing the bound "knows" the model isn't finding a simple underlying pattern.

Limitations and Future Work

Even though the bounds are $10^{10}$ times smaller, they are still often numerically greater than 1. The authors acknowledge that while they've made the bounds much tighter, they haven't yet reached the "holy grail" of a non-vacuous bound (one that is $< 1$) for modern deep networks. Additionally, the direct uniform convergence approach suffers from a $n^{1/4}$ convergence rate, which is slower than the standard $n^{1/2}$ rate found in simpler statistical models.

Future directions suggest that exploring different data augmentation schemes or more sophisticated distillation objectives could further tighten these bounds. There is also an open question about whether this "witness" approach can be extended to other types of model compression, such as pruning or quantization, to continue bridging the gap between deep learning theory and practice.

Summary updated

BibTeX
@inproceedings{hsu2021generalization,
  author = {Daniel Hsu and Ziwei Ji and Matus Telgarsky and Lan Wang},
  title = {{Generalization bounds via distillation}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=EGdFhBzmAwB},
}
Figure