SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.04009 · 2020

Learning joint segmentation of tissues and brain lesions from task-specific hetero-modal domain-shifted datasets

arXiv · PDF · Open in the Atlas

Code that ran

3 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; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2009.04009.json · badge: /api/ran/2009.04009.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
ReubenDo/jSTABL canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
FunctionStatusWhere it lives
find_zeros Ran
ran on a synthesized input
ReubenDo/jSTABL/jstabl/utilities/cropping.py
code served (permissive licence) · get_code("219e0cf24b6fc55c")
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, 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 numpy as np

# Create a 3D image array with some zeros
# Shape: (x_dim=5, y_dim=4, z_dim=3)
# This array has some zero values scattered throughout
img_array = np.array([
    [[1.0, 2.0, 0.0], [1.0, 0.0, 1.0], [0.0, 1.0, 1.0], [1.0, 1.0, 1.0]],
    [[0.0, 1.0, 1.0], [1.0, 1.0, 0.0], [1.0, 0.0, 1.0], [0.0, 1.0, 1.0]],
    [[1.0, 0.0, 1.0], [0.0, 1.0, 1.0], [1.0, 1.0, 0.0], [1.0, 0.0, 1.0]],
    [[1.0, 1.0, 0.0], [1.0, 0.0, 1.0], [0.0, 1.0, 1.0], [1.0, 1.0, 1.0]],
    [[0.0, 1.0, 1.0], [1.0, 1.0, 1.0], [1.0, 0.0, 1.0], [0.0, 1.0, 1.0]],
])

ARGS = {
    "img_array": img_array
}
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 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
merge_skips Ran
ran on a synthesized input
ReubenDo/jSTABL/jstabl/glioma/train_BRATS_adversarial.py
code served (permissive licence) · get_code("53ab07cec84a5b42")
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
import torch.nn.functional as F

torch.manual_seed(0)

# The function expects a list of tensors (skips)
# It interpolates each to match the size of skips[1]'s spatial dimensions (size()[2:])
# Then concatenates along channel dimension (dim 1)
# Then permutes to (0, 4, 1, 2, 3)
# Then reshapes

# Create a list of tensors with different spatial dimensions
# All tensors need compatible batch and channel dimensions
# The function will interpolate all to match skips[1]'s spatial size

batch_size = 2
num_channels_list = [3, 4, 5]  # Different channel counts for each skip connection
z_dim = 6  # This will become dimension after permutation

# Create skips with shape (batch, channels, depth, height, width)
# skips[1] will be the reference size for interpolation
skips = [
    torch.randn(batch_size, num_channels_list[0], 4, 8, 7),  # Different spatial dims
    torch.randn(batch_size, num_channels_list[1], 4, 8, 7),  # Reference tensor
    torch.randn(batch_size, num_channels_list[2], 2, 4, 3),  # Will be interpolated to match skips[1]
]

ARGS = {
    'skips': skips
}
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
onehot Ran
ran on a synthesized input
ReubenDo/jSTABL/jstabl/utilities/jaccard.py
code served (permissive licence) · get_code("dac2b744c6b4459a")
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, 5) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

# gt: ground truth tensor with class indices
# The function calls gt.shape, gt.long(), and uses scatter_ with dimension 1
# scatter_(1, gt, 1) means gt should have shape (batch_size, some_dim)
# The scatter operation scatters 1s into y_onehot at positions specified by gt
gt = torch.tensor([[0, 1, 2, 3], [1, 2, 0, 3]], dtype=torch.int32)  # shape: (2, 4)

# shape: target shape for y_onehot output
# Must be compatible with scatter_(1, gt, 1) where gt has shape (2, 4)
# This means y_onehot should have shape (2, num_classes, ...)
# Since scatter_ is called on dimension 1, shape should be (batch, num_classes, ...)
# num_classes should be >= max value in gt + 1
shape = (2, 5)  # batch_size=2, num_classes=5 (enough for max index 3)

ARGS = {
    "gt": gt,
    "shape": shape,
}
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, 5) — shape (2, 5) 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
jaccard Not yet run
unverified (harvested, no recorded run)
ReubenDo/jSTABL/jstabl/utilities/jaccard.py
code served (permissive licence) · get_code("4c3a76d28a890461")
How it ran

no invocation recorded.

jaccard_tissue Not yet run
unverified (harvested, no recorded run)
ReubenDo/jSTABL/jstabl/utilities/jaccard.py
code served (permissive licence) · get_code("563205dae273c020")
How it ran

no invocation recorded.

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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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.

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

Brain tissue segmentation from multimodal MRI is a key building block of many neuroimaging analysis pipelines. Established tissue segmentation approaches have, however, not been developed to cope with large anatomical changes resulting from pathology, such as white matter lesions or tumours, and often fail in these cases. In the meantime, with the advent of deep neural networks (DNNs), segmentation of brain lesions has matured significantly. However, few existing approaches allow for the joint segmentation of normal tissue and brain lesions. Developing a DNN for such a joint task is currently hampered by the fact that annotated datasets typically address only one specific task and rely on task-specific imaging protocols including a task-specific set of imaging modalities. In this work, we propose a novel approach to build a joint tissue and lesion segmentation model from aggregated task-specific hetero-modal domain-shifted and partially-annotated datasets. Starting from a variational formulation of the joint problem, we show how the expected risk can be decomposed and optimised empirically. We exploit an upper bound of the risk to deal with heterogeneous imaging modalities across datasets. To deal with potential domain shift, we integrated and tested three conventional techniques based on data augmentation, adversarial learning and pseudo-healthy generation. For each individual task, our joint approach reaches comparable performance to task-specific and fully-supervised models. The proposed framework is assessed on two different types of brain lesions: White matter lesions and gliomas. In the latter case, lacking a joint ground-truth for quantitative assessment purposes, we propose and use a novel clinically-relevant qualitative assessment methodology.

For agents

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

get_harvested_code_for_paper("2009.04009")
get_code_for_paper("2009.04009")
have("2009.04009")

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

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

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

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

Connect an agent — have() is free.