ePC: Fast and Deep Predictive Coding in Digital Simulation

Cédric Goemaere, Gaspard Oliviers, Rafal Bogacz, Thomas Demeester

Predictive Coding (PC) has emerged as a promising, biologically plausible alternative to backpropagation. By framing learning as a physical process where each layer attempts to predict the activity of the next, PC minimizes local "energy" or prediction error. While this theoretical framework is perfectly suited for future analog or neuromorphic hardware, the current reality is that PC must be simulated on digital computers. This paper addresses the severe "hardware-algorithm mismatch" that has historically prevented PC from scaling to deep neural networks, introducing a novel reparameterization that shatters previous speed and depth barriers.

The Root of the Problem: Exponential Signal Decay

The standard method for simulating PC, known as state-based PC (sPC), is notoriously slow and struggles to scale. The authors identify the fundamental mathematical culprit: exponential signal decay.

In sPC, the training signal propagates at a rate of only one layer per update step. Because the signal is multiplied by a learning rate ($\lambda < 1$) at every layer, it vanishes exponentially as it travels from the output layer back toward the input. In deep networks, this attenuation is so severe that the signal often hits numerical precision limits (such as machine epsilon) before it ever reaches the earlier layers. Consequently, deeper layers are left effectively untrained, and convergence becomes agonizingly slow.

The Solution: Error-Based Predictive Coding (ePC)

To overcome this bottleneck, the authors propose a fundamental shift in how PC is parameterized for digital hardware, introducing error-based PC (ePC).

Instead of optimizing the neural states ($s$) at each layer, ePC reformulates the mathematics to optimize the prediction errors ($\epsilon$) directly. By restructuring the computational graph, ePC allows training signals to reach all layers simultaneously. It leverages reverse-mode automatic differentiation (AD)—the same computational backbone used in backpropagation—not to replace the core logic of PC, but to find the state equilibrium exponentially faster.

Crucially, the authors mathematically prove that ePC and sPC reach the exact same equilibrium points. ePC is not a different learning algorithm; it is a vastly more efficient method for solving the identical optimization problem on digital chips. The authors note that this approach is mathematically analogous to the "reparameterization trick" used in Variational Autoencoders (VAEs), bridging PC with established probabilistic machine learning techniques.

Unmasking the Illusion of Deep PC

A major revelation in this paper is the exposure of a "silent flaw" in previous deep PC research. Prior works (such as $\mu$PC) claimed to successfully train networks up to 128 layers deep. However, the authors demonstrate that due to exponential signal decay, only the top few layers in those historical simulations were actually learning. The earlier layers were merely acting as fixed, random pass-throughs. By eliminating signal decay, ePC becomes the first method to genuinely train all layers of deep PC networks.

Empirical Triumphs: Speed and Accuracy

The researchers evaluated ePC across standard computer vision benchmarks (MNIST, FashionMNIST, CIFAR-10, and CIFAR-100) to ensure a rigorous comparison with existing literature.

  • Massive Speedups: In a 20-layer linear network, ePC converged 100x faster than sPC. In non-linear models dealing with complex inputs, the speedup reached a staggering 10,000x.
  • Matching Backprop: For the first time, a PC-based algorithm consistently matched the test accuracy of backpropagation across various depths (VGG-5, VGG-7, VGG-9) and complex architectures like ResNet-18.
  • Enhanced Stability: ePC proved significantly more stable than sPC, which historically became unstable or failed to converge on architectures with residual connections.

Limitations and the Path Forward

The authors transparently acknowledge that ePC, by utilizing reverse-mode AD, sacrifices biological plausibility. It is explicitly designed as a high-performance simulation tool for AI researchers, rather than a strict model of the brain. Furthermore, because ePC and sPC take different optimization paths to reach the same equilibria, ePC cannot be used to study the transient dynamics of how a biological system settles into a state.

Ultimately, ePC solves the digital simulation bottleneck that has held Predictive Coding back. With the ability to efficiently simulate deep PC networks, the field is now unblocked to explore domains where PC might naturally outperform backpropagation, such as online learning and continual learning.

Summary updated

BibTeX
@inproceedings{goemaere2026epc,
  author = {Cédric Goemaere and Gaspard Oliviers and Rafal Bogacz and Thomas Demeester},
  title = {{ePC: Fast and Deep Predictive Coding in Digital Simulation}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=vNPkcJj46N},
}
Figure