Rademacher complexity #
The empirical Rademacher complexity of a class F of real functions on a sample
S = (zโ, โฆ, z_m) is the expected best correlation of F with random signs,
Rฬ_S(F) = ๐ผ_ฯ sup_{f โ F} (1 / m) โ i, ฯ_i f (z_i), where ฯ_1, โฆ, ฯ_m are independent uniform
signs [MohriRostamizadehTalwalkar2018, Definition 3.1]. The Rademacher complexity
R_m(F) = ๐ผ_{S โผ D^m} Rฬ_S(F) averages it over m independent draws from a distribution D
[MohriRostamizadehTalwalkar2018, Definition 3.2]. It measures how well the class can fit random
noise on typical samples, and controls the gap between empirical and population means uniformly
over the class (CslibFrontier.MachineLearning.Rademacher.Generalization).
Signs are bits through Cslib.BitString.signVal and expectations are uniform averages ๐ผ.
rademacherAverage is the underlying quantity for an indexed family of vectors in โแต;
the empirical Rademacher complexity is the Rademacher average of the restrictions
(f (S 0), โฆ, f (S (m - 1))) of the functions f โ F. The supremum is the real โจ, so the
results assume a class that is uniformly bounded on the sample; an unbounded supremum takes the
junk value 0. For the population version the domain is a finite type with a probability mass
function, the setting of the finite McDiarmid inequality.
Massart's lemma (Cslib.BitString.expect_ciSup_sum_mul_signVal_le) bounds the Rademacher average
of N vectors of norm at most r by r โ(2 log N) / m [MohriRostamizadehTalwalkar2018,
Theorem 3.7]. For a class bounded by B, the empirical complexity is therefore at most
B โ(2 log P / m), where P is the number of distinct restrictions of the class to the sample
[MohriRostamizadehTalwalkar2018, Corollary 3.8], and at most B โ(2 log |F| / m) for a finite
class.
Main definitions #
Cslib.MachineLearning.rademacherAverage: the Rademacher average of a family of vectors.Cslib.MachineLearning.empiricalRademacherComplexity: the empirical Rademacher complexity.Cslib.MachineLearning.rademacherComplexity: its expectation overmindependent draws.
Main results #
Cslib.MachineLearning.rademacherAverage_def,Cslib.MachineLearning.empiricalRademacherComplexity_def,Cslib.MachineLearning.rademacherComplexity_def: the defining equations; the definitions are not exposed.Cslib.MachineLearning.rademacherAverage_eq_expect_ciSup_sum_div: the Rademacher average with the normalization1 / moutside the expectation.Cslib.MachineLearning.rademacherAverage_le,Cslib.MachineLearning.rademacherAverage_le_mul_sqrt: Massart's lemma in normalized form.Cslib.MachineLearning.rademacherAverage_nonneg,Cslib.MachineLearning.rademacherAverage_unique,Cslib.MachineLearning.rademacherAverage_of_isEmpty,Cslib.MachineLearning.rademacherAverage_le_of_forall_exists: nonnegativity, the value0for a single vector and for the empty family, and monotonicity.Cslib.MachineLearning.rademacherAverage_eq_of_forall_exists: families realizing the same vectors have the same Rademacher average.Cslib.MachineLearning.rademacherAverage_add_mul_signVal_mul: affine invariance; a fixed translation, fixed coordinate flips and a scaling byฮฒ โฅ 0multiply the average byฮฒ.Cslib.MachineLearning.empiricalRademacherComplexity_singleton,Cslib.MachineLearning.empiricalRademacherComplexity_empty,Cslib.MachineLearning.empiricalRademacherComplexity_nonneg,Cslib.MachineLearning.empiricalRademacherComplexity_mono: a single function and the empty class have complexity0, a nonempty bounded class has nonnegative complexity, and the complexity is monotone in the class.Cslib.MachineLearning.empiricalRademacherComplexity_le_of_finite: the bound through the number of restriction patterns.Cslib.MachineLearning.empiricalRademacherComplexity_le_of_finset,Cslib.MachineLearning.rademacherComplexity_le_of_finset: finite classes.Cslib.MachineLearning.rademacherComplexity_le,Cslib.MachineLearning.rademacherComplexity_nonneg,Cslib.MachineLearning.rademacherComplexity_singleton: a bound on every empirical complexity bounds the Rademacher complexity, which is nonnegative for a nonempty bounded class and0for a single function.
References #
Rademacher averages of vectors #
The Rademacher average of a family a : ฮน โ Fin m โ โ of vectors: the expected maximal
correlation ๐ผ_ฯ โจ j, (1 / m) โ i, ฯ_i a j i with a uniformly random sign vector ฯ, where
signVal turns bits into signs. For a family that is unbounded above for some ฯ, the real
supremum takes the junk value 0.
The Rademacher average with the normalization 1 / m taken outside.
The Rademacher average of a single vector is 0.
The Rademacher average of the empty family is 0.
The Rademacher average of a nonempty bounded family is nonnegative: its supremum dominates any single member, whose correlation with random signs has mean zero.
Monotonicity. If every vector of a occurs in the bounded family b, the Rademacher
average of a is at most that of b.
Two bounded families realizing the same vectors have the same Rademacher average.
Affine invariance. Translating every vector by a fixed c, flipping fixed coordinates
(multiplying coordinate i by signVal (s i)) and scaling by ฮฒ โฅ 0 multiplies the Rademacher
average of a bounded family by ฮฒ: the translation has mean-zero correlation with the signs, and
a fixed flip preserves the uniform distribution of the sign vector. This is the computation in
the proof of [MohriRostamizadehTalwalkar2018, Lemma 3.4].
Massart's lemma, normalized [MohriRostamizadehTalwalkar2018, Theorem 3.7]: the Rademacher
average of finitely many vectors of Euclidean norm at most r is at most r โ(2 log N) / m.
Massart's lemma for vectors with entries bounded by B: their Euclidean norms are at most
B โm, so the Rademacher average of N of them is at most B โ(2 log N / m).
Function classes #
The empirical Rademacher complexity of a class F of real functions on a sample
S : Fin m โ Z [MohriRostamizadehTalwalkar2018, Definition 3.1]:
๐ผ_ฯ โจ f โ F, (1 / m) โ i, ฯ_i f (S i) for uniformly random signs ฯ.
The empty class has empirical Rademacher complexity 0.
A single function has empirical Rademacher complexity 0.
Massart's lemma through restriction patterns [MohriRostamizadehTalwalkar2018, Corollary
3.8]: if the restrictions (f (S 0), โฆ, f (S (m - 1))) of the functions f โ F to the sample
form a finite set of P vectors, then the empirical Rademacher complexity of a class bounded by
B is at most B โ(2 log P / m). The source states the case of {-1, +1}-valued classes, where
P is at most the growth function.
Massart's lemma for a finite class bounded by B: the empirical Rademacher complexity is
at most B โ(2 log |F| / m).
The Rademacher complexity of a class F for samples of size m from a distribution D
on a finite type [MohriRostamizadehTalwalkar2018, Definition 3.2]: the expected empirical
Rademacher complexity over m independent draws from D.
A bound on the empirical complexity of every sample bounds the Rademacher complexity.
Massart's lemma for a finite class bounded by B: the Rademacher complexity is at most
B โ(2 log |F| / m).