Probabilistic Inference through Neural Sampling in Spiking Networks

24 concepts14 papers1 proposal

To survive in an uncertain world, the brain must constantly perform Bayesian inference—interpreting ambiguous sensory data by combining it with internal prior expectations. Traditionally, computational neuroscientists modeled this by assuming that a neuron's firing rate represents a continuous statistical parameter, such as a probability or a log-likelihood.

However, rate coding faces a fundamental limitation: a single scalar rate cannot easily capture a complex, multi-modal probability distribution or represent the brain's confidence about multiple competing hypotheses simultaneously.

An alternative framework solves this by treating individual neural spikes not as continuous values, but as discrete random samples drawn from a posterior probability distribution. In this paradigm, known as neural sampling, a network represents a probability distribution through its dynamics over time. If a population of neurons spikes in a certain pattern, that pattern represents a concrete hypothesis about the world. Over time, the frequency with which different patterns appear mirrors the underlying probability landscape.

The Mechanics of Spikes as Samples

How can physical, often deterministic neurons generate the stochastic samples required for Markov Chain Monte Carlo (MCMC) sampling?

As explored by Srinjoy Das et al. in Event-driven contrastive divergence: neural sampling foundations and Hyeryung Jang et al. in Spiking Neural Networks - Part I: Detecting Spatial Patterns, the intrinsic biophysical properties of spiking neurons—such as refractory periods, membrane decay, and background synaptic noise—can be mathematically mapped to the transition steps of a Markov chain. Instead of needing an explicit algorithmic random number generator, the physical dynamics of the network allow it to asymptotically produce samples that match a target distribution, such as a Boltzmann distribution.

Rate Coding:    |||||||||||||||||||||  ->  High Firing Rate = High Probability Scalar

Neural Sampling:  |      |   |      |  ->  Each spike is a discrete sample (Hypothesis X)
                |   |      |   |    |  ->  Each spike is a discrete sample (Hypothesis Y)

This sampling can manifest in different temporal structures:

To make this sampling efficient enough for real-time decision-making, the underlying mathematical rules must allow for rapid state transitions. Paul Masset et al. prove in Natural Gradient Enables Fast Sampling in Spiking Neural Networks that deterministic spiking rules can be viewed as a limiting case of Metropolis-Hastings sampling. By implicitly utilizing a natural gradient, the network avoids getting stuck in local minima, bridging the gap between smooth physical simulations and fast probabilistic inference.

Mapping Biophysics to Probabilistic Mathematics

The reason neural sampling works so elegantly is that the standard differential equations governing a neuron's membrane potential mirror the algebraic operations required for exact Bayesian inference.

In a classic single-author paper, Rajesh P. N. Rao demonstrated in Hierarchical Bayesian Inference in Networks of Spiking Neurons that the belief propagation algorithm maps directly onto leaky integrate-and-fire dynamics. When a neuron integrates synaptic inputs, it is mathematically summing log-messages from its neighbors. Consequently, the membrane potential represents the log-probability of a specific environmental state. When the potential crosses a threshold and fires, the resulting spike communicates this posterior probability to downstream circuits.

Synaptic Integration (Summing Inputs)  ===>  Summation of Log-Messages
Membrane Potential (Voltage Level)     ===>  Log-Probability of a State
Action Potential (Spike Event)         ===>  Discrete Sample Sent to Neighbors

This connection between optimization and sampling is further solidified by Jacob A Zavatone-Veth et al. in Combining Sampling Methods with Attractor Dynamics in Spiking Models of Head-Direction Systems. The authors show that spiking networks can combine greedy error minimization with Langevin dynamics. By following the gradient of a probability distribution and incorporating controlled biophysical noise, the network's physical trajectory naturally samples from the correct target distribution over time.

Tracking Dynamic Environments with Recurrent Loops

The real world is rarely static; the hidden variables the brain tracks change continuously. To perform Bayesian filtering (like tracking a moving target), a network must maintain a memory of past states and update its beliefs based on new, noisy sensory inputs.

Recurrent connections within the neural circuit provide the necessary computational substrate for this task. As established by Richard Zemel et al. in Probabilistic Computation in Spiking Populations, recurrent loops allow a network to maintain and dynamically update probabilistic representations over time, minimizing the divergence between the network's internal model and the true evolving state of the world.

This mechanism allows spiking networks to implement biological equivalents of advanced tracking algorithms:

Learning the Statistical Priors

For a network to sample from a posterior distribution, it must first learn the statistical structure of its environment (the priors and likelihoods) and embed them into its synaptic weights.

In a neural sampling network, learning is generative: the network adjusts its weights so that its spontaneous, internally generated spiking activity matches the distribution of the data it experiences from the outside world.

Srinjoy Das et al. proved the viability of this approach on physical hardware in Event-driven contrastive divergence for spiking neuromorphic systems. By combining neural sampling with Spike-Time Dependent Plasticity (STDP), they implemented an event-driven version of the Contrastive Divergence algorithm, allowing a network to learn generative models in an unsupervised, low-power manner.

External Stimulus Present  ===>  Network samples from Posterior P(State | Sensory Input)
                                       │  (STDP adjusts weights to match data)
                                       ▼
Spontaneous Activity       ===>  Network samples from Prior P(State) via internal dynamics

This learning framework adapts to complex environmental variations through specialized architectural and plasticity rules:

  • Competitive Inference: Cristina Savin et al. demonstrate in Neurons Equipped with Intrinsic Plasticity Learn Stimulus Intensity Statistics that a soft-winner-take-all architecture can map the steps of the expectation-maximization algorithm onto neural dynamics. Here, intrinsic plasticity allows individual neurons to treat stimulus intensity variations as a useful statistical feature rather than destructive noise.
  • Spontaneous Replay: Once these statistics are embedded in the weights, the network can perform inference entirely offline. Amadeus Maes et al. show in Long- and short-term history effects in a spiking network model of statistical learning that combining Hebbian learning with synaptic normalization allows a network's spontaneous activity to act as an internal Monte Carlo simulation. The network randomly switches between internal clusters, replaying past experiences according to their learned probability, allowing downstream circuits to compute expectations effortlessly.

Key Foundational Work

Probabilistic Computation in Spiking Populations (2004) — contributed 6 concept elements to this direction.
Event-driven contrastive divergence for spiking neuromorphic systems (2014) — contributed 2 concept elements to this direction.
Ensembles of Spiking Neurons with Noise Support Optimal Probabilistic Inference in a Dynamically Changing Environment (2014) — contributed 2 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_neural_sampling_9cb3bab9,
  title = {neural sampling},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/neural-sampling/rdr_9cb3bab95c884da9afdc932230249e45},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-22},
}

This exact version (version 1, frozen text):

@misc{lacuna_neural_sampling_9cb3bab9_v1,
  title = {neural sampling},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/neural-sampling/rdr_9cb3bab95c884da9afdc932230249e45/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-22},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake