Brain Captioning: Decoding human brain activity into images and text

Matteo Ferrante, Furkan Ozcelik, Tommaso Boccato, Rufin VanRullen, Nicola ToschiarXiv 2023 · DOI

Abstract

Recent advancements in neuroimaging and generative AI have opened new frontiers in brain decoding. Traditional methods often struggle with the "semantic gap," failing to capture the high-level meaning of visual stimuli. This paper presents a novel "Brain Captioning" pipeline that translates fMRI activity into natural language descriptions. By integrating these captions with brain-estimated depth maps to guide a Latent Diffusion Model, the proposed method achieves state-of-the-art performance in both semantic accuracy and visual reconstruction fidelity.

Introduction

The primary challenge in decoding human brain activity from functional Magnetic Resonance Imaging (fMRI) is the indirect nature of the BOLD (blood-oxygen-level-dependent) signal. Mapping noisy voxels directly to pixel-level reconstructions often results in blurry images that lack semantic coherence. This "semantic gap" suggests that the human brain processes visual information through high-level abstractions rather than raw pixels. This study proposes shifting the decoding target from images to captions, leveraging language as a robust bridge between neural activity and visual synthesis.

Methodology

The researchers developed a multi-stage pipeline utilizing several state-of-the-art generative models to bridge the gap between fMRI data and visual output.

The Brain Captioning pipeline: fMRI data is mapped to a GIT decoder for captioning and a VDVAE for an initial visual guess, combined with depth estimation to guide Stable Diffusion.
  1. The Captioner (GIT): A Generative Image-to-text Transformer (GIT) serves as the backbone. Linear regression models are trained to map fMRI activity to the latent features of the GIT model, effectively predicting the semantic "thoughts" of the captioning AI.
  2. Initial Guess (VDVAE): A Very Deep Variational Autoencoder (VDVAE) generates a low-resolution "blurry" draft of the image from fMRI data to establish basic color and shape.
  3. Depth Estimation: To improve spatial accuracy, a brain-decoder is trained to predict grayscale depth maps, which are then used via ControlNet to constrain the spatial layout of the final image.
  4. Synthesis: The generated caption, initial guess, and estimated depth map are processed by Stable Diffusion v2. The ControlNet module ensures the output respects the 3D layout, while the caption ensures semantic correctness.

Datasets

The study utilized the Natural Scenes Dataset (NSD), a gold-standard fMRI dataset containing high-resolution 7-Tesla scans from eight subjects. These subjects viewed thousands of images from the COCO (Common Objects in Context) dataset, which features diverse real-world scenes. The training set comprised approximately 8,859 images and nearly 25,000 fMRI trials per subject.

An example of a complex stimulus from the COCO dataset used in the study.

Key Results

The "Brain Captioning" approach significantly outperformed existing baselines across multiple metrics:

  • Textual Accuracy: The model achieved a METEOR score of 0.404, more than doubling the performance of previous baseline models (~0.17).
  • Semantic Similarity: CLIP-based metrics indicated a high correlation (0.70 to 0.83) between generated captions and ground-truth descriptions.
  • Visual Fidelity: The integration of depth maps allowed the model to produce reconstructions with correct orientations and spatial scales. For instance, if a subject viewed a specific object, the model could reproduce it with the correct spatial context rather than just a generic representation.

Discussion and Conclusion

The success of this approach highlights language as a powerful bottleneck that filters out low-level visual noise in favor of high-level meaning. Furthermore, the alignment between GIT-based decoders and fMRI patterns provides further evidence that Large Language Model (LLM) representations share structural similarities with human neural processing.

While the results are promising, limitations such as subject specificity and error propagation remain. Current models require individual training for each subject, and errors in the initial captioning phase can lead to high-quality but incorrect reconstructions. Future research will focus on developing "universal" models and transitioning to more portable neuroimaging technologies like fNIRS. This work marks a significant step toward seamless neural-to-digital visual communication.

Summary updated

BibTeX
@misc{ferrante2023brain,
  author = {Matteo Ferrante and Furkan Ozcelik and Tommaso Boccato and Rufin VanRullen and Nicola Toschi},
  title = {{Brain Captioning: Decoding human brain activity into images and text}},
  year = {2023},
  eprint = {2305.11560},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.11560},
}
Figure