Module 13

Statistical Learning Theory

Why can a model trained on a limited dataset work on examples it has never seen?

lessons
20
duration
34 h 30 min
concepts
105
available in English
20 / 20
completed by you
0 of 20

Where it fits

Overview

Frame learning as risk minimization under an unknown distribution. Work through complete proofs of when and why models generalize using PAC learning, VC dimension, Rademacher complexity, margins, algorithmic stability, PAC-Bayes and reproducing kernel Hilbert spaces. Apply these tools to implicit regularization, double descent, benign interpolation and the kernel regime of the neural tangent kernel, then examine what happens when the training and deployment distributions differ. Interactive demonstrations and code compare the bounds with measured errors.

Why it matters

Statistical learning theory helps you reason rigorously about how much data a model needs, why networks with more parameters than examples can generalize, when a strong backtest comes from selection, and which guarantees still apply when conditions change in production. It helps you read generalization research, design reliable evaluations for large language models and agents, and support claims about new algorithms beyond individual experiments.

Lessons 20

  1. 01The learning problem: risk, excess risk and ERMFormalize learning as the minimization of expected risk under an unknown distribution observed through an i.i.d. sample. Starting from the Bayes predictor, derive exact excess-risk identities for squared and 0-1 loss, define empirical risk minimization, and identify the generalization gap.Core90 min
  2. 02Overfitting, inductive bias and the No Free Lunch theoremExplain how inductive bias supports generalization, decompose excess risk into approximation, estimation and optimization, and examine the scope of No Free Lunch and universal consistency.Core90 min
  3. 03The bias-variance decompositionProve the bias-variance-noise decomposition of expected squared error and apply it to k-NN, ridge and polynomial models in closed form and by simulation. Examine why the decomposition does not transfer cleanly to 0-1 loss and the classical U-curve later challenged by double descent.Core90 min
  4. 04Concentration review: the test set bound and uniform convergenceReview Hoeffding, Bernstein and McDiarmid and derive useful test-set and finite-class uniform bounds. A counterexample shows why the same inequality fails when applied to training error.Review60 min
  5. 05PAC learning: realizable, agnostic and sample complexityIntroduce Valiant’s PAC model and its agnostic version as rigorous definitions of learning. Prove finite-class sample bounds of order log|H|/ε in the realizable case and log|H|/ε² in the agnostic case, explain the difference, and distinguish statistical from computational learnability through proper and improper learning.Core100 min
  6. 06VC dimension and the Sauer-Shelah lemmaFor infinite classes, count distinct labelings on n points instead of log|H|. Define shattering, growth function and VC dimension, calculate geometric examples including half-spaces via Radon, and prove Sauer-Shelah.Core100 min
  7. 07Rademacher complexityBuild Rademacher complexity as a measure of correlation with pure noise. Derive a generalization bound through McDiarmid and ghost-sample symmetrization, Massart’s finite-class lemma and structural properties including Talagrand’s contraction lemma.Core110 min
  8. 08The fundamental theorem of PAC learning: upper bounds, lower bounds and ratesCombine Rademacher, Massart and Sauer to obtain a VC bound, discuss sample-complexity lower bounds and the fundamental PAC theorem, and introduce covering numbers, Dudley chaining and fast rates.Advanced120 min
  9. 09Surrogate loss calibration and margin boundsStudy classification calibration and the ψ transform linking convex surrogate loss to 0-1 excess risk, then derive norm- and margin-based generalization bounds for SVM and boosting.Advanced110 min
  10. 10Structural risk minimization and model selection with guaranteesStudy structural risk minimization and Occam bounds, formalize nonuniform learnability and validation guarantees, and examine adaptive overfitting from repeated test-set use.Core100 min
  11. 11Regularization and algorithmic stabilityShift focus from the class to the algorithm. Define stability notions, relate average replacement to expected generalization gap, and prove uniform stability for Tikhonov regularization with convex Lipschitz losses.Advanced110 min
  12. 12PAC-Bayes, compression and information-theoretic boundsDerive PAC-Bayes bounds through change of measure and KL divergence, obtain the Gibbs posterior, study nonvacuous network bounds, and connect compression and mutual information. GPUAdvanced110 min
  13. 13Reproducing kernel Hilbert spaces and the representer theoremDevelop kernel theory through RKHS construction, continuous evaluation and reproduction, the representer theorem, Mercer spectral decomposition and Rademacher bounds for RKHS balls.Core110 min
  14. 14Spectral analysis of kernel ridge regression and random featuresAnalyze kernel ridge regression through Gram eigenmodes, effective dimension and source-capacity rates, then examine the statistical cost of random-feature kernel approximation.Advanced110 min
  15. 15Implicit regularization: what gradient descent choosesStudy how optimization selects among infinitely many empirical-risk minimizers: minimum-norm least-squares GD, early stopping as ridge, maximum-margin logistic regression, and stability of SGD with few passes.Advanced100 min
  16. 16Double descent and the interpolation regimeReproduce double descent with random features, derive ridgeless risk in the proportional regime, explain the interpolation peak, assess optimal regularization, and study deep model-, epoch- and sample-wise variants. GPUAdvanced110 min
  17. 17Benign overfitting and the puzzle of deep generalizationDeep networks can fit random labels and still generalize from real labels. This rules out explanations that depend only on the hypothesis class. Reproduce the random-label experiment, study effective ranks and benign interpolation in linear regression, classify benign, tempered, and catastrophic interpolation, and examine spectral margin bounds and the limits of uniform convergence. GPUResearch120 min
  18. 18The kernel regime: the NTK as a lens on the generalization of wide networksA very wide network whose parameters barely move can behave like its linearization, giving regression with the neural tangent kernel (NTK). Use the NTK to analyze data-dependent bounds, spectral learning and alignment with the target. Then compare the fixed-kernel regime with finite networks that learn features. GPUResearch110 min
  19. 19Distribution shift: the theory of domain adaptationStudy generalization when training and deployment distributions differ. Distinguish covariate, label and concept shift, derive importance weighting and its variance cost, estimate new label proportions, and use the Ben-David domain adaptation bound to understand what alignment can and cannot guarantee.Advanced110 min
  20. 20Out-of-distribution generalization: distributional robustness and invarianceWhen deployment conditions are unknown, learn predictors that work across a family of distributions. Formulate out-of-distribution generalization with worst-case risk, develop f-divergence DRO, CVaR and group DRO, and study spurious correlations, invariant risk minimization and empirical regularities such as accuracy on the line. GPUResearch110 min

Module capstone

Generalization Observatory

Bring the module together on a small real task such as binary MNIST or a subset of CIFAR-10 using a local GPU. Train models of increasing width at several label noise levels. For each model, compute the test error, a VC bound based on parameter count, a margin bound using spectral norms, an estimate of Rademacher complexity by fitting random labels, a PAC-Bayes-kl bound optimized as in Dziugaite and Roy, and an empirical stability estimate. Use the same models to reproduce double descent, measure how empirical NTK drift varies with width, and evaluate a locally generated test set with distribution shift, using importance weighting or group DRO. Deliver a reproducible report with seeds, settings and figures. Identify which bounds are vacuous, which rank models in agreement with their measured errors using Kendall rank correlation as in Jiang et al., and which aspects of the observed generalization remain theoretically unexplained.

Check what you already know

  • Express the excess risk over the Bayes predictor for squared and 0–1 loss, and distinguish it from the generalization gap
  • Prove the bias–variance–noise decomposition and compute it in closed form for ridge regression
  • Construct confidence intervals for test error using Hoeffding’s inequality and the exact binomial tail
  • Prove that a finite class is PAC learnable and calculate its realizable and agnostic sample complexity
  • Compute the VC dimension of halfspaces and prove the Sauer–Shelah lemma
  • Prove the Rademacher generalization bound using symmetrization and McDiarmid’s inequality
  • Bound the Rademacher complexity of a norm-bounded linear class and apply the margin bound
  • Prove uniform stability for strongly convex regularized risk minimization
  • Derive the PAC-Bayes bound from the Donsker–Varadhan formula
  • Prove the representer theorem and compute norms in an RKHS
  • Explain and reproduce double descent with the minimum-norm interpolator
  • Calculate the effective ranks of a covariance spectrum and decide whether interpolating noisy data is benign
  • Correct covariate shift with importance weights and measure the effective sample size

References