ICML 2026

Omni-fMRI

A universal atlas-free fMRI foundation model.

Omni-fMRI learns directly from voxel-level BOLD signals, replacing atlas-dependent regional summaries with dynamic patch tokenization and global self-attention over informative brain regions.

Mo Wang, Wenhao Ye, Junfeng Xia, Junxiang Zhang, Xuanye Pan, Minghao Xu, Haotian Deng, Hongkai Wen, Quanying Liu SUSTech, University of Warwick, Shenzhen University

49,497 pretraining sessions
9 pretraining datasets
11 benchmark datasets
16 downstream tasks

Abstract

Voxel-level pretraining without an atlas bottleneck.

Self-supervised fMRI foundation models have improved transfer, but most still compress dense voxel signals into predefined ROI parcellations. Omni-fMRI removes that atlas dependency by operating directly on voxel-level time series while using dynamic patching to keep large-scale pretraining tractable.

Atlas-free inputs

The encoder works on voxel-level fMRI volumes rather than predefined regional summaries, preserving fine-grained spatial information and avoiding atlas-induced bias.

Dynamic patching

Background regions are pruned, simple foreground regions are merged into larger patches, and complex regions keep finer resolution for efficient global modeling.

Reproducible benchmark

The paper standardizes datasets, splits, and tasks for resting-state and task-based fMRI evaluation across diagnosis, demography, retrieval, emotion, and state prediction.

Quick Start

Process a raw fMRI volume and extract Omni-fMRI features.

The checkpoint is hosted on Hugging Face; keep the downloaded file at pretrain_checkpoint/checkpoint.pth. The smoke-test script and notebook below create a tiny synthetic NIfTI first, so a new user can verify the full preprocessing-to-feature path before preparing ADNI, HCP, ABIDE, or other benchmark data.

1. Install

Clone the repository and fetch the HF checkpoint.

git clone https://github.com/OneMore1/Omni-fMRI.git
cd Omni-fMRI
conda create -n omnifmri python=3.11 -y
conda activate omnifmri
pip install -r requirements.txt
pip install -U huggingface_hub

mkdir -p pretrain_checkpoint
huggingface-cli download OneMore1/Omni-fMRI checkpoint.pth \
  --local-dir pretrain_checkpoint
2. Preprocess

Convert raw NIfTI files into 96 x 96 x 96 x 40 NPZ segments.

python data_preparation/preprocessing.py \
  --input_dir examples/raw_nifti \
  --output_dir outputs/demo_npz \
  --pattern .nii.gz \
  --target_shape 96 96 96 \
  --segment_length 40
3. Extract

Run the frozen encoder and save feature tokens.

python extract_feat.py outputs/demo_npz \
  --checkpoint pretrain_checkpoint/checkpoint.pth \
  --output-dir outputs/demo_tokens \
  --device cuda:0 \
  --overwrite

Method

Dynamic patches make voxel-level ViT pretraining practical.

Instead of forcing a dense regular grid into a hierarchical backbone, Omni-fMRI tokenizes the volume according to local spatiotemporal complexity. This reduces the encoder sequence from roughly 14K tokens to about 4.3K tokens while keeping global self-attention over informative brain tissue.

1

Allocate content-adaptive patches

Prune non-brain background and assign patch scale by local signal variability.

2

Project mixed-scale tokens

Use dual-path multi-scale embedding with ZeroMLP for stable coarse-to-fine learning.

3

Reconstruct by scale

Route masked-autoencoding targets to scale-aware prediction heads.

Results

Strong transfer across resting-state and task-based fMRI.

95.54%

HCP sex classification ACC

Omni-fMRI leads the benchmark table while also achieving 95.05 F1 on HCP sex classification.

88.77%

ADNI AD diagnosis ACC

The model reaches the best reported ADNI Alzheimer's disease diagnosis accuracy in the paper's main comparison.

23.08%

Top-10 image retrieval

On 100-way image retrieval, Omni-fMRI improves over NeuroSTORM, SwiFT, and TFF in Top-10, Top-5, and Top-1 accuracy.

45.29%

HCP task accuracy at 10% data

Few-shot evaluation shows the model preserves strong task classification performance under severe data reduction.

Benchmark summary

Linear probing stays competitive.

With a frozen encoder and a lightweight linear head, Omni-fMRI often surpasses fine-tuned baselines and shows a smaller ADNI AD degradation than NeuroSTORM LP.

Efficiency summary

Scalability is part of the method.

The paper reports a 157M-parameter model pretrained for 35 epochs in about 32 hours on 4 NVIDIA A10G GPUs, enabled by dynamic token reduction.

Table 3

Main demography and disease diagnosis results.

Values are copied from Table 3. Accuracy/F1 use higher-is-better metrics; age regression reports MSE lower-is-better and Pearson R higher-is-better. Red cells mark the single best value in each column; stars follow the paper's reported effect-size markers.

Model ABIDE MSE ABIDE R NKI age MSE NKI age R SALD MSE SALD R ABCD ACC ABCD F1 HCP ACC HCP F1
Brain-LM0.907 +/- 0.0070.239 +/- 0.0230.503 +/- 0.0150.678 +/- 0.0140.677 +/- 0.0550.634 +/- 0.06159.24 +/- 1.0358.74 +/- 0.7062.71 +/- 4.4361.74 +/- 4.72
Brain-JEPA0.982 +/- 0.0660.166 +/- 0.0171.030 +/- 0.0800.330 +/- 0.0301.130 +/- 0.1080.299 +/- 0.060--69.97 +/- 2.7369.17 +/- 3.55
BrainMass0.695 +/- 0.0380.500 +/- 0.0440.600 +/- 0.0620.620 +/- 0.0360.704 +/- 0.0800.626 +/- 0.06257.92 +/- 1.1957.86 +/- 1.1867.65 +/- 1.0266.93 +/- 1.78
SwiFT0.524 +/- 0.0100.704 +/- 0.0110.127 +/- 0.0040.946 +/- 0.0020.164 +/- 0.08*0.926 +/- 0.003*66.67 +/- 3.5168.69 +/- 0.4490.75 +/- 4.3890.76 +/- 4.37
NeuroSTORM0.537 +/- 0.0160.648 +/- 0.0130.152 +/- 0.0330.835 +/- 0.0350.194 +/- 0.0190.892 +/- 0.01076.51 +/- 1.8876.24 +/- 1.7094.17 +/- 2.6594.17 +/- 2.15
Omni-fMRI0.427 +/- 0.006*0.734 +/- 0.002*0.088 +/- 0.004*0.959 +/- 0.003*0.182 +/- 0.0190.909 +/- 0.00577.01 +/- 0.5576.91 +/- 0.5495.54 +/- 0.3695.05 +/- 0.41
Model BHRC ACC BHRC F1 PPMI ACC PPMI F1 ADNI MCI ACC ADNI MCI F1 ADNI AD ACC ADNI AD F1 NKI Edu ACC NKI Edu F1
Brain-LM57.09 +/- 1.3354.69 +/- 1.0354.86 +/- 1.2049.03 +/- 2.6464.53 +/- 2.0161.35 +/- 0.6680.96 +/- 0.4672.43 +/- 0.6460.46 +/- 0.7358.93 +/- 0.70
Brain-JEPA58.16 +/- 6.1056.16 +/- 6.0547.91 +/- 3.6148.60 +/- 2.4264.53 +/- 0.6055.17 +/- 0.6680.23 +/- 0.8073.26 +/- 1.0349.21 +/- 2.1548.73 +/- 1.62
BrainMass62.76 +/- 1.5061.05 +/- 1.2258.68 +/- 4.2151.95 +/- 2.2362.39 +/- 0.6061.35 +/- 0.6073.45 +/- 3.9162.10 +/- 0.7062.36 +/- 1.2461.98 +/- 0.88
SwiFT70.21 +/- 0.0269.56 +/- 0.0261.55 +/- 2.5258.23 +/- 4.2065.38 +/- 1.2972.54 +/- 0.1674.90 +/- 1.8880.76 +/- 0.3378.54 +/- 4.8779.08 +/- 3.85
NeuroSTORM73.02 +/- 2.1972.49 +/- 1.9668.25 +/- 1.1865.18 +/- 2.5566.67 +/- 1.0662.17 +/- 8.9384.26 +/- 0.8083.91 +/- 0.7589.35 +/- 4.7289.34 +/- 4.49
Omni-fMRI75.86 +/- 1.35*75.96 +/- 1.31*72.57 +/- 0.98*70.19 +/- 0.84*72.92 +/- 1.64*72.87 +/- 1.7488.77 +/- 0.71*88.60 +/- 0.72*92.05 +/- 2.8591.64 +/- 2.25

Datasets

Pretraining and downstream benchmark coverage.

Table 2 in the paper groups datasets into pretraining-only data, internal downstream data, and external downstream evaluation data.

ID Dataset Participants Sessions Age Sex (M/F) Downstream task
Type I: only for pretraining
1UK Biobank38,30138,37268.37 +/- 7.4817879/20493-
2AOMIC (PIOP1)16867222.15 +/- 1.8394/67-
3AOMIC (PIOP2)18072021.99 +/- 1.8398/81-
4CHCP2441,22418-79 range117/127-
5ISYB13052022.52 +/- 2.6198/32-
Type II: internal downstream tasks
6ABCD1,6806,7209.93 +/- 0.63813/866Sex classification
7ABIDE6092,4366-58 range506/103Age regression
8HCP rest6062,42428.79 +/- 3.53321/281Sex classification
9PPMI3311,32435-84 range181/150Disease classification
Type III: external downstream tasks
10ADNI4971,98855-90 range-Disease classification
11SALD49349319-80 range197/306Age regression
12BHRC4654659.93 +/- 1.79272/193Sex classification
13NKI7177177-86 range311/406Education / age regression
14NSD670,56619-32 range-Image retrieval
15HCP task1181,64723-36 range54/64State prediction
16StudyForrest2071,98026.6 mean12/8Emotion prediction

Resources

Project links for release, reproduction, and deployment.

Performance Map

One model leads across heterogeneous fMRI tasks.

Figure 1 summarizes the headline comparison: Omni-fMRI is reported as the top performer across a broad collection of resting-state and task-based benchmarks, including linear probing variants.

Interpretability

Voxel representations align with disease-related brain maps.

SSIM

0.5639 vs 0.4636

Omni-fMRI shows higher similarity to the Neurosynth Alzheimer reference map than the NeuroSTORM baseline.

RMSE

0.0562 vs 0.1386

Lower error supports the paper's claim that the learned voxel-level representation captures task-relevant patterns.

Paper Figures

Original figure crops from the manuscript PDF.

Citation

BibTeX

@inproceedings{wang2026omnifmri,
  title = {Omni-fMRI: A Universal Atlas-Free fMRI Foundation Model},
  author = {Wang, Mo and Ye, Wenhao and Xia, Junfeng and Zhang, Junxiang and Pan, Xuanye and Xu, Minghao and Deng, Haotian and Wen, Hongkai and Liu, Quanying},
  booktitle = {Proceedings of the International Conference on Machine Learning},
  year = {2026}
}