SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.05671 · NeurIPS · 2023

Topology-Aware Uncertainty for Image Segmentation

Chao Chen, Yikai Zhang, Saumya Gupta, Xiaoling Hu, Prateek Prasanna

arXiv · PDF · Open in the Atlas

Code that ran

21 of 27 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 17 have no contract verdict; 4 failures of our instrument; 6 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/2306.05671.json · badge: /api/ran/2306.05671.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
johschmidt42/PyTorch-2D-3D-UNet-Tutorial canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
gigantenbein/UNet-Zoo canonical (classifier label)
classifier basis: census
2 ran · 0 no recorded run
saumya-gupta-26/struct-uncertainty canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
iMED-Lab/CS-Net community
Papers with Code archive
8 ran · 1 no recorded run
HuXiaoling/Structural_Uncertainty community
Papers with Code archive
2 ran · 3 no recorded run
Saumya-Gupta-26/struct-uncertainty marked official in Papers with Code
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
AffinityAttention Ran
ran on a synthesized input · constructed an object; no result was computed
iMED-Lab/CS-Net/model/csnet.py
code served (permissive licence) · get_code("605dbaeb7a17d95a")
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 an instance of its own class, AffinityAttention: the run constructed the object and did not call it, so no result was computed. 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 as nn

torch.manual_seed(0)

# The AffinityAttention class only takes in_channels as a parameter
# Looking at the forward method, it expects x to be a tensor of shape BxCxHxW
# We need to create a valid input tensor for testing

# Create a small input tensor: batch=2, channels=4, height=3, width=5
x = torch.randn(2, 4, 3, 5)

# The only parameter for AffinityAttention.__init__ is in_channels
in_channels = 4

ARGS = {
    "in_channels": in_channels
}
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 AffinityAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AffinityAttention 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
AxisAlignedConvGaussian Ran
ran on a synthesized input
HuXiaoling/Structural_Uncertainty/probabilistic_unet.py
pointer only (licence: NONE) · get_code("c163bba7de076605")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HuXiaoling/Structural_Uncertainty 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.

CSNet Ran
ran on a synthesized input · constructed an object; no result was computed
iMED-Lab/CS-Net/model/csnet.py
code served (permissive licence) · get_code("efdf1f54291e5b38")
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 an instance of its own class, CSNet: the run constructed the object and did not call it, so no result was computed. 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 as nn

torch.manual_seed(0)

ARGS = {
    'classes': 10,
    'channels': 3,
}
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 CSNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CSNet 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
ChannelAttentionBlock Ran
ran on a synthesized input
iMED-Lab/CS-Net/model/csnet.py
code served (permissive licence) · get_code("5b2a9f8699891fa8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch
import numpy as np

INIT_ARGS = {
    "in_channels": 4,
}

# Create input tensor: batch=2, channels=4, height=3, width=5
input_tensor = torch.randn(2, 4, 3, 5)

ARGS = {
    "x": input_tensor,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Decoder Ran
ran on a synthesized input · constructed an object; no result was computed
iMED-Lab/CS-Net/model/csnet.py
code served (permissive licence) · get_code("b5b8a23ced0e8669")
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 an instance of its own class, Decoder: the run constructed the object and did not call it, so no result was computed. 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 as nn

torch.manual_seed(0)

ARGS = {
    'in_channels': 3,
    'out_channels': 4,
}
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 Decoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Decoder 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
Encoder Ran
ran on a synthesized input
HuXiaoling/Structural_Uncertainty/probabilistic_unet.py
pointer only (licence: NONE) · get_code("0326380a477a365f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HuXiaoling/Structural_Uncertainty 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.

ResEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
iMED-Lab/CS-Net/model/csnet.py
code served (permissive licence) · get_code("ea12770312446fcc")
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 an instance of its own class, ResEncoder: the run constructed the object and did not call it, so no result was computed. 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 as nn

torch.manual_seed(0)

class ResEncoder(nn.Module):

    def __init__(self, in_channels, out_channels):
        super(ResEncoder, self).__init__()
        self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=3, padding=1)
        self.bn1 = nn.BatchNorm2d(out_channels)
        self.conv2 = nn.Conv2d(out_channels, out_channels, kernel_size=3, padding=1)
        self.bn2 = nn.BatchNorm2d(out_channels)
        self.relu = nn.ReLU(inplace=False)
        self.conv1x1 = nn.Conv2d(in_channels, out_channels, kernel_size=1)

    def forward(self, x):
        residual = self.conv1x1(x)
        out = self.relu(self.bn1(self.conv1(x)))
        out = self.relu(self.bn2(self.conv2(out)))
        out = out + residual
        out = self.relu(out)
        return out

ARGS = {
    'in_channels': 3,
    'out_channels': 4
}
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 ResEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResEncoder 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
SpatialAttentionBlock Ran
ran on a synthesized input
iMED-Lab/CS-Net/model/csnet.py
code served (permissive licence) · get_code("c96bc45ac6dfcbdf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch
import numpy as np

# INIT_ARGS: parameters for SpatialAttentionBlock.__init__
INIT_ARGS = {
    'in_channels': 16
}

# ARGS: parameters for the forward method
# Input tensor shape: (B, C, H, W)
# B=2 (batch), C=16 (must match in_channels), H=8, W=6 (distinct spatial dims)
ARGS = {
    'x': torch.randn(2, 16, 8, 6)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
autocrop Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
johschmidt42/PyTorch-2D-3D-UNet-Tutorial/unet.py
code served (permissive licence) · get_code("b128f04e610e22c8")
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 5, 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 torch

torch.manual_seed(0)

# Create encoder_layer as a 4D tensor (batch, channels, height, width)
# Larger spatial dimensions than decoder
encoder_layer = torch.randn(2, 3, 8, 10)

# Create decoder_layer as a 4D tensor with smaller spatial dimensions
decoder_layer = torch.randn(2, 3, 4, 6)

ARGS = {
    "encoder_layer": encoder_layer,
    "decoder_layer": decoder_layer,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 5, dtype family float — 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
create_dense_target Ran
ran on a synthesized input
johschmidt42/PyTorch-2D-3D-UNet-Tutorial/transformations.py
code served (permissive licence) · get_code("7f1458886e91abd9")
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 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 numpy as np

# Create a simple numpy array with some class labels
# Using distinct values to make it clear what the function does
tar = np.array([0, 1, 2, 0, 1, 2, 0, 1], dtype=np.int32)

ARGS = {
    "tar": tar
}
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 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
deconv Ran
ran; our contract draft was wrong, not the code
iMED-Lab/CS-Net/model/csnet.py
code served (permissive licence) · get_code("b528298ef3ced2c0")
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 ConvTranspose2d. 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 as nn

torch.manual_seed(0)

ARGS = {
    "in_channels": 3,
    "out_channels": 64,
}
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 ConvTranspose2d — a ConvTranspose2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ConvTranspose2d 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
dice_loss Ran
ran on a synthesized input
johschmidt42/PyTorch-2D-3D-UNet-Tutorial/losses.py
code served (permissive licence) · get_code("291fdb8dff7cf15e")
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 0, dtype family float, 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 torch

torch.manual_seed(0)

# dice_loss expects:
# - probs: torch.Tensor (probability predictions, typically from softmax)
# - target: torch.Tensor (ground truth labels)
# - weight: float (weighting factor for loss)
# - eps: float (small epsilon for numerical stability)
# - smooth: float (smoothing factor for dice coefficient)

# Case 1: target and probs have the same shape (already one-hot encoded)
# Shape: (batch=2, channels=4, height=3, width=5)
probs = torch.rand(2, 4, 3, 5)
target = torch.randint(0, 2, (2, 4, 3, 5)).float()

ARGS = {
    "probs": probs,
    "target": target,
    "weight": 1.0,
    "eps": 0.0001,
    "smooth": 0.0
}
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 0, dtype family float, 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
downsample Ran
ran on a synthesized input
iMED-Lab/CS-Net/model/csnet.py
code served (permissive licence) · get_code("a7606e101556581b")
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 MaxPool2d. 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 as nn

torch.manual_seed(0)

# The function downsample() takes no parameters
# It simply returns a MaxPool2d layer
# So ARGS should be an empty dict

ARGS = {}
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 MaxPool2d — a MaxPool2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MaxPool2d 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
get_conv_layer Ran
ran; our contract draft was wrong, not the code
johschmidt42/PyTorch-2D-3D-UNet-Tutorial/unet.py
code served (permissive licence) · get_code("53bab7232f605d02")
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 Conv2d. 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 as nn
from enum import Enum, IntEnum

torch.manual_seed(0)

class Dimensions(IntEnum):
    TWO: int = 2
    THREE: int = 3

def conv_layer(dim: int):
    conv_layers = {Dimensions.TWO: nn.Conv2d, Dimensions.THREE: nn.Conv3d}
    return conv_layers[dim]

def get_conv_layer(in_channels: int, out_channels: int, kernel_size: int=3, stride: int=1, padding: int=1, bias: bool=True, dim: int=Dimensions.TWO):
    layer = conv_layer(dim=dim)
    return layer(in_channels=in_channels, out_channels=out_channels, kernel_size=kernel_size, stride=stride, padding=padding, bias=bias)

ARGS = {
    "in_channels": 3,
    "out_channels": 16,
    "kernel_size": 3,
    "stride": 1,
    "padding": 1,
    "bias": True,
    "dim": Dimensions.TWO
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
increase_resolution Ran
ran on a synthesized input
gigantenbein/UNet-Zoo/models/phiseg3D.py
code served (permissive licence) · get_code("497d8b92031530bc")
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 Sequential. 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 as nn

torch.manual_seed(0)

ARGS = {
    "times": 2,
    "input_dim": 4,
    "output_dim": 8,
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
load_data_into_loader Ran
ran on a synthesized input
gigantenbein/UNet-Zoo/load_LIDC_data.py
code served (permissive licence) · get_code("4463af1a7a2f90d4")
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 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 torch
import numpy as np
import os
import tempfile
import pickle
from unittest.mock import Mock

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

# Create a temporary directory with mock pickle data
temp_dir = tempfile.mkdtemp()

# Create mock dataset with minimal valid structure
mock_data = {}
for i in range(12):
    # Each entry needs 'image', 'masks' (4 masks), and 'series_uid'
    image = np.random.rand(32, 32).astype(np.float32)
    image = np.clip(image, 0, 1)
    masks = [np.random.rand(32, 32).astype(np.float32) for _ in range(4)]
    masks = [np.clip(m, 0, 1) for m in masks]
    mock_data[f'sample_{i}'] = {
        'image': image,
        'masks': masks,
        'series_uid': f'uid_{i}'
    }

# Save mock data to pickle file
pickle_path = os.path.join(temp_dir, 'mock_data.pickle')
with open(pickle_path, 'wb') as f:
    pickle.dump(mock_data, f)

# Create a mock sys_config object
sys_config = Mock()
sys_config.data_root = temp_dir

# Create a mock transform (identity function)
def mock_transform(x):
    return x

# Define arguments
ARGS = {
    'sys_config': sys_config,
    'name': '',
    'batch_size': 2,
    'transform': mock_transform
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 float — 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
normalize Ran
ran on a synthesized input
johschmidt42/PyTorch-2D-3D-UNet-Tutorial/transformations.py
code served (permissive licence) · get_code("ab7d4eaddf5ca7e9")
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 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 numpy as np

# Create a small numpy array for normalization
inp = np.array([[1.0, 2.0, 3.0, 4.0],
                [5.0, 6.0, 7.0, 8.0]], dtype=np.float32)

# Define mean and standard deviation values
mean = 4.5
std = 2.0

ARGS = {
    "inp": inp,
    "mean": mean,
    "std": std
}
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 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
normalize_01 Ran
ran on a synthesized input
johschmidt42/PyTorch-2D-3D-UNet-Tutorial/transformations.py
code served (permissive licence) · get_code("a207a2db9756ef69")
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 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 numpy as np

# Create a simple numpy array to normalize
# Using a small array with distinct min/max values to test the normalization
input_array = np.array([[1.0, 2.0, 3.0, 4.0],
                        [5.0, 6.0, 7.0, 8.0]])

ARGS = {
    "inp": input_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 ndarray, 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
parse_func Ran
ran; our contract draft was wrong, not the code
saumya-gupta-26/struct-uncertainty/infer.py
pointer only (licence: NONE) · get_code("d30fa705b8e23cb4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, saumya-gupta-26/struct-uncertainty 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.

plot_training Ran
ran on a synthesized input
johschmidt42/PyTorch-2D-3D-UNet-Tutorial/visual.py
code served (permissive licence) · get_code("66aa286caeb3283b")
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 Figure. 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 numpy as np

ARGS = {
    "training_losses": np.array([0.5, 0.45, 0.4, 0.38, 0.35, 0.32, 0.3, 0.28]),
    "validation_losses": np.array([0.55, 0.48, 0.42, 0.39, 0.36, 0.34, 0.31, 0.29]),
    "learning_rate": np.array([0.001, 0.001, 0.0009, 0.0008, 0.0007, 0.0006, 0.0005, 0.0004]),
    "gaussian": True,
    "sigma": 2,
    "figsize": (8, 6)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
predict Ran
ran on a synthesized input
johschmidt42/PyTorch-2D-3D-UNet-Tutorial/inference.py
code served (permissive licence) · get_code("02c8d4823f0bd036")
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 2, dtype family float, shape (2, 3) 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a minimal model that satisfies the function's usage
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)  # input dim 4, output dim 3 (for softmax over 3 classes)
    
    def forward(self, x):
        return self.linear(x)

# Create a sample image (batch_size=2, channels=4)
img = np.random.randn(2, 4).astype(np.float32)

# Create model instance
model = SimpleModel()

# Preprocess function: converts numpy array to float32 and normalizes
def preprocess(img_array):
    return (img_array - img_array.mean()) / (img_array.std() + 1e-6)

# Postprocess function: converts softmax output back to numpy
def postprocess(tensor):
    return tensor.cpu().numpy()

# Device (CPU only)
device = 'cpu'

ARGS = {
    'img': img,
    'model': model,
    'preprocess': preprocess,
    'postprocess': postprocess,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
DMT Not yet run
unverified (harvested, no recorded run)
Saumya-Gupta-26/struct-uncertainty/dmt_2d.py
pointer only (licence: NONE) · get_code("e63919c931ba1e99")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Saumya-Gupta-26/struct-uncertainty 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. No invocation recorded.

ProbabilisticUnet Not yet run
unverified (harvested, no recorded run)
HuXiaoling/Structural_Uncertainty/probabilistic_unet.py
pointer only (licence: NONE) · get_code("260ed13140183edd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HuXiaoling/Structural_Uncertainty 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. No invocation recorded.

UNet Not yet run
unverified (harvested, no recorded run)
HuXiaoling/Structural_Uncertainty/probabilistic_unet.py
pointer only (licence: NONE) · get_code("477da3a4420e7316")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HuXiaoling/Structural_Uncertainty 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. No invocation recorded.

conv_layer Not yet run
unverified (harvested, no recorded run)
johschmidt42/PyTorch-2D-3D-UNet-Tutorial/unet.py
code served (permissive licence) · get_code("c78cf3e9f814160b")
How it ran

no invocation recorded.

init_weights Not yet run
unverified (harvested, no recorded run)
HuXiaoling/Structural_Uncertainty/probabilistic_unet.py
pointer only (licence: NONE) · get_code("f0e750b2fb39dd62")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HuXiaoling/Structural_Uncertainty 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. No invocation recorded.

initialize_weights Not yet run
unverified (harvested, no recorded run)
iMED-Lab/CS-Net/model/csnet.py
code served (permissive licence) · get_code("fe857ca50126df0e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 27 samples lifted from this paper's linked repositories, 27 carry a function identity and 0 do not. Of the 27 distinct functions with an identity, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 1 later) and 22 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
autocrop 2 other papers
2 dated earlier
1505.04597 (2015-05)
U-Net: Convolutional Networks for Biomedical Image Segmentation
2301.00345 (2023-01)
MTNeuro: A Benchmark for Evaluating Representations of Brain Structure Across Multiple Levels of Abstraction
conv_layer 1 other paper
1 dated earlier
1505.04597 (2015-05)
U-Net: Convolutional Networks for Biomedical Image Segmentation
deconv
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2007.05201 (2020-07)
ROSE: A Retinal OCT-Angiography Vessel Segmentation Dataset and New Model
get_conv_layer 1 other paper
1 dated earlier
1505.04597 (2015-05)
U-Net: Convolutional Networks for Biomedical Image Segmentation
init_weights
brick of this paper's assembly: helper
1 other paper
1 later
2403.13417 (2024-03)
Diversified and Personalized Multi-rater Medical Image Segmentation

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

Segmentation of curvilinear structures such as vasculature and road networks is challenging due to relatively weak signals and complex geometry/topology. To facilitate and accelerate large scale annotation, one has to adopt semi-automatic approaches such as proofreading by experts. In this work, we focus on uncertainty estimation for such tasks, so that highly uncertain, and thus error-prone structures can be identified for human annotators to verify. Unlike most existing works, which provide pixel-wise uncertainty maps, we stipulate it is crucial to estimate uncertainty in the units of topological structures, e.g., small pieces of connections and branches. To achieve this, we leverage tools from topological data analysis, specifically discrete Morse theory (DMT), to first capture the structures, and then reason about their uncertainties. To model the uncertainty, we (1) propose a joint prediction model that estimates the uncertainty of a structure while taking the neighboring structures into consideration (inter-structural uncertainty); (2) propose a novel Probabilistic DMT to model the inherent uncertainty within each structure (intra-structural uncertainty) by sampling its representations via a perturband-walk scheme. On various 2D and 3D datasets, our method produces better structure-wise uncertainty maps compared to existing works. Code available at https://github.com/Saumya-Gupta-26/struct-uncertainty

For agents

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

get_harvested_code_for_paper("2306.05671")
get_code_for_paper("2306.05671")
have("2306.05671")

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

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

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

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

Connect an agent — have() is free.