Machine learning

no free lunch theorem

/ noh free lunch THEER-um /

The no free lunch theorem is a humbling mathematical result: averaged across every possible problem, no learning method is better than any other — not even better than random guessing. There is no single algorithm that wins everywhere. Any method that does brilliantly on some kinds of problems must, in exchange, do correspondingly badly on others. The name captures the spirit perfectly: you don't get something for nothing.

The reasoning is surprisingly clean. A method only beats the competition by making assumptions about what patterns the world tends to have. Those assumptions pay off when they match the problem at hand — and cost you when they don't. If you imagine the full universe of all conceivable problems, including bizarre ones where the patterns are pure chaos, then every method's wins and losses cancel out exactly. The free lunch you might hope for — a master algorithm good at literally everything — is mathematically impossible.

Why care, if those bizarre problems never come up in practice? Because the theorem reframes the whole job. It says the question "what is the best algorithm?" is meaningless without finishing the sentence: best for what kind of problem? Real-world problems are not random — they have structure — and success comes from picking a method whose assumptions (its inductive bias) fit that structure. The theorem doesn't say all methods are equally good on your task; it says you cannot escape the work of matching method to problem, and there is no shortcut around understanding your data.

A decision tree might crush a problem where the answer depends on a few crisp yes/no rules, while a neural network wins on messy image data. Swap them and both stumble. Neither is "the best learner" — each is the best fit for a different shape of problem, exactly as the theorem predicts.

Every method's strength on one problem is paid for by weakness on another.

The theorem is often misread as "all algorithms are equally good, so it doesn't matter which you pick." Wrong: it averages over all possible problems, most of which are pure noise. On the structured problems we actually face, the choice of method matters a great deal.

Also called
NFL theorem没有免费午餐定理沒有免費午餐定理天下没有免费的午餐