The sharp agnostic sample size for classes of finite VC dimension #
If every finite set shattered by a Boolean class G on a countable domain has at most d points,
then for m ≥ 16384 d / ε² i.i.d. samples from μ, the relative frequency of some {g = true},
g ∈ G, deviates from its probability by at least ε with probability at most
4 exp (-m ε² / 32). Unlike measure_pi_exists_le_abs_card_filter_div_sub_measure_le, the bound
has no growth-function factor, so the sample size
chainingSampleSize d ε δ = (16384 d + 32 log (4 / δ)) / ε²
that brings it below δ has no factor log (1 / ε). For the loss class of a binary concept class
C this gives uniform convergence, agnostic PAC learning by empirical risk minimization from
chainingSampleSize d (ε / 2) δ examples, and the agnostic sample-complexity bound
O ((d + log (1 / δ)) / ε²) of [ShalevShwartzBenDavid2014, Theorem 6.8]. Shalev-Shwartz and
Ben-David prove only the weaker O ((d log (d / ε) + log (1 / δ)) / ε²) (Section 28.1) and do not
apply their chaining lemma (Lemma 27.4) to the sharp form; the route here is that of
[Vershynin2018, Section 8.3], with explicit, unoptimized constants.
The proof is double-sample symmetrization with a different swap step.
- Ghost sample.
measure_pi_exists_le_abs_card_filter_div_sub_measure_le_of_card_filter_swapSamples_lereduces the bound to the fraction of the2 ^ mswaps of a fixed double samplezunder which someg ∈ Ghas counts on the two swapped samples that differ by at leastm ε / 2. - Swaps. Under the swap
σ, the count difference ofgis∑ i, a_g i · signVal (σ i), wherea_g i = g (z.1 i) - g (z.2 i) ∈ {-1, 0, 1}. The supremum overg ∈ Gof this sum changes by at most2when one sign changes, so McDiarmid's inequality (Cslib.BitString.card_filter_expect_add_le_le) bounds the fraction of swaps on which it exceeds its mean bym ε / 4byexp (-m ε² / 32). The vectora_gdepends only on the labeling of the2mpoints ofzbyg, with‖a_g - a_g'‖² ≤ 2 · hammingDist, so the chaining boundCslib.MachineLearning.expect_ciSup_sum_mul_signVal_le_of_hammingDistputs the mean at most32 √(m d) ≤ m ε / 4. The same holds for-a_g.
Through the loss class, whose shattered sets are no larger than those of C
(card_le_of_setShatters_lossClass in VCUpperBound.lean), this gives the classification results.
The domain is countable with measurable singletons, as in VCUniformConvergence.lean; uncountable
domains need a measurability hypothesis on the class. The constants are far from optimal: at
ε = δ = 1 / 10 and d = 1 the explicit size is about 6.6 · 10⁶, against 97600 from
uniformConvergenceSampleSize. The improvement is in the rate, which wins only as ε → 0.
Main definitions #
chainingSampleSize d ε δ: the sample size(16384 d + 32 log (4 / δ)) / ε².
Main results #
card_filter_swapSamples_exists_le_abs_le: the fraction of bad swaps of a double sample is at most2 exp (-m ε² / 32)once16384 d ≤ m ε².measure_pi_exists_le_abs_card_filter_div_sub_measure_le_exp: uniform convergence without a growth-function factor, with bound4 exp (-m ε² / 32).measure_pi_not_isRepresentative_le_exp_of_lossClass,measure_pi_not_isRepresentative_le_of_chainingSampleSize_le_of_lossClass,measure_pi_not_isRepresentative_le_exp,measure_pi_not_isRepresentative_le_of_chainingSampleSize_le: the same forε-representative samples (for general countable label spaces vialossClass C, and specialized toBool), and with the explicit sample size.IsERM.measure_pi_lt_error_le_exp,IsERM.measure_pi_lt_error_le_of_chainingSampleSize_le: the agnostic tail bound for empirical risk minimization.isPACLearnerFor_univ_of_chainingSampleSize_le,sampleComplexity_univ_le_chainingSampleSize: agnostic PAC learning fromchainingSampleSize d (ε / 2) δexamples, and the sample-complexity bound⌈chainingSampleSize (vcDim C) (ε / 2) δ⌉.
References #
- S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Theorem 6.8, Lemma 27.4 and Section 28.1
- R. Vershynin, High-Dimensional Probability, Section 8.3
- C. McDiarmid, On the method of bounded differences, Lemma 1.2
Counting swaps by chaining #
Counting bad swaps by chaining: if every finite set shattered by G has at most d points
and 16384 d ≤ m ε², then for every double sample z, at most a 2 exp (-m ε² / 32) fraction of
the swaps σ give some g ∈ G counts on the two swapped samples that differ by at least
m ε / 2.
Uniform convergence #
Uniform convergence without a growth-function factor on a countable domain
[Vershynin2018, Section 8.3]: if every finite set shattered by G has at most d points and
16384 d ≤ m ε², then 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 exp (-m ε² / 32).
The sample size (16384 d + 32 log (4 / δ)) / ε² of the chaining bound.
Uniform convergence without a growth-function factor for any concept class C on a
countable domain and label space whose Boolean loss class shatters no finite set of more than d
labeled points: once 16384 d ≤ m ε², m i.i.d. examples fail to be ε-representative for C
with probability at most 4 exp (-m ε² / 32).
Uniform convergence with the chaining sample size for any concept class C on a countable
domain and label space whose Boolean loss class shatters no finite set of more than d labeled
points: once m ≥ chainingSampleSize d ε δ, m i.i.d. examples fail to be ε-representative for
C with probability at most δ.
Uniform convergence without a growth-function factor for a binary concept class on a
countable domain: if every finite set shattered by C has at most d points and
16384 d ≤ m ε², then m i.i.d. examples fail to be ε-representative for C with probability
at most 4 exp (-m ε² / 32).
Uniform convergence with the chaining sample size on a countable domain: if every finite
set shattered by C has at most d points and m ≥ (16384 d + 32 log (4 / δ)) / ε², then m
i.i.d. examples fail to be ε-representative for C with probability at most δ.
Agnostic tail bound for ERM without a growth-function factor on a countable domain: if every
finite set shattered by C has at most d points and 65536 d ≤ m ε², then under every
distribution an empirical risk minimizer for C misses optimalError D C + ε with probability at
most 4 exp (-m ε² / 128).
Agnostic learning by ERM with the chaining sample size on a countable domain: if every
finite set shattered by C has at most d points and
m ≥ chainingSampleSize d (ε / 2) δ = (65536 d + 128 log (4 / δ)) / ε², then under every
distribution an empirical risk minimizer for C misses optimalError D C + ε with probability at
most δ.
The sharp agnostic sample size [ShalevShwartzBenDavid2014, Theorem 6.8] on a countable
domain: a class whose shattered finite sets have at most d points is (ε, δ)-PAC learnable over
all distributions from m ≥ chainingSampleSize d (ε / 2) δ = O ((d + log (1 / δ)) / ε²)
examples. If C is nonempty the learner is any empirical risk minimizer. If C is empty the
optimal error is ⊤ and any learner works.
The agnostic sample complexity of a class of finite VC dimension on a countable domain is at
most ⌈chainingSampleSize (vcDim C) (ε / 2) δ⌉ = O ((vcDim C + log (1 / δ)) / ε²)
[ShalevShwartzBenDavid2014, Theorem 6.8].