English

JPC: Flexible Inference for Predictive Coding Networks in JAX

Neural and Evolutionary Computing 2024-12-06 v1 Artificial Intelligence Machine Learning

Abstract

We introduce JPC, a JAX library for training neural networks with Predictive Coding. JPC provides a simple, fast and flexible interface to train a variety of PC networks (PCNs) including discriminative, generative and hybrid models. Unlike existing libraries, JPC leverages ordinary differential equation solvers to integrate the gradient flow inference dynamics of PCNs. We find that a second-order solver achieves significantly faster runtimes compared to standard Euler integration, with comparable performance on a range of tasks and network depths. JPC also provides some theoretical tools that can be used to study PCNs. We hope that JPC will facilitate future research of PC. The code is available at https://github.com/thebuckleylab/jpc.

Keywords

Cite

@article{arxiv.2412.03676,
  title  = {JPC: Flexible Inference for Predictive Coding Networks in JAX},
  author = {Francesco Innocenti and Paul Kinghorn and Will Yun-Farmbrough and Miguel De Llanza Varona and Ryan Singh and Christopher L. Buckley},
  journal= {arXiv preprint arXiv:2412.03676},
  year   = {2024}
}

Comments

9 pages, 7 figures

R2 v1 2026-06-28T20:23:29.225Z