The ε-net theorem on countable domains #
Let G be a class of Boolean functions on a domain Z and μ a probability measure on Z. A
sample S : Fin m → Z is an ε-net for G under μ if every g ∈ G with
μ {g = true} ≥ ε takes the value true at some sample point
[HausslerWelzl1987; ShalevShwartzBenDavid2014, Section 28.3]. The ε-net theorem says that m
i.i.d. samples fail to be an ε-net with probability at most 2 Π_G(2m) 2^(-εm/2) once
εm ≥ 8, where Π_G is the growth function [ShalevShwartzBenDavid2014, Section 28.3; see also
BlumerEhrenfeuchtHausslerWarmuth1989]. With Sauer's lemma this gives the sample size
m ≥ (8 / ε) (d log (48 / ε) + log (4 / δ))
for failure probability at most δ when every set shattered by G has at most d points. The
constants differ from those of the cited sources but have the same form.
The proof is the double-sample symmetrization argument. If some g with μ {g = true} ≥ ε misses
the first sample, then by the Chernoff lower tail a second independent sample has at least
εm / 2 points with g = true with probability at least 1 / 2. So the bad event has probability
at most twice that of the double-sample event: some g ∈ G is false on the first sample and
true on at least k = ⌈εm / 2⌉ points of the second. Swapping any set of coordinates between
the two samples preserves the product measure. For a fixed double sample, at most
Π_G(2m) 2^(m - k) of the 2^m swaps land in the double-sample event, because each realized
labeling of the 2m points is compatible with at most 2^(m - k) swaps. The measure-theoretic
steps of this argument (the ghost sample and swap averaging) are in DoubleSample.lean.
The domain is assumed countable with measurable singletons, so every set of samples is measurable. Over general domains the theorem needs a measurability hypothesis on the class (the "well-behaved" classes of [BEHW89]); that case is not formalized here.
Main definitions #
IsEpsNet μ G ε S: the sampleSis an ε-net forGunderμ.vcSampleSize d ε δ: the sample size(8 / ε) (d log (48 / ε) + log (4 / δ)).
Main results #
measure_pi_not_isEpsNet_mul_two_pow_le: the ε-net theorem, in growth-function form:μ^m {S not an ε-net} * 2 ^ ⌈εm/2⌉ ≤ 2 Π_G(2m)when8 ≤ εm.measure_pi_not_isEpsNet_le_of_growthFunction_le: the failure probability is at mostδwhen2 Π_G(2m) ≤ δ 2 ^ ⌈εm/2⌉.le_of_vcSampleSize_le,growthFunction_le_of_vcSampleSize_le: the explicit sample size achieves this when every set shattered byGhas at mostdpoints.measure_pi_not_isEpsNet_le_of_vcSampleSize_le: the ε-net theorem with the explicit sample size.
References #
Counting swaps #
The explicit sample size #
The VC sample size (8 / ε) (d log (48 / ε) + log (4 / δ)).
The sample-size calculation behind growthFunction_le_of_vcSampleSize_le: if
vcSampleSize d ε δ ≤ m and N ≤ exp (2m / (48 / ε)) (48 / ε) ^ d, then 8 ≤ εm and
2 N ≤ δ 2 ^ ⌈εm/2⌉. Factored out so multiclass bounds can instantiate it at rescaled confidence
δ / k ^ (2 d).
The explicit sample size makes 2 Π_G(2m) ≤ δ 2 ^ ⌈εm/2⌉ (and 8 ≤ εm) 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 = 48 / ε.
ε-nets #
The sample S is an ε-net for the class G under the measure μ: every g ∈ G with
μ {g = true} ≥ ε takes the value true at some sample point [HW87].
The ε-net theorem #
The ε-net theorem on a countable domain [ShalevShwartzBenDavid2014, Section 28.3; see
also BlumerEhrenfeuchtHausslerWarmuth1989]: if 8 ≤ εm, then m i.i.d. samples from μ fail to
be an ε-net for G with probability at most 2 Π_G(2m) / 2 ^ ⌈εm/2⌉.
The ε-net theorem in δ form: if 8 ≤ εm and 2 Π_G(2m) ≤ δ 2 ^ ⌈εm/2⌉, then m i.i.d.
samples fail to be an ε-net with probability at most δ.
The ε-net theorem with an explicit sample size on a countable domain
[BlumerEhrenfeuchtHausslerWarmuth1989; ShalevShwartzBenDavid2014, Section 28.3]: if every finite
set shattered by G has at most d points and m ≥ (8 / ε) (d log (48 / ε) + log (4 / δ)), then
m i.i.d. samples fail to be an ε-net for G with probability at most δ. The constants differ
from those of the cited sources but have the same form.