Roadmap
A Gibbs posterior can be obtained by minimising an empirical PAC-Bayes bound. We derive the additive, bounded-loss version of Catoni’s bound presented in Alquier (2024, Theorem 2.1 and Corollary 2.3), which attributes this argument to Catoni (2003). Donsker and Varadhan’s variational formula appears twice: first to obtain a bound valid simultaneously over distributions, then to identify its Gibbs minimiser. A short oracle inequality clarifies what this optimisation achieves; the final sections distinguish Gibbs risk from mixture risk and compare alternative foundations.
PAC-Bayes Motivation
Setup
Consider regression with covariates X\in\mathcal X and a real-valued response Y\in\mathbb R. Let S=((X_1,Y_1),\ldots,(X_n,Y_n))\sim P^n be an independent and identically distributed training sample from their joint distribution P. Let \{f_\theta:\mathcal X\to\mathbb R:\theta\in\Theta\} be a family of predictors on a measurable parameter space \Theta, and let \ell(\widehat y,y) measure prediction loss. Assume that (\theta,x,y)\mapsto\ell(f_\theta(x),y) is jointly measurable and takes values in [0,C], where 0<C<\infty. Define
R(\theta)=\mathbb E_{(X,Y)\sim P}[\ell(f_\theta(X),Y)], \qquad r_S(\theta)=\frac1n\sum_{i=1}^n\ell(f_\theta(X_i),Y_i).
For squared loss \ell(\widehat y,y)=(\widehat y-y)^2, the bounded-loss assumption holds, for example, when both outcomes and predictions lie in [-M,M], in which case C=4M^2. The theorem below does not cover unrestricted squared-loss regression without further assumptions.
For a probability measure \rho\in\mathcal P(\Theta), write
R(\rho)=\mathbb E_{\theta\sim\rho}[R(\theta)], \qquad r_S(\rho)=\mathbb E_{\theta\sim\rho}[r_S(\theta)].
Fix a probability measure \pi independently of S. This prior is a reference measure; the argument does not require it to describe beliefs about a true parameter. We use
\mathrm{KL}(\rho\Vert\pi) =\int_\Theta\log\left(\frac{d\rho}{d\pi}\right)d\rho
when \rho\ll\pi, and set it to +\infty otherwise. Absolute continuity alone does not guarantee finite KL.
After observing S, a learning rule may select a distribution \rho_S measurably. Conditional on S, R(\rho_S) is the expected loss of drawing \theta\sim\rho_S, predicting Y by f_\theta(X), and evaluating the loss on an independent test pair (X,Y)\sim P. Drawing once and reusing that predictor gives the same expected risk, averaged over the initial draw. It does not make every draw equally good.
A PAC-Bayes guarantee has the form
\mathbb P_S\bigl(R(\rho_S)\leq B(S,\rho_S)\bigr)\geq1-\delta.
The probability concerns repeated training samples. Prediction randomness and test-data randomness have already been averaged inside R(\rho_S). Thus 1-\delta is neither posterior credibility nor the probability that an individual posterior draw has small risk.
Empirical v.s. Oracle Bounds
An empirical bound controls R(\rho_S) by sample-dependent quantities, such as empirical risk and KL. It provides a numerical certificate when those quantities can be evaluated, and an objective for choosing \rho_S. An oracle bound compares R(\rho_S) with unknown population risks of competing distributions, plus a complexity penalty. It describes statistical performance relative to a benchmark, rather than a directly evaluable certificate. We obtain both below.
Donsker and Varadhan’s Lemma
For bounded measurable h:\Theta\to\mathbb R, the variational formula is (Donsker and Varadhan 1976; Alquier 2024, Lemma 2.2)
\log\mathbb E_\pi[e^h] =\sup_{\rho\in\mathcal P(\Theta)} \left\{\mathbb E_\rho[h]-\mathrm{KL}(\rho\Vert\pi)\right\}. \tag{1}
The unique maximiser is the exponential tilt \pi_h, defined by
\frac{d\pi_h}{d\pi}(\theta) =\frac{e^{h(\theta)}}{\mathbb E_\pi[e^h]}.
Proof. Boundedness of h makes the normaliser positive and finite, and makes \pi_h equivalent to \pi. For every \rho with finite \mathrm{KL}(\rho\Vert\pi), the density ratio satisfies
\frac{d\rho}{d\pi_h} =\frac{d\rho/d\pi}{d\pi_h/d\pi} =\frac{d\rho}{d\pi}\frac{\mathbb E_\pi[e^h]}{e^h}.
Taking its logarithm and then averaging under \rho gives
\begin{aligned} \mathrm{KL}(\rho\Vert\pi_h) &=\mathbb E_\rho\left[ \log\frac{d\rho}{d\pi}-h+\log\mathbb E_\pi[e^h] \right]\\ &=\mathrm{KL}(\rho\Vert\pi)-\mathbb E_\rho[h] +\log\mathbb E_\pi[e^h]. \end{aligned}
To see the rearrangement explicitly, move \mathbb E_\rho[h] to the left and \mathrm{KL}(\rho\Vert\pi_h) to the right, then subtract \mathrm{KL}(\rho\Vert\pi):
\begin{aligned} \mathbb E_\rho[h]-\mathrm{KL}(\rho\Vert\pi) &=\log\mathbb E_\pi[e^h]-\mathrm{KL}(\rho\Vert\pi_h)\\ &\leq\log\mathbb E_\pi[e^h]. \end{aligned}
The last inequality uses nonnegativity of KL. Its right-hand side does not depend on \rho, so it bounds the supremum in Equation 1 from above. To show that this bound is attained, take \rho=\pi_h: then \mathrm{KL}(\pi_h\Vert\pi_h)=0, and the displayed inequality becomes equality. Hence the supremum equals \log\mathbb E_\pi[e^h], and its unique maximiser is \pi_h, since KL vanishes only when its two measures agree. Measures with infinite KL contribute -\infty to the supremum and cannot improve it.
The formula converts a prior exponential average into a supremum over distributions, with KL measuring the cost of changing measure.
Catoni’s PAC-Bayes Bound
Theorem (additive Hoeffding–Catoni bound). Fix \lambda>0 and \delta\in(0,1) before observing S. Under the setup above, with probability at least 1-\delta, simultaneously for every \rho\in\mathcal P(\Theta),
R(\rho) \leq \underbrace{ r_S(\rho)+\frac{\mathrm{KL}(\rho\Vert\pi)+\log(1/\delta)}{\lambda} +\frac{\lambda C^2}{8n} }_{B_{\lambda,\delta}(S,\rho)}. \tag{2}
We use the additive bounded-loss form. The name Catoni bound is also used for other, sharper formulations, particularly for binary losses.
Complete Derivation
1. Hoeffding controls a fixed parameter. For fixed \theta, put U_i=R(\theta)-\ell(f_\theta(X_i),Y_i). These variables are independent, centred, and lie in an interval of width C. Applying the exponential-moment lemma in the auxiliary section with t=\lambda/n gives
\begin{aligned} \mathbb E_S e^{\lambda[R(\theta)-r_S(\theta)]} &=\prod_{i=1}^n\mathbb E_S e^{(\lambda/n)U_i}\\ &\leq\prod_{i=1}^n e^{\lambda^2C^2/(8n^2)} =e^{\lambda^2C^2/(8n)}. \end{aligned}
2. Integrate under the prior and apply Tonelli. The exponential is nonnegative and jointly measurable. Since \pi is fixed independently of the sample, Tonelli’s theorem gives
\mathbb E_S\mathbb E_\pi e^{\lambda(R-r_S)} =\mathbb E_\pi\mathbb E_S e^{\lambda(R-r_S)} \leq e^{\lambda^2C^2/(8n)}.
3. Use DV to make the statement uniform. For each realised sample, apply Equation 1 with the bounded function h_S(\theta)=\lambda[R(\theta)-r_S(\theta)]. Define
\begin{aligned} V(S) &=\sup_\rho\left\{ \lambda[R(\rho)-r_S(\rho)]-\mathrm{KL}(\rho\Vert\pi) \right\}-\frac{\lambda^2C^2}{8n}\\ &=\log\mathbb E_\pi e^{\lambda(R-r_S)} -\frac{\lambda^2C^2}{8n}. \end{aligned}
The second expression also establishes measurability of the supremum. Step 2 now reads \mathbb E_S[e^{V(S)}]\leq1.
4. Apply Markov’s inequality to the exponential. This is the Chernoff bounding technique:
\mathbb P_S\bigl(V(S)>\log(1/\delta)\bigr) =\mathbb P_S\bigl(e^{V(S)}>1/\delta\bigr) \leq\delta\mathbb E_S[e^{V(S)}] \leq\delta.
On the complementary event, every term in the supremum is at most \log(1/\delta)+\lambda^2C^2/(8n). Rearranging and dividing by \lambda proves Equation 2. The inequality is vacuous for infinite KL.
There is one event on which the bound holds for all \rho. Consequently we may substitute a data-dependent \rho_S on that event. Applying a fixed-parameter concentration inequality directly to a fitted parameter would not justify this step.
Gibbs Posteriors as Bound Minimisers
DV Strikes Again
For fixed \lambda, the only terms in Equation 2 depending on \rho are
F_\lambda(\rho) =r_S(\rho)+\frac1\lambda\mathrm{KL}(\rho\Vert\pi).
Apply Equation 1 with h=-\lambda r_S. Writing Z_\lambda(S)=\mathbb E_\pi[e^{-\lambda r_S}], we obtain
\inf_\rho F_\lambda(\rho) =-\frac1\lambda\log Z_\lambda(S), \qquad \frac{d\widehat\rho_\lambda}{d\pi}(\theta) =\frac{e^{-\lambda r_S(\theta)}}{Z_\lambda(S)}. \tag{3}
This Gibbs posterior exists because e^{-\lambda C}\leq Z_\lambda(S)\leq1. More explicitly, the same KL calculation gives
F_\lambda(\rho) =-\frac1\lambda\log Z_\lambda(S) +\frac1\lambda\mathrm{KL}(\rho\Vert\widehat\rho_\lambda).
Thus \widehat\rho_\lambda is the unique minimiser over all probability measures. Substitution into the simultaneous bound yields, with probability at least 1-\delta,
\begin{aligned} R(\widehat\rho_\lambda) &\leq\inf_\rho B_{\lambda,\delta}(S,\rho)\\ &=-\frac1\lambda\log Z_\lambda(S) +\frac{\lambda C^2}{8n} +\frac{\log(1/\delta)}{\lambda}. \end{aligned} \tag{4}
Our convention puts \lambda on the average loss. If the update is written \rho(d\theta)\propto\exp\{-\eta\sum_i\ell(f_\theta(X_i),Y_i)\}\pi(d\theta), then \lambda=n\eta.
What does Minimising the Bound Establish?
Changing \rho changes both sides of Equation 2. Nevertheless, uniformity makes the optimisation valid: the selected distribution has risk bounded by the smallest available certificate. It does not follow that \widehat\rho_\lambda minimises R(\rho), or even r_S(\rho) alone; it minimises the KL-regularised empirical objective F_\lambda.
For example, valid upper bounds R(\rho_1)=0.10\leq0.50 and R(\rho_2)=0.20\leq0.30 would favour \rho_2 when minimising the certificate, despite its larger risk. An oracle inequality supplies the missing comparison with population performance.
A Simple Oracle Inequality
The following is Alquier (2024, Theorem 4.2, Section 4.1.2, p. 233), written in our notation. We give a short proof by applying the empirical bound in both directions; the source gives the same argument on pp. 233–235.
Under the same assumptions, for fixed \lambda>0, with probability at least 1-\delta,
R(\widehat\rho_\lambda) \leq\inf_{\rho\in\mathcal P(\Theta)} \left\{R(\rho)+\frac{2\mathrm{KL}(\rho\Vert\pi)}{\lambda}\right\} +\frac{\lambda C^2}{4n} +\frac{2\log(2/\delta)}{\lambda}. \tag{5}
Proof. Apply Equation 2 with failure probability \delta/2, both to \ell and to the bounded loss \widetilde\ell(\widehat y,y)=C-\ell(\widehat y,y). For this second loss, population and empirical risks are C-R(\rho) and C-r_S(\rho), so rearranging its bound gives an upper bound on r_S(\rho)-R(\rho). A union bound gives, simultaneously for every finite-KL \rho,
R(\rho)\leq r_S(\rho)+\frac{\mathrm{KL}(\rho\Vert\pi)}{\lambda}+a, \qquad r_S(\rho)\leq R(\rho)+\frac{\mathrm{KL}(\rho\Vert\pi)}{\lambda}+a,
where a=\lambda C^2/(8n)+\log(2/\delta)/\lambda. Therefore, for every such comparator \rho,
\begin{aligned} R(\widehat\rho_\lambda) &\leq F_\lambda(\widehat\rho_\lambda)+a\\ &\leq F_\lambda(\rho)+a\\ &\leq R(\rho)+\frac{2\mathrm{KL}(\rho\Vert\pi)}{\lambda}+2a. \end{aligned}
Take the infimum over \rho to conclude. This elementary argument prioritises clarity over sharp constants.
Unlike Equation 4, Equation 5 contains unknown comparator risks. For any fixed finite-KL comparator, choosing \lambda proportional to \sqrt n makes the remainder vanish at order n^{-1/2}, with C and \delta fixed. Comparing with a best individual parameter may need an approximation argument: a point mass has infinite KL under a non-atomic prior. Risk control alone also does not establish calibrated credible regions.
How Else to Obtain Gibbs Posteriors?
The same exponential form has distinct foundations:
- Coherent generalised Bayesian updating. Bissiri et al. (2016) minimise expected cumulative loss plus \mathrm{KL}(\rho\Vert\pi). Their framework motivates KL through consistency between sequential and joint updates. With a fixed loss scale \eta, updating by \eta\ell_1 and then \eta\ell_2 multiplies the prior by e^{-\eta(\ell_1+\ell_2)}, yielding the Gibbs form with \lambda=n\eta. The coherence justification is within their stated framework; it is not a claim about every possible updating rule.
- Optimal information processing. Zellner (1988) derives ordinary Bayes by balancing specified input and output information. Up to terms constant in \rho, the criterion is \mathrm{KL}(\rho\Vert\pi)-\mathbb E_\rho\log L_S(\theta), whose minimiser is proportional to L_S\pi. Replacing -\log L_S by a scaled loss gives the same Gibbs variational problem; this loss-based extension should be distinguished from Zellner’s original likelihood argument.
- Likelihood tempering. For probabilistic regression, using conditional log loss -\log p_\theta(y\mid x) gives d\widehat\rho_\lambda/d\pi\propto\prod_i p_\theta(Y_i\mid X_i)^{\lambda/n}. Ordinary Bayes based on this conditional likelihood is the special case \lambda=n. This algebraic identity needs a positive finite normaliser, not the bounded-loss assumption used for the PAC guarantee.
These arguments justify the construction for different purposes. None alone establishes optimal mixture prediction or frequentist coverage of posterior credible regions.
Auxiliary Lemmas
Nonnegativity of KL
For \rho\ll\pi, put q=d\rho/d\pi. Since u\log u-u+1\geq0 for u\geq0, with equality only at u=1,
\mathrm{KL}(\rho\Vert\pi) =\int(q\log q-q+1)d\pi\geq0.
Equality holds precisely when q=1 \pi-almost everywhere, that is, \rho=\pi.
Hoeffding’s exponential-moment lemma
If a real random variable U\in[a,b] almost surely, then, for every t\in\mathbb R,
\mathbb E e^{t(U-\mathbb EU)} \leq e^{t^2(b-a)^2/8}.
This is the exponential-moment form underlying Hoeffding’s inequality (Hoeffding 1963).
Proof. Let K(t)=\log\mathbb E e^{t(U-\mathbb EU)}. Boundedness permits differentiation under the expectation. We have K(0)=K'(0)=0, and K''(t)=\operatorname{Var}_t(U) under the exponential tilt. Any distribution on [a,b] satisfies
\operatorname{Var}(U) =\inf_c\mathbb E(U-c)^2 \leq\mathbb E\left(U-\frac{a+b}{2}\right)^2 \leq\frac{(b-a)^2}{4}.
Taylor’s formula therefore yields
K(t)=t^2\int_0^1(1-s)K''(st)ds \leq\frac{t^2(b-a)^2}{8}.
Exponentiating proves the claim. For independent U_i\in[a_i,b_i], multiplication of moment bounds gives
\mathbb E\exp\left\{t\sum_{i=1}^n(U_i-\mathbb EU_i)\right\} \leq\exp\left\{\frac{t^2}{8}\sum_{i=1}^n(b_i-a_i)^2\right\}.
Markov and the Chernoff bounding technique
For W\geq0 and u>0, W\geq u\mathbf1\{W\geq u\} implies \mathbb P(W\geq u)\leq\mathbb EW/u. Applying this to W=e^{tV} gives, for any t>0 with finite exponential moment,
\mathbb P(V\geq s)\leq e^{-ts}\mathbb E[e^{tV}].
Taking the infimum over t>0 is Chernoff’s technique. For fixed \theta, Hoeffding’s moment bound gives
\mathbb P_S\bigl(R(\theta)-r_S(\theta)\geq s\bigr) \leq\inf_{t>0}\exp\left\{\frac{t^2C^2}{8n}-ts\right\} =\exp\left\{-\frac{2ns^2}{C^2}\right\}, \qquad s>0,
where the minimiser is t=4ns/C^2. The PAC-Bayes proof instead applies the exponential Markov step after prior integration and DV, which is what allows selection of \rho from the data.