Source-linked AI summary
Predictive Coding: a Theoretical and Experimental Review
Beren Millidge, Anil Seth, Christopher L Buckley
TL;DR
Predictive coding lacks a comprehensive review despite its influence as a proposed unifying account of cortical function and its extensive theoretical, biological, and empirical development. This paper synthesizes its mathematical framework and broad research landscape, including neural implementations, backpropagation, and machine learning. It concludes that predictive coding offers principled accounts of perception and learning, challenging cognitive-task solutions, and neurobiologically realistic process theories, while retaining important biological and theoretical open questions.
Problem
Despite predictive coding’s influence, no comprehensive review covered its core theory, recent developments, biological plausibility, and relationships to backpropagation and machine learning.
Method
The paper provides a comprehensive review of predictive coding’s mathematical framework, neural process theories, relationship to backpropagation, and connections with modern machine learning.
Results
The review finds that predictive coding provides principled methods for perception and learning, can solve challenging cognitive tasks, and yields neurobiologically realistic process theories with concrete neuroscientific predictions.
Takeaways & Limitations
Predictive coding offers a broad framework linking cortical computation with perceptual, cognitive, psychological, and neurobiological phenomena.
Takeaways & Limitations
Current models do not perfectly fit cortical microcircuitry, leave some cortical pathways unexplained, and generally assume real-valued rate codes rather than spikes.
Abstract
from arXiv · showhide
Predictive coding offers a potentially unifying account of cortical function -- postulating that the core function of the brain is to minimize prediction errors with respect to a generative model of the world. The theory is closely related to the Bayesian brain framework and, over the last two decades, has gained substantial influence in the fields of theoretical and cognitive neuroscience. A large body of research has arisen based on both empirically testing improved and extended theoretical and mathematical models of predictive coding, as well as in evaluating their potential biological plausibility for implementation in the brain and the concrete neurophysiological and psychological predictions made by the theory. Despite this enduring popularity, however, no comprehensive review of predictive coding theory, and especially of recent developments in this field, exists. Here, we provide a comprehensive review both of the core mathematical structure and logic of predictive coding, thus complementing recent tutorials in the literature. We also review a wide range of classic and recent work within the framework, ranging from the neurobiologically realistic microcircuits that could implement predictive coding, to the close relationship between predictive coding and the widely-used backpropagation of error algorithm, as well as surveying the close relationships between predictive coding and modern machine learning techniques.
1 Introduction
Predictive coding frames cortical function as hierarchical prediction-error minimization, supporting perception, learning, and action through inference, model updating, and sensory sampling. The review traces the theory’s origins, mathematical development, neurobiological motivations, and expanding links to Bayesian inference and machine learning.
- Core theory: Predictive coding proposes that the brain minimizes mismatches between predicted and received sensory inputs using an internal model of their causes.Perception updates internally generated predictions with sensory data rather than relying on unbiased feedforward processing.
- Core theory: Prediction-error minimization can operate through hidden-state inference for perception, world-model updating for learning, and action that samples confirming sensory data.These mechanisms extend the framework from perception to adaptive behavior and control.
- Core theory: Hierarchical layers predict activity below them, while upward-propagated prediction errors support multi-scale inference and learning.Lower levels represent local sensory detail, whereas deeper levels represent more global properties such as objects and scenes.
- Origins and development: Early predictive-coding work progressed from retinal redundancy reduction to cortical theories motivated by separate feedforward and feedback pathways.Srinivasan and colleagues modeled centre-surround retinal cells, while Mumford extended the approach toward a general cortical account.
- Origins and development: Rao and Ballard’s simulations showed that bottom-up prediction-error neurons and top-down prediction neurons can reproduce extra-classical receptive-field properties such as end-stopping.Their work helped establish predictive coding as an empirically consequential cortical framework after Mumford’s theory lacked simulations and empirical work.
- Broader connections: The review presents predictive coding as mathematically related to approximate Bayesian inference and intellectually connected to information theory, cybernetics, and control theory.Its influence has grown partly because it offers an abstract perspective on the cortex’s multi-level complexity and connects to modern unsupervised learning.
2 Predictive Coding
Predictive coding formalizes inference as minimizing variational free energy, with prediction errors and precision shaping hierarchical neural dynamics. The review also examines biological implementations and identifies unresolved neurophysiological and computational constraints.
- Mathematical foundations: Variational free energy is a tractable upper bound on negative log evidence, replacing posterior inference with optimization over an approximate posterior and generative model.When the KL divergence to the true posterior is zero, the variational distribution equals that posterior.
- Mathematical foundations: Generalized predictive coding extends the dynamics to moving states by linking successive orders of motion through a prior-motion term.At equilibrium, the real change in a variable matches its expected change, allowing dynamically moving solutions to be tracked.
- Precision: Precision weights prediction errors by inverse variance, enabling predictive coding to represent state-dependent sensory noise and connect with natural-gradient methods.With fixed predictions and identity precisions, predictive coding can converge to backpropagation gradients; learned precisions additionally weight gradients by intrinsic variance.
- Precision: Precision-based predictive coding can recapitulate attentional psychophysics phenomena, including the Posner paradigm, while its interpretation as attention remains contested.The review distinguishes objective variance weighting from adaptive attentional modulation and notes that high and low variance can both be salient.
- Predictive coding in the brain: The Bastos microcircuit maps predictive coding onto cortical laminae, interpreting superficial activity as prediction errors and deep activity as predictions sent across regions and to subcortical systems.The model explains several laminar pathways but leaves some established connections and functions unresolved.
- Predictive coding in the brain: Biological implementation remains constrained by unexplained deep-layer pathways, underused deep layers, null relay operations, weight transport, and excitation-inhibition conflicts.These issues motivate further work on the probabilistic role of additional pathways, biologically plausible learning, and inhibitory circuitry.
3 Paradigms of Predictive Coding
Predictive coding networks can be trained in supervised or unsupervised modes, with distinct input-output configurations and empirical trade-offs. The review also examines temporal prediction, biological-plausibility constraints, and relaxed architectures that preserve performance.
- Unsupervised predictive coding: Unsupervised predictive coding lets the highest-level latent activities vary freely while the network predicts current or future sensory inputs, functioning like an autoencoder.Temporal predictive coding instead targets the next sensory frame.
- Temporal Predictive Coding: Temporal predictive coding has supported 1-step environment prediction for simple planning and action selection, while its large-scale autoregressive abilities remain sparsely tested.One-step autoregressive linear predictive coding is mathematically similar to Kalman filtering.
- Supervised predictive coding: Forwards and Backwards: In supervised predictive coding, data and labels fix opposite ends of the hierarchy, and the network can operate in forward or backward modes.Forward mode fixes labels at the top and data at the bottom; backward mode reverses their placement.
- Supervised predictive coding: Forwards and Backwards: MNIST results reveal a trade-off: forward networks generate high-fidelity digits but classify below backpropagation, whereas backward networks often match classification accuracy while generating blurry images.The two modes therefore emphasize different generative and discriminative capabilities.
- Relaxed Predictive Coding: Canonical predictive coding faces weight transport, nonlinear derivatives, and error connectivity problems that challenge biological implementation.The weight transport issue requires prediction errors to travel backward through forward weights, despite biological axons being unidirectional.
- Relaxed Predictive Coding: Relaxing canonical assumptions can preserve performance: learnable backward weights match correct-transpose performance on MNIST, and learned ζ connectivity avoids precise one-to-one error-to-latent wiring.These results support greater flexibility in developing neurobiologically accurate predictive-coding process theories.
4 Relationship to Other Algorithms
The review connects predictive coding to backpropagation, Kalman filtering, normalization methods, biased competition, and active inference. These correspondences hold under specified assumptions and clarify predictive coding’s algorithmic and control-theoretic relationships.
- Predictive Coding and Backpropagation of error: Under fixed prediction assumptions, predictive-coding errors converge to backpropagation gradients, making converged weight updates identical to backpropagation.This correspondence extends from multilayer perceptrons to arbitrary computational graphs, including large-scale machine-learning models.
- Predictive Coding and Backpropagation of error: The first predictive-coding update is identical to backpropagation even without fixed predictions, because errors initialize at zero except for the output error.This equality propagates one layer per update step through a network with N layers.
- Linear Predictive Coding and Kalman Filtering: Predictive coding in the linear regime iteratively solves the same optimization problem that the Kalman filter solves analytically, reducing to Kalman filtering.Convexity of the underlying loss supports rapid and robust convergence.
- Predictive Coding, Normalization, and Normalizing Flows: Precision-weighted prediction errors provide a connection between predictive coding and whitening, while normalization schemes can be interpreted as simple normalizing flows.This interpretation supplies a theoretical framework for analyzing normalization transformations through invertible, differentiable mappings.
- Predictive Coding as Biased Competition: Predictive coding and biased competition can share the same mathematical structure despite differing proposed excitation and inhibition patterns.The models become mathematically identical when α = 1 −η, β = η, and γ = η, indicating that one mathematical structure can support different neural circuits.
- Predictive Coding and Active Inference: Active inference extends predictive coding to action by minimizing prediction errors through observations generated as functions of actions.Action selection uses a forward model multiplied by the prediction error between observed and predicted observations.
- Active inference and PID control: With an identity forward model and matched desired dynamical states, active inference reduces to derivative-form PID control.The equivalence requires assumptions that make explicit the implicit assumptions of PID control.
5 Discussion and Future Directions
The review concludes that predictive coding is influential and broadly supported, while identifying unresolved questions about biological implementation, scaling, temporal processing, and model assumptions. It also highlights connections to modern machine learning and alternative architectures.
- Discussion: Predictive coding is presented as a mathematically principled framework for perception and learning with empirical support across cognitive and neurobiological phenomena.The review also reports applications to object recognition and psychiatric disorders, alongside concrete neuroscientific predictions that are only beginning to be systematically tested.
- Biological plausibility: Key biological challenges include explaining cortical microcircuitry, spiking substrates, sparse and columnar connectivity, memory, precision, and feedback connections.The review states that several cortical loops and connectivity patterns remain unexplained by standard predictive-coding formulations, while current models often assume rate coding and fully connected layers.
- Open theoretical questions: The framework remains strongly tied to Gaussian generative models, while the scope of explicit prediction-error minimization in discrete models and across the brain remains unsettled.The review also notes unresolved questions about scaling predictive-coding networks and integrating CNNs, ResNets, and transformers.
- Connections to machine learning: Modern unsupervised generative models support the claim that predictive or autoregressive objectives can learn powerful, general world models and abstract representations.The cited examples include autoregressive transformers, generative-adversarial models, variational autoencoders, and unsupervised contrastive objectives.
- Future directions: Heterarchical and specialized architectures are proposed as underexplored machine-learning directions inspired by the brain’s parallel streams and modulatory connections.The review suggests that increasingly multimodal systems may combine specialized architectures within larger heterarchical networks.
- Temporal processing: Predictive coding must address continuous-time perception, where filtering combines sensory observations with prior knowledge about the current state.The review contrasts this setting with machine-learning systems that often omit temporal extension and dependencies, and notes that generalized coordinates remain insufficiently tested on spatiotemporal video.
6 Appendix A: Predictive Coding Under the Laplace Approximation
The appendix derives predictive coding under a Laplace approximation and shows that its optimized objective matches the result obtained with a Dirac-delta approximation. The Laplace treatment provides an analytical optimum for the variational variance.
- Laplace approximation: The appendix replaces the Dirac-delta variational density with a Gaussian whose variance depends on the mean under the Laplace approximation.The main derivation used a Dirac delta for simplicity, whereas the Laplace approximation is used in many standard derivations.
- Optimization: Because the variational variance has an analytical optimum, it need not be optimized during free-energy minimization.The resulting objective therefore depends on the remaining variables in the same way as the simpler derivation.
- Derivation: The derivation applies a Taylor expansion around x_i = µ_i and uses the expected squared residual to identify the variance term.The expected squared residual equals the variance, allowing differentiation with respect to σ_i and solution for the optimal variance.
- Equivalence: The Laplace-approximation derivation produces exactly the same result as the Dirac-delta approximation for the purposes considered.This establishes equivalence between the two approximations within the appendix’s derivation.
7 Appendix B: Precision as Natural Gradients
The appendix interprets precision-weighted predictive-coding updates as natural-gradient descent on free energy. In the linear case, parameter information combines activity variance from the higher level with prediction-error precision from the lower level.
- Natural gradients: Natural-gradient descent augments ordinary gradient descent with the Fisher information matrix, which accounts for how parameter-space directions differ in information.The Fisher information can be expressed through the score-function variance or the negative expected Hessian.
- Probabilistic formulation: The Gaussian predictive-coding setting links mean-squared-error loss to the log-likelihood of a probabilistic model.This provides the probabilistic interpretation underlying the natural-gradient formulation.
- Predictive-coding interpretation: In predictive coding, the expected Hessian of free energy with respect to activity variables µ is the precision.Precision-weighted prediction-error dynamics therefore implement natural-gradient descent rather than simple gradient descent.
- Linear case: In the linear setting, the parameter Fisher information is the variance of higher-level activities multiplied by the precision of lower-level prediction errors.The result specifies how activity variability and prediction-error precision jointly determine parameter information.
8 Appendix C: Challenges for a Neural Implementation of Backpropagation by predictive Coding
Direct predictive-coding implementations of backpropagation face unresolved problems involving fixed downward predictions, continuous-time dynamics, sensory loss placement, and temporal credit assignment.
- Fixed prediction assumption: Fixed downward predictions must remain unchanged while activity variables are optimized, an assumption considered unrealistic for recurrent cortical activity.The review suggests relaxing this assumption may be more promising than storing activations during iterative updates.
- Continuous-time dynamics: Continuous-time neural dynamics are poorly matched to the iterative convergence used to recover backpropagation.The brain operates continuously while the world changes during computation.
- Loss-function placement: Reverse-mode supervised learning places the loss function at the hierarchy’s bottom, which could imply sensory reconstruction or autoregressive losses.The review presents this sensory-loss interpretation as plausible but frames the mapping to the brain as an open question.
- Temporal credit assignment: The current derivation handles only a single fixed i.i.d. sample, whereas brains require credit assignment through time as neural activity affects future outcomes.Backpropagation through time addresses this computationally, but direct backward information propagation in time is biologically implausible; suitable approximations remain open research questions.
9 Appendix D: Kalman Filter Derivations
Appendix D presents full derivations for predictive-coding Kalman Filter weight updates, including the B control matrix and the C observation matrix.
- Kalman Filter derivations: The appendix derives the weight updates for the predictive coding Kalman Filter.
- Kalman Filter derivations: It derives the update for the B matrix, which represents control.
- Kalman Filter derivations: It derives the update for the C matrix, identified as the observation matrix.