# The no-free-lunch theorems of supervised learning

Model-dependent learning algorithms can be justified relative to their chosen model

Tom F. Sterkenburg, Peter D. Grünwald · arXiv · 2022-2-9

- **Problem** No-free-lunch seems to block justifying learning algorithms, yet guarantees exist.
- **Method** The authors split learning algorithms into data-only and model-dependent types. Model-dependent algorithms also take a model as input, which is a choice of bias, and the authors argue that standard methods such as cross-validation fit this type.
- **Results** The authors show that under the uniform distribution every algorithm has expected error 1/2 in the three-day example. They also argue the weaker result that no universal data-only algorithm exists, which keeps the no-free-lunch lesson without the uniformity assumption.

## Why the NFL results look like a blow to learning theory

The no-free-lunch theorems of supervised learning are impossibility results, and many readers take them to undercut machine learning altogether. Computer scientists rank them among the most important theorems in statistical learning, while some philosophers read them as a radicalized version of Hume's induction skepticism. On the usual reading, they show that we can't formally justify our learning algorithms.

Wolpert's own interpretation is stronger: all learning algorithms are equivalent, so cross-validation has as much justification as anti-cross-validation.

Learning theory nonetheless derives mathematical guarantees that standard procedures, like minimizing empirical error on the training set, beat other possible procedures. This creates a puzzle: if the NFL lesson were that learning algorithms have no formal justification, a learning theory could not exist. The tension was noticed from the start, yet the existing explanations of how NFL and learning theory fit together are partial at best.

The authors' main tool is a distinction between two conceptions of learning algorithms. That distinction has a parallel in the philosophical literature promoting a local view of inductive inference. On the data-only conception, an algorithm is a function that takes only data as input. On the model-dependent conception, an algorithm also takes an explicitly formulated model or hypothesis class as input, which is a choice of bias.

The authors argue that the NFL theorems rely on the data-only conception, while many standard methods, such as empirical risk minimization and cross-validation, are model-dependent.

The authors see the NFL lesson as consistent with learning theory: every data-only procedure must possess some inductive bias. A model-dependent algorithm can be judged by how well it performs relative to any chosen model. Learning-theoretic guarantees are therefore relative to the models the algorithm can take, so empirical risk minimization can be preferred to risk maximization.

The NFL lesson shouldn't be used as a stick against every possible learning algorithm, because model-dependent algorithms account for it from the start.

## Two conceptions of a learning algorithm

The paper separates two conceptions of a learning algorithm, and the NFL results rest on the first one. A data-only algorithm is a function that takes only data and returns conclusions. A model-dependent algorithm also asks for an input model, so it instantiates a function of two places. Empirical risk minimization and cross-validation take two inputs: the data and an explicit hypothesis class, which is a choice of bias.

The authors argue that the NFL theorems rely on the data-driven conception, while these standard methods should not be viewed that way.

The oatmeal example makes the data-only conception concrete. Each morning the question is whether breakfast will be tasty, based only on the days before. An algorithm maps that history of past days to a guess about the next day. For three days there are 2^3 possible learning situations and 2^7 possible algorithms. Every single algorithm predicts perfectly in exactly one possible learning situation.

Every single algorithm predicts maximally badly in exactly one other possible learning situation. It suffers error 1/3 in three possible learning situations, and error 2/3 in the remaining three. Under the uniform distribution on learning situations, every algorithm therefore has the same expected error of 1/2.

The same result holds in the classification setting with oats described by three binary features. The instances form the domain set X of eight possible bowls, and a classifier maps each instance to a label.

## What the uniform distribution is doing

The counting argument treats all possible learning situations on a par, and that is itself a choice of weighting. Assigning each learning situation the same probability makes the result a uniform distribution on learning situations. Under that uniform distribution, every learning algorithm has the same expected error of exactly 1/2 in the three-day prediction setting.

The authors argue that this equivalence depends on an unmotivated assumption, which they say can be read as assuming learning is impossible. So the equivalence claim is only as strong as the uniform weighting behind it.

Critics reply that uniformity isn't necessary, since Rao et al. show that generalization performance is conserved under a wider class of distributions. But those results don't extend to all distributions, because a certain symmetry must be retained. The worry remains that the NFL results express the induction-hostileness of the presupposed weighing distribution.

Wolpert answered that a non-uniform distribution could favour one algorithm just as easily as another. So the critic has to justify a prior, and that is where the dialectic stalls.

The authors put the burden on Wolpert, who hasn't justified the uniform premise. They see little reason to think the world is governed by any objective distribution over learning situations, let alone a uniform one. The equivalence conclusion needs that premise, so the premise is where the argument has to be checked. Dropping the uniformity assumption gives the weaker statement that there is no universal data-only learning algorithm.

## The weaker statement that survives

Dropping the uniform premise leaves a weaker variant of the NFL results, and the authors state it as a claim about data-only algorithms. It says that for any data-only learning algorithm, some learning situation exists where it performs poorly while another data-only algorithm performs well. The authors call the upshot that there is no universal data-only learning algorithm, one that performs well whenever some data-only algorithm does.

Because the statement is implied by the original results, it keeps the NFL lesson without the uniformity assumption.

Whether any instance of this statement holds depends on the learning problem, the candidate methods and the notion of good performance. The authors note it is not too hard to build artificial learning problems where the statement is false. Such a problem can be formulated so that its possible learning situations already accommodate a particular learning approach.

The authors read the same idea into Putnam's diagonalization argument, which van Fraassen relies on against the ideal of induction. Putnam's argument shows that for each prediction algorithm there are infinite data sequences on which it fails, and another algorithm predicts them perfectly.

The authors take the lesson not to be a rejection of inductive rules, but a finer notion of inductive rule. Such a rule can take local assumptions as inputs alongside the data. Bayesian conditionalization illustrates this, because its output depends on the prior as well as on the input data. So the rejection of general rules concerns purely data-driven rules, and the authors' statement is consistent with rules that also take a prior.

Okasha's distinction between a rule of inductive inference and conditionalization supports this reading.

## Model-relative justification for standard methods

Model-dependent learners are generic, because each application supplies its own model, and their guarantees hold relative to that model. Bayesian learning makes this concrete: the algorithm must be given a prior distribution over some domain of probability distributions. That choice of prior is itself the choice of model, so the algorithm stays generic while the model carries the bias.

A learning-theoretic demonstration then shows that, relative to the chosen prior, the Bayesian algorithm performs well. Under a subjective reading, the prior encodes one's beliefs, and the Bayesian algorithm is simply optimal under those beliefs. Under a pragmatic reading, which most practitioners subscribe to, one assumes the model is correct but picks the prior for other reasons.

Such reasons include computational convenience and optimizing worst-case behaviour, which leads to noninformative or flat priors.

ERM's learning-theoretic guarantees rely on the problem assumption of stochastic classification that data is sampled i.i.d. Given that assumption, ERM's uniformity meta-bias is provably good, while the anti-uniformity meta-bias of anti-ERM is provably not. The authors call these biases meta-biases, because they concern extrapolating classifiers' success rather than the data directly.

The meta-biases are linked to assumptions already introduced in formulating the learning problem, so they are not free-floating. The same ERM-versus-anti-ERM comparison is what the NFL results also cover, under a uniform prior.

Cross-validation gets the same model-relative treatment, which is what lets learning theory say it is preferable to anti-cross-validation. The authors find claims that cross-validation has no more inherent justification than anti-cross-validation misleading. Model-relative justification doesn't settle whether the model itself is warranted.

A justification for the model in any particular application still needs to come from further assumptions. Model-dependent algorithms are therefore evaluated relative to the models they are given, not in absolute terms.

## Why the NFL results and the guarantees don't contradict

The appendix takes a finite hypothesis class F and compares ERM with anti-ERM over that same class. Under a uniform prior over learning situations, the Wolpert-Schaffer results give both AERM(F) and Aa-ERM(F) the same expected off-training-set risk of 1/2 for any sample size n. The learning-theoretic guarantee, however, bounds the expected iid risk of AERM(F) by min over F of LD plus the square root of log\|F\| over 2n.

For Aa-ERM(F), the same guarantee says the expected iid risk is not less than max over F of LD minus that square root term. This presents a paradox: the two algorithms seem equally good under the uniform prior, yet the guarantee separates them.

The authors resolve this by deriving the bound in a compact form that doesn't depend on the uniform prior. The bound holds for all distributions DX and all conditional distributions DY\|X, and it still holds in expectation over any prior U' on DY\|X. The derivation applies Hoeffding's inequality to each classifier in F, and then sums the resulting bounds over the class.

Jensen's inequality, division by ηn, and optimization over η \> 0 give the square root form. The proof uses that ERM's empirical risk can't exceed that of f\*, so the bound follows.

The authors also use the same derivation for two-fold forward validation, with S1 fixing the class F. Because the guarantee holds for every distribution, the paradox is not a conflict with the uniform-prior result. Anti-ERM can beat random guessing while ERM does worse, but only in specific learning situations. In those situations, the authors show that F must be essentially useless, with its best and worst elements within about ε of 1/2.

The authors conclude that the paradoxical situations become much less paradoxical when viewed this way.

## Limits of the model-dependent view

Model-dependent algorithms don't come with guarantees everywhere, and the authors list where standard methods break down. In that regime ERM can behave in surprisingly bad ways, with its risk temporarily increasing in the small n-regime. Even when the goal is classification with 0/1-error, ERM often does better on a proxy loss such as logistic or hinge loss, which avoid the discontinuities of the 0/1-loss.

Cross-validation can perform poorly when the number of constituent algorithms grows exponentially in n, as in variable selection problems. For such problems penalized ERM approaches like the Lasso are more suitable.

The right method also depends on the loss function, so the picture changes when the loss changes. For squared-error prediction, cross-validation behaves like AIC and is often suitable. For finding which components of X are correlated with Y, cross-validation isn't suitable. The assumptions encoded in a probabilistic model or hypothesis class also set conditions for success.

When the model is wrong-but-useful, the inductive assumption behind pragmatic Bayesian inference fails, and Bayesian inference can fail dramatically in regression and classification. The posterior may never concentrate around the best-predicting distribution in the model, however much data arrives. ERM's assumption is more agnostic, since hypotheses only need to be useful with small classification error, so this problem doesn't arise by construction.

Deep learning shows a harder case, because ERM by stochastic gradient descent makes the algorithm and the model interact. SGD is run until the training error is zero, and neural nets have billions of local minima with zero empirical error. SGD directs learning towards particular minima, which tend to be broad and have small norm under a non-standard norm.

The same model trained with different ERM instances can land in very different minima and generalize differently. Because the networks can represent almost any continuous function, the model alone can't express the inductive bias. The authors conclude that in deep learning there is no crisp separation between inductive bias and learning algorithm.

For cross-validation the separation is clear, so its quality can be assessed relative to the model.

The model-dependent view doesn't escape Hume's skeptical argument, even though it accepts a local view of induction. An absolute justification for inductive conclusions still requires justifying the preceding choice of local assumptions or model. The authors suggest the global question of justification reduces to the original problem of induction.

Learning-theoretic guarantees still show that some standard algorithms are justified relative to a given model.

## Paper info

- **Authors**: Tom F. Sterkenburg, Peter D. Grünwald
- **Venue**: arXiv · Preprint
- **First published**: 2022-2-9
- **Added**: 2026-11-6
- **Updated**: 2022-2-9
- **Version**: v1
- **arXiv**: 2202.04513
- **DOI**: 10.1007/s11229-021-03233-1
- **Category**: cs.LG
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2202.04513v1) · [PDF ↗](https://arxiv.org/pdf/2202.04513v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

The no-free-lunch theorems promote a skeptical conclusion that all possible machine learning algorithms equally lack justification. But how could this leave room for a learning theory, that shows that some algorithms are better than others? Drawing parallels to the philosophy of induction, we point out that the no-free-lunch results presuppose a conception of learning algorithms as purely data-driven. On this conception, every algorithm must have an inherent inductive bias, that wants justification. We argue that many standard learning algorithms should rather be understood as model-dependent: in each application they also require for input a model, representing a bias. Generic algorithms themselves, they can be given a model-relative justification.

## Quote from the paper

Tom F. Sterkenburg, Peter D. Grünwald (2022). The no-free-lunch theorems of supervised learning. arXiv:2202.04513v1. https://doi.org/10.1007/s11229-021-03233-1

**BibTeX**

```
@article{sterkenburg2022free,
  title = {{The no-free-lunch theorems of supervised learning}},
  author = {Tom F. Sterkenburg and Peter D. Grünwald},
  year = {2022},
  eprint = {2202.04513},
  archivePrefix = {arXiv},
  doi = {10.1007/s11229-021-03233-1},
  url = {https://arxiv.org/abs/2202.04513v1}
}
```

## Other paper commentary

- [A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning](https://refivu.com/en/papers/08306129-4598-48b6-baf3-9d1af09e03a6-a-reduction-of-imitation-learning-and-structured-prediction.md)
- [NICE: Non-linear Independent Components Estimation](https://refivu.com/en/papers/f56da4f3-4308-4b66-a0bf-e0d6e495195a-nice-non-linear-independent-components-estimation.md)
- [Gaussian Error Linear Units (GELUs)](https://refivu.com/en/papers/264fd129-ba49-4e4c-ac1f-59466a4e43ea-gaussian-error-linear-units-gelus.md)
- [Towards Learning Universal, Regional, and Local Hydrological Behaviors via Machine-Learning Applied to Large-Sample Datasets](https://refivu.com/en/papers/c1ee1227-dd45-4aef-9943-a760b7a45dbc-towards-learning-universal-regional-and-local-hydrological.md)
- [Robust Training of Machine Learning Interatomic Potentials with Dimensionality Reduction and Stratified Sampling](https://refivu.com/en/papers/5c340cd0-bd53-43af-998d-a610bbe32799-robust-training-of-machine-learning-interatomic-potentials.md)
- [One-step regression and classification with crosspoint resistive memory arrays](https://refivu.com/en/papers/3d9de6a9-144e-4dd9-bf46-2e45035031ef-one-step-regression-and-classification-with-crosspoint.md)
- [Decision-Oriented Dialogue for Human-AI Collaboration](https://refivu.com/en/papers/1d9fad4b-76a3-40b2-b7c6-3b42b2a8ddc5-decision-oriented-dialogue-for-human-ai-collaboration.md)
- [A Review of Off-Policy Evaluation in Reinforcement Learning](https://refivu.com/en/papers/e25e61dd-1c4f-4fca-aaa9-9c30003d2d85-a-review-of-off-policy-evaluation-in-reinforcement.md)
- [Multimodal Spatial Language Maps for Robot Navigation and Manipulation](https://refivu.com/en/papers/4a0d9969-87c8-4cf7-9b1a-5f7c83b81e14-multimodal-spatial-language-maps-for-robot-navigation-and.md)
- [Multi-SimLex: A Large-Scale Evaluation of Multilingual and Cross-Lingual Lexical Semantic Similarity](https://refivu.com/en/papers/2e03a8c0-9df9-42e1-97d6-82e5f0f5ad03-multi-simlex-a-large-scale-evaluation-of-multilingual.md)
- [Deep Unsupervised Learning using Nonequilibrium Thermodynamics](https://refivu.com/en/papers/0a712ab6-ae49-4e62-8de7-48f3f793c53f-deep-unsupervised-learning-using-nonequilibrium.md)
- [Fast R-CNN](https://refivu.com/en/papers/cf1d88ea-f632-4173-bcfd-eec504e5c175-fast-r-cnn.md)

## Terms in this paper

- [deep learning](https://refivu.com/en/terms/1114eabeb503-deep-learning)
- [generalization error](https://refivu.com/en/terms/f3d23f0e34d3-generalization-error)
- [empirical risk minimization](https://refivu.com/en/terms/886608d45c77-empirical-risk-minimization)
- [cross-validation](https://refivu.com/en/terms/2abb0d8da39c-cross-validation)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/e3085891-a4f1-4605-8cbb-a1c36168e267-the-no-free-lunch-theorems-of-supervised-learning)
