Brain-inspired Computational Intelligence via Predictive Coding

Tommaso Salvatori, Ankur Mali, Christopher L. Buckley, Thomas Lukasiewicz, Rajesh P. N. Rao, Karl Friston, Alexander Ororbia

Artificial Intelligence is currently dominated by deep neural networks trained via error backpropagation. While backpropagation is undeniably powerful, it has long been criticized for its biological implausibility—our brains simply don't seem to work that way. A new survey paper, "Brain-inspired Computational Intelligence via Predictive Coding," explores a compelling alternative: Predictive Coding (PC).

This framework isn't just a neuroscientific theory; it’s a mathematically rigorous approach to machine learning that offers a path toward more robust, parallel, and biologically grounded AI.

TL;DR

Predictive Coding (PC) is a brain-inspired learning framework that replaces global backpropagation with local error minimization. By treating learning as a process of constant prediction and correction, PC enables training on arbitrary, non-hierarchical network topologies and offers superior performance in areas like continual learning and adversarial robustness.

What Problem Does This Paper Address?

Modern AI relies on the backpropagation algorithm, which requires a global, sequential "backward pass" to update weights. This creates several bottlenecks:

  1. Biological Implausibility: The brain lacks a global mechanism to transport error signals across distant synapses (the "weight transport problem").
  2. Architectural Rigidity: Backprop is primarily designed for feed-forward or specific recurrent structures, making it difficult to train the highly "entangled" and cyclic structures found in biological brains.
  3. Catastrophic Forgetting: Standard deep networks often struggle with continual learning, where new information overwrites old knowledge.

The authors survey how PC addresses these gaps by framing the brain as a "prediction machine" that minimizes a single global energy function through local, asynchronous updates.

Methods

Predictive Coding operates on the principle of Variational Free Energy minimization. In a PC network, every neuron is part of a local circuit consisting of:

  • Value Nodes: Represent the current estimate of a latent state.
  • Error Nodes: Represent the difference between the current state and the prediction from the layer above.

Learning happens in two distinct phases:

  1. Inference: The network iteratively updates its value nodes to minimize the prediction error (energy) across the entire system.
  2. Learning: Once the nodes have settled, the synaptic weights are updated using a simple, local Hebbian-like rule to further reduce the error.
Figure 1: Generative models effectively compress information about a specific data point o, with missing information, into a low-dimensional code vector (or latent embedding), and use it to generate a (e.g., semantically) similar, complete data point. Left: the standard encoder-decoder model used in machine learning [30]; Right: an equivalent PC model, which iteratively computes and refines the code through a free-energy minimization process. At convergence, the code is then used to generate a data point via the same model used to perform the compression. Typically, PC associates the encoder with ascending (prediction error) messages and the decoder with descending (prediction) messages. Note that the implicit conflation of the encoding and decoding means that there is only one set of parameters in PC. These are the parameters of the generative model that, crucially, can be optimized locally, given the requisite predictions and prediction errors.

The paper also highlights Neural Generative Coding (NGC), a generalization of PC that decouples forward and feedback pathways, solving the "symmetric weight" problem and allowing for even more flexible, brain-like wiring patterns.

Datasets

The survey reviews results across a wide variety of standard benchmarks to demonstrate PC's versatility:

  • Image Classification: MNIST, CIFAR-10, and SVHN.
  • Associative Memory: COIL and ImageNet.
  • Temporal Data: Moving MNIST and natural video data.
  • Control/Robotics: Standard Reinforcement Learning (RL) environments and simulated robotics tasks.

Key Insights and Ideas

  • Locality is King: Unlike backprop, PC updates are purely local. A weight only needs information from the two neurons it connects. This makes PC a prime candidate for neuromorphic hardware, where massive parallelization is key.
  • Arbitrary Topologies: Because updates are local, PC can train networks with cycles and complex feedback loops—structures that are notoriously difficult for backpropagation but common in the cortex.
  • Implicit Gradient Descent: The authors note that PC naturally implements "implicit" gradient descent, a more stable optimization method that accounts for simultaneous changes across all parameters, leading to better-calibrated models.
  • Historical Evolution: The paper provides a fascinating timeline showing how PC evolved from a 1950s signal compression trick to a unified theory of evidence maximization.
Figure 2: A timeline of how the perception of what PC is has changed through the years. Initially, it was developed as a signal compression mechanism [34, 40]; then, it was used to model inhibition in the retina [35]. It then became a more general model of both learning and perception in the visual cortex [20]. Nowadays, it can be abstractly defined as an evidence-maximization scheme for hierarchical Gaussian generative models [41, 21]. For a detailed discussion on different PC algorithms, we also refer to another survey [42]

Key Results

  • Competitive Accuracy: On tasks like MNIST and CIFAR-10, PC networks achieve performance comparable to standard multi-layer perceptrons (MLPs) of similar complexity.
  • Robustness: PC models are significantly more robust to adversarial attacks and show better "calibration" (their confidence levels match their actual accuracy) than backprop-trained models.
  • Continual Learning: In "online" learning scenarios, PC-based models (like P-TNCNs) suffer far less from catastrophic forgetting, retaining performance on old tasks while learning new ones.
  • Active Inference: The survey highlights PC's success in robotics, where it serves as the backbone for "Active Inference"—a framework where agents act to minimize their future "surprise" or prediction error.

Limitations and Future Work

Despite its promise, PC faces significant hurdles:

  • The Scalability Bottleneck: PC currently struggles to match the performance of backprop in very deep architectures (e.g., Large Language Models). Deeper networks suffer from "energy imbalance," where error signals vanish or explode before reaching deeper layers.
  • Computational Efficiency: The iterative inference phase is slower on traditional GPUs than a single forward pass in a standard neural network.
  • Software Ecosystem: While libraries like ngc-learn and jPC are emerging, the field lacks the mature, highly optimized tooling enjoyed by the PyTorch and TensorFlow communities.

The authors conclude that the future of PC lies in developing amortized inference (speeding up the settling process) and finding the "PC equivalents" of modern deep learning tricks like Batch Norm and Adam to help the framework scale to the next generation of AI.

Summary updated

BibTeX
@misc{salvatori2023brain,
  author = {Tommaso Salvatori and Ankur Mali and Christopher L. Buckley and Thomas Lukasiewicz and Rajesh P. N. Rao and Karl Friston and Alexander Ororbia},
  title = {{Brain-inspired Computational Intelligence via Predictive Coding}},
  year = {2023},
  eprint = {2308.07870},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.07870},
}
Figure