A Stable, Fast, and Fully Automatic Learning Algorithm for Predictive Coding Networks
Tommaso Salvatori, Yuhang Song, Yordan Yordanov, Beren Millidge, Zhenghua Xu, Lei Sha, Cornelius Emde, Rafal Bogacz, Thomas Lukasiewicz
TL;DR
The paper tackles slow, unstable training in predictive coding networks and introduces incremental predictive coding (iPC), which updates inference and synaptic weights in parallel at every time step. Grounded in a variational free energy framework and incremental EM, iPC provides convergence guarantees and removes the need for external control signals. Empirically, iPC consistently outperforms the original PC on image classification benchmarks and matches or approaches BP performance on larger models, while offering improved calibration under distribution shift and better parameter efficiency. The approach extends to language modeling tasks, achieving robust perplexities comparable to BP and substantially better stability than PC, highlighting its practical potential for neuroscience-inspired learning on large-scale tasks.
Abstract
Predictive coding networks are neuroscience-inspired models with roots in both Bayesian statistics and neuroscience. Training such models, however, is quite inefficient and unstable. In this work, we show how by simply changing the temporal scheduling of the update rule for the synaptic weights leads to an algorithm that is much more efficient and stable than the original one, and has theoretical guarantees in terms of convergence. The proposed algorithm, that we call incremental predictive coding (iPC) is also more biologically plausible than the original one, as it it fully automatic. In an extensive set of experiments, we show that iPC constantly performs better than the original formulation on a large number of benchmarks for image classification, as well as for the training of both conditional and masked language models, in terms of test accuracy, efficiency, and convergence with respect to a large set of hyperparameters.
