SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1905.13077 · 2019

A Hierarchical Probabilistic U-Net for Modeling Multi-Scale Ambiguities

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 1 failure of our instrument; 1 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/1905.13077.json · badge: /api/ran/1905.13077.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
SimonKohl/probabilistic_unet reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
get_array_of_modes Ran
ran; our contract draft was wrong, not the code
SimonKohl/probabilistic_unet/evaluation/eval_cityscapes.py
code served (permissive licence) · get_code("65cc4cdcce48e4cb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 5, dtype family int, shape (32, 2, 3, 4, 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 numpy as np
import torch

torch.manual_seed(0)

# Create a config object with the required attributes
class Config:
    def __init__(self):
        # Define label_switches: dict with class names and their sampling probabilities
        self.label_switches = {
            'class_a': 0.3,
            'class_b': 0.5,
            'class_c': 0.7,
            'class_d': 0.2,
            'class_e': 0.6
        }
        self.exp_modes = 5
        self.num_modes = 2 ** self.exp_modes  # 32 modes
        
        # Create name2trainId mapping
        # Maps original class names to IDs and their switched versions to different IDs
        self.name2trainId = {
            'class_a': 1,
            'class_a_2': 11,
            'class_b': 2,
            'class_b_2': 12,
            'class_c': 3,
            'class_c_2': 13,
            'class_d': 4,
            'class_d_2': 14,
            'class_e': 5,
            'class_e_2': 15
        }

cf = Config()

# Create a small 4D segmentation array (batch, height, width, depth or similar)
# Using shape (2, 3, 4, 5) to have distinct dimensions
seg = np.array([
    [
        [[1, 2, 3, 4, 5],
         [2, 3, 1, 2, 4],
         [3, 1, 5, 3, 2],
         [4, 5, 2, 1, 3]],
        [[5, 4, 3, 2, 1],
         [1, 2, 3, 4, 5],
         [2, 3, 4, 5, 1],
         [3, 4, 5, 1, 2]],
        [[1, 1, 2, 2, 3],
         [3, 4, 4, 5, 5],
         [1, 2, 3, 4, 5],
         [5, 4, 3, 2, 1]]
    ],
    [
        [[5, 5, 4, 4, 3],
         [3, 2, 2, 1, 1],
         [4, 3, 2, 1, 5],
         [1, 2, 3, 4, 5]],
        [[2, 3, 4, 5, 1],
         [1, 5, 4, 3, 2],
         [3, 2, 1, 5, 4],
         [4, 3, 2, 1, 5]],
        [[1, 2, 3, 4, 5],
         [5, 4, 3, 2, 1],
         [2, 3, 4, 5, 1],
         [1, 5, 2, 4, 3]]
    ]
], dtype=np.uint8)

ARGS = {
    'cf': cf,
    'seg': seg
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 5, dtype family int, shape (32, 2, 3, 4, 5) — shape (32, 2, 3, 4, 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
get_array_of_samples Ran
ran, honoured the contract we drafted
SimonKohl/probabilistic_unet/evaluation/eval_cityscapes.py
code served (permissive licence) · get_code("d600a3dd3ae5b79f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 6, dtype family int, shape (3, 1, 1, 8, 12, 10) 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
import os
import tempfile

# Create a temporary directory for the test
temp_dir = tempfile.mkdtemp()

# Create a simple config object
class Config:
    def __init__(self):
        self.num_samples = 3
        self.patch_size = (8, 12, 10)  # 3D patch size (distinct dimensions)
        self.out_dir = temp_dir

cf = Config()

# Create some sample files
img_key = "test_image"

# Create dummy segmentation samples and save them
for i in range(cf.num_samples):
    sample_path = os.path.join(cf.out_dir, '{}_sample{}_labelIds.npy'.format(img_key, i))
    # Create a sample with shape (1, 1, 8, 12, 10) to match what the function expects
    sample_data = np.random.randint(0, 5, size=(1, 1) + cf.patch_size, dtype=np.uint8)
    np.save(sample_path, sample_data)

ARGS = {
    'cf': cf,
    'img_key': img_key
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 6, dtype family int, shape (3, 1, 1, 8, 12, 10) — shape (3, 1, 1, 8, 12, 10) 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_mode_counts Not yet run
unverified (harvested, no recorded run)
SimonKohl/probabilistic_unet/evaluation/eval_cityscapes.py
code served (permissive licence) · get_code("0621b823c2321b0f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 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
get_array_of_modes 1 other paper
1 dated earlier
1806.05034 (2018-06)
A Probabilistic U-Net for Segmentation of Ambiguous Images
get_array_of_samples 1 other paper
1 dated earlier
1806.05034 (2018-06)
A Probabilistic U-Net for Segmentation of Ambiguous Images
get_mode_counts 1 other paper
1 dated earlier
1806.05034 (2018-06)
A Probabilistic U-Net for Segmentation of Ambiguous Images

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

Medical imaging only indirectly measures the molecular identity of the tissue within each voxel, which often produces only ambiguous image evidence for target measures of interest, like semantic segmentation. This diversity and the variations of plausible interpretations are often specific to given image regions and may thus manifest on various scales, spanning all the way from the pixel to the image level. In order to learn a flexible distribution that can account for multiple scales of variations, we propose the Hierarchical Probabilistic U-Net, a segmentation network with a conditional variational auto-encoder (cVAE) that uses a hierarchical latent space decomposition. We show that this model formulation enables sampling and reconstruction of segmenations with high fidelity, i.e. with finely resolved detail, while providing the flexibility to learn complex structured distributions across scales. We demonstrate these abilities on the task of segmenting ambiguous medical scans as well as on instance segmentation of neurobiological and natural images. Our model automatically separates independent factors across scales, an inductive bias that we deem beneficial in structured output prediction tasks beyond segmentation.

For agents

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

get_harvested_code_for_paper("1905.13077")
get_code_for_paper("1905.13077")
have("1905.13077")

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

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

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

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

Connect an agent — have() is free.