Documentation

CslibFrontier.MachineLearning.PACLearning.SampleComplexityLower.EHKVProof

EHKV Proof Assembly #

This module assembles the Markov bound, involution pairing, and adversarial measure construction into the marginal-sample-space form of the EHKV proof.

The lower-bound argument here works on the marginal sample space Fin m → α under a probability measure P : Measure α, with concepts viewed as Set α. The translation to the joint sample space LabeledSample α Bool m under a realizable distribution D = P.map (x ↦ (x, c x)) is performed in SampleComplexityLower.lean via pi_map_sampleOf.

Main statements #

References #

theorem Cslib.MachineLearning.PACLearning.markov_bad_samples {α : Type u_1} [MeasurableSpace α] [MeasurableSingletonClass α] {W : Finset α} {w₀ : α} (hw₀ : w₀ ∈ W) (hW_card : 2 ≤ W.card) {ε' : ℝ} (hε'_pos : 0 < ε') (hε'_le : ε' ≤ 1 / 8) {m : ℕ} (hm : ↑m < ↑(W.erase w₀).card / (32 * ε')) (P : MeasureTheory.Measure α) [MeasureTheory.IsProbabilityMeasure P] (hP_w : ∀ w ∈ W.erase w₀, P {w} = ENNReal.ofReal (8 * ε' / ↑(W.erase w₀).card)) :
ENNReal.ofReal (1 / 2) < (MeasureTheory.Measure.pi fun (x : Fin m) => P) {xs : Fin m → α | (seenElements (W.erase w₀) xs).card ≤ (W.erase w₀).card / 2}

Lemma 3 [EHKV89]: Markov bound on bad samples (in the form used for this development's confidence range δ < 1/14; the source states its lemmas for δ ≤ 1/100).

When the sample size m satisfies m < d / (32ε), the probability (under the product measure P^m) that the sample reveals at most half of the shattered set W' exceeds 1/2.

theorem Cslib.MachineLearning.PACLearning.ehkv_sum_lower_bound {α : Type u_1} [MeasurableSpace α] [MeasurableSingletonClass α] {W : Finset α} (hW_card : 2 ≤ W.card) {w₀ : α} (hw₀ : w₀ ∈ W) {ε' : ℝ} (hε'_pos : 0 < ε') {m : ℕ} (A' : LabeledSample α Bool m → Set α) (P : MeasureTheory.Measure α) [MeasureTheory.IsProbabilityMeasure P] (hP_w : ∀ w ∈ W.erase w₀, P {w} = ENNReal.ofReal (8 * ε' / ↑(W.erase w₀).card)) (hP_supp : P (↑W)ᶜ = 0) (concepts : Finset α → Set α) (hconcepts_eq : ∀ S ∈ (W.erase w₀).powerset, concepts S ∩ ↑W = {w₀} ∪ ↑S) :
(2 ^ (W.erase w₀).card / 2) • (MeasureTheory.Measure.pi fun (x : Fin m) => P) {xs : Fin m → α | (seenElements (W.erase w₀) xs).card ≤ (W.erase w₀).card / 2} ≤ ∑ S ∈ (W.erase w₀).powerset, (MeasureTheory.Measure.pi fun (x : Fin m) => P) {xs : Fin m → α | hypothesisError P (A' (sampleOf (concepts S) xs)) (concepts S) > ENNReal.ofReal ε'}

Per-learner half-fraction sum lower bound: for any set-valued learner A' and any assignment of concepts to subsets of W' = W \ {w₀} satisfying the shattering intersection property, the weighted measure of "bad" samples is bounded by the sum of failure measures over the powerset.

theorem Cslib.MachineLearning.PACLearning.ehkv_final_contradiction {d : ℕ} (hd_pos : 0 < d) {μB : ENNReal} (hB_prob : ENNReal.ofReal (1 / 2) < μB) (h_combined : (2 ^ d / 2) • μB < 2 ^ d • ENNReal.ofReal (1 / 14)) :

The final arithmetic contradiction in the EHKV argument: if (2^d/2) • μ(B) < 2^d • (1/14)but1/2 < μ(B), then μ(B) ≤ 1/7 < 1/2`, a contradiction.

theorem Cslib.MachineLearning.PACLearning.exists_bad_concept_marginal {α : Type u_1} [MeasurableSpace α] [MeasurableSingletonClass α] {C_set : Set (Set α)} {W : Finset α} (hW : ∀ W' ⊆ ↑W, ∃ c ∈ C_set, c ∩ ↑W = W') (hW_card : 2 ≤ W.card) {m : ℕ} {ε δ : ENNReal} (hε_pos : 0 < ε) (hε_le : ε ≤ ENNReal.ofReal (1 / 8)) (hδ_lt : δ < ENNReal.ofReal (1 / 14)) (hm : ↑m < ENNReal.ofReal ((↑W.card - 1) / (32 * ε.toReal))) {Ω : Type u_2} [MeasurableSpace Ω] (Q : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure Q] (A : Ω → LabeledSample α Bool m → Set α) (hA_aem : ∀ (P : MeasureTheory.Measure α) [MeasureTheory.IsProbabilityMeasure P], P (↑W)ᶜ = 0 → ∀ c ∈ C_set, AEMeasurable (fun (ω : Ω) => (MeasureTheory.Measure.pi fun (x : Fin m) => P) {xs : Fin m → α | hypothesisError P (A ω (sampleOf c xs)) c > ε}) Q) :
∃ (P : MeasureTheory.Measure α) (_ : MeasureTheory.IsProbabilityMeasure P) (_ : P (↑W)ᶜ = 0), ∃ c ∈ C_set, δ < ∫⁻ (ω : Ω), (MeasureTheory.Measure.pi fun (x : Fin m) => P) {xs : Fin m → α | hypothesisError P (A ω (sampleOf c xs)) c > ε} ∂Q

Marginal-space EHKV witness lemma: If the sample size m is strictly less than (|W|-1)/(32ε), then for any randomized set-valued learner (Ω, Q, A) such that each per-concept failure event has a measurable failure function, there exist a concept c among the 2^d shattered concepts and an adversarial measure P such that the marginal-sample-space integrated failure exceeds δ.

This is the marginal-space form of EHKV; the headline IsRPACLearnerFor lower bound in SampleComplexityLower.lean follows by translating the joint-sample-space failure event to this marginal form via pi_map_sampleOf.