Rademacher bounds for binary classification #
For a binary concept class C on a finite domain α and a distribution D on labeled examples
α × Bool, the 0-1 losses (x, y) ↦ 𝟙[h x ≠ y] of the concepts h ∈ C form the class
bitClass (lossClass C) of {0, 1}-valued functions. Its empirical Rademacher complexity on a
labeled sample S is half that of the sign class signClass C on the unlabeled points of S
[MohriRostamizadehTalwalkar2018, Lemma 3.4]; taking expectations, its Rademacher complexity under
D is half that of signClass C under the marginal D.map Prod.fst. With the general Rademacher
generalization bound (CslibFrontier.MachineLearning.Rademacher.Generalization) this gives, with
probability at least 1 - δ over m independent examples, for every h ∈ C,
err_D(h) ≤ err_S(h) + R_m(signClass C) + √(log (1 / δ) / (2 m))
[MohriRostamizadehTalwalkar2018, Theorem 3.5], where err_D(h) is the probability that h
misclassifies an example drawn from D and err_S(h) is its empirical error on S. Bounding
the Rademacher complexity by the growth function or through Sauer's lemma gives the growth-function
and VC-dimension generalization bounds [MohriRostamizadehTalwalkar2018, Corollaries 3.9 and 3.19].
For an empirical risk minimizer A for C, the uniform bound at confidence δ / 2 and the
Rademacher bound for a single comparator at confidence δ / 2 give the agnostic guarantee
err_D(A S) ≤ err_D(c) + R_m(signClass C) + √(2 log (2 / δ) / m) for every c ∈ C, and thus the
VC-dimension rate √(2 d log (e m / d) / m) + √(2 log (2 / δ) / m) against the best concept of
C. The comparator bound is Hoeffding's inequality, obtained here from the generalization bound
for the singleton class {-𝟙[c x ≠ y]}, whose Rademacher complexity is 0.
The domain is a finite type, so that distributions are probability mass functions and the finite
McDiarmid inequality applies; the source states the results for an arbitrary input space.
Probabilities are the outer measures of the product mass function Probability.PMF.pi, true errors
are (D.toOuterMeasure {p | h p.1 ≠ p.2}).toReal, and empirical errors are
empiricalMiscount h S / m.
Main definitions #
Cslib.MachineLearning.bitClass: the{0, 1}-valued functionsbitVal ℝ ∘ cforc ∈ C.
Main results #
Cslib.MachineLearning.empiricalRademacherComplexity_bitClass_lossClass,Cslib.MachineLearning.rademacherComplexity_bitClass_lossClass: the 0-1 loss class has half the (empirical) Rademacher complexity of the sign class [MohriRostamizadehTalwalkar2018, Lemma 3.4].Cslib.MachineLearning.rademacherComplexity_classification_bound,Cslib.MachineLearning.empiricalRademacherComplexity_classification_bound: the Rademacher bounds (3.17) and (3.18) for binary classification [MohriRostamizadehTalwalkar2018, Theorem 3.5].Cslib.MachineLearning.growthFunction_classification_bound: the growth-function bound [MohriRostamizadehTalwalkar2018, Corollary 3.9].Cslib.MachineLearning.vc_classification_bound: the VC-dimension bound [MohriRostamizadehTalwalkar2018, Corollary 3.19].Cslib.MachineLearning.PACLearning.IsERM.rademacherComplexity_agnostic_bound,Cslib.MachineLearning.PACLearning.IsERM.vc_agnostic_bound: empirical risk minimization is withinR_m(signClass C) + √(2 log (2 / δ) / m), respectively√(2 d log (e m / d) / m) + √(2 log (2 / δ) / m), of the best concept ofC.
References #
- M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., Sections 3.1 to 3.3
The 0-1 loss class #
The {0, 1}-valued functions x ↦ bitVal ℝ (c x) of a binary concept class C. Applied to
lossClass C, these are the 0-1 losses (x, y) ↦ 𝟙[h x ≠ y] of the concepts h ∈ C.
The 0-1 losses of the concepts of C as functions on labeled examples.
The 0-1 loss class [MohriRostamizadehTalwalkar2018, Lemma 3.4]: on a labeled sample S,
the empirical Rademacher complexity of the 0-1 losses of C is half that of signClass C on the
unlabeled points x_i = (S i).1.
The average 0-1 loss on a labeled sample is the empirical error empiricalMiscount h S / m.
The 0-1 loss class, in expectation [MohriRostamizadehTalwalkar2018, Lemma 3.4 and the
remark after it]: under a distribution D on labeled examples, the Rademacher complexity of the
0-1 losses of C is half that of signClass C under the marginal distribution D.map Prod.fst
of the unlabeled points.
Generalization bounds #
Rademacher bound for binary classification [MohriRostamizadehTalwalkar2018, Theorem 3.5,
(3.17)]: with probability at least 1 - δ over m > 0 independent examples from D, every
h ∈ C satisfies err_D(h) ≤ err_S(h) + R_m(signClass C) + √(log (1 / δ) / (2 m)), where the
Rademacher complexity is taken under the marginal D.map Prod.fst. The domain is finite.
Data-dependent Rademacher bound for binary classification [MohriRostamizadehTalwalkar2018,
Theorem 3.5, (3.18)]: with probability at least 1 - δ over m > 0 independent examples from
D, every h ∈ C satisfies
err_D(h) ≤ err_S(h) + R̂_{S_X}(signClass C) + 3 √(log (2 / δ) / (2 m)), where S_X is the
sequence of unlabeled points of S. The domain is finite.
Growth-function generalization bound [MohriRostamizadehTalwalkar2018, Corollary 3.9]: with
probability at least 1 - δ over m > 0 independent examples from D, every h ∈ C satisfies
err_D(h) ≤ err_S(h) + √(2 log Π_C(m) / m) + √(log (1 / δ) / (2 m)). The domain is finite.
VC-dimension generalization bound [MohriRostamizadehTalwalkar2018, Corollary 3.19]: if
every finite set shattered by C has at most d points, then for m ≥ d and m > 0, with
probability at least 1 - δ over m independent examples from D, every h ∈ C satisfies
err_D(h) ≤ err_S(h) + √(2 d log (e m / d) / m) + √(log (1 / δ) / (2 m)). The source assumes
m ≥ d implicitly through Corollary 3.18. The domain is finite.
Empirical risk minimization #
Agnostic learning by empirical risk minimization: with probability at least 1 - δ over
m > 0 independent examples from D, an empirical risk minimizer A for C satisfies
err_D(A S) ≤ err_D(c) + R_m(signClass C) + √(2 log (2 / δ) / m) simultaneously for every
c ∈ C, that is, it is within this margin of the best concept of C. The Rademacher complexity
is taken under the marginal D.map Prod.fst. This combines (3.17) of
[MohriRostamizadehTalwalkar2018, Theorem 3.5] at confidence δ / 2 with Hoeffding's upper tail
for a best concept at confidence δ / 2; compare the agnostic analysis of
[ShalevShwartzBenDavid2014, Chapter 26], whose constants differ. The domain is finite.
Agnostic VC bound for empirical risk minimization: if every finite set shattered by C
has at most d points, then for m ≥ d and m > 0, with probability at least 1 - δ over m
independent examples from D, an empirical risk minimizer A for C satisfies
err_D(A S) ≤ err_D(c) + √(2 d log (e m / d) / m) + √(2 log (2 / δ) / m) for every c ∈ C, an
excess error of O(√((d log (m / d) + log (1 / δ)) / m)). This combines
PACLearning.IsERM.rademacherComplexity_agnostic_bound with the VC bound on the Rademacher
complexity [MohriRostamizadehTalwalkar2018, Corollaries 3.8 and 3.18]. The domain is finite.