NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Flow Matching with In-Context Priors for Out-of-Distribution Brain Dynamics

Sam Gijsen, Michał Łukomski, Marc-Andre Schulz, Kerstin Ritter

NeurIPS page · OpenReview · Open on the map

Category: Brain Signals & Spiking Networks › Brain Representation Learning with Priors · Type: new method · Keywords: fMRI brain dynamics, zero-shot generation, in-context conditioning, cognitive neuroscience, diffusion modeling

Areas: Model Architectures & Sequence Modeling › Neural and brain architectures › Brain Foundation Models; Generative Models (Diffusion & Flows) › Pixel-Space Diffusion › Diffusion and Flow Models; AI for Science › Brain Dynamics and Medical Imaging › Brain Representation Learning

Summary

We introduce a per-timestep conditioned diffusion transformer that generates realistic fMRI brain dynamics for unseen cognitive tasks by injecting compositional language and optional spatial priors in-context.

Explained to a 5-year-old

Scientists want to imagine how brains act when people think new thoughts. They built a tool that can draw pictures of brain activity just by reading words about the thoughts. If they also have a picture of where the brain should be active, the tool uses that to make the pictures more accurate. This helps them test ideas about the brain without scanning many people. It lets researchers plan experiments on a computer first.

Explained to a 5-year-old, longer

Scientists study how brains change when people do different tasks. They have a computer program that can create pictures of brain activity. The program reads sentences that describe the tasks, like 'someone solves a puzzle' or 'someone listens to music'. It uses those words to guess which parts of the brain will light up. Sometimes they also give the program a picture of where the brain should be active, which helps it make better guesses. This way, they can see what the brain might do for new tasks they have never scanned before. It saves time because they don't need to scan many people right away. The program can also combine different task descriptions to imagine new, mixed tasks. This helps researchers think of experiments before they actually run them. It also lets them ask 'what if' questions about brain behavior, like changing one part of a task and seeing how the brain reacts. All of this is done on a computer, making brain research faster and cheaper. The tool is the first of its kind to generate whole-brain activity for completely new tasks.

For a technical reader

The system generates brain activity patterns for cognitive tasks using language prompts and optional spatial priors. It processes each time step of the fMRI signal with a transformer that incorporates these cues as in-context conditioning. This allows zero-shot generation of realistic whole-cortex dynamics without retraining on new data. Spatial priors improve accuracy in regions where language alone is insufficient, while preserving the ability to compose novel task descriptions. The result is a tool for designing and evaluating neuroscience experiments computationally.

Problem

Generating realistic neural time series for unseen conditions while allowing compositional and zero-shot generalization remains challenging, as existing models rely on categorical conditioning and lack effective conditioning signals for out-of-distribution extrapolation.

Method

The approach employs a time-stepwise generative model that uses language and spatial information as conditioning signals to produce realistic brain activity sequences.

Results

The model recovers region-specific recruitment and activation patterns from language alone, and spatial priors improve generation in challenging task regions while preserving compositionality.

Contributions

We present the first generative model for whole-cortex fMRI dynamics that supports zero-shot, compositional generation for unseen cognitive tasks using in-context language and spatial priors, enabling counterfactual neuroscience and data-driven experimental design.

Practical relevance

It enables in-silico design and evaluation of cognitive experiments, reducing the need for costly brain-scanning campaigns.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction