The Problem of Induction
Can the evidence of the past tell us anything at all about the future?
Russell's chicken expects breakfast every morning, with growing confidence, until the morning the farmer comes with a knife. Hume's argument says no past regularity entails anything about the future, and that any defence of induction by its record runs in a circle. The part collects the answers. Laplace's rule of succession and Carnap's continuum put the problem into a prior; Dignāga's wheel of reasons and the Cārvāka skeptic met it a thousand years earlier. Three paradoxes of confirmation follow: Hempel's ravens, measures that rank the same evidence oppositely, and Goodman's grue, reproduced in eight small neural networks that agree on the data and disagree after T. Popper, inference to the best explanation and the merging of opinions each help and each fall short. Then the question changes from justification to reliability: learning in the limit, Gold's adversary, Kelly's justification of Ockham's razor, Solomonoff's universal prior and MDL. The turn is Wolpert's no free lunch theorem, proved on all 256 worlds over three bits, the Wall's fifteenth brick: every learner bets on a kind of world. It ends with Reichenbach's pragmatic vindication and Schurz's meta-induction, whose regret bound holds for every sequence.
What you need. Bayes' rule as in Part 13. One integral (the Beta integral behind Laplace's rule) is stated and left as a problem.
- The calculation
- Bayesian confirmation, learning in the limit
- The wall
- grue; no free lunch; Gold
- Built toy
- inductive-bias zoo; a small Solomonoff mixture
What you will be able to do
Introductory
- State Hume's argument and show where an inductive justification of induction is circular.
- Compute a prediction with Laplace's rule of succession and say what its prior assumes.
- Prove no free lunch for one training set by counting the worlds that agree with the labels seen.
Advanced
- Compute the Bayes factors of a black raven and of a white shoe for 'all ravens are black', and say which premise of the paradox the Bayesian gives up.
- Evaluate two pieces of evidence on six confirmation measures and exhibit a reversal of their ranking.
- Simulate two Bayesians with opposed priors merging, and one whose prior rules out the truth.
Research
- Prove Gold's theorem by constructing the adversary, and Putnam's diagonal sequence against a computable predictor.
- State Kelly's Ockham efficiency theorem and Solomonoff's error bound, and say what each does and does not claim about simplicity and truth.
Applied
- Choose a polynomial degree by two-part MDL and relate the code length to prediction error.
- Name the inductive bias of a given learner and describe a world in which that bet loses.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Introductory 24 min · Advanced 42 min · Research 52 min · Applied 26 min.
- 0Will the sun rise tomorrow?Introductory2 min
- 1Hume's problemIntroductory3 min
- 2The rule of successionIntroductory3 min
- 3Inference in IndiaAdvanced2 min
- 4The ravensIntroductory3 min
- 5Measuring confirmationAdvanced3 min
- 6GrueIntroductory3 min
- 7Conjectures and refutationsIntroductory4 min
- 8The best explanationAdvanced4 min
- 9When opinions mergeAdvanced2 min
- 10Learning in the limitResearch4 min
- 11Ockham's razor, justifiedResearch3 min
- 12The universal priorResearch3 min
- 13Compression and predictionApplied3 min
- 14No free lunchIntroductory4 min
- 15A pragmatic vindicationAdvanced4 min
- Recap, problems, and where this comes backAll tracks2 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film.
Will the sun rise tomorrow?Introductory2 min
Parts 13 and 14 told us how to change our minds when evidence arrives. This part asks whether the evidence of the past can tell us anything at all about the future. Bertrand Russell's chicken expected breakfast every morning, with ever greater confidence, until the morning it got something else.
Picture the chicken's life. Every morning it is fed, and every morning its confidence that tomorrow will be the same grows. Then the farmer comes with a knife. The evidence was real, the inference natural, and the conclusion false. David Hume's point is that nothing in the past, however long and regular, entails anything about the future. Yet science, machine learning and everyday life all depend on learning from experience. Can that be justified, and if not, what can be said for it?
The plan. Hume's problem, and the first mathematical answer, Laplace's. The Indian logicians, who faced the same problem a thousand years earlier. Three paradoxes of confirmation: the ravens, the choice of measure, and grue, which the Reasoner reproduces in a neural network. Popper, inference to the best explanation, and the theorem that Bayesians eventually agree. The theory of learning in the limit, and a theorem that justifies Ockham's razor. The universal prior, and compression. And the no free lunch theorem, this part's brick in the Wall, with the best vindication of induction we have.
What it establishes: Russell's chicken (1912); the plan.
1Hume's problemIntroductory3 min
Hume's argument, from the Enquiry of 1748. We observe that every emerald so far has been green, and conclude that the next one will be. The step needs a premise: that the future will resemble the past. How could we know it? Not by reason alone: its denial is perfectly conceivable, so no demonstration can prove it. Not by experience: experience tells us only about the past, and to project it onto the future we must already assume the principle in question.
The tempting reply is circular. Induction has worked so far; so it will keep working; but that step is itself an induction. A justification of induction by induction assumes exactly what it was supposed to prove.
How have philosophers lived with the circle? Hume's own answer was what he called a sceptical solution: custom. We expect the future to resemble the past because we are made that way. That explains our expectations; it does not justify them. Max Black argued that the inductive defence of induction is circular only in a harmless way: it does not assume its conclusion as a premise, it merely uses the rule it defends. Wesley Salmon's reply was a mirror. The counterinductivist predicts the opposite of the past. Counterinduction has mostly failed so far, so, by counterinduction, it will work next time. If rule-circularity is harmless, this argument is just as good. Peter Strawson tried to dissolve the question: asking whether induction is reasonable is like asking whether the law is legal, since being reasonable means, in part, proportioning belief to inductive evidence. And Goodman held that rules and particular inferences are justified together, each adjusted to the other: the method later called reflective equilibrium.
Philosophers have given six kinds of answer, and this part meets each of them. Make induction probable rather than certain, with Laplace and Bayes. Do science without induction, with Popper. Infer whatever would best explain the evidence. Ask which methods are guaranteed to converge on the truth, and which do so most efficiently. Prefer simple explanations, made precise as a universal prior. Or argue, with Reichenbach, that if any method works, induction does. Behind all of them stands a theorem: no method of learning works in every possible world.
What it establishes: Hume (1748): the argument and the circle; custom; Black (1958), Salmon's counterinductivist, Strawson (1952), Goodman; six kinds of answer.
2The rule of successionIntroductory3 min
The first mathematical answer to Hume came from Thomas Bayes and Pierre-Simon Laplace. Suppose an event has an unknown chance theta of happening on each trial, and that beforehand every value of theta is equally likely. You have seen s successes in n trials. Then the probability that the next trial succeeds is a ratio of two integrals, and it comes out beautifully: s plus one, over n plus two. With no data, a half. After one success, two thirds. After nine of ten, ten twelfths. Bayes's essay of 1763 contained the integral; Laplace gave the formula, and applied it everywhere.
Laplace's famous example. Recorded history, he said, covers about five thousand years: over a million and eight hundred thousand sunrises. So the probability of another tomorrow is one minus one over that number plus two: odds of about one million eight hundred thousand to one. The same rule gives only about even odds that the sun rises every day for the next five thousand years. Laplace himself added that someone who knows the laws regulating the days would put the probability far higher. And there is the catch: the answer is only as good as the uniform prior over theta. Why should ignorance look like that? Part 13's Bertrand already showed it need not.
Laplace assumed an unknown chance. Bruno de Finetti, a subjectivist who doubted that chances exist at all, showed in 1937 that you do not need to assume it. Call your beliefs about a sequence exchangeable if the probability of any sequence depends only on how many ones it has, not on their order. With Laplace's prior, for example, each of these six orderings of two ones in four gets exactly one thirtieth. De Finetti's representation theorem: any exchangeable beliefs about an unending sequence are exactly as if you believed in an unknown chance theta, with some prior mu over it, and tosses independent given theta. So the unknown chance is not a metaphysical posit. It is simply what exchangeable beliefs look like, and learning from frequencies follows. But exchangeable with respect to which description of the outcomes? Green and blue, or grue and bleen? We will see in chapter six that this is the whole question.
Rudolf Carnap tried to make inductive logic a branch of logic. He found not one rule but a continuum: s plus lambda over two, over n plus lambda. The parameter lambda says how many imaginary trials the prior is worth. Lambda zero is the straight rule: predict the observed frequency. Lambda two is Laplace. Large lambda clings to one half, near indifference. With eighty percent successes, every method converges to point eight, at different speeds. Carnap could not find a logical reason to prefer one lambda. The choice is a choice of prior, and Hume's problem reappears as a parameter.
What it establishes: the rule of succession (Bayes 1763, Laplace 1814); the sunrise; de Finetti (1937); Carnap's continuum (1952).; Computed on screen: odds of 1,826,214 to 1; exchangeable orderings at 1/30; four λ-curves
3Inference in IndiaAdvanced2 min
Indian logicians faced the problem of induction more than a thousand years before Hume. The Nyāya school's standard inference has five members. The thesis: the hill has fire. The reason: because it has smoke. The example: wherever there is smoke there is fire, as in a kitchen. The application: this hill has smoke, which goes with fire. And the conclusion. The heart of it is vyāpti, pervasion: the invariable concomitance of smoke with fire. The example both states the general rule and shows an instance of it.
Dignāga, around 480, systematized the conditions in his wheel of reasons. A good reason must be present in the subject, present in similar cases, places with fire, and absent from dissimilar cases, places without. A reason can occur in all, some or none of the similar cases, and in all, some or none of the dissimilar ones: nine combinations, a wheel of three by three. The Reasoner builds a small universe for each and checks the two things that matter: the reason never occurs without the property, and it does occur with it. Exactly two cells are good: present in all or some similar cases, and in no dissimilar case. Two are contradictory: they support the opposite conclusion. The other five are inconclusive, which is Dignāga's classification exactly.
How is pervasion known? The Cārvāka materialists pressed exactly Hume's objection. Perception shows us only these smokes and these fires, never all of them. Inference needs pervasion, and establishing pervasion would need inference: a circle. Dharmakīrti, in the seventh century, answered that pervasion rests on real relations: identity of nature, or cause and effect. Smoke is the effect of fire, so it cannot occur without it. Gaṅgeśa, founder of the new Nyāya in the fourteenth century, held that in seeing smoke we perceive smokeness, the universal, and so, in a way, all smoke. Hume rediscovered the circle, and the debate over what could break it, in the same place.
What it establishes: the Nyāya inference; vyāpti; Dignāga's hetucakra (c. 480); the Cārvāka challenge, Dharmakīrti, Gaṅgeśa.; Computed on screen: nine universes: 2 good, 2 contradictory, 5 inconclusive
4The ravensIntroductory3 min
In 1945 Carl Hempel found a paradox at the heart of confirmation. Take the hypothesis that all ravens are black: for everything, if it is a raven, it is black. A black raven is an instance of it, and surely confirms it. But the hypothesis is logically equivalent to its contrapositive: everything that is not black is not a raven. And a white shoe is an instance of that. So, it seems, a white shoe confirms that all ravens are black, and you can do ornithology without leaving the house.
Hempel's paradox is a Price List. Three principles: Nicod's criterion, that an instance confirms a generalization; the equivalence condition, that what confirms a claim confirms its logical equivalents; and the conviction that a white shoe does not confirm anything about ravens. Together they are inconsistent, and dropping any one restores consistency. I. J. Good dropped the first. He described a world in which seeing a black raven should lower your confidence that all ravens are black, because of what else you believe about how many ravens there are. Israel Scheffler and Nelson Goodman dropped the second: confirmation, they said, is selective, and does not pass across equivalences. Hempel himself, and most Bayesians, drop the third. The shoe does confirm, but by an amount so small that intuition rounds it to zero.
How tiny is tiny? Here is the Bayesian accounting, after Good, Mackie, and Branden Fitelson and James Hawthorne. Imagine a hundred million objects, ten thousand of them ravens, and ninety percent of everything not black. Compare H, all ravens are black, with a rival H prime, on which a hundred ravens are white. Pick a raven at random. Under H prime, one in a hundred ravens is white, so finding it black is a real test. Pick a non-black thing at random. Under H prime, only one in nine hundred thousand of them is a white raven, so finding a shoe is almost no test at all. The Bayes factor, the ratio of the likelihoods, measures the evidence: one point zero one for the raven; one point zero zero zero zero zero one for the shoe. Both confirm. The raven is worth about nine thousand shoes. The paradox dissolves into a difference of degree, if you accept that a white shoe confirms at all.
What it establishes: Hempel (1945); Price List: Nicod, equivalence, the white shoe; Good (1967); the Bayesian accounting.; Computed on screen: Bayes factors 1.0101 and 1.0000011
5Measuring confirmationAdvanced3 min
Before measuring confirmation, we should say what it is. Carnap, in the preface to the second edition of his Logical Foundations of Probability, separated two senses. Firmness: given E, H is probable. Increase: E raises the probability of H. They come apart. A hypothesis can be probable after the evidence even though the evidence lowered it. And a hypothesis can stay improbable even though the evidence raised it eightfold. The ravens, and almost all of modern confirmation theory, concern increase.
Increase can be measured in many ways, and they disagree. Take two pieces of evidence. E one makes a long shot, with prior one in a hundred, nine times likelier by the likelihoods. E two bears on an even bet, with likelihoods point nine against point five. Here are six measures from the literature: the difference, the log of the probability ratio, the log likelihood ratio, Kemeny and Oppenheim's normalized version of it, Carnap's relevance measure, and Christensen's. The Reasoner computes each. The difference measure says E two confirms more; so do Carnap's and Christensen's. The ratio and likelihood measures say E one does. Branden Fitelson showed that many arguments in confirmation theory, including some answers to the ravens, hold on one measure and fail on another. How much evidence confirms has no single answer.
If the measures disagree, which should we use? Ellery Eells and Branden Fitelson proposed testing them against symmetries. Hypothesis symmetry: evidence that confirms H should disconfirm not-H by the same amount. That seems right. Evidence symmetry: if E confirms H, then not-E should disconfirm H by the same amount. That seems wrong: finding a black raven confirms a little, but failing to find one need not disconfirm equally. And commutativity: E confirms H exactly as much as H confirms E. Also wrong. The Reasoner checks each measure on two thousand random probability distributions. Only the difference, the log likelihood ratio, and Kemeny and Oppenheim's measure have the wanted symmetry and lack the unwanted ones.
One more problem for the Bayesian account, Clark Glymour's problem of old evidence. Since Le Verrier in 1859, astronomers had known that Mercury's perihelion advances faster than Newton allows, by about forty-three arc seconds a century. In 1915 Einstein derived exactly that from general relativity, and it became the strongest early evidence for the theory. But the evidence was already known, with probability one. And when the probability of E is one, conditioning on it changes nothing: the posterior equals the prior. Old evidence cannot confirm. Two answers. Colin Howson: measure confirmation against the credence you would have had without E. Daniel Garber, Richard Jeffrey and Ilkka Niiniluoto: what Einstein learned in 1915 was not E but a logical fact, that the theory entails E, and for an agent who is not logically omniscient that is real news.
What it establishes: firmness vs increase (Carnap); six measures; Fitelson's measure sensitivity; old evidence (Glymour 1980).; Computed on screen: six measures on two pieces of evidence: three each way
6GrueIntroductory3 min
Hume asked why we should project past regularities at all. In 1955 Nelson Goodman asked a harder question: which ones? Define a new predicate, grue. Something is grue if it is examined before a time T and green, or not examined before T and blue. Every emerald we have ever examined is green. Each of them was examined before T, so each one is also grue. The hypothesis that all emeralds are green predicts that the emeralds examined after T will be green. The hypothesis that all emeralds are grue predicts that they will be blue. The two hypotheses have exactly the same instances so far, and they make opposite predictions. Instance confirmation cannot tell them apart.
The obvious reply is that grue is gerrymandered: it mentions a time, and green does not. But the symmetry is exact. In our language, grue is green before T and blue after. In the language of someone who speaks of grue and bleen, green is grue before T and bleen after. Whose predicate mentions time depends on where you stand. The Reasoner makes this concrete. One learner, logistic regression on time, gets the same ten observations, encoded two ways. Encoded as green or blue, it predicts green after T, with probability point nine nine nine five. Encoded as grue or bleen, it predicts grue, which is to say blue, with exactly the same confidence. The learner projects more of the same, and more of the same is relative to the vocabulary it is given.
Grue is not a philosopher's toy. It is the central fact about machine learning. Give a small neural network two inputs: the time, and a feature that says whether we are past T. On every training example that feature is zero, so the data say nothing about its weight. Train eight networks from eight random starting points on the same ten green emeralds. All eight fit the training data perfectly. After T they disagree. Most project green. One projects grue, confidently. Others hedge. The data fix behaviour on the data and nowhere else. What a network does off its training distribution is settled by its inductive bias: the architecture, the initialization, the training procedure. That is distribution shift, and it is Goodman's riddle.
So what makes green projectible and grue not? Goodman's answer was entrenchment: green has a long history of successful projections, grue has none. Quine appealed to natural kinds, and to a sense of similarity that evolution gave us and science refines. For a Bayesian the answer is the prior, which weights green above grue. In learning theory the name is inductive bias, and every learner has one. Each answer names something that the evidence itself does not contain.
What it establishes: Goodman (1955); the symmetry of grue and green; grue in neural networks; entrenchment, natural kinds, inductive bias.; Computed on screen: one learner, two encodings; eight networks that agree before T and not after
7Conjectures and refutationsIntroductory4 min
Karl Popper's answer to Hume was radical: science does not use induction at all. Take the hypothesis that all swans are white. No number of white swans proves it. But one black swan, like those Willem de Vlamingh's crew saw in Western Australia in 1697, refutes it, by modus tollens, a purely deductive rule: H implies E; not E; so not H. So science, for Popper, is bold conjecture and severe attempted refutation. And bold means improbable: a theory that says more has more ways to be wrong. The probability of H and G together is never more than that of H alone. Science aims at content, not at probability.
Falsification is less simple than it looks, as Pierre Duhem saw in 1906 and Quine generalized. No theory predicts anything alone. A predicted orbit follows from Newton's laws, together with assumptions about which planets exist, and the reliability of the telescopes. When the prediction fails, modus tollens refutes only the conjunction. In the 1840s Uranus strayed from its predicted orbit. Le Verrier and Adams blamed the auxiliary assumption, predicted a new planet, and in 1846 Neptune was found where Le Verrier said. In 1859 Le Verrier tried the same move for Mercury, and predicted a planet called Vulcan. It was never found. This time the culprit was Newton, as Einstein showed. The logic was identical, and only later evidence told the two cases apart. Imre Lakatos concluded that we judge whole research programmes, progressive or degenerating, not single hypotheses.
If no theory is ever proved, can one at least be closer to the truth than another? Popper defined verisimilitude. A is closer to the truth than B if A has all of B's true consequences and B has all of A's false ones, with at least one of these strict. David Miller and Pavel Tichý proved in 1974 that on this definition no false theory is ever closer to the truth than any other theory. The Reasoner checks every pair over three atoms: thirty-two thousand pairs, and not one. Since every interesting theory in science is false, the definition is useless. Tichý proposed likeness instead: count how many atoms a theory gets wrong. The weather is hot, rainy and windy. T one says it is not hot but rainy and windy: one wrong. T two says it is none of these: three wrong. T one is closer. Miller's reply was to translate. Call it Minnesotan when it is hot exactly when rainy, and Arizonan when hot exactly when windy. In hot, Minnesotan and Arizonan, T one gets all three wrong, and T two only one. Likeness to the truth depends on the vocabulary. It is grue again.
Wesley Salmon asked Popper a practical question. Popper tells us to prefer the theory that has best survived severe tests. Suppose you must build a bridge tomorrow. Which theory should you rely on? That a theory has survived is a report about the past. To rely on it tomorrow is to treat the past as a guide to the future. So either corroboration says nothing about what to predict, or it is induction under another name.
What it establishes: falsification (1934); Duhem and Quine; Neptune and Vulcan; Lakatos; verisimilitude (1963), Miller and Tichý (1974); Salmon (1981).; Computed on screen: no false theory closer than another in 32,258 pairs; Tichý's likeness and Miller's flip
8The best explanationAdvanced4 min
Scientists rarely reason by enumerating instances. They infer the hypothesis that would best explain what they see. Charles Sanders Peirce called it abduction. The surprising fact C is observed. But if A were true, C would be a matter of course. Hence there is reason to suspect that A is true. Ignaz Semmelweis, in Vienna in 1847, saw that mothers delivered by doctors who came from the dissecting room died of childbed fever far more often than those delivered by midwives. Particles from the corpses would explain it. He made the doctors wash in chlorinated lime, and the death rate fell from over ten percent to about two. Gilbert Harman named the pattern inference to the best explanation, and Peter Lipton refined it: prefer the loveliest explanation, the one with the widest scope, a mechanism, and the most unification, and expect it to be the likeliest.
Bas van Fraassen pressed two objections. The first is the bad lot. We can only compare the hypotheses someone has thought of. The truth may not be among them, and then the best of a bad lot is still false. The second is sharper. If you give the best explanation a bonus, over and above what conditionalization gives it, your new credence is no longer your old credence conditional on the evidence, and Part 13 showed that a bookie can then arrange a dynamic Dutch book against you. Compatibilists like Lipton and Samir Okasha reply that explanatory considerations are how we set the priors and likelihoods in the first place, not a bonus added afterwards. But some philosophers have defended the bonus itself.
Igor Douven did, in 2013, by racing the two rules. The Reasoner reruns his race. A coin's bias is one of eleven values, zero, a tenth, up to one; the truth is point seven. Both agents start uniform. The Bayesian conditionalizes. The explanationist conditionalizes and then adds a bonus of a tenth to the bias that best explains the data so far, the one nearest the observed frequency. Averaged over a thousand runs, the explanationist's confidence in the truth rises faster. It first passes ninety percent after about eighty tosses, against the Bayesian's hundred and seventy. But it pays for its speed. In fifty-nine percent of runs it is, at some point, more than ninety percent sure of a false hypothesis; the Bayesian, in twelve percent. And its average inaccuracy, by the Brier score, is worse.
So which rule is right? Hilary Greaves and David Wallace proved that conditionalization minimizes expected inaccuracy, by your own lights. Douven replies that we also care about getting to the truth quickly, and acting on it. The price of speed is jumping to falsehoods, the same trade-off we will meet with Kelly's bold learner in chapter eleven. Machine learning faces it too: keep the whole posterior, or commit to the single best fit. Which rule is right depends on what each kind of error costs. That is a decision, not a theorem.
What it establishes: abduction (Peirce 1903); Semmelweis; Harman (1965), Lipton (2004); van Fraassen (1989); Douven (2013); Greaves and Wallace (2006).; Computed on screen: a thousand races: speed, false confidence, Brier inaccuracy
9When opinions mergeAdvanced2 min
Bayesians have their own answer to the worry that priors are arbitrary: in the long run, they wash out. Ann thinks heads is rare; her prior on the coin's chance is a Beta one, nine. Bo thinks heads is common: Beta nine, one. At the start their predictions differ by point eight. The coin's true chance is point seven. They watch the same tosses and conditionalize. Both predictions move toward the truth, and toward each other. After four hundred tosses they differ by two hundredths.
This is a theorem, due to David Blackwell and Lester Dubins in 1962. If two priors agree about what is possible, each giving positive probability wherever the other does, then with probability one their conditional probabilities, for every event at once, converge as the data grow. The condition matters. Cy's prior gives probability zero to every chance above one half. The data cannot revive what the prior has killed: Cy's prediction creeps up toward one half and stops, forever wrong. Dennis Lindley called the moral Cromwell's rule, after Cromwell's plea to the Church of Scotland: I beseech you, think it possible you may be mistaken. Never give probability zero to anything that might be true.
Merging is a real comfort, but a limited one. It gives agreement, not truth: two people who rule out the same truth can merge on the same mistake. It is about the long run, with no bound on how long unless the priors were close to begin with. With infinitely many hypotheses, Persi Diaconis and David Freedman showed in 1986 that a Bayesian can fail to converge at all. And it assumes one fixed process producing the data. Joseph Doob proved that every Bayesian is certain, by her own lights, to converge on the truth. Gordon Belot argued in 2013 that this certainty is a defect: a prior that is sure it will learn has decided in advance that the world is learnable.
What it establishes: washing out of priors; Blackwell and Dubins (1962); Cromwell's rule; Diaconis and Freedman (1986); Doob; Belot (2013).; Computed on screen: Ann and Bo merge (gap 0.8 → 0.02); Cy never learns
10Learning in the limitResearch4 min
In the 1960s a new question replaced Hume's. Not: is induction justified? But: can a method be guaranteed to get to the truth? A learner sees data one item at a time, and after each item it guesses. It identifies the truth in the limit if, after some finite time, every guess it makes is right. It never has to know when it has arrived. That is the price of asking only for convergence. Hilary Putnam and Mark Gold introduced the idea independently in 1965. Its ancestor was Reichenbach's notion of a posit, which we meet in chapter fifteen.
Mark Gold's 1967 paper found the first limit on learning in the limit. Take the class of languages consisting of every finite set of numbers, together with the set of all numbers. The learner sees examples from the true language, positive examples only, and guesses which language it is. Here is an adversary. While the learner guesses a finite set, the adversary shows a new number. When the learner guesses all the numbers, the adversary repeats an old one, and keeps repeating, until the learner backs down to a finite guess. If it never backs down, the data were from a finite language, and the learner is wrong forever. This learner backs down, so the adversary goes on: twenty-nine changes of mind in thirty steps, and on forever, while the data spell out every number. Gold proved that every learner can be beaten this way. No method identifies this class from positive data alone, and since every finite language, and the language of all strings, is regular, no method identifies the regular languages either. With negative examples as well, far more becomes learnable. Children hear few negative examples, and linguists have read Gold's theorem as evidence that the grammars a child can learn are constrained in advance.
Hilary Putnam had already turned a similar argument against Carnap. Take any computable method for predicting the next bit of a sequence. Build the sequence that always does the opposite of what the method predicts. Since the method is computable, so is this sequence. Here the method is Laplace's rule. Whenever it thinks a one is more likely, the sequence shows a zero, and the other way round. Laplace's rule is wrong twenty four times out of twenty four, on a sequence as simple as zero one zero one. Every computable inductive method has such a blind spot: no computable method can learn every computable regularity.
Kevin Kelly turned these ideas into a theory of how hard an empirical question is. Some hypotheses can be verified with certainty: some swan is black. When it is true, you eventually see the swan and can say so for good. Some can be refuted with certainty, like all swans are white: these are exactly Popper's falsifiable hypotheses. Some can only be decided in the limit: exactly three particles exist. You can be wrong for a while, but you settle eventually. Some can only be verified in the limit: only finitely many black swans. And some only refuted in the limit. Kelly showed that what a method can achieve corresponds exactly to the level of the hypothesis in a topological hierarchy, like the arithmetical hierarchy of Part 7. Falsifiability is one rung, not the whole ladder.
What it establishes: identification in the limit (Putnam, Gold 1965); Gold (1967); Putnam's diagonal (1963); Kelly's hierarchy (1996).; Computed on screen: the adversary: 29 mind changes in 30 steps; Laplace wrong 24 times of 24
11Ockham's razor, justifiedResearch3 min
Every learner needs a bias, and the favourite bias of science is simplicity. William of Ockham, in the fourteenth century: plurality is never to be posited without necessity. Copernicus, Newton and Einstein all argued that their theories were simpler than the rivals. But why would the world be simple? If the razor is only a bias, a taste for simplicity, how could it lead us to the truth, rather than to the theories we find convenient?
Kevin Kelly found a precise sense in which the razor helps. Here is his game. Nature reveals particles, or effects, one at a time, and may hold the next one back as long as it likes. A learner must eventually settle on the true number. Particles appear at three moments. The Ockham learner conjectures exactly as many particles as it has seen. It never takes anything back: when a particle appears, it adds one. A bold learner gets impatient, and after a quiet spell it anticipates one more particle. Nature simply withholds it. The bold learner eventually gives up its guess, and the moment it does, Nature reveals the particle. Each time, the bold learner is forced to retract: three retractions, against Ockham's none.
Kelly proved that this is no accident. Among all methods that are guaranteed to converge to the truth, Ockham's method has the fewest retractions in the worst case, and any method that ever violates the razor can be forced by Nature into at least one retraction more. Notice what the theorem does not say. It does not say that simpler theories are more likely to be true. It says that preferring the simplest theory compatible with the data is the most direct route to the truth, whatever the truth is. It is like the best route home when you do not know where home is: not a guarantee of arriving soon, but the fewest U-turns.
Bayesians have a razor of their own, which needs no prior preference for simplicity. The evidence for a model is the probability it gave the data, averaged over its parameters. A simple model can produce only a few data sets, so it gives each of them high probability. A flexible model can fit almost anything, so it must spread its probability thinly. When the data fall where both can fit them, the simple model predicted them more sharply, and wins. William Jefferys and James Berger called this Ockham's razor at work, and David MacKay made it a standard tool of machine learning.
What it establishes: Ockham's razor; Kelly's retraction game and Ockham efficiency theorem (2007); the Bayesian Occam factor (Jefferys and Berger 1992, MacKay).; Computed on screen: three retractions against none
12The universal priorResearch3 min
Ray Solomonoff, in 1964, proposed a single prior for all of science. Treat every hypothesis as a program for a universal computer. Give each program prior weight two to the minus its length, so shorter programs count for more: Ockham, in bits. The universal prior of a data string x adds up the weights of every program whose output begins with x. To predict, condition: the probability that the next bit is one is M of x one over M of x. Solomonoff's theorem: if the data come from any computable source whatever, the total expected squared error of these predictions, summed over all time, is bounded by a constant times the Kolmogorov complexity of the source: the length of the shortest program that computes it. The errors must die out. One prior learns every computable world.
The real universal prior cannot be computed, but the Reasoner can run a toy version. In the toy language a program is a bit pattern, printed over and over, with weight two to the minus twice its length. There are five hundred and ten programs up to length eight. The data are zero one one, repeated. Each bar shows the probability the mixture gave to the bit that actually came. At first it is guessing: shorter patterns predict wrongly, and are refuted. From the fourth bit on, the leading hypothesis is zero one one, and the bars climb. By the seventh bit the mixture is ninety nine percent sure, and after the ninth it is certain, because every program that disagrees has been refuted. This is induction by elimination, weighted by simplicity.
There is a catch, in three parts. The universal prior is incomputable. To add up the weights of all programs whose output begins with x, you would have to know which programs halt, and Part 7 showed that no machine can. That is how it escapes Putnam's diagonal: the diagonal defeats only computable predictors. Second, the prior depends on the choice of universal machine. Switching machines changes every complexity by at most a constant. But the constant can be enormous, and over any finite stretch of data it can make grue simpler than green. Goodman's riddle comes back as the choice of a machine. Third, all practical use is by approximation: minimum description length, Levin's search, Marcus Hutter's AIXI agent. And today's language models, trained to predict the next token, are compressors in exactly this sense.
What it establishes: the universal prior (1964); Solomonoff's error bound; incomputability; machine-relativity; approximations.; Computed on screen: a mixture over 510 programs learning 011011…
13Compression and predictionApplied3 min
Behind Solomonoff's idea is a simple equation of Claude Shannon's. If you assign a probability to a message, you can encode it in minus log two of that probability bits, and on average no code does better. Arithmetic coding achieves the bound. A fair coin costs a bit per toss. A coin that lands heads nine times in ten, encoded with the right model, costs under half a bit per toss. So a better predictor is a better compressor, and a better compressor is a better predictor. Twenty such tosses take twenty bits without a model, and about nine with one.
Jorma Rissanen turned this into a method for choosing models, minimum description length, in 1978. Here are thirty noisy points from a quadratic. A constant misses the shape. A line misses the bend. A quadratic, the true degree, follows it. A degree eight polynomial fits even better, because it chases the noise. Adding parameters always improves the fit. Where should we stop?
Rissanen's answer: describe the data in two parts. First the model, its coefficients, each costing about half log n bits. Then the data, encoded with the model's help: only the residuals need to be written down. Every coefficient makes the model part longer. The data part falls steeply, then flattens once the true shape is captured. The total is smallest at degree two, the true degree. Writing the numbers down with no model at all would take about two hundred and sixty-five bits. The best model saves forty-five of them, and that saving is what it has learned. The shortest total description is the model to believe.
Compression runs through modern learning. The Bayesian information criterion is, to first order, two-part MDL; Akaike's criterion aims instead at predictive accuracy. Deep learning complicated the story: huge networks can fit pure noise and yet generalize well on real data, the phenomenon of double descent. Counting parameters is the wrong measure of complexity. PAC-Bayes bounds measure instead how far training moved the weights from a prior. And a language model, trained to predict the next token, is trained to compress text. In each case simplicity has to be measured, and the choice of measure is itself an inductive bias.
What it establishes: Shannon's code lengths; two-part MDL (Rissanen 1978); AIC and BIC; double descent; PAC-Bayes; language models as compressors.; Computed on screen: polynomial fits of degree 0–8; code lengths minimal at the true degree
14No free lunchIntroductory4 min
David Wolpert's no free lunch theorem of 1996 is Hume's problem turned into a theorem. Take inputs of three bits: eight of them. A world is any way of labelling them, so there are two hundred and fifty six worlds. A learner sees the labels of four inputs. Which worlds agree with what it saw? Every way of labelling the other four: sixteen worlds. Now let the learner predict the unseen labels; here, nearest neighbour copies the label of the closest seen input. Look down any column. In exactly eight of the sixteen worlds the prediction is right. That is forced: half the consistent worlds say one there, and half say zero. So averaged over all worlds, any prediction on unseen inputs, by any learner, is right exactly half the time.
The Reasoner checks the theorem by brute force. Four learners: nearest neighbour, majority vote, always say zero, and a perverse one that predicts the opposite of the majority. Over all two hundred and fifty six worlds, their accuracy on unseen inputs is exactly the same: one half, for every one of them, even the perverse one. Now restrict to a smooth universe, in which the label depends only on the first bit. Nearest neighbour is perfect, majority gets three quarters, always zero gets half, and the perverse learner a quarter. Off the training set, a learner is exactly as good as the match between its bias and the world it happens to be in.
No free lunch has a positive side. Restrict the worlds, and guarantees appear. This is the theory of Vladimir Vapnik and Alexey Chervonenkis, and Leslie Valiant's probably approximately correct learning. A class of hypotheses shatters a set of points if it can produce every labelling of them. Intervals on a line can produce all four labellings of two points. But not of three: no interval contains the outer two points and misses the middle one. The Reasoner counts, by brute force, the labellings each class can make. Thresholds shatter one point, intervals two: those are their VC dimensions. The fundamental theorem of statistical learning: a class can be learned, to accuracy epsilon with confidence one minus delta, from finitely many examples exactly when its VC dimension is finite, and the number of examples needed grows with that dimension. The guarantee holds in every world the class contains, and says nothing about the rest. That is the free lunch's price, paid in advance.
This is the fifteenth brick in the Wall. The dream: a justification of induction that needs no assumptions about the world. The wall: Hume's argument, Goodman's riddle, Gold's theorem, and now Wolpert's, which makes the point exact. Averaged over every possible world, no learner does better than any other off the data it has seen. What it forces: every learner, human or machine, bets on a kind of world. The bet can be good, and science is the history of good bets, but it is a bet, and the data alone cannot place it.
So every learner bets on a world. Nearest neighbour bets on smoothness: nearby inputs have nearby labels. Linear models bet that effects add up. Convolutional networks bet on local patterns that look the same anywhere in an image. Ockham, MDL and Solomonoff bet that the world is compressible. A Bayesian bets the world was drawn from her prior. And science bets on laws: the same regularities here, there, and tomorrow. No free lunch does not say that learning fails. It says that every success is the success of a bet.
What it establishes: no free lunch (Wolpert 1996), proved; smooth worlds; VC dimension and PAC learning; the Wall's fifteenth brick; inductive biases.; Computed on screen: 16 consistent worlds; four learners on 256 worlds; shattering by thresholds and intervals
15A pragmatic vindicationAdvanced4 min
Hans Reichenbach gave the most influential answer to Hume of the twentieth century. He did not claim to prove that induction succeeds. He claimed to prove that it is the best bet. Either the world has stable limiting frequencies, or it does not. If it does, induction finds them, in the limit. If it does not, induction fails, but so does every other method of prediction. Any other method might succeed or fail where there are limits, and fails where there are none. So if any method can find the limiting frequency, the straight rule can. Using it costs nothing.
Reichenbach's method is the straight rule. After n trials with s successes, posit that the limiting frequency is s over n. If a limit exists, the posits converge to it. Here is a coin with chance point three, two thousand tosses. The posits wander early and settle near point three. Reichenbach called each estimate a posit: a claim treated as true for now, in the knowledge that the method will correct it.
Three objections. First, there are too many winners. Add to the straight rule any correction that shrinks to zero, and the result converges just as well. Laplace's rule does, and so does every member of Carnap's continuum. Wesley Salmon tried to single out the straight rule by requiring that its answers not depend on how the outcomes are described; few were convinced. Second, the long run. As Keynes said, in the long run we are all dead, and the vindication gives no bound on when the posits become good. Third, which frequencies? The frequency of grue emeralds converges too. Reichenbach shows that induction is a good bet, not which bet.
Gerhard Schurz found a sharper answer, using a tool from machine learning: prediction with expert advice. Don't try to justify one method. Follow all the methods you can see, each in proportion to its track record. Here is a world with three regimes: mostly ones, then mostly zeros, then strict alternation. Five object-level methods predict each bit: always one, always zero, the straight rule, repeat the last bit, and flip it. Each line is a method's running total of error. The meta-inductor weights each method by e to the minus its past loss, and predicts with the weighted average. It is never the best method, but it is never far behind whichever method has done best.
And here is the theorem. For any sequence whatever, even one chosen by an adversary, the meta-inductor's total loss exceeds the best method's by at most the square root of T over two times log N. Nick Littlestone and Manfred Warmuth, and Nicolò Cesa-Bianchi and Gábor Lugosi, proved bounds of this kind. The Reasoner checks it on our world: the gap never comes near the bound. Unlike Reichenbach's argument, this is a guarantee about every world, and the average gap per round shrinks to zero. The price is that it holds only against the methods the meta-inductor can see. That is not a free lunch, and it is consistent with Wolpert: in a world where all those methods do badly, the meta-inductor does badly too. But it turns Hume's question into one we can answer: given the methods we have, follow the record.
What it establishes: the pragmatic vindication (1938); the straight rule; three objections; meta-induction (Schurz 2008) and its regret bound.; Computed on screen: the straight rule converging; exponential weights over five methods, regret within the bound
Recap, problems, and where this comes backAll tracks2 min
Let's gather what we built. Hume's circle, and the first mathematical answers. The Indian logicians' wheel of reasons, and their own skeptic. Three paradoxes of confirmation, the third reproduced in a neural network. Popper, what happened to falsification and to closeness to the truth, and the race between explanation and conditionalization. The theory of learning in the limit, which justified Ockham's razor as the shortest path to the truth. The universal prior, and compression. And no free lunch, with the two best vindications of induction we have.
The Reasoner has one new module, induction. It computes Laplace's rule and Dignāga's wheel, the Bayesian ravens and six confirmation measures, the Miller and Tichý theorem by exhaustive search, merging and Gold's adversary, Kelly's retraction game, a toy universal prior, MDL, the no free lunch average over every world, and the meta-inductor's regret. And the Wall has its fifteenth brick.
Six problems, with full solutions in this part's notes. Laplace's rule from the Beta integral; the ravens with different numbers; a new disagreement between measures; grue in Kelly's hierarchy; the regret bound for exponential weights; and a world in which nearest neighbour meets its match. Pause here, and try them.
Where this comes back. Significance tests, likelihoods and Bayes factors, in Part 16. Learning causes from data, in Part 17. Underdetermination and realism, in Part 18. Laws and chance, in Part 24. Inductive bias in learning machines, in Parts 41 and 42. And goal misgeneralization, an agent that learned grue when we meant green, in the finale. Next, Part 16: evidence by numbers.
The books and papers this part follows are on screen, and in the notes. Thanks for watching.
Where it goes next. Significance tests, likelihoods and Bayes factors follow in Part 16; learning causes from data in Part 17; underdetermination and realism in Part 18; laws and chance in Part 24; inductive bias in learning machines in Parts 41 and 42, and goal misgeneralization, an agent that learned grue when we meant green, in the finale.
Key results
The part's results in one place, for revision.
Try it
Lab 15 · No free lunch, by brute force, and Laplace's rule by simulation
Score the Reasoner's four learners, and twenty learners drawn at random, on the unseen inputs of every one of the 256 labellings of three bits: each must average exactly one half. Then restrict the worlds to smooth ones, where the learners separate. Finally check Laplace's (s + 1)/(n + 2) against simulated coins whose chance is drawn uniformly.
python -m videos.philosophy.labs 15
needs numpy, scipy, matplotlib · download lab15.py ·
source on GitHubmajority: all 256 worlds, smooth worlds 0.500 0.750
nearest neighbour: all 256 worlds, smooth worlds 0.500 1.000
always 0: all 256 worlds, smooth worlds 0.500 0.500
anti-majority: all 256 worlds, smooth worlds 0.500 0.250
20 random learners: all 256 worlds min 0.500 max 0.500 (theory 0.500)
worlds consistent with 4 labels; right per unseen input 16; [8, 8, 8, 8]
after 9 heads in 10: simulated, Laplace, straight rule 0.833 0.833 0.900
largest gap, simulated vs (s+1)/(n+2), s = 0..10 0.0049 (theory 0)
Averaged over every possible world no learner beats any other on unseen inputs, so success belongs to the match between a learner's bias and the world; Laplace's rule is exactly right in the one world its uniform prior describes.
The code (89 lines; it asserts its own result)
"""Lab 15: average every learner over all 256 worlds on three bits (no free lunch), then over smooth worlds only."""
import itertools
import numpy as np
from videos.coursekit import labs
from explainer.philosophy.reasoner import induction as Ind
TITLE = "No free lunch, by brute force, and Laplace's rule by simulation"
GOAL = ("Score the Reasoner's four learners, and twenty learners drawn at random, on the unseen inputs of every "
"one of the 256 labellings of three bits: each must average exactly one half. Then restrict the worlds to "
"smooth ones, where the learners separate. Finally check Laplace's (s + 1)/(n + 2) against simulated coins "
"whose chance is drawn uniformly.")
TASKS = [
"Weight the 256 worlds unevenly, for example in proportion to 2 to the minus (number of label changes along "
"the inputs in order), and find which learner now wins.",
"Draw the coins' chances from Beta(5, 5) instead of the uniform prior. Which member of Carnap's continuum, "
"(s + lambda/2)/(n + lambda), now matches the simulated frequencies?",
"Add a fifth method to Ind.meta_induction's world in a copy of the function and check that the regret stays "
"below sqrt(T ln N / 2).",
]
def random_learner_accuracy(rng, n_bits=3):
"""A learner is any map from the four training labels to four test predictions: draw one at random and average
its off-training-set accuracy over all 2^8 worlds."""
table = {tr: rng.integers(0, 2, 4) for tr in itertools.product([0, 1], repeat=4)}
total = 0.0
for f in itertools.product([0, 1], repeat=2 ** n_bits):
train, test = f[::2], np.array(f[1::2])
total += np.mean(table[train] == test)
return total / 2 ** (2 ** n_bits)
def run(seed=0):
rng = np.random.default_rng(seed)
lab = labs.Lab()
nfl = Ind.no_free_lunch()
smooth = Ind.smooth_world_lunch()
assert nfl["targets"] == 256
for name, acc in nfl["accuracy"].items():
assert abs(acc - 0.5) < 1e-12, f"{name}: exactly one half over all worlds"
lab.row(f"{name}: all 256 worlds, smooth worlds", f"{acc:.3f} {smooth['accuracy'][name]:.3f}")
assert smooth["accuracy"]["nearest neighbour"] == 1.0 and smooth["accuracy"]["anti-majority"] < 0.5
rand = [random_learner_accuracy(rng) for _ in range(20)]
assert max(abs(a - 0.5) for a in rand) < 1e-12, "any learner at all averages one half"
lab.row("20 random learners: all 256 worlds", f"min {min(rand):.3f} max {max(rand):.3f} (theory 0.500)")
sl = Ind.nfl_slice()
assert all(c == len(sl["completions"]) // 2 for c in sl["correct"]), "half the consistent worlds agree"
lab.row("worlds consistent with 4 labels; right per unseen input", f"{len(sl['completions'])}; {sl['correct']}")
# Laplace: chance uniform on [0, 1], n tosses with s heads; how often is toss n + 1 a head?
n, reps = 10, 400_000
theta = rng.uniform(0, 1, reps)
s = rng.binomial(n, theta)
nxt = rng.uniform(0, 1, reps) < theta
freq = np.array([nxt[s == k].mean() for k in range(n + 1)])
rule = np.array([float(Ind.succession(k, n)) for k in range(n + 1)])
straight = np.arange(n + 1) / n
assert np.max(np.abs(freq - rule)) < 0.015, "Laplace's rule matches a uniform prior"
assert np.max(np.abs(freq - straight)) > 0.05, "and the straight rule does not"
lab.row("after 9 heads in 10: simulated, Laplace, straight rule", f"{freq[9]:.3f} {rule[9]:.3f} {straight[9]:.3f}")
lab.row("largest gap, simulated vs (s+1)/(n+2), s = 0..10", f"{np.max(np.abs(freq - rule)):.4f} (theory 0)")
lab.note = ("Averaged over every possible world no learner beats any other on unseen inputs, so success "
"belongs to the match between a learner's bias and the world; Laplace's rule is exactly right in "
"the one world its uniform prior describes.")
fig, ax = labs.figure(2, size=(11, 4.2))
names = list(nfl["accuracy"])
x = np.arange(len(names))
ax[0].bar(x - 0.2, [nfl["accuracy"][k] for k in names], 0.4, color=labs.BLUE, label="all 256 worlds")
ax[0].bar(x + 0.2, [smooth["accuracy"][k] for k in names], 0.4, color=labs.GOLD,
label="smooth worlds (label depends on bit 1 at most)")
ax[0].axhline(0.5, color=labs.MUTED, ls="--", lw=1)
ax[0].set_axisbelow(True)
ax[0].set_xticks(x, [k.replace(" ", "\n") for k in names])
ax[0].set(title="Accuracy on unseen inputs", ylabel="average accuracy off the training set", ylim=(0, 1.25))
ax[0].legend(loc="upper left")
k = np.arange(n + 1)
ax[1].plot(k, rule, color=labs.GOLD, label="Laplace: (s + 1)/(n + 2)")
ax[1].plot(k, straight, color=labs.MUTED, ls="--", label="straight rule: s/n")
ax[1].scatter(k, freq, s=28, color=labs.BLUE, zorder=3, label="simulated, chance uniform on [0, 1]")
ax[1].set(title="Is toss 11 a head, after s heads in 10?", xlabel="heads s in the first 10 tosses",
ylabel="frequency of a head on toss 11")
ax[1].legend(loc="upper left")
lab.fig = fig
return lab
Now change it
- Weight the 256 worlds unevenly, for example in proportion to 2 to the minus (number of label changes along the inputs in order), and find which learner now wins.
- Draw the coins' chances from Beta(5, 5) instead of the uniform prior. Which member of Carnap's continuum, (s + lambda/2)/(n + lambda), now matches the simulated frequencies?
- Add a fifth method to Ind.meta_induction's world in a copy of the function and check that the regret stays below sqrt(T ln N / 2).
Problems, with solutions
Try each problem before opening its solution.
-
Derive \((s + 1)/(n + 2)\) from the uniform prior, using \(\int_0^1 \theta^a (1-\theta)^b\, d\theta = \frac{a!\, b!}{(a + b + 1)!}\).
Solution
With a uniform prior and \(s\) successes in \(n\) trials, the posterior density is proportional to \(\theta^s(1-\theta)^{n-s}\). The chance of a success next time is the posterior mean, \(\int_0^1 \theta^{s+1}(1-\theta)^{n-s}\,d\theta \big/ \int_0^1 \theta^{s}(1-\theta)^{n-s}\,d\theta\). By the Beta integral the numerator is \((s+1)!\,(n-s)!/(n+2)!\) and the denominator \(s!\,(n-s)!/(n+1)!\), so the ratio is \((s+1)/(n+2)\). After \(n\) sunrises in \(n\) days, \((n+1)/(n+2)\).
-
In the ravens model, let \(H'\) have 1{,}000 white ravens. Recompute both Bayes factors.
Solution
Keep the film's world: \(10^8\) objects, \(10^4\) ravens, 90% of everything not black. Under \(H'\) 1,000 ravens are white. A random raven is black with probability 1 under \(H\) and \(9{,}000/10{,}000 = 0.9\) under \(H'\): Bayes factor \(1/0.9 = 1.111\). A random non-black thing is a non-raven with probability 1 under \(H\) and \(1 - 1{,}000/(9 \times 10^7)\) under \(H'\): Bayes factor \(1.0000111\). Each factor's distance from 1 grows about tenfold (from 1.0101 and 1.0000011), so their ratio barely moves: a black raven is now worth about 9,500 white shoes (\(\ln 1.111 / \ln 1.0000111\)), against about 9,000 before.
-
Find \(E_1\), \(E_2\) that the log likelihood ratio and Christensen's measure rank oppositely.
Solution
The film's pair already does it. \(E_1\): prior 0.01, likelihoods 0.9 and 0.1. \(E_2\): prior 0.5, likelihoods 0.9 and 0.5. The log likelihood ratio is \(\ln 9 = 2.20\) for \(E_1\) and \(\ln 1.8 = 0.59\) for \(E_2\), so it ranks \(E_1\) first. Christensen's measure \(P(H \mid E) - P(H \mid \neg E)\) is \(0.0833 - 0.0011 = 0.082\) for \(E_1\) and \(0.643 - 0.167 = 0.476\) for \(E_2\), so it ranks \(E_2\) first. The likelihood ratio ignores the prior; Christensen's measure is a difference of posteriors, which a long-shot prior keeps small.
-
Place 'all emeralds are grue' and 'only finitely many emeralds are blue' in Kelly's hierarchy.
Solution
"All emeralds are grue" has the form of "all swans are white": one emerald seen to be non-grue (blue before \(T\), or green after it) refutes it for good, and no finite run of grue emeralds verifies it. So it is refutable with certainty but not verifiable: Popper's rung. "Only finitely many emeralds are blue" is like the film's "only finitely many black swans": it is verifiable in the limit (say "true" whenever no blue emerald has appeared for a while; if the hypothesis is true you eventually stop changing your mind) but not refutable in the limit, and it cannot be decided with certainty at any finite time.
-
Prove: exponential weights has regret at most \(\frac{\ln N}{\eta} + \frac{\eta T}{8}\); optimize \(\eta\).
Solution
Let \(L_i\) be expert \(i\)'s total loss, losses in \([0, 1]\), and \(W_t = \sum_i e^{-\eta L_{i,t}}\) with \(W_0 = N\). Lower bound: \(W_T \ge e^{-\eta L^*}\), so \(\ln(W_T/W_0) \ge -\eta L^* - \ln N\). Upper bound: each step, \(\ln(W_{t+1}/W_t) = \ln E_{p_t}[e^{-\eta \ell}] \le -\eta\, E_{p_t}[\ell] + \eta^2/8\) by Hoeffding's lemma, and summing gives \(\ln(W_T/W_0) \le -\eta L_{\text{alg}} + \eta^2 T/8\). Together, \(L_{\text{alg}} - L^* \le \ln N/\eta + \eta T/8\). The right side is smallest at \(\eta = \sqrt{8 \ln N / T}\), where the regret is at most \(\sqrt{(T \ln N)/2}\): it grows like \(\sqrt T\), so the average regret per round goes to zero.
-
No free lunch, again: if every world's labels depend only on the last bit, how does nearest neighbour do?
Solution
The training inputs are 000, 010, 100 and 110, all ending in 0, and the four unseen inputs all end in 1. The nearest training input to each unseen one is the one that differs only in the last bit. Of the four worlds whose labels depend only on the last bit, nearest neighbour is perfect in the two constant ones and wrong on every unseen input in the two where the label equals or reverses the last bit: an average of one half, the same as no free lunch. Its bias, that inputs one bit apart share labels, is exactly wrong for the one bit that matters, and the training set never varied that bit.
Notes and sources
Sources
Texts: Hume, An Enquiry concerning Human Understanding (1748), §4; Skyrms, Choice and Chance (4th ed. 2000); Howson and Urbach, Scientific Reasoning: The Bayesian Approach (3rd ed. 2006); Goodman, Fact, Fiction, and Forecast (1955); Popper, The Logic of Scientific Discovery (1959); Lipton, Inference to the Best Explanation (2nd ed. 2004); Kelly, The Logic of Reliable Inquiry (1996); Li and Vitányi, An Introduction to Kolmogorov Complexity and Its Applications (4th ed. 2019); Grünwald, The Minimum Description Length Principle (2007); Shalev-Shwartz and Ben-David, Understanding Machine Learning (2014); Schurz, Hume's Problem Solved (2019); Matilal, The Character of Logic in India (1998); Henderson, "The Problem of Induction" (SEP).
Papers: Hempel (1945); Carnap (1950, 1952); Black (1958); Blackwell and Dubins (1962); Putnam (1963); Solomonoff (1964); Gold (1967); Good (1967); Miller (1974); Tichý (1974); Rissanen (1978); Glymour (1980); Salmon (1981); Littlestone and Warmuth (1994); Wolpert (1996); Fitelson (1999); Greaves and Wallace (2006); Kelly (2007); Schurz (2008); Douven (2013); Belot (2013); Delétang et al. (2024).
About this partfrom its README
Part 15 of Philosophy, Built (series plan, syllabus): can the past tell us anything about the future, and if no argument shows that it can, what can be said for learning from experience? Russell's chicken; Hume's argument and the circle, Hume's custom, Black's rule-circularity and Salmon's counterinductive mirror, Strawson and Goodman; Laplace's rule of succession and the sunrise, de Finetti's representation theorem, and Carnap's λ-continuum; the Nyāya five-membered inference, Dignāga's wheel of reasons (checked on nine small universes) and the Cārvāka challenge; Hempel's ravens as a Price List, with Good, Scheffler and Goodman, and the Bayesian accounting (a raven is worth about nine thousand shoes); firmness versus increase, six confirmation measures that rank two pieces of evidence oppositely (Fitelson), and Glymour's old evidence; Goodman's grue, its symmetry, one learner under two encodings, and grue reproduced in eight small neural networks that fit the data identically and disagree after T; Popper's falsification, Duhem and Quine (Neptune and Vulcan), verisimilitude and the Miller–Tichý theorem (checked over all 32,258 pairs on three atoms), Tichý's likeness and Miller's translation that reverses it, and Salmon's bridge; inference to the best explanation (Peirce, Semmelweis, Harman, Lipton), van Fraassen's bad lot and Dutch book, and Douven's race between an explanationist and a Bayesian; merging of opinions (Blackwell–Dubins), Cromwell's rule, Doob and Belot; learning in the limit, Gold's theorem by adversary, Putnam's diagonal against Laplace, and Kelly's hierarchy of empirical questions; Ockham's razor, Kelly's retraction game and efficiency theorem, and the Bayesian Occam factor; Solomonoff's universal prior, a toy mixture over 510 programs, and its catches; code lengths, two-part MDL (Rissanen) and compression in modern learning; Wolpert's no free lunch, proved on all 256 worlds over three bits (the Wall's fifteenth brick), its positive side in VC dimension and PAC learning, and what each learner bets on; and Reichenbach's pragmatic vindication, its objections, and Schurz's meta-induction with its worst-case regret bound.
Every verdict on screen is computed by the Reasoner's new module explainer/philosophy/reasoner/induction.py:
Laplace's rule and the sunrise, the wheel of reasons, the ravens' Bayes factors, the confirmation measures, grue under
two encodings, the Miller–Tichý search and Miller's translation, Douven's explanationist, merging, Gold's adversary,
Putnam's diagonal, Kelly's retraction game, the toy universal prior, MDL, no free lunch (all worlds and the proof
slice), VC shattering, the straight rule and the meta-inductor. The networks of the grue chapter are trained in
compute.py. Tested in tests/philosophy/test_induction.py.
Chapter notes
| # | Scene | What it establishes | Computed on screen |
|---|---|---|---|
| 0 | Hook |
Russell's chicken (1912); the plan. | — |
| 1 | Hume |
Hume (1748): the argument and the circle; custom; Black (1958), Salmon's counterinductivist, Strawson (1952), Goodman; six kinds of answer. | — |
| 2 | Laplace |
the rule of succession (Bayes 1763, Laplace 1814); the sunrise; de Finetti (1937); Carnap's continuum (1952). | odds of 1,826,214 to 1; exchangeable orderings at 1/30; four λ-curves |
| 3 | Wheel |
the Nyāya inference; vyāpti; Dignāga's hetucakra (c. 480); the Cārvāka challenge, Dharmakīrti, Gaṅgeśa. | nine universes: 2 good, 2 contradictory, 5 inconclusive |
| 4 | Ravens |
Hempel (1945); Price List: Nicod, equivalence, the white shoe; Good (1967); the Bayesian accounting. | Bayes factors 1.0101 and 1.0000011 |
| 5 | Measures |
firmness vs increase (Carnap); six measures; Fitelson's measure sensitivity; old evidence (Glymour 1980). | six measures on two pieces of evidence: three each way |
| 6 | Grue |
Goodman (1955); the symmetry of grue and green; grue in neural networks; entrenchment, natural kinds, inductive bias. | one learner, two encodings; eight networks that agree before T and not after |
| 7 | Popper |
falsification (1934); Duhem and Quine; Neptune and Vulcan; Lakatos; verisimilitude (1963), Miller and Tichý (1974); Salmon (1981). | no false theory closer than another in 32,258 pairs; Tichý's likeness and Miller's flip |
| 8 | Explain |
abduction (Peirce 1903); Semmelweis; Harman (1965), Lipton (2004); van Fraassen (1989); Douven (2013); Greaves and Wallace (2006). | a thousand races: speed, false confidence, Brier inaccuracy |
| 9 | Merging |
washing out of priors; Blackwell and Dubins (1962); Cromwell's rule; Diaconis and Freedman (1986); Doob; Belot (2013). | Ann and Bo merge (gap 0.8 → 0.02); Cy never learns |
| 10 | Gold |
identification in the limit (Putnam, Gold 1965); Gold (1967); Putnam's diagonal (1963); Kelly's hierarchy (1996). | the adversary: 29 mind changes in 30 steps; Laplace wrong 24 times of 24 |
| 11 | Ockham |
Ockham's razor; Kelly's retraction game and Ockham efficiency theorem (2007); the Bayesian Occam factor (Jefferys and Berger 1992, MacKay). | three retractions against none |
| 12 | Solomonoff |
the universal prior (1964); Solomonoff's error bound; incomputability; machine-relativity; approximations. | a mixture over 510 programs learning 011011… |
| 13 | MDL |
Shannon's code lengths; two-part MDL (Rissanen 1978); AIC and BIC; double descent; PAC-Bayes; language models as compressors. | polynomial fits of degree 0–8; code lengths minimal at the true degree |
| 14 | Lunch |
no free lunch (Wolpert 1996), proved; smooth worlds; VC dimension and PAC learning; the Wall's fifteenth brick; inductive biases. | 16 consistent worlds; four learners on 256 worlds; shattering by thresholds and intervals |
| 15 | Reichenbach |
the pragmatic vindication (1938); the straight rule; three objections; meta-induction (Schurz 2008) and its regret bound. | the straight rule converging; exponential weights over five methods, regret within the bound |
| 16 | Outro |
recap; the Reasoner's module; the Wall; problems; payoffs; references. | — |
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hume's problem restated: the circle in any inductive justification of induction.
- Laplace's rule of succession and the sunrise problem, computed; what the prior assumes.
- Indian inference: vyāpti (invariable concomitance) and Dignāga's wheel of reasons (hetucakra), a 3×3 grid of which only two reasons are good, drawn and checked.
- Hempel's ravens (1945): the equivalence condition and Nicod's criterion. The Bayesian answer, computed: a white shoe confirms "all ravens are black", by an amount of order 10⁻⁶ in a realistic model.
- Confirmation measures: difference, ratio, likelihood ratio, Kemeny–Oppenheim. Fitelson's comparison of which measures satisfy which desiderata.
- The problem of old evidence (Glymour 1980): Mercury's perihelion and GR.
- Goodman's new riddle (1955): grue; projectibility and entrenchment.
- Grue in a neural network. Built: train small models on emeralds observed before t and show which extrapolation each architecture projects. Inductive bias is projectibility.
- Popper: falsification and corroboration; the asymmetry; Duhem–Quine holism.
- Merging of opinions: Blackwell–Dubins (1962); Bayesian convergence computed for disagreeing priors; when convergence fails (non-absolutely-continuous priors).
- Formal learning theory: identification in the limit (Gold 1967) and Gold's theorem (no learner identifies all regular languages from positive data), proved; Putnam's diagonal argument against Carnap.
- Kelly's Ockham efficiency theorem: Ockham's razor as minimizing retractions.
- Solomonoff induction: Kolmogorov complexity; the universal prior; the convergence theorem; incomputability. Built: a Solomonoff mixture over a small program language predicting bit sequences.
- MDL and two-part codes; the link to Part 1 of AI, Built (compression is prediction).
- No free lunch (Wolpert 1996): averaged over all problems no learner beats another. Hume's problem in machine learning, and the answers (the world is not uniformly random; priors).
- Reichenbach's pragmatic vindication: if any method succeeds, the straight rule does.
- Recap and Problems.
Built: reasoner.induction (confirmation measures, Bayesian convergence, Gold-style learners, a Solomonoff
mixture over a toy language, the grue experiment).
Wall: Hume; Goodman; no free lunch; Gold.
Price List: the paradox of the ravens (Nicod's criterion; the equivalence condition; the white shoe doesn't
confirm).
Visuals: two posteriors merging toward a point; the hetucakra grid; grue and green branching on the timeline; the
retraction staircase of Ockham's learner.
References: Howson and Urbach; Earman, Bayes or Bust?; Goodman, Fact, Fiction, and Forecast; Kelly; Li and
Vitányi, An Introduction to Kolmogorov Complexity; Sterkenburg 2016 (Phil Sci); Henderson (SEP), "The Problem of
Induction".
Build the film
python -m videos.philosophy.philosophy15.compute # the part's numbers, into .cache/philosophy15
python tools/build.py philosophy15 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py philosophy15 Hook # one chapter, silent, with a contact sheet
Scenes: videos/philosophy/philosophy15. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.philosophy.philosophy15.compute # every computed item (about ten seconds; .cache/philosophy15)
python tools/build.py philosophy15 -q l # 480p preview
python tools/build.py philosophy15 # 1080p30 -> renders/philosophy15.mp4
python tools/qa_scene.py philosophy15 Lunch # one chapter, silent, with a contact sheet