Abstract
Image-to-fMRI encoding is important for both neuroscience research and practical applications. However, such "Brain-Encoders" have been typically trained per-subject and per fMRI-dataset, thus restricted to very limited training data. In this paper we propose a Universal Brain-Encoder, which can be trained jointly on data from many different subjects/datasets/machines. What makes this possible is our new voxel-centric Encoder architecture, which learns a unique "voxel-embedding" per brain-voxel. Our Encoder trains to predict the response of each brain-voxel on every image, by directly computing the cross-attention between the brain-voxel embedding and multi-level deep image features. This voxel-centric architecture allows the functional role of each brain-voxel to naturally emerge from the voxel-image cross-attention. We show the power of this approach to (i) combine data from multiple different subjects (a "Crowd of Brains") to improve each individual brain-encoding, (ii) quick & effective Transfer-Learning across subjects, datasets, and machines (e.g., 3-Tesla, 7-Tesla), with few training examples, and (iii) use the learned voxel-embeddings as a powerful tool to explore brain functionality.
Introduction
Mapping how the human brain responds to visual stimuli—a process known as image-to-fMRI encoding—is a cornerstone of modern neuroscience. However, progress has been hampered by two major hurdles: data scarcity and inter-subject variability. Individual fMRI datasets are typically small, as a single person can only spend a few hours in a scanner. Furthermore, models trained on one subject rarely generalize to another due to unique physical and functional brain structures. Historically, this has forced researchers to build "subject-specific" and "machine-specific" encoders that cannot easily combine data from different studies.
Methods: A Voxel-Centric Architecture
The core innovation of this work is a shift from whole-brain modeling to a voxel-centric architecture. Instead of treating an entire fMRI scan as a single high-dimensional block, the model assigns a unique voxel-embedding (a 256-dimensional vector) to every single 3D voxel in the brain.
The model operates through three primary components:
- Feature Extraction: The model uses a pre-trained DINO-v2 (Vision Transformer) to extract multi-level features from input images, capturing a hierarchy of information from low-level textures to high-level semantic concepts.
- Cross-Attention: Each voxel-embedding acts as a "query" that uses cross-attention to probe the image features. It learns exactly which spatial parts of an image and which types of functional features it should care about.
- Shared Weights: While each voxel has its own embedding, the rest of the network weights are shared across all voxels and all subjects. This allows the model to learn the "universal" rules of how visual features translate to neural activity.
Datasets and Training
The study demonstrates the model's universality by integrating three distinct fMRI datasets:
- NSD (Natural Scenes Dataset): A high-quality 7-Tesla dataset with 8 subjects viewing ~73,000 color images.
- fMRI-on-ImageNet: A 3-Tesla dataset with 5 subjects viewing 1,200 images.
- vim1: An older 4-Tesla dataset with 2 subjects viewing grayscale images.
Despite differences in image types, machine strengths, and voxel counts, the model successfully trained on these simultaneously. This "crowd of brains" approach allows the model to find "functional twins"—voxels across different people that share similar response patterns—thereby overcoming the limitations of small, individual datasets.
Key Results and Insights
The Universal Encoder demonstrates significant improvements over traditional subject-specific models:
- Superior Performance: The model showed a 7% to 15% improvement in prediction accuracy on the NSD dataset compared to state-of-the-art subject-specific encoders.
- Effective Transfer Learning: A model pre-trained on the "crowd" could adapt to a completely new subject with as few as 100 image samples and still outperform a dedicated model trained on thousands of samples from scratch.
- Functional Emergence: The "role" of a voxel (e.g., responding to faces) isn't hard-coded; it emerges naturally through the cross-attention mechanism. By clustering the learned voxel-embeddings, researchers could map functional regions without needing to physically align the brains.
- Image Retrieval: The model is accurate enough to identify which image a subject was looking at out of a pool of 1,000 candidates based solely on the predicted fMRI response.
Conclusion
By focusing on individual voxels rather than whole brains, the Universal Brain Encoder leverages shared functional patterns to predict brain activity with unprecedented efficiency. This approach not only improves individual encoding but also enables rapid transfer learning across different machines and resolutions, providing a powerful new tool for exploring the functional organization of the human brain. Future work may extend this voxel-centric approach to other modalities, such as language, or use it to create sophisticated "brain-to-brain" translation tools.
Summary updated