Documentation

CslibFrontier.MachineLearning.PACBayes.Inversion

Analytical inversions of the PAC-Bayes-kl bound (Pinsker and fast-rate forms) #

Derives explicit risk bounds from the implicit binary-relative-entropy inequality binaryKL q p ≤ c of CslibFrontier.MachineLearning.PACBayes.KL [See02] [Mau04] [TS13], building on the pure binaryKL lower bounds and analytical inversions in CslibFrontier.Probability.BinaryKL:

All four handle the boundary p = 1 (where binaryKL takes a finite junk value) via the shared almost-everywhere boundary lemma Cslib.MachineLearning.PACBayes.ae_forall_empiricalRisk_eq from CslibFrontier.MachineLearning.PACBayes.KL.

Main results #

References #

Exact section and page locators below are unverified against primary PDFs (pending an outside-fleet source check).

theorem Cslib.MachineLearning.PACBayes.measure_pi_exists_pinsker_risk_gt_of_binaryKL {ι : Type u_1} {Z : Type u_2} [MeasurableSpace Z] {D : MeasureTheory.Measure Z} [MeasureTheory.IsProbabilityMeasure D] {ℓ : ι → Z → ℝ} [MeasurableSpace ι] [Countable ι] [MeasurableSingletonClass ι] (hℓ : ∀ (i : ι), Measurable (ℓ i)) (hℓ01 : ∀ (i : ι) (z : Z), ℓ i z ∈ Set.Icc 0 1) {m : ℕ} (hm : 0 < m) (P : MeasureTheory.Measure ι) [MeasureTheory.IsProbabilityMeasure P] {δ : ℝ} (hδ : 0 < δ) :
(MeasureTheory.Measure.pi fun (x : Fin m) => D) {S : Fin m → Z | ∃ (Q : MeasureTheory.Measure ι), MeasureTheory.IsProbabilityMeasure Q ∧ InformationTheory.klDiv Q P ≠ ⊤ ∧ ∫ (i : ι), empiricalRisk ℓ S i ∂Q + √(((InformationTheory.klDiv Q P).toReal + Real.log ((↑m + 1) / δ)) / (2 * ↑m)) < ∫ (i : ι), trueRisk ℓ D i ∂Q} ≤ ENNReal.ofReal δ

Boundary-qualified Pinsker conversion of the PAC-Bayes-kl bound [See02] [Mau04] (locators unverified): for 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 ((m + 1) / δ)) / (2 * m)). (Denominator 2 * m, replacing 2 * (m - 1) from McAllester's form in CslibFrontier.MachineLearning.PACBayes.Basic.)

theorem Cslib.MachineLearning.PACBayes.measure_pi_exists_fastRate_risk_gt_of_binaryKL {ι : Type u_1} {Z : Type u_2} [MeasurableSpace Z] {D : MeasureTheory.Measure Z} [MeasureTheory.IsProbabilityMeasure D] {ℓ : ι → Z → ℝ} [MeasurableSpace ι] [Countable ι] [MeasurableSingletonClass ι] (hℓ : ∀ (i : ι), Measurable (ℓ i)) (hℓ01 : ∀ (i : ι) (z : Z), ℓ i z ∈ Set.Icc 0 1) {m : ℕ} (hm : 0 < m) (P : MeasureTheory.Measure ι) [MeasureTheory.IsProbabilityMeasure P] {δ : ℝ} (hδ : 0 < δ) :
(MeasureTheory.Measure.pi fun (x : Fin m) => D) {S : Fin m → Z | ∃ (Q : MeasureTheory.Measure ι), MeasureTheory.IsProbabilityMeasure Q ∧ InformationTheory.klDiv Q P ≠ ⊤ ∧ have q := ∫ (i : ι), empiricalRisk ℓ S i ∂Q; have c := ((InformationTheory.klDiv Q P).toReal + Real.log ((↑m + 1) / δ)) / ↑m; q + c + √(c ^ 2 + 2 * q * c) < ∫ (i : ι), trueRisk ℓ D i ∂Q} ≤ ENNReal.ofReal δ

Sharp quadratic fast-rate inversion of PAC-Bayes-kl [TS13] (locator unverified): setting c = (KL(Q ‖ P) + log ((m + 1) / δ)) / m, with probability at least 1 - δ, every posterior Q with KL(Q ‖ P) < ∞ satisfies 𝔼_Q L_D ≤ 𝔼_Q L_S + c + √(c ^ 2 + 2 * (𝔼_Q L_S) * c).

theorem Cslib.MachineLearning.PACBayes.measure_pi_exists_tolstikhin_risk_gt_of_binaryKL {ι : Type u_1} {Z : Type u_2} [MeasurableSpace Z] {D : MeasureTheory.Measure Z} [MeasureTheory.IsProbabilityMeasure D] {ℓ : ι → Z → ℝ} [MeasurableSpace ι] [Countable ι] [MeasurableSingletonClass ι] (hℓ : ∀ (i : ι), Measurable (ℓ i)) (hℓ01 : ∀ (i : ι) (z : Z), ℓ i z ∈ Set.Icc 0 1) {m : ℕ} (hm : 0 < m) (P : MeasureTheory.Measure ι) [MeasureTheory.IsProbabilityMeasure P] {δ : ℝ} (hδ : 0 < δ) :
(MeasureTheory.Measure.pi fun (x : Fin m) => D) {S : Fin m → Z | ∃ (Q : MeasureTheory.Measure ι), MeasureTheory.IsProbabilityMeasure Q ∧ InformationTheory.klDiv Q P ≠ ⊤ ∧ have q := ∫ (i : ι), empiricalRisk ℓ S i ∂Q; have c := ((InformationTheory.klDiv Q P).toReal + Real.log ((↑m + 1) / δ)) / ↑m; q + √(2 * q * c) + 2 * c < ∫ (i : ι), trueRisk ℓ D i ∂Q} ≤ ENNReal.ofReal δ

Relaxed square-root fast-rate PAC-Bayes bound [TS13] (locator unverified): 𝔼_Q L_D ≤ 𝔼_Q L_S + √(2 * 𝔼_Q L_S * c) + 2 * c where c = (KL(Q ‖ P) + log ((m + 1) / δ)) / m.

theorem Cslib.MachineLearning.PACBayes.measure_pi_exists_zero_risk_gt_of_binaryKL {ι : Type u_1} {Z : Type u_2} [MeasurableSpace Z] {D : MeasureTheory.Measure Z} [MeasureTheory.IsProbabilityMeasure D] {ℓ : ι → Z → ℝ} [MeasurableSpace ι] [Countable ι] [MeasurableSingletonClass ι] (hℓ : ∀ (i : ι), Measurable (ℓ i)) (hℓ01 : ∀ (i : ι) (z : Z), ℓ i z ∈ Set.Icc 0 1) {m : ℕ} (hm : 0 < m) (P : MeasureTheory.Measure ι) [MeasureTheory.IsProbabilityMeasure P] {δ : ℝ} (hδ : 0 < δ) :

Realizable 1 - exp (-c) corollary of the PAC-Bayes-kl bound: when 𝔼_Q L_S = 0, 𝔼_Q L_D ≤ 1 - exp (-((KL(Q ‖ P) + log ((m + 1) / δ)) / m)) (strictly tighter than c).