TL;DR
This paper introduces a data-driven framework to quantitatively evaluate the Neural Sampling Code (NSC)—a theory suggesting that neurons represent uncertainty by drawing samples from a "world model" posterior. By using deep learning to build flexible generative models and fitting them directly to macaque V1 recordings, the authors demonstrate that complex, non-linear models significantly outperform the simple, classical models previously used to describe the visual system.
What Problem Does This Paper Address?
For decades, neuroscientists have hypothesized that the brain is a "Bayesian machine," maintaining an internal generative model of the world to handle noisy and ambiguous sensory input. The Neural Sampling Code (NSC) is a leading theory in this space, proposing that a neuron's firing rate isn't just a fixed response, but a stochastic sample from a probability distribution over latent world states.
However, NSC has historically been a "normative" theory—elegant on paper but difficult to test against real data. Previous research relied on simple, hand-crafted models (like linear filters and Gaussian noise) and only compared them qualitatively to brain activity. There was no precise way to "fit" these theories to the complex neural responses triggered by natural images. This paper bridges that gap by providing a formal mathematical framework to learn the brain's internal generative model directly from population recordings.
Methods
The authors formalize NSC as a joint probability distribution $p(\mathbf{x}, \mathbf{r})$ between a stimulus $\mathbf{x}$ (an image) and a neural response $\mathbf{r}$ (spike counts). Their core approach involves several key steps:
- Likelihood and Prior Decomposition: They break the joint distribution into a prior $p(\mathbf{r})$ and a likelihood $p(\mathbf{x}|\mathbf{r})$. This allows them to learn what the brain "expects" to see (the prior) and how it "explains" an image based on neural activity (the likelihood).
- Flexible vs. Classical Models: They compare "Classical" models (linear likelihoods and exponential priors) against "Flexible" models. The flexible models use Normalizing Flows for the prior and Multi-Layer Perceptrons (MLPs) for the likelihood, allowing the model to capture complex, non-linear relationships.
- Variational Dequantization: Since neural spikes are discrete counts and many deep learning models (like flows) work on continuous data, they use a technique called variational dequantization to map discrete spikes into a continuous space for better modeling.
- Predictive Inversion: Once a generative model is trained, they "invert" it to create a predictive model $q(\mathbf{r}|\mathbf{x})$. This allows them to predict how a neuron will respond to a new image, providing a direct benchmark against standard "System Identification" models.
Datasets
To validate their framework, the researchers utilized both synthetic and real-world neurophysiological data.
- Synthetic Data: 10,000 pairs of images and neural responses were simulated from three classical NSC models (Hoyer & Hyvärinen, Olshausen & Field, and a Gaussian model) to validate that the framework can accurately recover known underlying models.
- Neurophysiological Data: Population recordings were taken from the primary visual cortex (V1) of two awake macaque monkeys.
- The data consists of 12 recording sessions using 32-channel laminar probes.
- Stimuli were grayscale natural images from the ImageNet dataset.
- Each session included approximately 16,000 image-response pairs from at least 16 well-isolated single neurons.
Key Insights and Results
Instead of assuming the brain uses a specific mathematical form (like a Gabor filter), this framework lets the data dictate the shape of the generative model. The "Aha!" moment of the study is that classical linear-Gaussian models are insufficient for natural stimuli. The flexible deep-learning-based models captured significantly more information about the neural population's structure.
A key insight is that a good generative model (one that can imagine an image given neural activity) also leads to a better predictive model (one that can predict neural activity given an image). While specialized "System Identification" models (designed only to predict spikes) still perform best, the NSC-based generative models are catching up, suggesting that the sampling hypothesis is a viable quantitative description of V1.
Quantitatively, the flexible "Flow-MLP" model achieved the highest log-likelihood on real V1 data. It improved the prior score by 0.095 bits per neuron over the standard exponential prior and the likelihood score by 0.052 bits per pixel over linear models. Furthermore, the flexible NSC model gained up to 1.39 bits per neuron per trial in posterior predictive performance compared to the baseline classical models, showing a 10% higher correlation with real neural responses.
Limitations and Future Work
- 1:1 Mapping Assumption: The current study assumes a strict 1:1 mapping between a single neuron and a single latent variable in the world model. In reality, the brain likely uses a more complex, distributed mapping where many neurons represent many overlapping variables.
- Definition of a "Sample": The authors defined a sample as the total spike count in a specific time window (40–160ms). Other definitions, such as membrane potential fluctuations or precise spike timing, might be more biologically accurate.
- Image Priors: The current likelihood model $p(\mathbf{x}|\mathbf{r})$ is relatively simple (Gaussian noise). Future work could incorporate more sophisticated "natural image priors" to better capture the statistics of the real world.
- Mechanistic Gap: While the model is statistically powerful, it is not "mechanistic"—it doesn't explain how biological circuits of neurons actually perform these calculations. Bridging this statistical fit with biophysical circuit models is a major next step.
Summary updated