Back to research
Generative modelsPreprint · 2026

Toward a mechanistic understanding of inference in visual cortex and diffusion models

A recurrent sparse-coding model links visual inference and diffusion through an explicit network of interactions between latent features.

Method

A learned pairwise interaction matrix extends sparse coding beyond independent latent variables. The recurrent circuit is trained on natural images with denoising score matching and implicit differentiation.

The model’s Jacobian is decomposed through this interaction matrix to trace how connections shape image features. Denoising and sampling are compared with a parameter-matched U-Net, while ablations test the contribution of latent units that receive almost no direct visual input.

Results

  • Learned connections preferentially link similarly oriented features, resembling horizontal connectivity in superficial primary visual cortex. The circuit completes extended contours under severe visual ambiguity.
  • In the evaluated generalization setting, the model produces comparable denoising scores and visually similar samples to the parameter-matched U-Net.
  • About 30% of latent units develop near-zero input weights. Removing their recurrent interactions degrades denoising, especially at high noise, linking these units to global consistency in the computational model.
Cite this work
@article{visualcortexdiffusion2026,
  title = {Toward a mechanistic understanding of inference in visual cortex and diffusion models},
  author = {Zeyu Yun and Alexander Belsten and Dasheng Bi and Zahra Kadkhodaie and Yubei Chen and Bruno A. Olshausen},
  year = {2026},
  journal = {arXiv},
  url = {https://arxiv.org/abs/2607.15693}
}