NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Instance-Dependent Generalization Bounds via Optimal Transport

Songyan Hou, Parnian Kassraie, Anastasis Kratsios, Jonas Rothfuss, Andreas Krause · DOI

Introduction

A fundamental challenge in modern machine learning is explaining why deep neural networks, which often possess millions more parameters than training samples, generalize so effectively to unseen data. Classical statistical learning theory relies on uniform convergence bounds, such as VC-dimension or Rademacher complexity. These frameworks analyze the entire hypothesis space—the set of all possible functions a model could represent.

However, for over-parameterized models, these global measures often lead to "vacuous" bounds—mathematical guarantees that predict error rates exceeding 100%, even when the actual test error is near zero. This discrepancy arises because uniform bounds ignore the specific "inductive bias" of the training process (e.g., SGD) and the specific function actually learned by the model. This paper introduces a novel framework that leverages Optimal Transport (OT) to derive instance-dependent generalization bounds that remain meaningful even in the high-parameter regime.

Methodology: Generalization as Transport

The authors propose a paradigm shift: viewing the generalization gap through the lens of Optimal Transport. Instead of bounding the worst-case performance over a function class, they measure the cost of transporting probability mass from the empirical training distribution to the true underlying data distribution.

1. Localization and Partitioning

The core of the approach is localization. Rather than analyzing the model's behavior across the entire input space, the researchers partition the data space into smaller, manageable neighborhoods. This allows for a more granular assessment of the model's complexity.

2. Local Lipschitz Regularity

Within each partition, the framework measures the local Lipschitz constant of the learned function. This constant quantifies how much the model's output changes in response to small perturbations in the input. A "smooth" function with low local Lipschitz constants is less likely to overfit to noise in the training data. By aggregating these local measures, the authors construct a bound that reflects the actual geometry of the learned function rather than the theoretical capacity of the architecture.

3. Parameter-Agnostic Framework

Because the bound is calculated based on the output function's behavior on the data manifold, it is inherently parameter-agnostic. Whether a network has 1,000 or 1,000,000 parameters, the bound depends only on the resulting function's smoothness and the data distribution. This directly addresses the failure of classical theory to explain the success of massive models.

Key Insights

  • The Geometry of Generalization: The research demonstrates that generalization is more closely tied to the geometric properties of the learned mapping than to the raw count of weights and biases.
  • Justifying Regularization: The OT framework provides a rigorous mathematical foundation for why techniques like weight decay, early stopping, and adversarial training work. These methods essentially act as constraints that lower the local Lipschitz constants, thereby tightening the generalization bound.
  • Distribution Shift Robustness: A unique advantage of using the Wasserstein distance (a key metric in OT) is its natural handling of distribution shifts. If the test distribution differs from the training distribution, the bound incorporates the Wasserstein-1 distance between the two, providing a principled way to estimate performance under covariate shift.

Empirical Results

The authors validated their theory using synthetic datasets (1D regression and 2D classification) where the "true" distribution is known, allowing for exact calculation of the generalization gap.

  • Non-Vacuous Guarantees: In scenarios where traditional Rademacher-based bounds yielded values in the hundreds, the proposed OT bounds provided values in the same order of magnitude as the empirical risk (e.g., a bound of 0.7 for an error of 0.5).
  • Stability Under Scaling: Experiments confirmed that as the number of parameters increased by several orders of magnitude, the OT-based bound remained stable, mirroring the actual performance of the models.
  • Tightness: In classification tasks, the partition-based bounds were found to be 5 to 20 times tighter than standard uniform bounds.

Limitations and Future Directions

While promising, the framework faces two primary hurdles:

  1. Computational Complexity: Estimating local Lipschitz constants for high-dimensional neural networks is computationally expensive. Current experiments relied on grid-based partitioning, which is unfeasible for datasets like ImageNet. Future research must focus on scalable Lipschitz estimators.
  2. The Curse of Dimensionality: Like most Optimal Transport methods, the transport cost can scale poorly with the input dimension $d$. While the authors provide theoretical results for data lying on low-dimensional manifolds, practical implementation in high dimensions remains a challenge.

Conclusion

By shifting the focus from "how many parameters does the model have?" to "how smooth is the function the model learned?", this work provides a significant step toward a predictive theory of deep learning. The use of Optimal Transport allows for instance-dependent bounds that finally begin to bridge the gap between theoretical guarantees and empirical reality.

Summary updated

BibTeX
@misc{hou2022instance,
  author = {Songyan Hou and Parnian Kassraie and Anastasis Kratsios and Jonas Rothfuss and Andreas Krause},
  title = {{Instance-Dependent Generalization Bounds via Optimal Transport}},
  year = {2022},
  eprint = {2211.01258},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.01258},
}
Figure