Predictive Coding

Predictive coding is a theory of how the brain processes information in which higher levels of a neural hierarchy continually generate predictions about the activity of lower levels, and only the difference between prediction and reality, the prediction error, is passed forward. Rather than relaying raw sensory data upward, the system tries to explain its inputs and forwards just the part it failed to anticipate. Perception, on this account, is the brain settling on the interpretation that best predicts its sensations.

The idea was given its influential modern form by Rajesh Rao and Dana Ballard in a 1999 Nature Neuroscience model of the visual cortex, where feedback connections carried predictions and feedforward connections carried errors. Their network, trained on natural images, reproduced known features of real visual neurons, which gave the abstract theory concrete biological support. Predictive coding was later folded into Karl Friston’s broader free-energy principle.

The concept matters for AI because it expresses, in neural terms, the same insight that drives self-supervised learning: a system can learn rich structure simply by trying to predict parts of its input from other parts, with the prediction errors serving as the teaching signal. This convergence is one reason predictive coding is a favorite example in the dialogue between neuroscience and machine learning.

For a general reader, predictive coding offers an intuitive picture worth carrying: brains and capable AI systems alike may work less by passively recording the world and more by guessing it, then learning from where their guesses went wrong.

Sources

Last verified June 7, 2026