Theorem 4.2: type I control and type II oracle inequality for the convexified NP classifier
ProvedNeymanPearsonClassification.np_classifier_oracle_inequalityLet , , and let be an -Lipschitz convex surrogate. Let , , be measurable base classifiers with values in , and . Assume (Assumption 1) that there is with . Let be the smallest such and .
Let be i.i.d. with law and i.i.d. with law . The two samples need not be independent of each other. Assume and . Let be any solution of
Then, with probability at least ,
and
This is the paper's main result: the convexified NP classifier respects the type I level with high probability and has near-optimal -type II error.
Formalization Note "Any solution" is stated uniformly: on one event of probability at least , every solution of the empirical program satisfies both bounds. The minimum over is an infimum over a nonempty set. The asymptotic remark that follows the theorem is not included.
import Mathlib import Definitions.Def_NeymanPearsonClassification_Basic open MeasureTheory ProbabilityTheory
namespace NeymanPearsonClassification
theorem np_classifier_oracle_inequality {d M : ℕ} (hM : 2 ≤ M)
(h : Fin M → EuclideanSpace ℝ (Fin d) → ℝ) (hh : IsBaseFamily h)
(Pm Pp : Measure (EuclideanSpace ℝ (Fin d))) [IsProbabilityMeasure Pm] [IsProbabilityMeasure Pp]
(φ : ℝ → ℝ) (hφ : IsConvexSurrogate φ) (L : ℝ) (hL : 0 < L) (hLip : LipschitzOnWith (Real.toNNReal L) φ (Set.Icc (-1) 1))
(δ α : ℝ) (hδ : δ ∈ Set.Ioo 0 1) (hα : α ∈ Set.Ioo 0 1)
(hA1 : ∃ ε : ℝ, 0 < ε ∧ ε < 1 ∧ (Hphi h Pm φ (ε * α)).Nonempty)
{nm np : ℕ} (hnm1 : 1 ≤ nm) (hnp : 1 ≤ np)
(hnm : nZero (kappa L M δ) (epsBar h Pm φ α) α ≤ nm)
{Omega : Type*} [MeasurableSpace Omega] (μ : Measure Omega) [IsProbabilityMeasure μ]
(Xm : Fin nm → Omega → EuclideanSpace ℝ (Fin d)) (Xp : Fin np → Omega → EuclideanSpace ℝ (Fin d))
(hXm : ∀ i, Measurable (Xm i)) (hXp : ∀ i, Measurable (Xp i))
(hXmind : iIndepFun Xm μ) (hXpind : iIndepFun Xp μ)
(hXmlaw : ∀ i, μ.map (Xm i) = Pm) (hXplaw : ∀ i, μ.map (Xp i) = Pp) :
μ {ω | ¬ ∀ f, IsNPClassifier h φ α (kappa L M δ) Finset.univ (fun i => Xm i ω)
Finset.univ (fun i => Xp i ω) f →
(typeI Pm f ≤ phiTypeI Pm φ f ∧ phiTypeI Pm φ f ≤ α) ∧
phiTypeII Pp φ f - minPhiTypeII h Pm Pp φ α ≤
4 * φ 1 * kappa L M δ / ((1 - epsBar h Pm φ α) * α * Real.sqrt nm) +
2 * kappa L M δ / Real.sqrt np} ≤ ENNReal.ofReal (2 * δ) := by sorry
end NeymanPearsonClassificationRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix natural numbers and with , and work on (Euclidean space with its Borel structure).
Base classifiers. Let be measurable functions taking values in . Let be the standard simplex. For write . The convex hull is .
Class-conditional laws. Let and be probability measures on .
Surrogate. Let satisfy the following on :
- is non-negative, non-decreasing, continuous and convex;
- ;
- for a real , is -Lipschitz: for all .
Nothing is assumed about outside .
Parameters. Let and , both open intervals.
Error functionals. For a function define:
- the type I error ;
- the -type I error ;
- the -type II error .
Constrained classes. For a real let .
The statement assumes there is some with such that .
Derived constants.
- is the infimum of all real with . Under the hypotheses above, this set is non-empty and bounded below by .
- The oracle value is
- The constant is
- The threshold is
the ceiling taken in , with negative values mapped to .
Sample sizes. Let and be natural numbers with , and .
Samples. Let be any probability space. On it take two families of measurable random vectors:
- , mutually independent, each with law ;
- , mutually independent, each with law .
No independence between the two families is assumed.
NP classifiers. For an outcome , a function is an NP classifier at if both of the following hold:
- and satisfies
- For every satisfying the same constraint,
The bad set. Let be the set of for which it is not true that every NP classifier at satisfies all three of:
In other words, is the set of at which at least one NP classifier violates at least one of these three inequalities.
Conclusion. The theorem asserts
where is applied to as an outer measure; is not asserted to be measurable.
Notes on scope.
- If no NP classifier exists at , then vacuously.
- When several minimizers exist, the bound must hold for all of them simultaneously.
- The ordinary type II error does not appear in the conclusion; only the -type II error does.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.