On the role of data in PAC-Bayes bounds

Gintare Karolina Dziugaite, Kyle Hsu, Waseem Gharbieh, Daniel M. RoyarXiv 2020

Abstract

The dominant term in PAC-Bayes bounds is often the Kullback--Leibler divergence between the posterior and prior. For so-called linear PAC-Bayes risk bounds based on the empirical risk of a fixed posterior kernel, it is possible to minimize the expected value of the bound by choosing the prior to be the expected posterior, which we call the oracle prior on the account that it is distribution dependent. In this work, we show that the bound based on the oracle prior can be suboptimal: In some cases, a stronger bound is obtained by using a data-dependent oracle prior, i.e., a conditional expectation of the posterior, given a subset of the training data that is then excluded from the empirical risk term. While using data to learn a prior is a known heuristic, its essential role in optimal bounds is new. In fact, we show that using data can mean the difference between vacuous and nonvacuous bounds. We apply this new principle in the setting of nonconvex learning, simulating data-dependent oracle priors on MNIST and Fashion MNIST with and without held-out data, and demonstrating new nonvacuous bounds in both cases.

Introduction

A central challenge in deep learning theory is explaining why models with millions of parameters generalize well despite having the capacity to overfit. PAC-Bayes bounds provide a framework for quantifying generalization, typically expressed as a function of the empirical risk and the Kullback–Leibler (KL) divergence between a posterior distribution (learned from data) and a prior distribution (chosen before seeing the data). However, these bounds are frequently "vacuous"—proving only that the error is less than 100%—primarily because the KL term explodes when the prior is poorly aligned with the learned posterior.

Methodology: Data-Dependent Oracle Priors

This research investigates the use of data-dependent oracle priors to tighten these bounds. Traditionally, a prior must be independent of the training data used to estimate the risk. The authors circumvent this by splitting the training set $S$ into two parts:

  1. Prior Construction: A subset $S_J$ (comprising a fraction $\alpha$ of the total data) is used to "center" the prior distribution.
  2. Risk Estimation: The remaining data ($S \setminus S_J$) is used to calculate the empirical risk.

In the context of Stochastic Gradient Descent (SGD), the authors introduce the $\alpha$-prefix run. Here, the prior is centered on the weights obtained after training on only the first $\alpha$ fraction of the data. This captures the early learning trajectory, which significantly influences the final model state.

Theoretical Insights: The $\alpha$ Trade-off

The core of the paper's argument is that data-dependence is not merely a heuristic but a mathematical necessity for non-vacuous bounds in complex models. This introduces a fundamental trade-off governed by the parameter $\alpha$:

  • Information Rate Gain: As $\alpha$ increases, the prior becomes more informed by the data, reducing the KL divergence between the prior and posterior.
  • Excess Bias: Conversely, as $\alpha$ increases, fewer data points are available for the empirical risk estimate, which can lead to a looser bound on the true risk.
Figure 1: The trade-off between the fraction of data alpha used for the prior and the resulting error bound.

The authors demonstrate that simple isotropic Gaussian priors centered on these $\alpha$-prefix runs are often sufficient to achieve significant tightness, suggesting that the "direction" of learning captured early on is more critical than complex covariance structures.

Empirical Results

The proposed methods were evaluated on MNIST, Fashion-MNIST, and CIFAR-10 (using ResNet-20). Key findings include:

  • State-of-the-Art Tightness: On MNIST, the authors achieved a non-vacuous generalization bound of approximately 11%, a significant improvement over the previous benchmark of 46% (Zhou et al., 2019).
  • Direct Risk Bound Minimization: By using the PAC-Bayes bound itself as a loss function during training, the researchers produced models with "built-in" generalization certificates that closely track actual test performance.
  • Scalability to Deep Networks: For ResNet-20 on CIFAR-10, the bounds remained informative and tracked test error as the data-dependence ($\alpha$) was tuned.

Conclusion and Future Work

This work establishes that using a portion of the training data to inform the prior is essential for deriving non-vacuous PAC-Bayes bounds in deep learning. While the study focuses on linear bounds for tractability, future research could explore non-linear variants or more sophisticated coupling mechanisms between the prior and posterior. The "ghost sample" method remains a powerful theoretical tool, though practical applications still rely on data-splitting, highlighting a continued need for efficient sample utilization in generalization theory.

Summary updated

BibTeX
@misc{dziugaite2020role,
  author = {Gintare Karolina Dziugaite and Kyle Hsu and Waseem Gharbieh and Daniel M. Roy},
  title = {{On the role of data in PAC-Bayes bounds}},
  year = {2020},
  eprint = {2006.10929},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.10929},
}
Figure