Scalable Diffusion Transformer for Conditional 4D fMRI Synthesis

Jungwoo Seo, David Keetae Park, Shinjae Yoo, Jiook Cha

TL;DR

This paper introduces the first conditional diffusion transformer capable of generating whole-brain, voxel-level 4D functional MRI (fMRI) sequences conditioned on cognitive tasks. By pairing a 3D VQ-GAN latent compression scheme with a scalable hybrid CNN–Transformer backbone and dual conditioning, the model successfully captures realistic spatiotemporal hemodynamic responses and exhibits predictable foundation-model-style scaling behavior.

What Problem Does This Paper Address?

While generative diffusion models have achieved remarkable success synthesizing static 3D anatomical brain scans (structural MRI), generating dynamic 4D task-based fMRI at the voxel level remains an open challenge.

Task fMRI measures blood-oxygen-level-dependent (BOLD) signals across 3D space and time to observe cognition in action. However, modeling whole-brain 4D dynamics is notoriously difficult because:

  1. Extreme dimensionality: Modeling 3D volumes across consecutive time frames incurs immense computational cost.
  2. Dominant non-task variance: Individual subject differences and scanner acquisition artifacts (like phase-encoding directions) introduce substantial noise that heavily obscures subtle, task-evoked neural responses.

Because of this, prior work avoided voxel-level 4D generation altogether, settling instead for simplified proxies like static contrast maps, regional (ROI) time-series, or functional connectivity matrices.

Methods

The authors build a conditional latent diffusion model (DDPM) tailored to high-dimensional 4D functional neuroimaging:

  • Latent Compression via 3D VQ-GAN: Rather than running diffusion in raw voxel space, each 3D frame is compressed using a pretrained 3D VQ-GAN encoder. Multiple time steps are stacked along the channel dimension, enabling joint spatiotemporal modeling in latent space.
  • Hierarchical CNN–Transformer Backbone: A pure transformer overfits under limited neuroimaging data, while pure 3D CNNs struggle to scale. The authors propose a U-Net-like hybrid: early convolutional residual blocks provide inductive bias for local spatio-temporal features, while deeper transformer blocks with global attention capture long-range dependencies across the brain.
  • Dual Task Conditioning: To overpower subject-to-subject variability and inject subtle task signals, the architecture combines two conditioning pathways:
  • Adaptive normalization: AdaLN-Zero in transformer blocks and FiLM layers in convolutional blocks.
  • Cross-attention: Explicitly injects task condition embeddings directly into latent feature tokens.

Datasets

  • Human Connectome Project (HCP) Task-fMRI: The model is trained and evaluated on 34,632 condition blocks across 1,083 healthy participants spanning seven distinct task paradigms: Working Memory, Emotion, Gambling, Language, Relational, Motor, and Social.
  • Evaluation Framework: Rather than relying on standard computer vision metrics like FID (which miss neurobiological validity), the authors evaluate using three domain-grounded metrics:
  • GLM Activation Map Correlation: Voxelwise Pearson correlation ($r$) between synthetic and real group-level activation contrast maps ($z$-maps).
  • Representational Similarity Analysis (RSA): How well synthetic data preserves inter-task representational geometry across cognitive domains.
  • Condition Specificity (Top-1 Accuracy): Whether generated samples are identifiable as the intended cognitive task.
  • ROI Hemodynamic Time-Courses: Alignment of temporal BOLD signals in known functional regions (Harvard–Oxford atlas).

Key Insights and Ideas

  • Inductive Bias Still Matters at Scale: While pure transformers dominate vision and text, a hybrid CNN–Transformer yielded better fidelity ($r = 0.70$) than an All-Transformer ($r = 0.67$) or All-CNN ($r = 0.63$) backbone at matched parameter counts. The early convolutional layers provide essential spatial priors when medical data is relatively scarce.
  • Adaptive Normalization Alone Fails: Most standard diffusion transformers rely solely on AdaLN for conditioning. The authors found that removing cross-attention dropped activation map correlation sharply (from $0.63$ down to $0.51$), demonstrating that explicit cross-attention is crucial to prevent task signals from being washed out by background anatomical variance.
  • Spatial 3D Compression Suffices for 4D Synthesis: The model synthesizes realistic, continuous temporal BOLD dynamics without requiring a complex 4D video compression autoencoder. Stacking 3D VQ-GAN latents over time inside the diffusion backbone was sufficient.
  • Clear Scaling Laws: Generative performance steadily improves as model capacity scales from 38M to 463M parameters, demonstrating that fMRI generation follows predictable scaling laws.

Key Results

  • Surpassing the U-Net Baseline: Compared against a matched-capacity 3D U-Net baseline from the medical generative package MONAI, the diffusion transformer outperformed it across all scales and metrics.
  • Quantitative Scaling: Scaled up to 463M parameters, the proposed model achieved:
  • 0.83 activation map correlation with ground-truth test data (baseline plateaued around $\sim 0.40$).
  • 0.98 RSA correlation (approaching the theoretical maximum of 1.0, preserving cognitive representational structures).
  • 100% Top-1 condition specificity for models $\ge 340\text{M}$ parameters (baseline peaked at $57\%$).
  • Temporal Dynamics: Synthetic ROI time-series closely matched the amplitude and shape of canonical hemodynamic responses (e.g., stimulus-evoked rise and post-stimulus undershoot) across sensory and cognitive networks, whereas baselines flattened or distorted these profiles.

Limitations and Future Work

  • Short Time Horizons: Generation is currently restricted to block-design segments ($\approx 18$ seconds / 12 TRs) rather than continuous, long-horizon resting-state or naturalistic viewing fMRI.
  • Discrete Task Conditioning: Conditioning is currently limited to discrete categorical task labels rather than rich, multimodal prompts (such as natural language descriptions or visual stimuli).
  • Multi-Site Generalization: The experiments were conducted exclusively on HCP data. Future work must validate robustness across diverse datasets, scanners, and clinical populations to support applications in cross-site data harmonization and in-silico neuroscientific experimentation.

Summary updated

BibTeX
@inproceedings{seo2025scalable,
  author = {Jungwoo Seo and David Keetae Park and Shinjae Yoo and Jiook Cha},
  title = {{Scalable Diffusion Transformer for Conditional 4D fMRI Synthesis}},
  booktitle = {BrainBodyFM @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=DsghCw8ybh},
}
Figure