The Sample Complexity of Pattern Classification with Neural Networks: The Size of the Weights is More Important than the Size of the Network I: Fat-Shattering Margin Bound with d = fat_H(γ/16)Research Paper
Motivation
Classical generalization bounds for classifiers, built on the VC dimension, grow with the number of adjustable parameters. For neural networks this is at odds with practice: networks with many more weights than training examples often generalize well. Bartlett's 1998 paper (IEEE Trans. Inform. Theory 44(2), 525–536) explains part of this by measuring a real-valued classifier's confidence. If a hypothesis classifies most training examples correctly with a margin , its misclassification probability is controlled by a scale-sensitive dimension of the class at scale proportional to , not by its VC dimension. Later in the paper this yields bounds for networks with small weights that do not depend on the number of weights.
This mission formalizes the first of the paper's two main technical results, the margin bound of Theorem 2 (p. 527), together with the steps of its proof on pp. 527–528.
The fat-shattering dimension was introduced by Kearns and Schapire (JCSS 1994). Alon, Ben-David, Cesa-Bianchi and Haussler (J. ACM 1997) proved the scale-sensitive Sauer-type covering bound used here (Theorem 5 of the paper). Shawe-Taylor, Bartlett, Williamson and Anthony (IEEE Trans. Inform. Theory 1998) proved the zero-training-error version (Theorem 1 of the paper). Theorem 2 extends it to hypotheses that make margin errors on the training data.
Setting
Let be a set and a probability distribution on . The threshold function is for and for . For a real-valued hypothesis on , the misclassification probability is . For a sample drawn independently from and , the margin error estimate is
Let be a class of real functions on . Points are -shattered by if some has the following property: for every sign vector , some satisfies for all . The fat-shattering dimension is the largest such , possibly .
The proof uses the following objects:
- the squashing function and the class ;
- the sample pseudometric ;
- the covering number , the largest over of the size of the smallest -cover (Definition 3), and the corresponding packing number ;
- the quantization .
Formalization targets
Goal: Theorem 2
Assume , , , and finite with . With probability at least over , every satisfies
Milestones, in the order the proof uses them
- Lemma 4. uniformly over , with probability at least .
- Theorem 5 (Alon et al.). If and , then , provided is large enough.
- Writing : .
- .
- .
- when and .
- .
A further item, Proposition 8 (p. 529), is the probabilistic device the paper uses to make such bounds uniform over .
Significance
Theorem 2 is the bound behind the paper's main message. Corollary 9 makes it uniform over , and Theorem 28 combines it with fat-shattering estimates for networks with bounded weights. Together they show that a network classifying the training data with a large margin generalizes at a rate governed by the size of its weights, not by its number of weights. The same template, a margin error plus a capacity term at scale , underlies later margin analyses of support vector machines and boosting.
All results in this mission are proved in the literature; none is open. None is machine-checked on this platform: the platform has Rademacher-complexity margin bounds, but no statement about fat-shattering dimension or sample covering numbers of real-valued classes. A complete formalization would provide a reusable library of these objects, with their basic inequalities between squashing, quantization, packing and covering. It would also give a checked version of the explicit constants and , which differ from those in later textbook treatments.
Difficulty
The bound is uniform over a possibly uncountable class , so a union bound over hypotheses does not apply. The obvious replacement is a union bound over a cover of . Two steps make it hard:
- Lemma 4. It needs a ghost-sample symmetrization and a random-swap argument, carried out with an cover of the squashed class on the double sample, so the cover depends on the data.
- Theorem 5. Bounding that covering number by the fat-shattering dimension is a combinatorial counting argument about strongly shattered pairs. It is the scale-sensitive analogue of the Sauer–Shelah lemma, and here the bookkeeping of constants is exact.
The quantization steps look routine but carry the factor-of-two losses that produce the constants , and .
Formalization scope
The model is in the namespace BartlettNN.Margin.
- Labels and samples. Labels are
Bool, read as throughpm(trueis ). . Samples are functionsFin m → X × Bool, indexed from , with lawMeasure.pi (fun _ => P). The margin estimate uses the strict inequality , and shattering uses . - Fat-shattering dimension. is valued in
ℕ∞. Aℕ-valued supremum would be on an unbounded set, so the goal assumesfat H (γ/16) = dwithd : ℕ. - Covering and packing numbers. Covers are finite and external (centres are arbitrary functions), the cover inequality is strict, and covering numbers are
⊤when no finite cover exists. and are suprema over all samples, with repetitions allowed. "-separated", which the paper leaves undefined, is read as distance . - Logarithms. is
Real.log, isReal.logb 2, and isReal.exp 1. - High probability. "With probability at least , every " bounds the measure of the event that some violates the inequality. It is not a per-hypothesis statement.
Measurability. The paper states "we ignore issues of measurability, and assume that all sets considered are measurable" (p. 526). This is made explicit, not removed, through three hypotheses:
- every is measurable;
- the bad events are measurable;
- the double-sample events of display (1) are measurable.
Replacing these by countability of would weaken the theorem.
Corrections of the printed text.
- Theorem 2. The goal adds . Beyond the term decreases, vanishes at and then turns negative, and the printed statement fails for rich classes. Within this range nothing is lost: the proof covers , and for the bound exceeds .
- Milestone 6. It carries the hypothesis , the range of the binomial estimate behind .
- Milestone 3. Its printed justification is false; the correct term is . The milestone's conclusion is true as printed, and only the conclusion is formalized.
Trivializing formalizations, ruled out. The following would each make the statements empty or different, and none is used:
- a
ℕ-valued fat dimension or covering number; Real.signin place of ;- a per-hypothesis probability bound;
- an unrestricted , which makes of a negative number equal to ;
- a covering number that is on classes without finite covers.
Infrastructure that a complete development needs, and contributions that are welcome:
- product measures and Hoeffding's inequality, which Mathlib has;
- a symmetrization (ghost-sample) lemma for margin events;
- the combinatorics of Theorem 5;
- the elementary inequalities between packing and covering numbers.
The covering/packing and fat-shattering lemmas apply beyond this mission. Proofs of individual milestones, or of Theorem 5 in the generality of Alon et al., are useful contributions in their own right.
Selected references
- P. L. Bartlett, The Sample Complexity of Pattern Classification with Neural Networks: The Size of the Weights is More Important than the Size of the Network, IEEE Trans. Inform. Theory 44(2), 525–536, 1998. https://doi.org/10.1109/18.661502
- N. Alon, S. Ben-David, N. Cesa-Bianchi, D. Haussler, Scale-sensitive dimensions, uniform convergence, and learnability, J. ACM 44(4), 615–631, 1997. https://doi.org/10.1145/263867.263927
- J. Shawe-Taylor, P. L. Bartlett, R. C. Williamson, M. Anthony, Structural risk minimization over data-dependent hierarchies, IEEE Trans. Inform. Theory 44(5), 1926–1940, 1998. https://doi.org/10.1109/18.705570
- M. J. Kearns, R. E. Schapire, Efficient distribution-free learning of probabilistic concepts, J. Comput. Syst. Sci. 48(3), 464–497, 1994. https://doi.org/10.1016/S0022-0000(05)80062-5
- V. N. Vapnik, A. Ya. Chervonenkis, On the uniform convergence of relative frequencies of events to their probabilities, Theory Probab. Appl. 16(2), 264–280, 1971. https://doi.org/10.1137/1116025