SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.13328 · 2026

Self-Supervised Multi-Stage Domain Unlearning for White-Matter Lesion Segmentation

Domen Preložnik, Žiga Špiclin

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2603.13328.json · badge: /api/ran/2603.13328.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
Pubec/nnunetv2-unlearning canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_labels_back_to_BraTS Ran
ran, violated the contract we drafted
Pubec/nnunetv2-unlearning/nnunetv2/dataset_conversion/Dataset137_BraTS21.py
code served (permissive licence) · get_code("a2c8b38ba9393780")
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 ndarray, ndim 3, dtype family int, 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 numpy as np

# Create a small segmentation array for testing
# The array has values 0, 1, 2, 3 which will be converted
seg = np.array([
    [[0, 1, 2, 3],
     [1, 0, 3, 2],
     [2, 3, 0, 1]],
    [[3, 2, 1, 0],
     [0, 1, 2, 3],
     [1, 2, 3, 0]]
], dtype=np.uint8)

ARGS = {
    "seg": seg
}
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 ndarray, ndim 3, dtype family int, 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
copy_files Ran
ran, honoured the contract we drafted
Pubec/nnunetv2-unlearning/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
Pubec/nnunetv2-unlearning/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
Pubec/nnunetv2-unlearning/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
Pubec/nnunetv2-unlearning/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
Pubec/nnunetv2-unlearning/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 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 2 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
9 dated earlier, 2 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
8 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 7 more not named here
convert_labels_back_to_BraTS 9 other papers
9 dated earlier
2106.01226 (2021-06)
Semi-Supervised Semantic Segmentation with Cross Pseudo Supervision
2205.04846 (2022-05)
MNet: Rethinking 2D/3D Networks for Anisotropic Medical Image Segmentation
2303.09975 (2023-03)
MedNeXt: Transformer-driven Scaling of ConvNets for Medical Image Segmentation
and 6 more not named here
get_vendor_split 6 other papers
6 dated earlier
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
6 dated earlier
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
4 dated earlier
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
2405.10246 (2024-05)
A Foundation Model for Brain Lesion Segmentation with Mixture of Modality Experts
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-22.

Repositories linked to this paper

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

Abstract

Inter-scanner variability of magnetic resonance imaging has an adverse impact on the diagnostic and prognostic quality of the scans and necessitates the development of models robust to domain shift inflicted by the unseen scanner data. Review of recent advances in domain adaptation showed that efficacy of strategies involving modifications or constraints on the latent space appears to be contingent upon the level and/or depth of supervision during model training. In this paper, we therefore propose an unsupervised domain adaptation technique based on self-supervised multi-stage unlearning (SSMSU). Building upon the state-of-the-art segmentation framework nnU-Net, we employ deep supervision at deep encoder stages using domain classifier unlearning, applied sequentially across the deep stages to suppress domain-related latent features. Following self-configurable approach of the nnU-Net, the auxiliary feedback loop implements a self-supervised backpropagation schedule for the unlearning process, since continuous unlearning was found to have a detrimental effect on the main segmentation task. Experiments were carried out on four public datasets for benchmarking white-matter lesion segmentation methods. Five benchmark models and/or strategies, covering passive to active unsupervised domain adaptation, were tested. In comparison, the SSMSU demonstrated the advantage of unlearning by enhancing lesion sensitivity and limiting false detections, which resulted in higher overall segmentation quality in terms of segmentation overlap and relative lesion volume error. The proposed model inputs only the FLAIR modality, which simplifies preprocessing pipelines, eliminates the need for inter-modality registration errors and harmonization, which can introduce variability. Source code is available on https://github.com/Pubec/nnunetv2-unlearning. CCS Concepts: • Computing methodologies → Image segmentation; • Applied computing → Health care information systems.

For agents

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

get_harvested_code_for_paper("2603.13328")
get_code_for_paper("2603.13328")
have("2603.13328")

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

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

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

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

Connect an agent — have() is free.