Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.No algorithm wins everywhere
Suppose someone gives you a few examples of a rule and asks you to guess the rest. If the rule could be anything, with no pattern at all, the examples tell you nothing about the unseen cases, and every guessing strategy is a coin flip. Learning only works because we assume something about the world: nearby things behave alike, simpler explanations are likelier, physics is smooth. Those assumptions are a learner’s inductive bias, and they help only when they match the world.
NFL is why there is no universal best model. Choosing a CNN for images (translation symmetry), a physics-informed model for dynamics, or a Gaussian process with a smooth kernel for sensor fields all encode prior knowledge. In robotics and space, where data is scarce, building the right assumptions in (symmetries, conservation laws, priors) often matters more than any learning algorithm.
- 1. Can one learning algorithm be best on every possible problem?
- 2. The assumptions a learner makes to generalize are its…
- 3. Learning works in practice because real problems…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Off-training-set generalization
Take a finite input set X, a training set T ⊂ X, and binary targets f. A learner sees f on T and must predict f off T. If all targets are equally likely, then given the training labels, the labels off T are still uniform. With 8 inputs and 4 seen, 16 targets agree with the training data, and for every unseen point exactly half of them say 1. So every learner’s expected off-training-set accuracy is exactly 1/2 (Wolpert, 1996).
What NFL does and doesn’t say
- It does say that no learner beats another when averaged uniformly over all problems.
- It doesn’t say learning is hopeless. Real problems are not uniformly random. It says the only way to win is to assume something, and to be right about it.
- 1. Number of binary target functions on 8 inputs:
- 2. With 8 inputs and 4 labels seen, how many targets agree with the data?
- 3. Averaged over all targets, a learner's off-training-set accuracy is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 35 minUndergraduate students and practising engineers.NFL for optimization
Wolpert and Macready (1997) proved the analogue for black-box search. Averaged over all functions on finite sets, any two algorithms that don’t revisit points produce the same distribution of observed values after m evaluations. Hill climbing, random search, a fixed sweep and even a deliberately bad “anti-hill-climber” all tie. Over the 3⁸ = 6561 functions from 8 points to 3 values, the mean best-so-far after 1–4 evaluations is 1.000, 1.444, 1.667, 1.790 for every algorithm.
Structure breaks the tie
- Smooth targets (at most one label change along x): 1-NN gets 87.5% off-training-set, majority 71.9%, and the anti-1-NN 12.5%.
- Search: on smooth single-peak functions hill climbing wins, but on broad-plateau unimodal functions exploring far wins.
The ranking of algorithms is a property of algorithm and problem class together.
Learning-theory version
A sharper form (Shalev-Shwartz and Ben-David, 2014): for any learner and any sample size below |X|/2, there is a distribution where a perfect classifier exists, yet the learner errs at least 1/8 of the time with probability at least 1/7. Hence learning requires restricting the hypothesis class, which is the start of PAC learning (B2).
- 1. NFL for optimization compares algorithms that…
- 2. On smooth targets, 1-NN scored…
- 3. NFL implies that useful learning needs…
Level 3: Advanced
★★★★☆ Advanced⏱ 35 minGraduate level, with full derivations and proofs.Proof (off-training-set, uniform targets)
Fix the training labels. The consistent targets are all completions of the unseen labels, each equally likely. For any unseen x and any prediction ŷ, exactly half of the completions have f(x) = ŷ. So the expected accuracy at x is 1/2, and the off-training-set average is 1/2 for every learner. ∎
Gains are paid for
Pair each target f with , which agrees with f on T and is flipped off T. Both give the learner the same training data, hence the same predictions, so . Any target where a learner beats 50% has a twin where it does equally worse. ∎
Optimization NFL (sketch)
Condition on the values seen so far. For a uniformly random f, the value at any unvisited point is uniform and independent of the history, whichever point the algorithm picks. By induction, the sequence of observed values has the same distribution for every non-revisiting algorithm. ∎
- 1. The 'twin target' argument pairs f with a target that…
- 2. Binary targets on 20 inputs consistent with 15 seen labels:
- 3. In optimization NFL, the next value observed is uniform because…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.Exhaustive verification and the role of structure
Learning. Over all 256 targets, every learner scores exactly 0.500 off-training-set: always-0, majority, 1-NN, and anti-1-NN alike. Over the 16 smooth targets: 1-NN 0.875, majority 0.719, always-0 0.500 and anti-1-NN 0.125. (1-NN and its anti-version always sum to 1.)
Search. Over all 6561 functions, the mean best-so-far curves of the sweep, random-order, hill-climbing and anti-hill-climbing searches are identical to machine precision. After 4 evaluations:
| problem class | hill climbing | anti-hill | sweep |
|---|---|---|---|
| broad unimodal (787 functions) | 1.607 | 1.668 | 1.582 |
| smooth single peak (256 functions) | 1.547 | 1.461 | 1.484 |
Neither search is better in general. Which one wins depends on the problem’s shape. Algorithm benchmarks (optimizers, neural architectures, RL methods) therefore only make sense relative to a problem distribution.
No Free Lunch in AI, robotics and aerospace
- Architecture design: CNNs (translation), graph networks (permutation), equivariant networks (a12-3) build in known symmetries.
- Physics-informed learning: conservation laws (a13-11, a13-12) as inductive bias for data-poor dynamics.
- Bayesian methods: priors make the inductive bias explicit (a5-2-1); Gaussian-process kernels encode smoothness.
- Benchmarking: evaluate optimizers and learners on distributions that match the deployment domain (terrain, missions), not on arbitrary test suites.
References
- D. Wolpert (1996). “The lack of a priori distinctions between learning algorithms.” Neural Computation, 8.
- D. Wolpert, W. Macready (1997). “No free lunch theorems for optimization.” IEEE Transactions on Evolutionary Computation, 1.
- S. Shalev-Shwartz, S. Ben-David (2014). Understanding Machine Learning, ch. 5. Cambridge.
- T. Mitchell (1980). “The need for biases in learning generalizations.” Rutgers CBM-TR-117.
- C. Schaffer (1994). “A conservation law for generalization performance.” ICML.