For more than a decade, the artificial intelligence revolution has been powered by one mathematical engine: backpropagation. By taking an error at the very end of a deep neural network and propagating its blame backward through every preceding layer, backpropagation has allowed machines to master language, generate art, and fold proteins. Yet beneath this triumph lies an uneasy paradox: the algorithm that powers our most advanced silicon intelligence works nothing like the biological intelligence in our heads.
Your brain doesn't stop time while a global error signal runs backward over millions of synapses to rewire itself. Biological neurons are local, real-time, and run on about twenty watts of power—less than a low-wattage light bulb. They do not wait for a master conductor at the top of a hierarchy to tell them how to change. Instead, they operate on a radically different principle, one that is quietly becoming a strong contender for the future of machine learning: predictive coding.

At the core of predictive coding is a fundamental shift in how a neural network behaves. Traditional deep learning models follow a pipeline paradigm where information flows from bottom to top like water in a pipe. Raw sensory data, be it visual or auditory, enters at the bottom and moves upward step by step to form an output or decision. Learning happens only when that output misses the mark, triggering a top-down correction pass that requires knowing the exact weights of the forward connections.
A predictive coding network turns this passivity on its head, transforming a simple relay into an active, hierarchical game of guesswork. Higher layers do not wait for bottom-up signals to tell them what is happening in the outside world; instead, they continuously generate predictions about the activity of the layers below. Concepts predict, and sensory layers test those expectations against incoming reality. What travels upward through the network is not raw signal alone, but surprise—the difference between prediction and reality.
This reshapes how learning unfolds. In a predictive coding network, processing a single input involves two distinct phases. First comes inference, when the network holds its weights steady and lets neuron activities settle. Predictions descend and errors ascend until adjacent layers reach agreement—an internal state that best explains the sensory input with minimal surprise. Only then does the network enter its second phase, updating each synapse using solely the activity of the connected neurons and the local prediction error.
There is no global backward pass, no static network frozen while gradients trickle down from a distant output layer, and no biologically unrealistic requirement that forward and backward pathways share identical synaptic weights. Everything happens locally. Under certain mathematical assumptions, this dance of prediction and error actually mirrors the gradients of backpropagation. In practice, however, it opens doors that conventional deep learning struggles to reach.
Consider what happens when you train these systems on concrete tasks, such as reconstructing images from scratch. A purely local predictive coding network must spend compute cycles letting its internal states settle before updating weights, making it noticeably slower than a conventional autoencoder even on standard graphics processors. Yet if a researcher uses a fast bottom-up pass to initialize the hidden states before letting local prediction errors refine them, convergence speeds up sharply and produces accurate reconstructions.
The true promise of predictive coding, however, does not lie in beating backpropagation on its home turf of massive, power-hungry GPU clusters. Modern graphics processors were built for the synchronous, global matrix multiplications that backpropagation favors. Instead, predictive coding points toward a different hardware frontier: neuromorphic, analog, and in-memory computing systems that operate asynchronously, much like living tissue. On chips where memory and computation sit close together and global synchronization is an energy bottleneck, an algorithm that relies only on local error signals becomes a superpower.
Beyond hardware, predictive coding offers a long-awaited bridge between artificial intelligence and cognitive neuroscience. When intelligence is viewed as continuous prediction-error minimization, perception, imagination, and learning become facets of a single unified process. A model predicting its sensory inputs builds a structured representation of the world through ongoing adaptation to streaming data, rather than splitting existence into rigid phases of training and deployment.
Backpropagation proved what deep hierarchies of simple units can achieve under a global objective. Predictive coding asks an even bolder question: what happens when every layer in that hierarchy acts as an independent predictor, constantly testing its model of reality against the world just beyond its door? As artificial intelligence pushes toward edge autonomy, brain-like efficiency, and continuous learning, learning through local surprise may prove to be the difference.