Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.A guarantee you can sign
No learner can promise to be exactly right after seeing some examples: it might be unlucky. What it can promise is to be approximately right (error at most ε, say 5%), probably (in at least 95% of the ways the data might have come out), once it has seen enough examples. That’s PAC learning. The theory tells you how many examples is “enough”.
Certifying a learned component, such as a classifier that flags anomalous telemetry or a perception model on a rover, needs statements of the form “with probability 1 − δ, error ≤ ε”. PAC theory is where those statements come from, and it shows how the required data grows with the target accuracy, the confidence and the richness of the model.
- 1. PAC stands for…
- 2. In PAC learning, ε controls…
- 3. …and δ controls…
Level 1: Beginner
★★☆☆☆ Basic⏱ 25 minSecondary-school mathematics: arithmetic and elementary algebra.Definitions
A hypothesis class H is PAC learnable if there is an algorithm A and a function such that for every ε, δ ∈ (0, 1), every distribution D over X, and every target f ∈ H (the realizable case), given i.i.d. examples labelled by f,
is the sample complexity. If A also runs in time polynomial in 1/ε, 1/δ and the input size, H is efficiently PAC learnable (Valiant, 1984).
Thresholds
For , the consistent learner “smallest positive example” errs by more than ε only if no example lands in the ε-mass interval just above t*. That happens with probability . So suffices: 60 examples for ε = δ = 0.05.
- 1. The realizable assumption means…
- 2. Samples needed for thresholds with ε = δ = 0.05:
- 3. PAC guarantees must hold for…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.Axis-aligned rectangles
The tightest rectangle around the positive examples is consistent and lies inside the target. Its error is the probability mass of the target not covered. Split the target’s border region into four strips, each of mass ε/4. If every strip contains a sample, the error is at most ε. A union bound over the four strips gives failure probability , so suffices (Kearns and Vazirani, 1994): 351 examples for ε = δ = 0.05.
Finite classes
Any consistent learner over a finite H needs only (b2-2).
Agnostic PAC
Drop realizability: labels may be noisy, so the best in class has error . Require with probability ≥ 1 − δ. For finite classes, ERM needs . The 1/ε² (instead of 1/ε) is the price of noise in the worst case.
Noise conditions decide the rate
The worst case 1/√m appears when the noise is close to ½ near the decision boundary. If everywhere (Massart noise), fast 1/m rates return. Intermediate conditions (Tsybakov’s margin condition) give rates in between (Massart and Nédélec, 2006).
- 1. Rectangle sample complexity:
- 2. Agnostic learning over finite H needs about…
- 3. Massart noise (η bounded away from ½) allows…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Proof: thresholds
Let I be the interval with probability mass exactly ε. The learner’s error exceeds ε only if no example falls in I, which has probability (since 1 − x ≤ e^(−x)). Setting that ≤ δ gives m ≥ ln(1/δ)/ε. ∎
Proof: finite realizable classes
A “bad” hypothesis with error > ε is consistent with m random examples with probability . By the union bound, some bad hypothesis is consistent with probability . Any consistent learner then succeeds with probability ≥ 1 − δ once . ∎
Why the smooth-noise rate is m^(−2/3)
If η(x) = x crosses ½ linearly at t* = ½, then a threshold off by d costs excess risk , while the empirical evidence separating t* from t* + d is only about . Balancing this against the noise gives , so excess risk .
- 1. The key inequality in the threshold proof:
- 2. e^(−0.05 · 60) ≈
- 3. The finite realizable bound uses a union bound over…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.PAC guarantees, measured
Rectangles. With m = 351 (the ε = δ = 0.05 bound), 0 of 1000 runs exceeded ε = 0.05. The 95th-percentile error was 0.0215, so the bound is about 2.3× conservative. With m/8 = 43 examples, 81% of runs failed.
Thresholds. The simulated failure probabilities match (1 − ε)^m to within 1% at (m, ε) = (50, 0.05) and (100, 0.02).
Rates (mean excess error at m = 25 → 1600):
| setting | rate (log–log slope) |
|---|---|
| realizable | −1.00 |
| label noise that jumps at the boundary (Massart, η = 0.2/0.8) | −0.99 |
| smooth noise, η(x) = x crossing ½ | −0.62 (theory −2/3) |
Noise far from ½ costs almost nothing; noise near ½ at the boundary is what makes learning slow. For safety-critical classifiers, a clear separation margin is worth more than raw data volume.
PAC learning in AI, robotics and aerospace
- Certification: sample-size arguments for validating learned components (how many test scenarios demonstrate a failure rate below ε with confidence 1 − δ).
- Active learning: querying labels near the boundary can turn 1/ε into log(1/ε) labels for thresholds.
- Robust learning: noise models (Massart, Tsybakov) and adversarial noise determine what’s achievable.
- Theory of deep learning: classic PAC bounds are loose for big networks, which motivates B4.
References
- L. Valiant (1984). “A theory of the learnable.” Communications of the ACM, 27.
- M. Kearns, U. Vazirani (1994). An Introduction to Computational Learning Theory. MIT Press.
- S. Shalev-Shwartz, S. Ben-David (2014). Understanding Machine Learning, ch. 2–3. Cambridge.
- A. Blumer, A. Ehrenfeucht, D. Haussler, M. Warmuth (1989). “Learnability and the Vapnik–Chervonenkis dimension.” Journal of the ACM, 36.
- P. Massart, É. Nédélec (2006). “Risk bounds for statistical learning.” Annals of Statistics, 34.