Back

Naturalistic Stimulus Reconstruction from fMRI: A Primer in the Natural Scenes Dataset

Yildiz, U.; Urgen, B. A.

2026-03-30 neuroscience
10.64898/2026.03.26.714100 bioRxiv
Show abstract

Reconstructing natural images from brain activity represents one of the most compelling demonstrations of the synergy between modern neuroimaging and machine learning. However, the computational pipelines underlying these results remain scarcely accessible, difficult to reproduce, and offer limited opportunities for hands-on experimentation. They depend on large codebases, expensive hardware, and multiple representational stages whose interactions are not obvious. We present a step-by-step tutorial, organized across six notebooks, for reconstructing natural images from fMRI responses in the Natural Scenes Dataset. The workflow walks the reader through three main stages: predicting coarse image structure from brain activity by targeting the latent space of a pretrained image autoencoder, predicting semantic content by targeting learned vision-language embeddings, and combining both signals through a pretrained generative model that produces a final image reflecting both the recovered layout and the recovered meaning. Each notebook explains the reasoning behind its pipeline stage and provides runnable code to reproduce and build on each component. We present qualitative and quantitative metrics for all of our pipeline stages. Every notebook runs end-to-end on free-tier Google Colab hardware, and each stage can be inspected, modified, and replaced independently.

Matching journals

The top 3 journals account for 50% of the predicted probability mass.