Learning probability distributions of sensory inputs with Monte Carlo predictive coding

Gaspard Oliviers, Rafal Bogacz, Alexander MeulemansPLOS Computational Biology 2024 · DOI · OpenReview

Abstract

It has been suggested that the brain employs probabilistic generative models to optimally interpret sensory information. This hypothesis has been formalised in distinct frameworks, focusing on explaining separate phenomena. On one hand, predictive coding theory proposed how the probabilistic models can be learned by networks of neurons employing local synaptic plasticity. On the other hand, neural sampling theories have demonstrated how stochastic dynamics enable neural circuits to represent the posterior distributions of latent states of the environment. Here, we bring together these two lines of theoretic work by introducing Monte Carlo predictive coding (MCPC). We demonstrate that the integration of predictive coding with neural sampling results in a neural network that learns precise generative models using local computation and plasticity. The neural dynamics of MCPC infer the posterior distributions of the latent states in the presence of sensory inputs, and can generate likely inputs in their absence. Furthermore, MCPC captures the experimental observations on the variability of neural activity during perceptual tasks. By combining predictive coding and neural sampling, MCPC offers a unifying theory of cortical computation which can account for both sets of neural data that previously had been explained by these individual frameworks.

Introduction

The "Bayesian Brain" hypothesis suggests that our brains build internal generative models to predict sensory data. However, creating a model that satisfies biological constraints has been challenging. Specifically, a model must represent uncertainty (inference of the posterior distribution), build hierarchical representations, and rely solely on local synaptic plasticity rules rather than global signals like backpropagation.

Existing theories address these partially. Predictive Coding (PC) excels at local learning but typically only identifies the single most likely state, ignoring uncertainty. Neural Sampling theories demonstrate how stochastic noise can represent uncertainty but often lack a hierarchical learning mechanism. Monte Carlo Predictive Coding (MCPC) bridges this gap by integrating these two frameworks into a single, biologically plausible architecture.

The MCPC Framework

The core innovation of MCPC is the introduction of Langevin dynamics into the standard predictive coding architecture. In standard PC, neurons minimize prediction error to settle on a single value. MCPC adds zero-mean noise to this process, allowing neural activity to fluctuate and effectively "sample" from the full posterior distribution.

The MCPC framework maps a generative model (a) to a neural implementation (b) using value neurons and error neurons with local excitatory and inhibitory connections.

For learning, MCPC utilizes a Monte Carlo Expectation-Maximization (MC-EM) algorithm. While neurons sample the distribution (the E-step), synaptic weights are updated based on the average of these fluctuations (the M-step). These updates remain entirely local, involving only the activity of "value neurons" (latent states) and "error neurons" (mismatch between prediction and reality).

Key Results and Insights

The authors evaluated MCPC on a 1D Gaussian learning task and the MNIST handwritten digit dataset. The results demonstrate that MCPC significantly outperforms standard PC in generative tasks.

  • Handling Ambiguity: When presented with ambiguous or masked inputs, MCPC’s neural activity fluctuates between different possible interpretations (e.g., seeing a masked "4" as potentially a "9"), whereas standard PC often gets stuck on a single, incorrect guess.
  • Superior Generation: On the MNIST task, MCPC produced higher-quality digit samples than standard PC, achieving a lower Fréchet Inception Distance (FID) of 60.6 compared to 115.2 for PC.
  • Neural Quenching: The model naturally explains "neural quenching," where variability in neural activity drops when a stimulus appears, as the sensory input reduces uncertainty.
Comparison of MCPC and standard PC across tasks. (a-b) MCPC samples the full posterior distribution while PC finds a point estimate. (c-d) MCPC handles ambiguous MNIST digits by sampling multiple interpretations. (e) MCPC achieves lower KL divergence in learning.

Discussion

MCPC offers a unifying theory of cortical computation by combining the strengths of predictive coding and neural sampling. While Langevin dynamics can be slow, the brain may use accelerated sampling methods to speed up decision-making. Future work aims to extend this model to handle dynamic, time-varying sensory inputs and to develop a "spiking" version of the network to further align with biological implementations.

Summary updated

Abstract

Author summary Understanding how the brain interprets its sensory information is fundamental to neuroscience. It is suggested that the brain processes information by updating models of the environment that exist inside the brain. These models make educated guesses about the world, relying on the noisy information received through our senses. However, translating this conceptual framework into a concrete, biological theory is challenging. Several proposed theories explain specific aspects of brain function or dynamics. For instance, predictive coding describes the organization of the brain which is important for understanding how the brain infers and learns. Other theories, such as neural sampling, use random changes in the brain’s activity to explain how the brain interprets its sensory inputs. However, these theories remain separate, each explaining only certain brain functions. Our research introduces a theory that combines predictive coding and neural sampling into a unified framework for understanding brain learning and information processing. This model mirrors the brain’s organization, information processing capabilities using local computations, and learning using local plasticity. It also accounts for experimentally observed characteristics of the brain’s activity, while relying on minimal assumptions. Overall, our model offers a more comprehensive understanding of the brain’s learning capabilities, relevant to both neuroscience and machine learning.
BibTeX
@article{oliviers2024learning,
  author = {Gaspard Oliviers and Rafal Bogacz and Alexander Meulemans},
  title = {{Learning probability distributions of sensory inputs with Monte Carlo predictive coding}},
  journal = {PLOS Computational Biology},
  year = {2024},
  doi = {10.1371/journal.pcbi.1012532},
}
Figure