Taking the neural sampling code very seriously: A data-driven approach for evaluating generative models of the visual system
Suhas Shrinivasan, Konstantin-Klemens Lurz, Kelli Restivo, George H. Denfield, Andreas S. Tolias, Edgar Y. Walker, Fabian H. Sinz
Abstract
Prevailing theories of perception hypothesize that the brain implements perception via Bayesian inference in a generative model of the world. One prominent theory, the Neural Sampling Code (NSC), posits that neuronal responses to a stimulus represent samples from the posterior distribution over latent world state variables that cause the stimulus. Although theoretically elegant, NSC does not specify the exact form of the generative model or prescribe how to link the theory to recorded neuronal activity. Previous works assume simple generative models and test their qualitative agreement with neurophysiological data. Currently, there is no precise alignment of the normative theory with neuronal recordings, especially in response to natural stimuli, and a quantitative, experimental evaluation of models under NSC has been lacking. Here, we propose a novel formalization of NSC, that (a) allows us to directly fit NSC generative models to recorded neuronal activity in response to natural images, (b) formulate richer and more flexible generative models, and (c) employ standard metrics to quantitatively evaluate different generative models under NSC. Furthermore, we derive a stimulus-conditioned predictive model of neuronal responses from the trained generative model using our formalization that we compare to neural system identification models. We demonstrate our approach by fitting and comparing classical-and flexible deep learning-based generative models on population recordings from the macaque primary visual cortex (V1) to natural images, and show that the flexible models outperform classical models in both their generative-and predictive-model performance. Overall, our work is an important step towards a quantitative evaluation of NSC. It provides a framework that lets us learn the generative model directly from neuronal population recordings, paving the way for an experimentally-informed understanding of probabilistic computational principles underlying perception and behavior.
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 52ca5a85-6355-45ef-8bfc-001b66cd7aebCited by top-tier papers4
- Brain-like Variational InferenceHadi Vafaii, Dekel Galor, Jacob L. YatesNeurIPS 2025 · 7 citations
- An Information-Theoretic Framework For Optimizing Experimental Design To Distinguish Probabilistic Neural CodesPo-Chen Kuo, Edgar Y. WalkerICLR 2026
- TAVAE: A VAE with Adaptable Priors Explains Contextual Modulation in the Visual CortexBalázs Meszéna, Keith T. Murray, Julien Corbo, O. Batuhan Erkat et al.ICLR 2026
- Meta-Learning Theory-Informed Inductive Biases using Deep Kernel Gaussian ProcessesBahti Zakirov, Gasper TkacikICLR 2026
Builds on13
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
- Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
- Generalization in data-driven models of primary visual cortexKonstantin-Klemens Lurz, Mohammad Bashiri, Konstantin Willeke, Akshay Kumar Jagadish et al.ICLR 2021 · 71 citations
- Very Deep VAEs Generalize Autoregressive Models and Can Outperform Them on ImagesRewon ChildICLR 2021 · 45 citations
Related papers
- Adaptation Accelerating Sampling-based Bayesian Inference in Attractor Neural NetworksXingsi Dong, Zilong Ji, Tianhao Chu, Tiejun Huang et al.NeurIPS 2022 · 13 citations
- A flow-based latent state generative model of neural population responses to natural imagesMohammad Bashiri, Edgar Y. Walker, Konstantin-Klemens Lurz, Akshay Kumar Jagadish et al.NeurIPS 2021 · 31 citations
- Neural Sampling in Hierarchical Exponential-family Energy-based ModelsXingsi Dong, Si WuNeurIPS 2023 · 5 citations
- Bidirectional Predictive CodingGaspard Oliviers, Mufeng Tang, Rafal BogaczICLR 2026 · 7 citations
- Learning identifiable and interpretable latent models of high-dimensional neural activity using pi-VAEDing Zhou, Xue-Xin WeiNeurIPS 2020 · 110 citations
