Lemma 25 (empirical error): second-moment expansion of
ProvedStabGen.Hypothesis.lemma25_empiricalLet be a probability distribution on , let the cost satisfy , and let be a symmetric deterministic learning algorithm whose losses are measurable. Let with , and let be independent of each other and of . Write and . Then for any indices ,
This is the generalized Rogers–Wagner lemma that opens the proof of Lemma 9: it expresses the second moment of the deviation through a few correlations of the loss.
Formalization Note The printed Lemma 25 has as its third term, copied from the leave-one-out inequality. The paper's own proof (p. 521) bounds by , and the rewriting as (pp. 521–522) uses ; the statement here is that corrected form. The lemma is printed "for any learning algorithm", but its proof uses the standing assumptions of §2.1 (symmetry, measurability) and the bound ; these are hypotheses here. is implicit in the existence of . Expectations over and are integrals against and .
import Mathlib import Definitions.Def_FoundationsML_Stability_Loss import Definitions.Def_FoundationsML_Stability_EmpiricalError import Definitions.Def_FoundationsML_Stability_GeneralizationError import Definitions.Def_StabGen_Hypothesis_Setting open MeasureTheory
namespace StabGen.Hypothesis
open FoundationsML.Stability
theorem lemma25_empirical {X Y Y' : Type*} [MeasurableSpace X] [MeasurableSpace Y]
(D : Measure (X × Y)) [IsProbabilityMeasure D] (L : Y' → Y → ℝ) (M : ℝ)
(hL : ∀ (y' : Y') (y : Y), 0 ≤ L y' y ∧ L y' y ≤ M)
(A : LearningAlgorithm X Y Y')
(hA : ∀ n : ℕ, Measurable (fun p : (Fin n → X × Y) × (X × Y) =>
Loss L (A (trainingSet p.1)) p.2))
(m : ℕ) (hm : 2 ≤ m) (i j : Fin m) (hij : i ≠ j) :
∫ S : Fin m → X × Y,
(GeneralizationError D L (A (trainingSet S)) - EmpiricalError L S (A (trainingSet S))) ^ 2
∂(Measure.pi fun _ : Fin m => D)
≤ ∫ p : ((Fin m → X × Y) × (X × Y)) × (X × Y),
Loss L (A (trainingSet p.1.1)) p.1.2 * Loss L (A (trainingSet p.1.1)) p.2
∂(((Measure.pi fun _ : Fin m => D).prod D).prod D)
- 2 * ∫ p : (Fin m → X × Y) × (X × Y),
Loss L (A (trainingSet p.1)) p.2 * Loss L (A (trainingSet p.1)) (p.1 i)
∂((Measure.pi fun _ : Fin m => D).prod D)
+ ∫ S : Fin m → X × Y,
Loss L (A (trainingSet S)) (S i) * Loss L (A (trainingSet S)) (S j)
∂(Measure.pi fun _ : Fin m => D)
+ M / (m : ℝ) * ∫ S : Fin m → X × Y, Loss L (A (trainingSet S)) (S i)
∂(Measure.pi fun _ : Fin m => D)
- 1 / (m : ℝ) * ∫ S : Fin m → X × Y,
Loss L (A (trainingSet S)) (S i) * Loss L (A (trainingSet S)) (S j)
∂(Measure.pi fun _ : Fin m => D) := by sorry
end StabGen.Hypothesis
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.