SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.10246 · 2024

A Foundation Model for Brain Lesion Segmentation with Mixture of Modality Experts

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2405.10246.json · badge: /api/ran/2405.10246.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
zhangxinrubit/mome canonical (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
copy_files Ran
ran, honoured the contract we drafted
zhangxinrubit/mome/MoME_foundation/nnunetv2/dataset_conversion/Dataset027_ACDC.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from luumsk/SmallLesionMRI, is pointer only (licence: NONE) · get_code("517ad51ee69e8a2d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from luumsk/SmallLesionMRI, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

copy_files Ran
ran, honoured the contract we drafted
zhangxinrubit/mome/MoME_foundation/nnunetv2/dataset_conversion/Dataset115_EMIDEC.py
code served (permissive licence) · get_code("c66e8feb67225a1b")
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 int, ndim 0, dtype family int, shape () 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 tempfile
from pathlib import Path
import shutil

# Create temporary directories and file structure for testing
temp_base = Path(tempfile.mkdtemp())

# Create source data directory structure
src_data_dir = temp_base / "src_data"
src_data_dir.mkdir(exist_ok=True)

# Create training patients with Images and Contours subdirectories
for i in range(2):
    patient_dir = src_data_dir / f"patient_train_{i:03d}"
    patient_dir.mkdir(exist_ok=True)
    
    images_dir = patient_dir / "Images"
    images_dir.mkdir(exist_ok=True)
    (images_dir / f"patient_train_{i:03d}.nii.gz").touch()
    
    contours_dir = patient_dir / "Contours"
    contours_dir.mkdir(exist_ok=True)
    (contours_dir / f"patient_train_{i:03d}.nii.gz").touch()

# Create source test directory structure
src_test_dir = temp_base / "src_test"
src_test_dir.mkdir(exist_ok=True)

for i in range(2):
    patient_dir = src_test_dir / f"patient_test_{i:03d}"
    patient_dir.mkdir(exist_ok=True)
    
    images_dir = patient_dir / "Images"
    images_dir.mkdir(exist_ok=True)
    (images_dir / f"patient_test_{i:03d}.nii.gz").touch()

# Create destination directories
train_dir = temp_base / "train"
train_dir.mkdir(exist_ok=True)

labels_dir = temp_base / "labels"
labels_dir.mkdir(exist_ok=True)

test_dir = temp_base / "test"
test_dir.mkdir(exist_ok=True)

ARGS = {
    "src_data_dir": src_data_dir,
    "src_test_dir": src_test_dir,
    "train_dir": train_dir,
    "labels_dir": labels_dir,
    "test_dir": test_dir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () 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
get_vendor_split Ran
ran; our contract draft was wrong, not the code
zhangxinrubit/mome/MoME_foundation/nnunetv2/dataset_conversion/Dataset114_MNMs.py
code served (permissive licence) · get_code("2a83a2bc5120febe")
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 random

# Set seed for reproducibility
random.seed(0)

# Create a list of patient identifiers
patients = [f"patient_{i}" for i in range(10)]

# Number of validation patients
num_val_patients = 3

# Construct the arguments dictionary
ARGS = {
    "patients": patients,
    "num_val_patients": num_val_patients,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
merge Ran
ran; our contract draft was wrong, not the code
zhangxinrubit/mome/MoME_foundation/nnunetv2/batch_running/generate_lsf_runs_customDecathlon.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from luumsk/SmallLesionMRI, is pointer only (licence: NONE) · get_code("86ec2ccc2984b8bf")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from luumsk/SmallLesionMRI, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_csv Ran
ran; our contract draft was wrong, not the code
zhangxinrubit/mome/MoME_foundation/nnunetv2/dataset_conversion/Dataset114_MNMs.py
code served (permissive licence) · get_code("882441705cf75b1d")
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 dict. 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 tempfile
import csv
import os

# Create a temporary CSV file with the required headers and data
temp_dir = tempfile.mkdtemp()
csv_file_path = os.path.join(temp_dir, "patient_data.csv")

with open(csv_file_path, 'w', newline='') as f:
    writer = csv.writer(f)
    # Write headers
    writer.writerow(['External code', 'ED', 'ES', 'Vendor'])
    # Write sample data rows
    writer.writerow(['P001', '100', '50', 'VendorA'])
    writer.writerow(['P002', '120', '60', 'VendorB'])
    writer.writerow(['P003', '95', '45', 'VendorA'])

ARGS = {
    'csv_file': csv_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 5 later) and 0 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
merge 11 other papers
6 dated earlier, 5 later
2303.14444 (2023-03)
MultiTalent: A Multi-Dataset Approach to Medical Image Segmentation
2309.03906 (2023-09)
A-Eval: A Benchmark for Cross-Dataset Evaluation of Abdominal Multi-Organ Segmentation
2402.03302 (2024-02)
Swin-UMamba: Mamba-based UNet with ImageNet-based pretraining
and 8 more not named here
copy_files 10 other papers
5 dated earlier, 5 later
2309.03906 (2023-09)
A-Eval: A Benchmark for Cross-Dataset Evaluation of Abdominal Multi-Organ Segmentation
2402.03302 (2024-02)
Swin-UMamba: Mamba-based UNet with ImageNet-based pretraining
2403.05246 (2024-03)
LightM-UNet: Mamba Assists in Lightweight UNet for Medical Image Segmentation
and 7 more not named here
get_vendor_split 6 other papers
4 dated earlier, 2 later
2309.03906 (2023-09)
A-Eval: A Benchmark for Cross-Dataset Evaluation of Abdominal Multi-Organ Segmentation
2402.03302 (2024-02)
Swin-UMamba: Mamba-based UNet with ImageNet-based pretraining
2403.05246 (2024-03)
LightM-UNet: Mamba Assists in Lightweight UNet for Medical Image Segmentation
and 3 more not named here
read_csv 6 other papers
4 dated earlier, 2 later
2309.03906 (2023-09)
A-Eval: A Benchmark for Cross-Dataset Evaluation of Abdominal Multi-Organ Segmentation
2402.03302 (2024-02)
Swin-UMamba: Mamba-based UNet with ImageNet-based pretraining
2403.05246 (2024-03)
LightM-UNet: Mamba Assists in Lightweight UNet for Medical Image Segmentation
and 3 more not named here
copy_files 4 other papers
2 dated earlier, 2 later
2402.03302 (2024-02)
Swin-UMamba: Mamba-based UNet with ImageNet-based pretraining
2403.05246 (2024-03)
LightM-UNet: Mamba Assists in Lightweight UNet for Medical Image Segmentation
2407.06468 (2024-07)
AnatoMask: Enhancing Medical Image Segmentation with Reconstruction-guided Self-masking
and 1 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

Brain lesion segmentation plays an essential role in neurological research and diagnosis. As brain lesions can be caused by various pathological alterations, different types of brain lesions tend to manifest with different characteristics on different imaging modalities. Due to this complexity, brain lesion segmentation methods are often developed in a task-specific manner. A specific segmentation model is developed for a particular lesion type and imaging modality. However, the use of task-specific models requires predetermination of the lesion type and imaging modality, which complicates their deployment in real-world scenarios. In this work, we propose a universal foundation model for 3D brain lesion segmentation, which can automatically segment different types of brain lesions for input data of various imaging modalities. We formulate a novel Mixture of Modality Experts (MoME) framework with multiple expert networks attending to different imaging modalities. A hierarchical gating network combines the expert predictions and fosters expertise collaboration. Furthermore, we introduce a curriculum learning strategy during training to avoid the degeneration of each expert network and preserve their specialization. We evaluated the proposed method on nine brain lesion datasets, encompassing five imaging modalities and eight lesion types. The results show that our model outperforms state-of-the-art universal models and provides promising generalization to unseen datasets.

For agents

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

get_harvested_code_for_paper("2405.10246")
get_code_for_paper("2405.10246")
have("2405.10246")

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

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

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

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

Connect an agent — have() is free.