Lecture 4 Full Handout

Derek Wang17 min read

Complete English reading edition of the nine-page Lecture 4 handout: fat-shattering, linear and neural-network covers, spectral complexity, and margin bounds, preserving numbering, proofs, and figures.

Fall 2026. Instructor: Haipeng Luo.

English reading edition restored from the nine-page Lecture 4 handout. It preserves every section, theorem, proposition, lemma, numbered equation, proof argument, and experimental discussion. Editorial notes identify notation or constant issues rather than silently changing the source. Figures are extracted from the handout. Companion: detailed explanation.

1 Regression: Fat-Shattering Dimension

In the previous lecture, after bounding the Rademacher complexity of real-valued function classes using different covering numbers, we began looking for a combinatorial parameter analogous to VC dimension that would directly bound covering numbers. The first attempt was pseudo-dimension:

This is the largest integer for which there exist input-output pairs such that, for every labeling , some satisfies for every .

Although this is a reasonable complexity measure for linear classes, it is infinite for the learnable class of nondecreasing functions. For any , take pairs . Given any labels, a nondecreasing function can pass through

for some , realizing all the required signs. Thus finite pseudo-dimension is not necessary for learning.

Comparing pseudo-dimension with covering numbers reveals the missing ingredient: the scale . We want a combinatorial parameter that depends on scale and becomes smaller at larger scales. One approach asks the induced classifier to predict correctly with a specified confidence or margin. This leads to fat-shattering.

A class -shatters points if there are thresholds , called a witness, such that every labeling has a corresponding satisfying

This condition means correct prediction of with margin at least . Define

The dimension is nonincreasing in : a set shattered at one scale is also shattered at every smaller positive scale. As the scale tends to zero, fat-shattering recovers pseudo-dimension.

For the nondecreasing class, the earlier construction only provides margin . Requiring margin at least leaves it valid when , proving . The failure of this particular construction for larger does not establish equality: another construction might work. The following result shows that nevertheless has the correct order.

Proposition 1. If , , and is the class of all nondecreasing functions, then for every ,

Proof. Suppose is shattered with witness . For each adjacent pair, choose labels , with arbitrary labels elsewhere. A corresponding nondecreasing function satisfies

Therefore . Summing and using the output range,

Consequently , as claimed.

An analogue of Sauer's lemma connects this dimension to covering numbers. The handout states it without proof.

Theorem 1. For any , , and inputs ,

for an absolute constant .

Since , this improves the pseudo-dimension bound. It is also independent of . Informally, the projected class behaves as though it has effective dimension inside . Dudley's entropy integral then gives a Rademacher bound.

Editorial note: effective dimension is an intuition about metric entropy, not a claim of containment in a linear subspace. For a bound uniform up to , use with an absolute ; this avoids a logarithm vanishing at the upper endpoint. The explanation uses that version.

Proposition 2. For the nondecreasing class on with range ,

Proof. Apply Dudley's integral with

It gives

The previous lecture obtained using the covering estimate . Direct control of the covering number through fat-shattering removes the logarithm inside the square root, demonstrating the benefit of the scale-sensitive dimension.

Unlike finite pseudo-dimension, finite fat-shattering dimension is also necessary for learnability in the relevant real-valued learning setting. Collecting the bounds yields

Editorial note: finiteness is required at every fixed positive scale. Necessity must be read with the appropriate learning model and loss assumptions; it does not hold for every possible loss, such as the identically zero loss. Here is the loss's Lipschitz constant in the prediction, and the usual measurability and integrability conditions are understood.

2 Towards Understanding the Complexity of Neural Networks

We now have the basic concepts and tools for statistical learning. Neural networks provide a case study: can the theory explain their practical success, at least in part?

A central puzzle is why networks generalize when their parameter count exceeds the training sample size by several orders of magnitude. Modern architectures may have millions or billions of parameters and often achieve zero training error. To transfer training performance to unseen data, theory suggests examining uniform convergence or, more generally, learnability of the associated class.

Classification learnability is characterized by VC dimension in the binary setting. Yet the dimension of a network class can appear at least as large as the sample size. For example, a fully connected feed-forward network with roughly a million parameters can fit all 50,000 CIFAR10 training images with random labels. Zhang et al. [2017] provide strong empirical evidence of this expressive power. A bound of the form

then gives no useful generalization guarantee. Nevertheless, training on clean CIFAR10 yields about 50% accuracy, substantially better than guessing in a ten-class problem, and a convolutional network with a similar parameter count can approach 90% accuracy.

Other complexity measures initially seem unhelpful too. Even for linear functions, a degenerate special case of networks, the earlier excess-risk bounds were of the form , where the dimension is essentially the number of parameters. If , these bounds are uninformative. Does that make the theory useless?

No. The observation suggests that parameter count or VC dimension may not capture the relevant intrinsic complexity. Weight magnitudes can matter more. HW1 already provided an example: for linear predictors with , empirical Rademacher complexity is at most

which has no explicit dimension dependence. The norm of the weights, rather than their dimension alone, controls this bound.

Following mainly Bartlett et al. [2017], we first derive an almost dimension-independent covering bound for linear classes, extend it to matrices and one network layer, then to a full network. We finally return to experiments to see what these bounds explain.

Editorial note: a large worst-case upper bound does not prove poor generalization on a particular distribution. Fitting sampled random labelings is evidence of richness, not a formal proof of fitting every labeling. CIFAR10 is multiclass, so the source's VC discussion is an analogy with binary classification.

2.1 Almost Dimension-Independent Covering: A Warm-Up

Theorem 2. For

the source states

where stacks the inputs as rows.

The previous estimate, assuming , was

That bound is linear in , whereas the new bound depends logarithmically on . Its dependence on accuracy is worse, but Dudley's integral preserves the main rate. HW1 asks for the resulting bound , up to logarithmic factors, without polynomial dimension dependence.

The proof uses the following HW1 result.

Lemma 1. Let , and let

The handout states , describing as the convex hull scaled by .

Editorial note: because the coefficients may sum to less than , the precise set is . A general sampling proof gives the safe bound , including a zero atom and integer rounding. The simplified constants in Theorems 2–4 should be interpreted accordingly; their principal dependencies are unchanged.

Proof of Theorem 2. A projected prediction vector has the form . For each nonzero column, define

Then , with unit-norm atoms. The coefficients may be negative, so write

This uses the atoms and nonnegative coefficients. Cauchy–Schwarz bounds their total mass:

Apply Lemma 1. The same argument can be adapted to other primal-dual norm pairs, an exercise suggested by the source.

Editorial note: omit zero columns to avoid division by zero. It suffices for the projected class to be contained in the atom hull; equality is unnecessary.

2.2 Almost Dimension-Independent Covering: One-Layer Networks

A single layer maps to , with and coordinatewise ReLU . Define the mixed norm

This takes the norm of each column, then the norm of those column norms.

Theorem 3. For

the source states

Proof. A projected output is . ReLU is 1-Lipschitz, so it suffices to cover the preactivation set. Expand

where

Treat these matrices as vectors in and include negative atoms. Lemma 1 now uses ambient dimension and at most atoms. The coefficient mass is

The inequality is Cauchy–Schwarz. Applying Lemma 1 completes the proof.

The parameter count again appears only inside a logarithm. The mixed norm arises naturally from the calculation. Bartlett et al. [2017] instead bound the same coefficient mass by summing row norms:

Since , the handout's calculation gives a potentially smaller quantity at this step. The source suggests proving the norm comparison by squaring and applying Cauchy–Schwarz.

2.3 Almost Dimension-Independent Covering: Multi-Layer Networks

Consider a fully connected feed-forward network with the following notation.

  • There are layers; layer maps to , with and .

Its weights belong to , for positive . The spectral norm is .

Define the following class . The target class is .

  • For , let cover at normalized radius .

Theorem 3 gives

The source assumes that these centers can be chosen inside the covered set, referring to HW1 Question 3(a)i.

Editorial note: the normalized metric is ; hence the unnormalized Frobenius radius is . The handout's wording mixes these descriptions. Moving external centers into the set generally doubles the radius, so a universal constant is needed if this step is justified by recentering. The explanation tracks that cost.

Recursively define

Each has the form . Because ReLU is 1-Lipschitz and vanishes at zero,

Iterating gives , and therefore

We next show that covers the projected class.

Lemma 2. For every , is a normalized -cover of , where

Proof. At , the assertion follows from and . Assume it holds at . For a true network's intermediate output

choose with

Then choose satisfying

Writing , we obtain

These steps use the triangle inequality, Equation (3) and ReLU's Lipschitz property, the spectral norm, and Equation (2). This completes induction.

Optimizing the layerwise radii yields the main covering result.

Theorem 4. For , the source states

Here continues to denote the normalized /Frobenius covering number.

Proof. Lemma 2 and Equation (1) imply

Choose the radii to minimize this expression subject to

Distribute the final error using , with . Substitution gives

The KKT conditions show that . The minimized sum is . Finally set .

The dependence on accuracy is again . Calculations analogous to HW1 Question 1(b) give the complexity scale

Apart from logarithmic factors, there is no explicit parameter-count term. This motivates the spectral complexity

2.4 Explaining Generalization Through Spectral Complexity and Margin

The derivation suggests that weight-based complexity, beyond parameter count, helps explain generalization. The handout discusses experiments from Bartlett et al. [2017].

Figure 1: AlexNet trained on CIFAR10 with original or random labels

Figure 1. Training AlexNet on CIFAR10 with original or random labels.

The curves track “excess risk” and “Lipschitzness” across epochs. In this figure, excess risk means test error minus training error, the generalization gap, rather than excess population risk over the best function in a class. Crosses mark the first zero-training-error epoch, reached much earlier with original labels. Afterward, the gap equals test error and plateaus near 0.3 for original labels and 0.9 for random labels.

Both networks have the same number of parameters, so parameter count cannot distinguish their substantially different gaps. The complexity curves are lower for original labels and correlate with the observed difference, supporting a more informative complexity measure.

Editorial note: the handout informally identifies the plotted Lipschitz quantity with spectral complexity up to constants. The paper's Lipschitz curves refer to the product of spectral norms; full spectral complexity also includes a mixed-norm correction, which is not generally a fixed constant.

Margin. The unnormalized complexity continues to grow even after the generalization gap plateaus. Thus a bound depending only on does not fully track the behavior. After training error reaches zero, predictions can continue to become more confident as complexity increases.

The prediction is , and the margin is

A positive margin guarantees a correct prediction, while a negative margin implies an incorrect one. Larger positive margins indicate greater separation from competing labels. Using the preceding tools and additional standard arguments, the handout states a high-probability bound, simultaneously for networks and :

Increasing increases the empirical small-margin term but decreases the complexity penalty. Simultaneous validity lets the analysis choose the best tradeoff; need not be a training hyperparameter.

When training error is zero and the minimum margin is positive, taking makes the source's strict-threshold empirical term vanish, leaving the main scale . Increasing complexity need not worsen this ratio if margins grow too. The square-marked curve in Figure 1 illustrates the stabilization after margin normalization.

Editorial note: ties can give zero margin even with zero training error. The full probability theorem also has a confidence term, and the original paper uses a different mixed-norm expression. If the empirical indicator uses , take instead. Equation (4) here preserves the handout's leading-order shorthand.

Margin distributions. Normalize margins by . For , rescaling the threshold rewrites the leading-order inequality as

The empirical distribution's CDF supplies the first term. The source accidentally writes instead of in this rewritten probability event; this edition explicitly corrects that typo.

Figure 2: Comparing normalized margin distributions across tasks

Figure 2. Comparing normalized margin distributions for different tasks.

A distribution placing more mass to the right indicates an easier task under this comparison. The four panels suggest that MNIST is easier than CIFAR10; their randomly labeled versions are similarly difficult; CIFAR100 is nearly as difficult as CIFAR10 with random labels; and random inputs are harder than random labels.

Closing remark. Spectral complexity and margin provide a partial explanation for generalization despite large parameter counts. What remains unexplained is why networks trained on clean data tend to have low complexity. Training is generally not ERM over a class with an explicitly fixed spectral-complexity constraint; it is often a variant of SGD without explicit weight-norm constraints. Understanding the optimization algorithm's implicit preference for low-complexity solutions is a separate nonconvex optimization question.

References

  • Peter L. Bartlett, Dylan J. Foster, Matus J. Telgarsky. Spectrally-normalized margin bounds for neural networks. Advances in Neural Information Processing Systems 30, 2017.
  • Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, Oriol Vinyals. Understanding deep learning requires rethinking generalization. International Conference on Learning Representations, 2017.

Search the site

Notes
Blog
Projects
Resources
About me