TL;DR
NeuroFlow is the first unified framework that combines visual encoding (predicting brain activity from images) and decoding (reconstructing images from brain activity) into a single, reversible model. By leveraging cross-modal flow matching, it enforces strict semantic consistency between the two processes while using only a fraction of the parameters required by state-of-the-art isolated models.
What Problem Does This Paper Address?
In cognitive neuroscience and brain-computer interfaces (BCIs), researchers rely on two primary tasks to bridge the gap between human vision and machine learning:
- Visual Encoding: Predicting how the brain (via fMRI) will respond to a specific visual stimulus.
- Visual Decoding: Reconstructing the image a person is looking at based on their recorded brain activity.
Historically, these two tasks have been treated as entirely separate problems, requiring independent models and distinct training procedures. This siloed approach is not only computationally inefficient, but it also suffers from a lack of bidirectional consistency. For example, if you encode an image into synthetic brain activity and then pass that activity to a separate decoding model, the resulting image rarely matches the original semantics.
NeuroFlow addresses this gap by unifying encoding and decoding into a single, time-dependent, reversible process within a shared latent space.
Methods
NeuroFlow achieves bidirectional unification by combining a frozen visual backbone (CLIP/UnCLIP) with two novel components:
- NeuroVAE (Neural Backbone): This variational autoencoder maps raw fMRI signals into a compact, semantically structured latent space ($z_n$). To prevent the model from overfitting to voxel-level noise, NeuroVAE is trained with a combination of reconstruction loss, KL divergence (to capture neural variability), and a cycle-consistency loss. The cycle-consistency loss ensures that synthetic fMRI signals retain enough semantic information to be successfully decoded back into coherent images.
- Cross-Modal Flow Matching (XFM): Traditional generative methods rely on conditional diffusion pipelines that iteratively turn Gaussian noise into data. XFM bypasses this by learning a continuous, reversible vector field directly between the empirical visual latent distribution ($z_v$) and the neural latent distribution ($z_n$).
By formulating this relationship as an Ordinary Differential Equation (ODE), switching between encoding and decoding becomes as simple as changing the sign of the temporal step ($\Delta t$) during inference:
$$\text{Forward } (+ \Delta t): \text{Visual Latent } (z_v) \rightarrow \text{Neural Latent } (z_n) \quad [\text{Encoding}]$$ $$\text{Backward } (- \Delta t): \text{Neural Latent } (z_n) \rightarrow \text{Visual Latent } (z_v) \quad [\text{Decoding}]$$
Datasets
The model was trained and evaluated on the Natural Scenes Dataset (NSD), a high-resolution 7-Tesla fMRI dataset. The authors aligned their work with standard protocols in the field by focusing on four subjects (Sub-1, Sub-2, Sub-5, and Sub-7) who completed all scanning sessions.
- Training set: 9,000 unique images from the Microsoft COCO dataset per subject.
- Test set: 1,000 shared test images, each presented three times to account for biological neural variability.
Key Insights and Ideas
- Denoising Through Abstraction: One of the most striking findings is that decoding images from synthetic fMRI signals generated by NeuroFlow actually outperforms decoding from raw fMRI data (e.g., an Inception score of 98.6% vs 95.6%). The model acts as an intelligent semantic filter, abstracting away trial-to-trial voxel fluctuations and focusing purely on task-relevant features.
- Biologically Aligned Representations: Brain functional analysis revealed that NeuroFlow naturally suppresses early visual cortex noise (V1–V4) and prioritizes higher-order, category-specific regions like the Fusiform Face Area (FFA) and Extrastriate Body Area (EBA).
- No More Gaussian Noise: Unlike standard diffusion models that start generation from random noise, NeuroFlow's decoding trajectory initializes from a semantically grounded neural distribution. This drastically shortens the sampling path and stabilizes image generation.
Key Results
NeuroFlow demonstrates that a unified model does not have to sacrifice performance for generality:
- State-of-the-Art Decoding: NeuroFlow outperforms existing decoding baselines, achieving the highest overall performance in Inception score (95.6%) and CLIP similarity (94.2%).
- Superior Parameter Efficiency: NeuroFlow contains only 660M trainable parameters and requires no pretraining. This makes it roughly 25% of the size of MindEye2 (2.60B parameters), yet it matches or exceeds its performance across multiple metrics.
- Strict Consistency: In the image-to-fMRI-to-image pipeline, NeuroFlow significantly outperforms all standalone encoding models, proving that its generated brain activity preserves critical semantic structures.
Limitations and Future Work
While NeuroFlow marks a major step forward, the authors note a few limitations:
- Retrieval Trade-off: To achieve a unified architecture, NeuroFlow sacrifices a small amount of raw retrieval accuracy compared to massive, decoding-only models like MindEye2.
- Subject Specificity: Like most current fMRI models, NeuroFlow is trained on a per-subject basis due to the massive anatomical and functional differences between human brains.
Future work will focus on scaling the framework to cross-subject foundation models and extending the reversible flow matching paradigm to more portable neural modalities, such as EEG or MEG, for real-time BCI applications.
Summary updated