MindPainter: Efficient Brain-Conditioned Painting of Natural Images via Cross-Modal Self-Supervised Learning

Muzhou Yu, Shuyun Lin, Hongwei Yan, Kaisheng Ma

Abstract

MindPainter is a novel framework designed to bridge the gap between neural activity and visual content creation. By utilizing functional Magnetic Resonance Imaging (fMRI) signals as direct prompts for image editing, MindPainter enables users to "paint" or modify natural images through thought. Moving away from inefficient two-stage "decode-then-edit" workflows, this approach leverages a unified cross-modal self-supervised pipeline. The method introduces a Pseudo Brain Generator to synthesize training data and a Brain Adapter to align neural signals with a shared latent space. Results indicate that MindPainter achieves higher semantic accuracy and visual fluidity in inpainting and outpainting tasks compared to traditional modular baselines.

Introduction: The Challenge of Brain-Conditioned Editing

The ambition of direct brain-to-image synthesis has long been a goal in neuro-AI. However, current brain-conditioned image editing is hampered by inefficiency. Existing methods typically rely on a "naive combination" of two heavy generative processes: first decoding fMRI signals into an explicit image, and then using that image as a prompt for a secondary generative model to edit a target scene.

This serial approach suffers from three major flaws:

  1. Efficiency: Running two generative models back-to-back is computationally expensive and memory-intensive.
  2. Error Propagation: Inaccuracies in the initial brain-to-image decoding lead to semantic deviations in the final edit.
  3. Visual Inconsistency: Decoded prompts often fail to blend naturally into the source image, resulting in visible seams or stylistic clashes.

Methodology: Cross-Modal Self-Supervised Learning

MindPainter addresses these challenges through a Cross-Modal Self-Supervised Learning pipeline that integrates brain signal interpretation and image painting into a single step.

Illustration of the masking process used to train the model for inpainting tasks.

Key components of the architecture include:

  • Pseudo Brain Generator (PBG): To overcome the scarcity of paired fMRI-image data, the PBG (an MLP-based backbone) simulates pseudo-brain signals from image features. This allows the model to learn the relationship between neural activity and visual content using large-scale image datasets.
  • Brain Adapter (BA): This module maps brain signals into a latent space shared with visual modalities (such as CLIP), ensuring that neural signals and their corresponding images are semantically aligned.
  • Multi-Mask Generation Policy: During training, the model is exposed to various masking scenarios—inpainting, outpainting, and random masking—to ensure versatility in real-world applications.

Datasets

The model was developed using the Natural Scenes Dataset (NSD), which contains fMRI responses from participants viewing thousands of MS-COCO images. To ensure generalization, the system was fine-tuned on OpenImages, a dataset of 10,000 images covering a wide variety of natural categories.

Key Results and Evaluation

MindPainter was evaluated against a baseline combining the state-of-the-art MindEye for decoding and Paint-by-Example for editing.

Qualitative results showing MindPainter's ability to perform brain-conditioned inpainting and outpainting across various categories.

Qualitative analysis shows that MindPainter produces results that are significantly more logically sound and stylistically consistent. In outpainting tasks, MindPainter seamlessly extends landscapes and textures where baselines often create disjointed objects. A perceptual user study with 20 participants confirmed these findings, with MindPainter outperforming the baseline in both Consistency (2.31 vs 1.98) and Alignment (2.36 vs 2.11) on a 3-point scale.

Discussion and Future Work

The success of MindPainter lies in its shift from perfect reconstruction to semantic alignment. By treating brain signals as direct conditioning variables, the model avoids the "game of telephone" effect common in multi-stage pipelines.

However, several limitations remain. Like most fMRI-based models, MindPainter currently requires subject-specific training due to unique brain anatomy. Furthermore, fMRI remains a bulky and expensive imaging modality. Future research will explore more portable signals like EEG and investigate the model's ability to handle highly abstract or purely imagined prompts rather than perceived stimuli.

Summary updated

BibTeX
@inproceedings{yu2025mindpainter,
  author = {Muzhou Yu and Shuyun Lin and Hongwei Yan and Kaisheng Ma},
  title = {{MindPainter: Efficient Brain-Conditioned Painting of Natural Images via Cross-Modal Self-Supervised Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i13.33585},
}
Figure