Skip to content
MedARC-AIPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

nanobrain

A collaborative (or competitive) challenge to find the best recipe for training brain MRI foundation models. Inspired by nanoGPT, modded-nanogpt and our sibling project nanopath.

/goal achieve the best brainmarks-smri open score, using only the provided fomo300k pretraining data and at most 1 hour on 1xH100.

Want to get involved? Join us in the MedARC Discord (find us in #neuro-fm)!

Leaderboard

nanobrain progress plot
# Name open classification age segmentation Contributors
1 s-fast6_s2026 0.589 0.369 0.952 0.787 @RyanKim17920
2 final-f4_s2 0.571 0.344 0.941 0.778 @RyanKim17920, @mihirneal
3 screen_s2_a0 0.556 0.327 0.945 0.755 @RyanKim17920
4 r12_nat_lvl_mf 0.529 0.309 0.863 0.747 @mihirneal
5 hp1hr-lr1.5e-3-s0 0.508 0.299 0.858 0.694 @clane9
6 baseline 0.475 0.260 0.836 0.667 @clane9

The target metric is the brainmarks-smri open score, which is the mean over 11 tasks from 9 public MRI benchmark datasets. Sub-scores are means over each task type. Metrics are normalized so that 0 is ~chance and 1 is perfect: classification (2 AUROC - 1), age (R²) and segmentation (Dice). Scores are the median of 3 training seeds.

Baselines

# Name open classification age segmentation
1 Walnut 0.580 0.343 0.958 0.801
2 Walnut 0.1 0.556 0.332 0.923 0.760
3 nnFoundation ViT 0.492 0.283 0.841 0.678
4 Neuro-JEPA 0.477 0.325 0.886 0.510
5 NeuroVFM 0.468 0.317 0.881 0.495
6 OpenMind SimCLR 0.458 0.305 0.818 0.523
7 BrainDINO 0.439 0.287 0.791 0.508
8 DINOv3 0.429 0.290 0.761 0.485
9 Handcrafted 0.406 0.235 0.799 0.485
10 VoCo 0.402 0.260 0.720 0.473
11 AMAES 0.375 0.219 0.591 0.545
12 BrainIAC 0.329 0.176 0.579 0.471

Baselines are frozen reference models scored with the same brainmarks-smri probes. Walnut trained for ~15 hours on 8×H100, outside the leaderboard budget.

Rules

  • Training gets 1 hour of wall time on 1xH100 (~3.6e18 theoretical FLOPs).
  • Pretrain only on the FOMO300K data in brainmarks-smri.
  • The score is the mean over the fixed 11 brainmarks-smri open tasks.
  • No weights or teachers pretrained on brain MRI.
  • Test-time tricks on the embeddings (combining layers, pooling strategies, test-time augmentation) are technically allowed but lose style points.

Anything else can change: data curation, model, objective, preprocessing, schedule, etc.

Setup

git clone https://github.com/MedARC-AI/nanobrain && cd nanobrain
uv sync

Training and eval both read the data folder in BRAINMARKS_SMRI_DATA. On the MedARC cluster:

echo "BRAINMARKS_SMRI_DATA=/data/brainmarks-smri" >> .env

Elsewhere, download it from the gated Hugging Face repo medarc/brainmarks-smri (~850 GB). Accept its terms first, then:

uv run hf auth login
uv run hf download medarc/brainmarks-smri --repo-type dataset --local-dir data
echo "BRAINMARKS_SMRI_DATA=${PWD}/data" >> .env

Train, evaluate, submit

uv run python scripts/submit.py --login-only
sbatch scripts/train.sbatch smoke notes="smoke test" time_limit=5
sbatch scripts/train.sbatch my-run notes="what changed and why"

train.sbatch trains for 1 hour (time_limit), then evaluates the last checkpoint on the brainmarks-smri open tasks and submits it, except smoke tests.

submit.py posts the score and your code to labless. Sign in once with --login-only before your first job. Remember to push your branch so others can check out your commit.

Code

The baseline is a 3D ViT-B masked autoencoder trained on 87K MRI brain volumes (T1w, T2w, FLAIR, DWI) at 1mm isotropic resolution with an 8mm patch size and an effective masking ratio of ~80%.

train.py training loop
model.py ViT MAE and the brainmarks-smri model contract
data.py FOMO300K dataset and preprocessing
default_pretrain.yaml default config
select_images.py pretraining image selection, writes fomo300k_images.txt
train.sbatch train, then evaluate
submit.py submit to the leaderboard

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages