The Free Energy Principle

A brain is a prediction machine. It carries a model of the world, generates predictions, and updates beliefs when sensations don't match. Karl Friston's free energy principle (2005) claims this is what minds (and even cells) must do to exist: any system that resists dissolution into its environment will appear to minimize a quantity called variational free energy — the gap between its model and its sensory input.

noise σ 0.25
prior μ₀ 0.00
prior σ₀ 1.00
true world μ 1.00
posterior μ
0.000
posterior σ
1.000
free energy F
—
observations
0
why minds are surprise minimizers
Friston's claim, distilled: an organism survives by maintaining itself in a narrow region of state space (homeostasis). That means its future sensory states are concentrated. Mathematically: low Shannon entropy of sensations. By Jensen's inequality, low long-run entropy = low average surprise = high expected probability of what's experienced.

But sensations aren't directly the system — the system has hidden internal states tracking external causes. The exact posterior P(causes | sensations) is intractable. Solution: approximate it with a parameterized distribution Q. The variational free energy:
F = 𝔼_Q[ln Q(causes) − ln P(causes, sensations)]
= KL[Q ‖ P(causes | sensations)] − ln P(sensations)

F is an upper bound on surprise. Minimize F by changing either:
• Q (perception): update beliefs to fit data → Bayes' rule, dynamics-of-belief.
• sensations via action (active inference): change the world to match prediction → drink water when thirsty, dodge a thrown rock.

Predictive coding: the neural circuit Friston proposes for this. Hierarchical layers send predictions downward (corticofugal); error signals (the mismatch between prediction and input) propagate upward (feedforward). What you "see" is what your brain predicted, corrected by surprises. Hallucinations are runaway top-down predictions. Schizophrenia: broken precision-weighting of priors.

Visualization above: a Bayesian observer estimates the mean of a 1D world. Click "observation" to draw a sample from the true distribution. Watch the posterior update — Gaussian times Gaussian gives another Gaussian, precisions add. The posterior precision 1/σ²_post = 1/σ²_prior + N/σ²_likelihood. After many samples, posterior converges to the truth.

The bold claim: Friston extends this from neurons to any persistent self-organizing system. Bacteria, cells, multicellular organisms, brains, perhaps social groups — all are claimed to minimize variational free energy. The "good regulator theorem" (Conant & Ashby 1970): any system that regulates its environment must contain a model of it.

Controversy: critics argue the framework is so general it's unfalsifiable. Defenders note it gives the right local Bayesian dynamics for perception, and predicts specific brain-imaging signatures (mismatch negativity, attentional gain). The reach (and the math) keep growing.