Uniform convergence from the growth function on countable domains #
Let G be a class of Boolean functions on a countable domain Z with measurable singletons and
let μ be a probability measure on Z. The uniform convergence theorem of Vapnik and
Chervonenkis bounds the probability that the relative frequency of some event {g = true},
g ∈ G, in m i.i.d. samples differs from its probability by at least ε:
μ^m {S | ∃ g ∈ G, ε ≤ |#{i | g (S i)} / m - μ {g = true}|} ≤ 4 Π_G(2m) exp (-m ε² / 8),
where Π_G is the growth function [VapnikChervonenkis1971; AnthonyBartlett1999, Theorem 4.3].
Applied to the loss class of a binary concept class C and a distribution D on labeled
examples, this says that m i.i.d. examples fail to be ε-representative for C (in the sense of
[ShalevShwartzBenDavid2014, Definition 4.1]) with probability at most
4 Π_C(2m) exp (-m ε² / 8). With Sauer's lemma, the explicit sample size
uniformConvergenceSampleSize d ε δ = (16 / ε²) (2 d log (10 / ε) + log (4 / δ))
brings the failure probability below δ when every set shattered by C has at most d points.
The proof is the double-sample symmetrization argument, with the measure-theoretic steps from
DoubleSample.lean.
- Ghost sample. If
gwitnesses a deviation of at leastεonS, then by Hoeffding's inequality (measure_pi_le_abs_card_filter_div_sub_measure) an independent sampleThas relative frequency withinε / 2ofμ {g = true}with probability at least1 / 2. The bad event therefore has at most twice the probability of the double-sample event: someg ∈ Ghas counts onSandTthat differ by at leastm ε / 2. - Swaps. For a fixed double sample, the change of
g's count difference under the swapσis the weighted bit sum∑ i, w i (σ i - 1 / 2)with weights|w i| ≤ 2. Hoeffding's inequality for random bit strings (Cslib.BitString.card_filter_le_abs_sum_mul_sub_half_le) bounds the number of swaps that make it at leastm ε / 2by2 · 2^m exp (-m ε² / 8). The weights depend only on the labeling of the2msample points byg, and at mostΠ_G(2m)labelings occur.
The ghost-sample step is stated separately, for any bound on the fraction of bad swaps
(measure_pi_exists_le_abs_card_filter_div_sub_measure_le_of_card_filter_swapSamples_le);
AgnosticVCSharp.lean bounds that fraction by chaining instead of the union over labelings.
The theorem is stated with ≤ |…| (a deviation of at least ε), which is slightly stronger than
the strict form > ε in the sources, and for all ε ≥ 0 and m; when 4 Π_G(2m) exp (-m ε² / 8)
is at least 1 it is trivial. The domain is assumed countable with measurable singletons, so that
every set of samples is measurable. Over general domains the theorem needs a measurability
hypothesis on the class, which is not formalized here.
Main definitions #
uniformConvergenceSampleSize d ε δ: the sample size(16 / ε²) (2 d log (10 / ε) + log (4 / δ)).
Main results #
measure_pi_exists_le_abs_card_filter_div_sub_measure_le_of_card_filter_swapSamples_le: the ghost-sample step, from any bound on the fraction of bad swaps of each double sample.measure_pi_exists_le_abs_card_filter_div_sub_measure_le: uniform convergence of relative frequencies for a Boolean class, with the bound4 Π_G(2m) exp (-m ε² / 8).measure_pi_exists_le_abs_empiricalMiscount_div_sub_error_le: the same bound for the empirical errors of a binary concept class.measure_pi_not_isRepresentative_le_growthFunction:mi.i.d. examples fail to beε-representative with probability at most4 Π_C(2m) exp (-m ε² / 8).four_mul_growthFunction_mul_exp_le_of_uniformConvergenceSampleSize_le: the explicit sample size brings this belowδ.measure_pi_not_isRepresentative_le_of_uniformConvergenceSampleSize_le: uniform convergence with the explicit sample size.
References #
Counting swaps #
Uniform convergence #
The ghost-sample step of double-sample symmetrization on a countable domain: suppose that
for every double sample z, at most a β fraction of the 2 ^ m swaps σ give some g ∈ G
counts on the two swapped samples that differ by at least m ε / 2, and that
4 exp (-m ε² / 2) ≤ 1. Then the probability that the relative frequency of some {g = true},
g ∈ G, in m i.i.d. samples deviates from μ {g = true} by at least ε is at most 2 β.
Hoeffding's inequality puts the count of a fixed g on an independent ghost sample within
m ε / 2 of m μ {g = true} with probability at least 1 / 2, and swapping coordinates preserves
the law of the double sample.
Uniform convergence of relative frequencies on a countable domain [VapnikChervonenkis1971;
AnthonyBartlett1999, Theorem 4.3]: under m i.i.d. samples from μ, the probability that the
relative frequency of {g = true} deviates from μ {g = true} by at least ε for some g ∈ G
is at most 4 Π_G(2m) exp (-m ε² / 8).
Uniform convergence of empirical errors on a countable domain [VapnikChervonenkis1971;
AnthonyBartlett1999, Theorem 4.3]: under m i.i.d. examples from D, the probability that the
empirical error of some h ∈ C deviates from its error by at least ε is at most
4 Π_C(2m) exp (-m ε² / 8).
Uniform convergence for a class with a bounded growth function on a countable domain
[VapnikChervonenkis1971; AnthonyBartlett1999, Theorem 4.3]: m i.i.d. examples fail to be
ε-representative for C with probability at most 4 Π_C(2m) exp (-m ε² / 8).
The explicit sample size #
The uniform convergence sample size (16 / ε²) (2 d log (10 / ε) + log (4 / δ)).
The explicit sample size makes 4 Π_G(2m) exp (-m ε² / 8) ≤ δ whenever every finite set
shattered by G has at most d points. The proof applies Sauer's lemma in the form
Π_G(2m) ≤ exp (2m / T) T ^ d (growthFunction_le_exp_mul_pow) at T = (10 / ε)².
Uniform convergence with an explicit sample size on a countable domain: if every finite
set shattered by C has at most d points and m ≥ (16 / ε²) (2 d log (10 / ε) + log (4 / δ)),
then m i.i.d. examples fail to be ε-representative for C with probability at most δ.