SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.14039 · 2026

Generalizing Abstention for Noise-Robust Learning in Medical Image Segmentation

Rafet Sifa, Lorenz Sparrenberg, Wesam Moustafa, Helen Schneider

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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 0 have no contract verdict; 5 failures of our instrument; 3 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/2601.14039.json · badge: /api/ran/2601.14039.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
wemous/abstention-for-segmentation canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
build_image_and_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
wemous/abstention-for-segmentation/datasets/dsad.py
code served (permissive licence) · get_code("6bb0a0b81e439d4b")
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. 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 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 pathlib import Path
from PIL import Image
import tempfile
import os

torch.manual_seed(0)

# Create temporary directory structure with mock image and mask files
temp_dir = tempfile.mkdtemp()
video_path = temp_dir

# Create a mock image file
image_path = Path(video_path) / 'image0.png'
img = Image.new('RGB', (100, 100), color='red')
img.save(image_path)

# Create mock mask files
mask_path_1 = Path(video_path) / 'mask0_organ1.png'
mask_path_2 = Path(video_path) / 'mask0_organ2.png'
mask_img_1 = Image.new('L', (100, 100), color=50)
mask_img_2 = Image.new('L', (100, 100), color=100)
mask_img_1.save(mask_path_1)
mask_img_2.save(mask_path_2)

ARGS = {
    'video_path': video_path,
    'index': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — 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
flip_label Ran
ran; our contract draft was wrong, not the code
wemous/abstention-for-segmentation/datasets/noisy_cadis.py
code served (permissive licence) · get_code("d6c094a648d32e7e")
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 1, dtype family int, shape (5,) 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
import random

torch.manual_seed(0)
random.seed(0)

# Create a small mask tensor with class labels
# The mask contains labels from 0 to num_classes-1
num_classes = 5
mask = torch.tensor([0, 1, 2, 3, 4], dtype=torch.long)

ARGS = {
    "mask": mask,
    "num_classes": num_classes,
}
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 1, dtype family int, shape (5,) — shape (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
flip_label Ran
ran; our contract draft was wrong, not the code
wemous/abstention-for-segmentation/datasets/noisy_dsad.py
code served (permissive licence) · get_code("cdb385150202ee3a")
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 1, dtype family int, shape (8,) 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 random
import torch

torch.manual_seed(0)

# The function expects a torch.Tensor with multiple unique values
# It accesses mask.unique(), modifies mask in-place, and works with values 1-7
# Create a tensor with values in range [0, 7] to ensure we have multiple unique values
mask = torch.tensor([0, 1, 2, 3, 4, 5, 6, 7], dtype=torch.long)

ARGS = {
    "mask": mask
}
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 1, dtype family int, shape (8,) — shape (8,) 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
mask_to_setup Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
wemous/abstention-for-segmentation/datasets/cadis.py
code served (permissive licence) · get_code("ffccb5beb849f266")
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 int, 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

torch.manual_seed(0)

# Create a small mask tensor with values in the range that the function operates on
# The function modifies mask values based on the setup parameter
mask = torch.tensor([[7, 8, 10, 20], [27, 32, 9, 22]], dtype=torch.long)

# Define setup as one of the valid options (1, 2, or 3)
setup = 2

ARGS = {
    "mask": mask,
    "setup": setup,
}
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 int, 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
to_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
wemous/abstention-for-segmentation/datasets/cadis.py
code served (permissive licence) · get_code("8e9807374d1c998d")
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 (3, 3, 4) 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
from PIL import Image
import tempfile
import os

torch.manual_seed(0)

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")

# Create a small PIL Image and save it
img = Image.new('RGB', (4, 3), color='red')
img.save(temp_image_path)

ARGS = {
    'path': temp_image_path,
    'dtype': torch.float,
    'scale': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — 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 (3, 3, 4) — shape (3, 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
build_dataset Not yet run
unverified (harvested, no recorded run)
wemous/abstention-for-segmentation/datasets/cadis.py
code served (permissive licence) · get_code("07c94b759b069d9f")
How it ran

no invocation recorded.

build_dataset Not yet run
unverified (harvested, no recorded run)
wemous/abstention-for-segmentation/datasets/dsad.py
code served (permissive licence) · get_code("f64d395578fc446c")
How it ran

no invocation recorded.

to_tensor Not yet run
unverified (harvested, no recorded run)
wemous/abstention-for-segmentation/datasets/dsad.py
code served (permissive licence) · get_code("2998c3cdef2c6b5c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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 8 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-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

Label noise is a critical problem in medical image segmentation, often arising from the inherent difficulty of manual annotation. Models trained on noisy data are prone to overfitting, which degrades their generalization performance. While a number of methods and strategies have been proposed to mitigate noisy labels in the segmentation domain, this area remains largely under-explored. The abstention mechanism has proven effective in classification tasks by enhancing the capabilities of Cross Entropy, yet its potential in segmentation remains unverified. In this paper, we address this gap by introducing a universal and modular abstention framework capable of enhancing the noise-robustness of a diverse range of loss functions. Our framework improves upon prior work with two key components: an informed regularization term to guide abstention behaviour, and a more flexible power-law-based auto-tuning algorithm for the abstention penalty. We demonstrate the framework's versatility by systematically integrating it with three distinct loss functions to create three novel, noise-robust variants: GAC, SAC, and ADS. Experiments on the CaDIS and DSAD medical datasets show our methods consistently and significantly outperform their non-abstaining baselines, especially under high noise levels. This work establishes that enabling models to selectively ignore corrupted samples is a powerful and generalizable strategy for building more reliable segmentation models. Our code is publicly available at https://github.com/wemous/abstention-for-segmentation.

For agents

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

get_harvested_code_for_paper("2601.14039")
get_code_for_paper("2601.14039")
have("2601.14039")

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

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

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

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

Connect an agent — have() is free.