Corollary 10.4 — ranking margin bound for the convex hull (both inequalities; )
DisprovedFoundationsML.Ranking.margin_bound_ranking_convex_hull_v2Statement (Corollary 10.4, p. 250, PDF p. 267). Let be a set of real-valued (measurable) functions mapping into a bounded interval and a -valued (measurable) preference function. Fix ; then, for any , with probability at least over the choice of a sample of size , each of the following holds for all :
Here is the set (7.12) of Lemma 7.4 (sub-convex combinations ).
Formalization Note. The retired version allowed (every sample-dependent term is Lean's ), stated only (10.17), and used a convex hull with whereas the book's here is Lemma 7.4's set (7.12) with (corrected module ConvHull_v2). Changes: , ; both displayed inequalities, each at confidence ; bounded (Definition 3.1's domain); the book's standing measurability of the functions in and of (footnote 2) and of the supremum defining (footnote 3) explicit; the corrected EmpiricalRademacherComplexity/RademacherComplexity (_v2).
import Mathlib import Definitions.Def_FoundationsML_Ranking_GeneralizationError import Definitions.Def_FoundationsML_Ranking_EmpiricalMarginLoss import Definitions.Def_FoundationsML_Ranking_RademacherComplexity_v2 import Definitions.Def_FoundationsML_Ranking_ConvHull_v2 open MeasureTheory
namespace FoundationsML.Ranking
/-- Corollary 10.4 (Mohri, Rostamizadeh & Talwalkar, *Foundations of Machine Learning*, 2nd
ed., MIT Press 2018, p. 250, PDF p. 267). Let `H` be a set of real-valued functions (bounded,
as Definition 3.1 requires) and `f` a `{−1,+1}`-valued preference function. Fix `ρ > 0`; then,
for any `δ > 0`, with probability at least `1 − δ` over the choice of a sample `S` of size
`m ≥ 1`, each of the following holds for all `h ∈ conv(H)`:
`R(h) ≤ R̂_{S,ρ}(h) + (2/ρ)(R_m^{D1}(H) + R_m^{D2}(H)) + sqrt(log(1/δ)/(2m))` (10.17)
and `R(h) ≤ R̂_{S,ρ}(h) + (2/ρ)(R̂_{S1}(H) + R̂_{S2}(H)) + 3·sqrt(log(2/δ)/(2m))` (10.18).
**Formalization Note.** Replaces `margin_bound_ranking_convex_hull`, which allowed `m = 0`
(every sample-dependent term is then Lean's `x / 0 = 0`), stated only (10.17), and used a
convex hull with `∑ μ_k = 1` whereas the book's `conv(H)` here is the set (7.12) of Lemma 7.4
(`∑ μ_k ≤ 1`; corrected module `ConvHull_v2`). Changes: `m ≥ 1`, `δ ∈ (0,1)`; both displayed
inequalities, each with probability at least `1 − δ`; `H` bounded (`hHb`, Definition 3.1's
domain); the book's standing measurability of the functions in `H` and of `f` (footnote 2,
p. 10) and of the supremum defining `R̂_S(H)` (footnote 3, p. 30, `hHsup`) are explicit; the
corrected `EmpiricalRademacherComplexity`/`RademacherComplexity` (`_v2`) are used. -/
theorem margin_bound_ranking_convex_hull_v2
{X : Type*} [MeasurableSpace X] (D : Measure (X × X)) [IsProbabilityMeasure D]
(f : X × X → ℝ) (hf : ∀ p, f p = 1 ∨ f p = -1) (hf_meas : Measurable f)
(H : Set (X → ℝ)) (hHb : ∃ a b : ℝ, ∀ h ∈ H, ∀ x, h x ∈ Set.Icc a b)
(hHmeas : ∀ h ∈ H, Measurable h)
(ρ : ℝ) (hρ : 0 < ρ) (m : ℕ) (hm : 0 < m)
(hHsup : Measurable (fun S : Fin m → X => EmpiricalRademacherComplexity H S))
(δ : ℝ) (hδ : 0 < δ) (hδ1 : δ < 1) :
(1 - δ) ≤ (Measure.pi (fun _ : Fin m => D)
{S : Fin m → X × X | ∀ h ∈ ConvHull H,
GeneralizationError D f h ≤
EmpiricalMarginLoss ρ (fun i => (S i).1) (fun i => (S i).2) (fun i => f (S i)) h +
(2 / ρ) * (RademacherComplexity (Measure.map Prod.fst D) H m +
RademacherComplexity (Measure.map Prod.snd D) H m) +
Real.sqrt (Real.log (1 / δ) / (2 * m))}).toReal ∧
(1 - δ) ≤ (Measure.pi (fun _ : Fin m => D)
{S : Fin m → X × X | ∀ h ∈ ConvHull H,
GeneralizationError D f h ≤
EmpiricalMarginLoss ρ (fun i => (S i).1) (fun i => (S i).2) (fun i => f (S i)) h +
(2 / ρ) * (EmpiricalRademacherComplexity H (fun i => (S i).1) +
EmpiricalRademacherComplexity H (fun i => (S i).2)) +
3 * Real.sqrt (Real.log (2 / δ) / (2 * m))}).toReal := by sorry
end FoundationsML.Ranking