PAC-Bayes bounds for general measurable spaces: Catoni, Hoeffding, and Gibbs oracle bounds #
Extends CslibFrontier.MachineLearning.PACBayes.Basic on arbitrary measurable hypothesis
spaces (Θ, mΘ) (including uncountable/continuous parameter spaces such as ℝᵈ with a Gaussian
or uniform prior), assuming joint measurability Measurable (Function.uncurry ℓ) of the
[0, 1]-bounded loss ℓ : Θ → Z → ℝ.
Using the Donsker–Varadhan change-of-measure inequality
(CslibFrontier.Probability.ChangeOfMeasure), the shared Tonelli–Markov and joint-measurability
helpers in CslibFrontier.MachineLearning.PACBayes.Basic, and Gibbs variational optimality
(CslibFrontier.Probability.DonskerVaradhan), this module proves:
- Catoni's PAC-Bayes bound [Catoni2007, Theorem 1.2.6] (exact constant
1— nolog morlog (m + 1)slack!). For any scalec > 0, define the convex, strictly increasing potentialcatoniPhi c p = -log (1 - p * (1 - exp (-c))) / con[0, 1]with inversecatoniInv c y = (1 - exp (-c * y)) / (1 - exp (-c)). With probability at least1 - δoverS ~ D^m, every posteriorQwithKL(Q ‖ P) < ∞satisfiescatoniPhi c (𝔼_Q L_D) ≤ 𝔼_Q L_S + (KL(Q ‖ P) + log (1 / δ)) / (c * m), equivalently𝔼_Q L_D ≤ catoniInv c (𝔼_Q L_S + (KL(Q ‖ P) + log (1 / δ)) / (c * m))and the linearized form𝔼_Q L_D ≤ (c / (1 - exp (-c))) * 𝔼_Q L_S + (KL(Q ‖ P) + log (1 / δ)) / (m * (1 - exp (-c))). - Realizable
O(1 / m)fast-rate PAC-Bayes bound. With probability at least1 - δoverS ~ D^m, every posteriorQwithKL(Q ‖ P) < ∞and zero empirical risk (∫ θ, L_S(θ) ∂Q = 0) satisfies𝔼_Q L_D ≤ (KL(Q ‖ P) + log (1 / δ)) / m— without anylog mfactor. - Linear PAC-Bayes–Hoeffding (
PAC-Bayes-λ) bounds [Cat07] [Alquier2024, Theorem 2.1]. Upper and lower two-sided deviations for any inverse temperaturelam > 0:𝔼_Q L_D ≤ 𝔼_Q L_S + (KL(Q ‖ P) + log (1 / δ)) / lam + lam / (8 * m)(and reversed). - Gibbs posterior excess-risk oracle inequalities [Alq24]. With probability at least
1 - δ, the Gibbs posteriorQ̂ S = P.tilted (-lam * L_S)satisfies:- for any fixed comparator
QwithKL(Q ‖ P) < ∞:𝔼_{Q̂} L_D ≤ 𝔼_Q L_D + KL(Q ‖ P) / lam + lam / (4 * m) + 2 * log (2 / δ) / lam; - simultaneously for every (even data-dependent)
QwithKL(Q ‖ P) < ∞:𝔼_{Q̂} L_D ≤ 𝔼_Q L_D + 2 * KL(Q ‖ P) / lam + lam / (4 * m) + 2 * log (2 / δ) / lam.
- for any fixed comparator
(The general measurable McAllester log (√m / δ) bound
measure_pi_exists_integral_risk_gt_of_measurable lives directly in
CslibFrontier.MachineLearning.PACBayes.Basic.)
Differences from the sources: δ < 1 is not required; posteriors with klDiv Q P = ⊤ are
excluded (for which the bounds are vacuous); losses are required to be jointly measurable in
Θ × Z and valued in [0, 1].
Main definitions #
Cslib.MachineLearning.PACBayes.catoniPhi: Catoni's log-Laplace potentialΦ_c.Cslib.MachineLearning.PACBayes.catoniInv: inverseΦ_c⁻¹.
Main results #
Cslib.MachineLearning.PACBayes.convexOn_catoniPhi: convexity ofcatoniPhi con[0, 1].Cslib.MachineLearning.PACBayes.measure_pi_exists_catoniPhi_integral_risk_gt,Cslib.MachineLearning.PACBayes.measure_pi_exists_catoni_integral_risk_gt,Cslib.MachineLearning.PACBayes.measure_pi_exists_catoni_linear_integral_risk_gt: Catoni's PAC-Bayes bound [Catoni2007, Theorem 1.2.6].Cslib.MachineLearning.PACBayes.measure_pi_exists_realizable_integral_risk_gt: fast-rateO(1 / m)PAC-Bayes bound for zero-empirical-risk posteriors.Cslib.MachineLearning.PACBayes.measure_pi_exists_hoeffding_integral_risk_gt,Cslib.MachineLearning.PACBayes.measure_pi_exists_hoeffding_integral_risk_lt: upper and lower linear PAC-Bayes–Hoeffding bounds [Alquier2024, Theorem 2.1].Cslib.MachineLearning.PACBayes.measure_pi_gibbs_fixed_oracle_gt,Cslib.MachineLearning.PACBayes.measure_pi_gibbs_oracle_gt: excess-risk oracle inequalities for the Gibbs posteriorP.tilted (fun θ => -lam * empiricalRisk ℓ S θ).
References #
Exact section and page locators below are unverified against primary PDFs (pending an outside-fleet source check).
- O. Catoni, PAC-Bayesian Supervised Classification: The Thermodynamics of Statistical Learning, Theorem 1.2.6 (locator unverified against primary PDF)
- P. Alquier, User-friendly Introduction to PAC-Bayes Bounds, Theorem 2.1 (locator unverified against primary PDF)
Catoni potential Φ_c and its inverse #
Catoni's log-Laplace potential Φ_c(p) = -log (1 - p * (1 - exp (-c))) / c for c > 0
and p ∈ [0, 1] [Cat07] (locator unverified).
Inverse of Catoni's potential: Φ_c⁻¹(y) = (1 - exp (-c * y)) / (1 - exp (-c)).
catoniInv c is strictly increasing for c > 0.
Exponential moment bounds #
Catoni's PAC-Bayes theorem #
Catoni's PAC-Bayes bound (Φ_c form) [Catoni2007, Theorem 1.2.6] (locator unverified):
for any measurable hypothesis space Θ (countable or uncountable), jointly measurable loss
ℓ : Θ → Z → ℝ valued in [0, 1], probability prior P on Θ, m ≥ 1, scale c > 0, and
δ > 0, with probability at least 1 - δ over S ~ D^m, every probability posterior Q with
KL(Q ‖ P) < ∞ satisfies
catoniPhi c (𝔼_Q L_D) ≤ 𝔼_Q L_S + (KL(Q ‖ P) + log (1 / δ)) / (c * m).
Catoni's PAC-Bayes bound (inverted explicit risk bound) [Catoni2007, Theorem 1.2.6]
(locator unverified): for any measurable hypothesis space Θ, scale c > 0, m ≥ 1, and δ > 0,
with probability at least 1 - δ, every posterior Q with KL(Q ‖ P) < ∞ satisfies
𝔼_Q L_D ≤ catoniInv c (𝔼_Q L_S + (KL(Q ‖ P) + log (1 / δ)) / (c * m)).
Linearized Catoni PAC-Bayes bound: replacing catoniInv c y by c * y / (1 - exp (-c))
yields
𝔼_Q L_D ≤ (c / (1 - exp (-c))) * 𝔼_Q L_S + (KL(Q ‖ P) + log (1 / δ)) / (m * (1 - exp (-c))).
Realizable fast-rate O(1 / m) PAC-Bayes bound (zero log m factor): on an arbitrary
measurable hypothesis space Θ, with probability at least 1 - δ over S ~ D^m, every
posterior Q with KL(Q ‖ P) < ∞ and zero empirical risk (∫ θ, L_S(θ) ∂Q = 0) satisfies
𝔼_Q L_D ≤ (KL(Q ‖ P) + log (1 / δ)) / m.
Linear PAC-Bayes–Hoeffding (PAC-Bayes-λ) and McAllester bounds #
Linear PAC-Bayes–Hoeffding bound (PAC-Bayes-λ, upper tail) [Cat07]
[Alquier2024, Theorem 2.1] (locators unverified): for any measurable Θ, inverse temperature
lam > 0, m ≥ 1, and δ > 0, with probability at least 1 - δ, every posterior Q with
KL(Q ‖ P) < ∞ satisfies
𝔼_Q L_D ≤ 𝔼_Q L_S + (KL(Q ‖ P) + log (1 / δ)) / lam + lam / (8 * m).
Linear PAC-Bayes–Hoeffding bound (PAC-Bayes-λ, lower tail) [Cat07]
[Alquier2024, Theorem 2.1] (locators unverified): with probability at least 1 - δ, every
posterior Q with KL(Q ‖ P) < ∞ satisfies
𝔼_Q L_S ≤ 𝔼_Q L_D + (KL(Q ‖ P) + log (1 / δ)) / lam + lam / (8 * m).
Gibbs posterior excess-risk oracle inequalities #
Uniform oracle inequality for the Gibbs posterior [Alq24] [Cat07] (locators
unverified): letting Q̂ S := P.tilted (fun θ => -lam * empiricalRisk ℓ S θ), with probability
at least 1 - δ over S ~ D^m, simultaneously for every comparator probability measure Q
with KL(Q ‖ P) < ∞,
𝔼_{Q̂} L_D ≤ 𝔼_Q L_D + 2 * KL(Q ‖ P) / lam + lam / (4 * m) + 2 * log (2 / δ) / lam.
Sharp oracle inequality for the Gibbs posterior against a fixed comparator Q
[Alq24] (locator unverified): because Q is fixed before observing S, Hoeffding's lower
tail applies with prior Q (KL(Q ‖ Q) = 0), reducing the factor on KL(Q ‖ P) from 2 to
1:
𝔼_{Q̂} L_D ≤ 𝔼_Q L_D + KL(Q ‖ P) / lam + lam / (4 * m) + 2 * log (2 / δ) / lam.