Introduction
Deep learning's success is largely attributed to backpropagation (backprop), an algorithm for calculating gradients across multi-layered networks. However, backprop faces significant criticism from a neuroscientific perspective due to its biological implausibility. Specifically, it suffers from the "weight transport problem"—requiring identical forward and backward weights—and "non-locality," where updates to a single neuron necessitate global coordination across the entire architecture.
Predictive coding (PC) has emerged as a compelling alternative. Rooted in theories of brain function, PC posits that layers attempt to predict the activity of adjacent layers, minimizing the resulting "prediction error" through local interactions. While previous work demonstrated that PC could approximate backprop in simple multi-layer perceptrons (MLPs), this paper generalizes the approach to arbitrary, complex computation graphs, including Convolutional Neural Networks (CNNs) and Long Short-Term Memory (LSTM) units.
Methodology: From Global Gradients to Local Errors
The authors frame predictive coding as a variational inference algorithm that minimizes Variational Free Energy (VFE). Under the assumption of Gaussian noise, VFE minimization simplifies to minimizing the sum of squared prediction errors across all nodes in a network.
Instead of a global backward pass, each node in the computation graph performs local gradient descent on the VFE. This process involves two distinct phases:
- Forward Sweep: A standard inference pass to generate initial predictions.
- Backwards Iteration: Nodes and their associated error units update in parallel until the system reaches a steady-state equilibrium.
A central contribution of this work is the mathematical proof that at this equilibrium, local prediction errors are exactly equivalent to the gradients computed by standard backpropagation. This suggests that the recursive structure of the chain rule is naturally mirrored by the recursive structure of prediction errors in a PC network.
Generalizing to Arbitrary Computation Graphs
To move beyond simple feedforward chains, the authors treat any differentiable program as a Directed Acyclic Graph (DAG). They provide a systematic "recipe" for translating standard machine learning components—such as convolutions, gates, and non-linearities—into PC equivalents. This involves augmenting every variable in the graph with an associated error unit.
This generalization allows PC to be applied to modern architectures like CNNs for image classification and LSTMs for sequence modeling. Unlike backprop, which is strictly sequential, PC updates are fully parallelizable; every neuron can update based solely on its local inputs and the error signals from its immediate children.
Experimental Results
The authors evaluated PC-based architectures on several standard benchmarks, including image classification (SVHN, CIFAR-10/100) and sequence modeling (RNNs for character-level name classification and LSTMs for next-character prediction on the works of Shakespeare).
In all experiments, the performance of models trained via predictive coding was virtually indistinguishable from those trained with backpropagation. Furthermore, while the theoretical proof is asymptotic, the networks were found to converge to exact gradients rapidly in practice, typically within 100 to 200 iterations. The optimization remained robust even with high learning rates and complex, non-linear branching structures.
Discussion and Future Directions
While this research provides a powerful theoretical bridge between biological learning and modern AI, practical challenges remain. On current serial hardware (CPUs and GPUs), PC is approximately 100x to 200x slower than backprop due to the iterative nature of reaching equilibrium. However, the authors suggest that the true potential of this algorithm lies in neuromorphic hardware, where massive parallelism could turn this iterative process into a significant efficiency advantage.
Additionally, while the spatial updates are local, the temporal requirements for RNNs and LSTMs still rely on "unrolling through time," which remains a biological hurdle. Future work will explore scaling these methods to even larger architectures, such as Transformers, and further refining the biological plausibility of the temporal dynamics.
Summary updated