Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Learning from examples
You want a rule that decides, from a sensor reading, whether a rock sample is interesting. You can’t write the rule by hand, but you have labelled examples. A learning algorithm picks the rule that makes the fewest mistakes on those examples. The real question is whether it will also make few mistakes on new samples it hasn’t seen. Statistical learning theory answers when and why that works.
Every trained model, from a terrain classifier on a rover to an anomaly detector on spacecraft telemetry to a perception network on a drone, is chosen by minimizing error on training data and then trusted on new data. Knowing how training error relates to real-world error, and how much data that takes, is the foundation of reliable ML in safety-critical systems.
- 1. Learning from labelled examples is called…
- 2. What we really care about is the error on…
- 3. With more training examples, the training error becomes…
Level 1: Beginner
★★☆☆☆ Basic⏱ 25 minSecondary-school mathematics: arithmetic and elementary algebra.The setup
- Data come i.i.d. from an unknown distribution D.
- A loss scores a prediction: 0-1 loss for classification, squared loss for regression.
- The risk (expected loss) of a predictor h is . We can’t compute it.
- The empirical risk on a sample of size n is . We can compute it.
The Bayes predictor
The best possible predictor (over all functions) is the Bayes predictor. For 0-1 loss it predicts the more probable label, with . Its risk is the Bayes risk, the noise floor no learner can beat. For squared loss the Bayes predictor is .
- 1. Why can't we minimize the true risk directly?
- 2. The Bayes classifier predicts 1 when…
- 3. If η(x) = 0.3 everywhere, the Bayes risk is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.Empirical risk minimization
Restrict attention to a hypothesis class H (thresholds, linear models, networks of a fixed architecture) and choose
Excess risk decomposition
With the best predictor in the class,
A richer class shrinks approximation error but makes estimation harder (b1-4).
Uniform convergence
For one fixed h, by the law of large numbers. With Hoeffding’s inequality (a4-3-6), deviations are at most with probability . But is chosen using the data, so we need all h at once. For a finite class, the union bound gives
- 1. Approximation error measures…
- 2. Why do we need uniform convergence, not just the LLN for one h?
- 3. The finite-class bound scales with |H| as…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.The Bayes classifier is optimal
For any h, the conditional risk given x is , with equality for . Take expectations over x. ∎
ERM’s excess risk is at most twice the uniform deviation
Let . Then . ∎
The finite-class bound
Hoeffding gives for each h. The union bound over |H| hypotheses multiplies the right side by |H|. Setting it to δ and solving gives . ∎ Consequences: about samples suffice (1661 for ε = 0.05, |H| = 101, δ = 0.05), and 4× the data halves the gap. Infinite classes need a finer notion of size, such as VC dimension or Rademacher complexity (B2).
- 1. ERM's excess risk is bounded by…
- 2. Samples needed for ε = 0.05 with |H| = 101, δ = 0.05:
- 3. To halve the uniform-deviation bound you need…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Testing the guarantee
The setup: 101 threshold classifiers, labels flipped 10–15% of the time, Bayes risk 12%. We ran 400 independent training sets at each of n = 100, 400, 1600 and 6400.
| n | mean sup gap | bound (δ = 0.05) | violations | mean excess risk |
|---|---|---|---|---|
| 100 | 0.088 | 0.204 | 0% | 0.0087 |
| 400 | 0.042 | 0.102 | 0% | 0.0013 |
| 1600 | 0.021 | 0.051 | 0% | ≈ 0 |
| 6400 | 0.011 | 0.025 | 0% | ≈ 0 |
- Scaling: the worst-case gap shrinks with log–log slope −0.50, exactly the 1/√n rate.
- Excess risk: ERM’s excess risk never exceeded twice the gap.
- The bound never failed, but it is about 2.3× loose. Union bounds treat every hypothesis as independent, while neighbouring thresholds are highly correlated. Tighter, data-dependent bounds (Rademacher, PAC-Bayes) close much of this gap (Shalev-Shwartz and Ben-David, 2014).
The learning problem in AI, robotics and aerospace
- Certification and safety: sample-size requirements and generalization guarantees for learned components (perception, anomaly detection) in safety cases.
- Validation practice: held-out test sets estimate R; reuse of test sets reintroduces selection bias (adaptive data analysis).
- Distribution shift: the i.i.d. assumption fails when a rover reaches new terrain or a sensor ages, so monitoring and domain adaptation are needed.
- Modern deep learning: huge classes still generalize, a puzzle taken up in B4.
References
- S. Shalev-Shwartz, S. Ben-David (2014). Understanding Machine Learning: From Theory to Algorithms. Cambridge.
- V. Vapnik (1998). Statistical Learning Theory. Wiley.
- M. Mohri, A. Rostamizadeh, A. Talwalkar (2018). Foundations of Machine Learning, 2nd ed. MIT Press.
- L. Devroye, L. Györfi, G. Lugosi (1996). A Probabilistic Theory of Pattern Recognition. Springer.
- W. Hoeffding (1963). “Probability inequalities for sums of bounded random variables.” JASA, 58.