SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.27277 · 2026

Frozen Brain MRI Foundation Model Representations Generalize Across Clinical Tasks

Yuheng Li, Xiaofeng Yang, Yizhou Wu, Shansong Wang, Mojtaba Safari, Mingzhe Hu, Chih-Wei Chang, Harini Veeraraghavan

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2604.27277.json · badge: /api/ran/2604.27277.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
mclwu22/BrainDINO canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_dice Ran
ran, honoured the contract we drafted
mclwu22/BrainDINO/BrainDINO_seg/nnunetv2/compute_metrics.py
code served (permissive licence) · get_code("624c15867a0a89c2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create two small binary numpy arrays for testing
pred = np.array([
    [1, 0, 1, 0],
    [1, 1, 0, 1]
], dtype=bool)

ref = np.array([
    [1, 0, 0, 1],
    [1, 1, 1, 0]
], dtype=bool)

ARGS = {
    "pred": pred,
    "ref": ref
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_volume_difference Ran
ran, honoured the contract we drafted
mclwu22/BrainDINO/BrainDINO_seg/nnunetv2/compute_metrics.py
code served (permissive licence) · get_code("a05420fe3c94c2c7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create binary arrays representing segmentation masks
# These will be used as pred and ref parameters
pred = np.array([[[1, 0, 1, 0],
                   [0, 1, 0, 1],
                   [1, 0, 1, 0],
                   [0, 1, 0, 1]],
                  [[1, 1, 0, 0],
                   [1, 1, 0, 0],
                   [0, 0, 1, 1],
                   [0, 0, 1, 1]]], dtype=np.uint8)

ref = np.array([[[1, 1, 0, 0],
                 [1, 0, 0, 1],
                 [0, 0, 1, 1],
                 [0, 1, 1, 0]],
                [[1, 0, 1, 0],
                 [0, 1, 0, 1],
                 [1, 0, 1, 0],
                 [0, 1, 0, 1]]], dtype=np.uint8)

# Spacing in mm (sx, sy, sz)
spacing = (1.5, 2.0, 2.5)

ARGS = {
    "pred": pred,
    "ref": ref,
    "spacing": spacing
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_2tuple Ran
ran, honoured the contract we drafted
mclwu22/BrainDINO/BrainDINO_seg/dinov3/layers/patch_embed.py
code served (permissive licence) · get_code("3c04490a215299f2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Test case 1: tuple input with length 2
test_tuple = (5, 7)

# Test case 2: integer input
test_int = 3

# We'll create ARGS with the integer case
ARGS = {
    "x": test_int
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rope_apply Ran
ran; our contract draft was wrong, not the code
mclwu22/BrainDINO/BrainDINO_seg/dinov3/layers/attention.py
code served (permissive licence) · get_code("cf4d1fb373d8feef")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import Tensor

torch.manual_seed(0)

# Create small tensors for testing rope_apply
# x: input tensor to be rotated (batch_size=2, embedding_dim=4)
x = torch.randn(2, 4)

# sin and cos tensors for RoPE (Rotary Position Embedding)
# These should have the same shape as x for broadcasting in rope_apply
sin = torch.randn(2, 4)
cos = torch.randn(2, 4)

ARGS = {
    "x": x,
    "sin": sin,
    "cos": cos,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rope_rotate_half Ran
ran; our contract draft was wrong, not the code
mclwu22/BrainDINO/BrainDINO_seg/dinov3/layers/attention.py
code served (permissive licence) · get_code("51943d1aa28b334b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import Tensor

torch.manual_seed(0)

# rope_rotate_half takes a single parameter: x (a Tensor)
# The function chunks x along the last dimension into 2 parts,
# then returns them concatenated in reversed order with sign flip on first chunk

# Create a small tensor: batch_size=2, sequence_length=3, hidden_dim=4
x = torch.randn(2, 3, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
scale Ran
ran; our contract draft was wrong, not the code
mclwu22/BrainDINO/BrainDINO_seg/dinov3/layers/fp8_linear.py
code served (permissive licence) · get_code("b9f8fac4155e5864")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small test tensors
# t: a regular float tensor that will be scaled
t = torch.randn(2, 4, dtype=torch.float32)

# amax_t: the maximum absolute value tensor used for computing the scale
# This should have a shape compatible for broadcasting/division with t
amax_t = torch.tensor([1.5, 2.0, 1.2, 0.8], dtype=torch.float32)

ARGS = {
    "t": t,
    "amax_t": amax_t,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
matmul Not yet run
unverified (harvested, no recorded run)
mclwu22/BrainDINO/BrainDINO_seg/dinov3/layers/fp8_linear.py
code served (permissive licence) · get_code("7e738766ff4b5737")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
make_2tuple 20 other papers
18 dated earlier, 1 later, 1 undated · 1 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
2312.02366 (2023-12)
Evaluating General Purpose Vision Foundation Models for Medical Image Analysis: An Experimental Study of DINOv2 on Radiology Benchmarks
and 17 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Deep learning for brain MRI in clinical settings is constrained by the cost of expert annotation and the heterogeneity of acquisition across institutions. We present BrainDINO, a self-supervised foundation model pretrained on approximately 6.6 million unlabeled axial slices from 20 datasets spanning diverse patient populations, disease entities, scanner vendors, and acquisition protocols. Using a frozen encoder with lightweight task heads that update as little as 0.6% of model parameters for non-dense tasks (and up to 22.6% for dense segmentation), BrainDINO supports tumor segmentation, neurodegenerative and neurodevelopmental disease classification, brain age estimation, post-stroke temporal prediction, molecular status prediction, MRI sequence classification, and survival risk stratification. Across all tasks, BrainDINO matches or exceeds natural-image and MRI-specific self-supervised baselines, with the largest gains emerging under low-label regimes representative of real-world deployment. The learned representations are anatomically organized, pathology-sensitive, and stable under acquisition-related perturbations, establishing a scalable, parameter-efficient foundation for data-efficient brain MRI analysis. Code is available at https://github.com/mclwu22/BrainDINO

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2604.27277")
get_code_for_paper("2604.27277")
have("2604.27277")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2604.27277.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2604.27277.svg)](https://syntology.ai/paper/2604.27277)

Connect an agent — have() is free.