Certifying Deep Network Risks and Individual Predictions with PAC-Bayes Loss via Localized Priors

Wengxiang Dong
1/1/2025

No confident code implementation found for this paper.

Abstract

As machine learning increasingly relies on large, opaque foundation models powering generative and agentic AI, deploying these systems in safety-critical contexts demands rigorous generalization guarantees beyond training data. PAC-Bayes theory provides principled certificates linking training performance to generalization risk, yet existing approaches remain impractical: simple theoretical priors yield vacuous bounds, while data-dependent priors require costly second-stage training or introduce bias.

Show full abstract

To bridge this critical gap, we propose a localized PAC-Bayes prior —a structured, computationally efficient prior softly concentrated around parameters favored during standard training. By integrating this localized prior directly into the standard training objective, we deliver practically tight generalization certificates with minimal workflow disruption. Under standard neural tangent kernel assumptions, our bound shrinks as networks widen and datasets grow, becoming negligible in realistic regimes. Empirically, we demonstrate tight generalization certificates on tasks ranging from image classification (MNIST, CIFAR, ImageNet) and NLP fine-tuning (GLUE) to semantic segmentation (Cityscapes), typically within three percentage points of test error at ImageNet scale. Additionally, our approach provides rigorous guarantees for individual predictions, selective rejection of uncertain predictions, adversarial robustness, and accurate calibration—directly addressing key requirements for trustworthy AI deployment.

DOISemantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{dong2025certifying,
  title  = {Certifying Deep Network Risks and Individual Predictions with PAC-Bayes Loss via Localized Priors},
  author = {Wengxiang Dong},
  year   = {2025},
  doi    = {10.52202/085713-5651},
  url    = {https://doi.org/10.52202/085713-5651},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/c8ece18262a21a0b3037ba235d2e54b08104927b.svg)](https://codeofpaper.com/paper/c8ece18262a21a0b3037ba235d2e54b08104927b)

Discussion