AI Foundationspredict · compress · act
act III

The Instruments

Bayes' rule is the arithmetic of changing your mind when evidence arrives.

08

Belief, Updated

before this →Distance Between Beliefs

A probability is a degree of belief between 0 and 1. Bayes’ rule is the only correct way to update one of those beliefs when new evidence shows up.

priorP(hypothesis)likelihoodP(evidence | H)posteriorP(H | evidence)÷ P(evidence) — rescaled so it sums to 1
Bayes' rule as a plumbing diagram — prior and evidence feed the posterior

In one line

Posterior = prior × likelihood, then renormalise.

The prior is what you believed. The likelihood is how well each hypothesis explains what you just saw. The posterior is what you believe now. Evidence that would be likely under many hypotheses barely moves you; evidence only one hypothesis predicts moves you a lot.

This is why a rare disease test can produce a positive result that is still probably wrong: if the disease is rare, the prior is tiny, and even a good test only lifts it so far. Bayes is a machine for not being fooled by base rates.

One step, or a whole loop

Bayes’ rule is a single update. Bayesian inference is what you get when you refuse to collapse to one answer: you keep the whole distribution over hypotheses, and every new observation reweights all of it. The posterior you compute today is the prior you bring to tomorrow.

priorafter 5 observationsafter 50 observationsthe space of hypotheses
Each observation narrows the distribution — the posterior becomes the next prior

That is the difference between “the most likely explanation is X” and “here is how much I believe each explanation, and here is what would change my mind”.

The catch is at the bottom of the fraction

The P(evidence) underneath the bar is a sum over every hypothesis you were willing to consider. With five hypotheses that is five additions. With a model of a billion weights it is an integral over a billion-dimensional space, and nobody can compute it.

Almost everything called Bayesian inference in practice is a way around that integral:

And the thing almost everyone actually does — train a network with gradient descent — is not Bayesian. It keeps one point in the space and discards the rest of the distribution. Weight decay does not change that, though it is a Bayesian idea underneath: for a linear model, weight decay is exactly maximum-a-posteriori fitting under a Gaussian prior. The same reading is the standard one for deep networks, with a caveat worth knowing — a Gaussian prior on weights induces activation priors that get more heavy-tailed with depth, so the tidy linear-model story is a simplification rather than a derivation.

what the distribution buys youUncertainty you can act on. A single number cannot tell you whether to gather more data. A spread can — and that is the whole reason to pay the cost of keeping one.

Learning is Bayesian at the core

why this is not a detour

Training a model on data is a form of Bayesian updating: start with a prior (the architecture, the initialisation), see data (the likelihood), and end with a posterior over what the model should believe. When a model is “confidently wrong,” it has ignored its prior.

the disciplineKeep the prior honest. Data can only update what you were willing to consider beforehand.
PRIORwhat I thought
× LIKELIHOODhow well each story fits the data
= POSTERIORwhat I should think now
introduces →probabilityBayes' rulepriorposteriorlikelihoodBayesian inference
← previousDistance Between Beliefsnext →Everything Is a Vector