NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The neural coding framework for learning generative models

Alexander G. Ororbia, Daniel Kifer

Abstract

Neural generative models can be used to learn complex probability distributions from data, to sample from them, and to produce probability density estimates. We propose a computational framework for developing neural generative models inspired by the theory of predictive processing in the brain. According to predictive processing theory, the neurons in the brain form a hierarchy in which neurons in one level form expectations about sensory inputs from another level. These neurons update their local models based on differences between their expectations and the observed signals. In a similar way, artificial neurons in our generative models predict what neighboring neurons will do, and adjust their parameters based on how well the predictions matched reality. In this work, we show that the neural generative models learned within our framework perform well in practice across several benchmark datasets and metrics and either remain competitive with or significantly outperform other generative models with similar functionality (such as the variational auto-encoder).

Introduction

Most modern artificial neural networks (ANNs) rely on backpropagation, an algorithm that calculates errors at the output and "shuttles" them backward through the entire network to update weights. While effective, backpropagation faces several "neuro-mechanistic" criticisms that limit its biological plausibility. Specifically, it suffers from the weight transport problem (requiring identical weights for forward and backward passes), update locking (neurons must wait for a global signal to finish before updating), and a strict separation between activity and learning phases.

Researchers have developed the Neural Generative Coding (NGC) framework to address these issues. By replacing backpropagation with a hierarchical "predictive processing" approach, these models achieve superior data efficiency and more useful unsupervised features for downstream tasks.

The Neural Generative Coding (NGC) Framework

Instead of a standard feedforward pass, the NGC network operates as a hierarchy of "state" and "error" neurons. The core mechanism is Predictive Processing, where each layer attempts to predict the activity of the layer below it. Special error neurons calculate the mismatch between these top-down predictions and the actual states.

Comparison of Backpropagation (a) and the Neural Generative Coding (NGC) framework (b), highlighting the shift from global error signals to local, layer-wise updates.

Unlike backpropagation, where errors are propagated globally, NGC utilizes local updates. Each neuron adjusts its activity and local synaptic weights based only on the error neurons immediately adjacent to it. This allows the model to perform inference and learning simultaneously and locally, mimicking the brain's efficiency.

Architectural Variants and Sparsity

The framework incorporates sophisticated biological mechanisms such as lateral inhibition, allowing neurons within the same layer to compete. This forces the model to learn sparse representations, where only a few neurons are active at a time. The "NGC-PDH" variant, for instance, uses lateral competition to achieve high levels of sparsity (only ~16-20% activity), which surprisingly helps the model learn cleaner, more separable features for classification.

Architectural diagrams of the NGC framework, showing the interaction between state neurons (z) and error neurons (e), including variants with lateral inhibition and precision-weighting.

Experimental Results

The framework was evaluated on four benchmark image datasets: MNIST (handwritten digits), KMNIST (Japanese Kanji), Fashion-MNIST (clothing), and CalTech 101 Silhouettes.

Key Findings:

  • Better Reconstruction: On MNIST, the NGC-PDH model achieved a Binary Cross Entropy (BCE) of 44.86, significantly outperforming the standard Generative Variational Auto-encoder (GVAE) at 75.52.
  • Superior Unsupervised Features: After training without labels, a simple linear classifier on NGC features achieved a classification error of 2.28% on MNIST, while the GVAE lagged at 9.13%.
  • Data Efficiency: NGC models generalized better with less data. When trained on only 2% of the MNIST dataset, NGC maintained much lower reconstruction errors than backprop-based counterparts.
  • Pattern Completion: Because the model uses an iterative "generate-then-correct" process to resolve prediction errors, it is naturally better at imagining missing data (e.g., completing a partial digit) than standard one-pass models.

Discussion and Future Work

While NGC offers significant biological and performance advantages, it currently faces higher computational costs due to the iterative "settling" process required for every input. Future work aims to transition the framework to spiking neural networks to further increase energy efficiency and to explore its application in temporal data processing, such as video, where predictive coding is a natural fit. By bridging the gap between machine learning and computational neuroscience, NGC provides a robust foundation for developing more efficient and biologically grounded artificial intelligence.

Summary updated

BibTeX
@inproceedings{ororbia2022neural,
  author = {Alexander G. Ororbia and Daniel Kifer},
  title = {{The neural coding framework for learning generative models}},
  booktitle = {Nature Communications},
  year = {2022},
  doi = {10.1038/s41467-022-29632-7},
}
Figure