The PAC-Bayes-kl bound #
The PAC-Bayes-kl bound, [Seeger2002, Theorem 1] for losses in [0, 1]; Seeger states it for
the zero-one loss and [Maurer2004, Lemma 3] extends it. Hypotheses are indexed by a
countable type ι, ℓ i z ∈ [0, 1] is the loss of the hypothesis i on the example z, and
P is a prior on ι fixed before the sample. Under m ≥ 1 i.i.d. examples S from D and for
every δ > 0, with probability at least 1 - δ every probability measure Q on ι with
KL(Q ‖ P) < ∞ satisfies
kl(𝔼_{i∼Q} L_S(i) ‖ 𝔼_{i∼Q} L_D(i)) ≤ (KL(Q ‖ P) + log ((m + 1) / δ)) / m,
where kl(q ‖ p) is the binary relative entropy Cslib.Probability.binaryKL q p. The bound is
implicit in the true risk; inverting kl in its second argument bounds 𝔼_Q L_D, and the
bound is tighter than McAllester's (CslibFrontier.MachineLearning.PACBayes.Basic) when the
empirical risk is small.
The proof follows [Seeger2002, Appendix A] and [Maurer2004, Section 3]: the change-of-measure
inequality applied to
f(i) = m kl(L_S(i) ‖ L_D(i)), Jensen's inequality for kl
(Cslib.Probability.binaryKL_integral_le_integral), Maurer's exponential moment
𝔼_S exp (m kl(L_S(i) ‖ L_D(i))) ≤ m + 1
(Cslib.Probability.lintegral_exp_mul_binaryKL_sum_div_le) and Markov's inequality over the
prior (Cslib.MachineLearning.PACBayes.measure_ofReal_div_le_lintegral_le). The function f can
be unbounded under Q; its Q-integrability follows from the change of measure
(Cslib.Probability.integrable_of_lintegral_exp_ne_top). Jensen's inequality for kl needs
L_S(i) = L_D(i) whenever L_D(i) ∈ {0, 1}, where the true divergence is otherwise infinite;
this holds for every i on almost every sample.
Taking point-mass posteriors gives the Occam form: every hypothesis i with P {i} > 0
satisfies kl(L_S(i) ‖ L_D(i)) ≤ (log (1 / P {i}) + log ((m + 1) / δ)) / m.
Differences from the sources: the hypothesis space is countable with measurable singletons;
δ < 1 is not needed; posteriors with infinite divergence are excluded; each ℓ i must be
measurable. [Maurer2004, Theorem 5] proves the sharper log (2√m / δ) for m ≥ 8 from the
exponential moment bound 2√m of its Theorem 1, which is not formalized here.
Main results #
measure_pi_exists_binaryKL_integral_risk_gt: the PAC-Bayes-kl bound.measure_pi_exists_binaryKL_risk_gt: its Occam form for point-mass posteriors.
References #
On almost every nonempty sample, every hypothesis whose true risk is 0 or 1 has the same
empirical risk.
The PAC-Bayes-kl bound [Seeger2002, Theorem 1] [Mau04]: for a prior P on a
countable index, losses ℓ i z ∈ [0, 1], m ≥ 1 and δ > 0, the samples on which some
posterior Q with KL(Q ‖ P) < ∞ has
(KL(Q ‖ P) + log ((m + 1) / δ)) / m < kl(𝔼_Q L_S ‖ 𝔼_Q L_D) have probability at most δ.
The Occam form of the PAC-Bayes-kl bound: taking point-mass posteriors, with probability at
least 1 - δ every index i with P {i} > 0 satisfies
kl(L_S(i) ‖ L_D(i)) ≤ (log (1 / P {i}) + log ((m + 1) / δ)) / m.