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

Leveraging PAC-Bayes Theory and Gibbs Distributions for Generalization Bounds with Complexity Measures

Paul Viallard, Rémi Emonet, Amaury Habrard, Emilie Morvant, Valentina Zantedeschi

This paper, recently presented at AISTATS 2024, tackles one of the most persistent challenges in machine learning theory: bridging the gap between theoretical generalization guarantees and the practical complexity measures used by engineers.

TL;DR

The authors introduce a flexible PAC-Bayesian framework that allows researchers to "plug and play" arbitrary, user-defined complexity measures into computable generalization bounds. By leveraging Gibbs distributions and disintegrated PAC-Bayes theory, they demonstrate that if you can learn a good proxy for the generalization gap—even using a neural network—you can derive remarkably tight theoretical guarantees.

What Problem Does This Paper Address?

In statistical learning theory, we want to bound the generalization gap: the difference between a model's performance on training data and its performance on unseen data. Traditional bounds are often "locked" into specific theoretical frameworks. For instance, if you want a bound based on VC-dimension or Rademacher complexity, the math is predefined and often leads to "vacuous" results (bounds greater than 1) for deep neural networks.

Practitioners, however, use a wide variety of regularizers and complexity measures (like weight norms or path-norms) that don't always fit neatly into these classical buckets. While recent work has tried to relate arbitrary measures to generalization, those bounds were often uncomputable because they relied on knowing the true, underlying data distribution. This paper provides a way to use any measurable function as a complexity proxy while keeping the resulting bound computable.

Methods

The authors' approach rests on two main pillars:

  1. Disintegrated PAC-Bayes Bounds: Standard PAC-Bayes bounds provide guarantees for the expected risk over a distribution of models. "Disintegrated" versions are more granular, providing high-probability guarantees for a single hypothesis $h$ sampled from a posterior distribution.
  2. Gibbs Distributions as Posteriors: The "trick" that makes the math work is setting the posterior distribution $\rho_S$ as a Gibbs distribution: $\rho_S(h) \propto \exp[-\mu(h, S)]$. Here, $\mu(h, S)$ is the user-defined parametric function (the complexity measure).

By choosing this specific form, the complexity measure $\mu$ effectively becomes the "energy" or objective function of the system. Hypotheses with lower complexity (lower $\mu$) are more likely to be sampled. To make this practical, the authors use Stochastic Gradient Langevin Dynamics (SGLD) to sample hypotheses from these Gibbs distributions without needing to calculate the difficult normalization constants.

Illustration of the Gibbs distribution $\rho_S$ with a parametric function $\mu$. The distribution gives higher probability to hypotheses where $\mu$ is low.

Datasets

The authors evaluated their framework using an All Convolutional Network (4 layers) on two standard image classification benchmarks:

  • MNIST: Handwritten digits.
  • FashionMNIST: Clothing items.

They also created a custom "Neural Complexity" dataset by training thousands of models with varying validation set sizes to record their actual generalization gaps, which were then used to train a meta-model to predict generalization.

Key Insights and Ideas

  • The Power of Choice: The framework is "instantiable." You can plug in Frobenius norms, path-norms, or even the output of a separate neural network trained to predict generalization.
  • Optimization-Generalization Duality: Because the Gibbs distribution links the complexity measure directly to the sampling probability, the bound naturally accounts for how well the model minimizes your chosen complexity measure.
  • Norms are Not Enough: A striking finding is that standard weight norms (like $L_2$ or Frobenius) are often poor predictors of the generalization gap in deep learning. When used in the bound, they often result in vacuous guarantees.
  • Neural Complexities: The authors show that a "Neural Complexity" measure—a small MLP trained to predict the generalization gap of the main model—produces much tighter bounds than traditional handcrafted norms.

Key Results

The quantitative experiments highlight a significant disparity between different complexity measures. As shown in the bar plots below, traditional norm-based measures (like DistL2 or SumFro) often result in mean bound values near 1.0 (vacuous), whereas the Neural and Gap (ideal case) measures provide much tighter guarantees.

Figure 4: Bar plot of the bound value associated with Corollary 4 and the different parametric functions. The mean bound values of the sampled hypotheses h ∼ρS are shown with the hatched bars, and the mean test risks Rℓ T (h) are plotted in the colored bars. Moreover, the standard deviations are plotted in black.

Furthermore, the authors demonstrate that using informed priors (Corollary 5)—priors that have seen a fraction of the data—significantly tightens the bounds compared to uniform priors, especially when the concentration parameter $\alpha$ is well-tuned.

Limitations and Future Work

  • Hyperparameter Sensitivity: The tightness of the bound is highly dependent on the concentration parameter $\alpha$ and the SGLD sampling parameters (learning rate, noise). Tuning these is non-trivial.
  • Computational Overhead: Sampling from a Gibbs distribution via SGLD is computationally more demanding than standard SGD training.
  • The Search for $\mu$: While the framework allows any $\mu$, the bound is only useful if $\mu$ is a good proxy for the generalization gap. Finding such functions for complex architectures remains an open research area. The authors suggest that learning interpretable models of generalization is a promising next step.

Summary updated

BibTeX
@inproceedings{viallard2024leveraging,
  author = {Paul Viallard and Rémi Emonet and Amaury Habrard and Emilie Morvant and Valentina Zantedeschi},
  title = {{Leveraging PAC-Bayes Theory and Gibbs Distributions for Generalization Bounds with Complexity Measures}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=zyCrs7EtYF},
}
Figure