Sample as you Infer: Predictive Coding with Langevin Dynamics
Umais Zahid, Qinghai Guo, Zafeirios Fountas
Abstract
We present a novel algorithm for parameter learning in generic deep generative models that builds upon the predictive coding (PC) framework of computational neuroscience. Our approach modifies the standard PC algorithm to bring performance on-par and exceeding that obtained from standard variational auto-encoder (VAE) training. By injecting Gaussian noise into the PC inference procedure we re-envision it as an overdamped Langevin sampling, which facilitates optimisation with respect to a tight evidence lower bound (ELBO). We improve the resultant encoder-free training method by incorporating an encoder network to provide an amortised warm-start to our Langevin sampling and test three different objectives for doing so. Finally, to increase robustness to the sampling step size and reduce sensitivity to curvature, we validate a lightweight and easily computable form of preconditioning, inspired by Riemann Manifold Langevin and adaptive optimizers from the SGD literature. We compare against VAEs by training like-for-like generative models using our technique against those trained with standard reparameterisation-trick-based ELBOs. We observe our method out-performs or matches performance across a number of metrics, including sample quality, while converging in a fraction of the number of SGD training iterations.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers3
- Divide-and-Conquer Predictive Coding: a structured Bayesian inference algorithmEli Sennesh, Hao Wu, Tommaso SalvatoriNeurIPS 2024 · 7 citations
- Bidirectional Predictive CodingGaspard Oliviers, Mufeng Tang, Rafal BogaczICLR 2026 · 7 citations
- Benchmarking Predictive Coding Networks - Made SimpleLuca Pinchetti, Chang Qi, Oleh Lokshyn, Cornelius Emde et al.ICLR 2025
Builds on4
- NVAE: A Deep Hierarchical Variational AutoencoderArash Vahdat, Jan KautzNeurIPS 2020 · 1,141 citations
- Reliable Fidelity and Diversity Metrics for Generative ModelsMuhammad Ferjad Naeem, Seong Joon Oh, Youngjung Uh, Yunjey Choi et al.ICML 2020 · 553 citations
- Very Deep VAEs Generalize Autoregressive Models and Can Outperform Them on ImagesRewon ChildICLR 2021 · 45 citations
- Langevin Autoencoders for Learning Deep Latent Variable ModelsShohei Taniguchi, Yusuke Iwasawa, Wataru Kumagai, Yutaka MatsuoNeurIPS 2022 · 2 citations
Related papers
- Predictive Coding beyond Gaussian DistributionsLuca Pinchetti, Tommaso Salvatori, Yordan Yordanov, Beren Millidge et al.NeurIPS 2022 · 22 citations
- Brain-like Variational InferenceHadi Vafaii, Dekel Galor, Jacob L. YatesNeurIPS 2025 · 7 citations
- A Geometric Perspective on Variational AutoencodersClément Chadebec, Stéphanie AllassonnièreNeurIPS 2022 · 39 citations
- From Variational to Deterministic AutoencodersPartha Ghosh, Mehdi S. M. Sajjadi, Antonio Vergari, Michael J. Black et al.ICLR 2020 · 298 citations
- Learning Energy-Based Model with Variational Auto-Encoder as Amortized SamplerJianwen Xie, Zilong Zheng, Ping LiAAAI 2021 · 57 citations
