SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.04516 · 2022

Uncertainty-Informed Deep Learning Models Enable High-Confidence Predictions for Digital Histopathology

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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 5 have no contract verdict; 4 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/2204.04516.json · badge: /api/ran/2204.04516.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
jamesdolezal/slideflow canonical (classifier label)
classifier basis not recorded on the link
9 ran · 2 no recorded run
FunctionStatusWhere it lives
batch_loss_crossentropy Ran
ran on a synthesized input
jamesdolezal/slideflow/slideflow/model/tensorflow_utils.py
code served (permissive licence) · get_code("383daf686e96763a")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create a small TensorFlow tensor for testing
# The function splits features along axis 0 into 8 parts, so we need batch size divisible by 8
# Using batch size of 8 and feature dimension of 4
batch_size = 8
feature_dim = 4

# Create a random tensor with shape (8, 4)
features = tf.constant(
    np.random.randn(batch_size, feature_dim).astype(np.float32),
    dtype=tf.float32
)

# Define the ARGS dictionary with all parameters
ARGS = {
    "features": features,
    "diff": 0.5,
    "eps": 1e-05
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
calculate_heatmap_extent Ran
ran on a synthesized input
jamesdolezal/slideflow/slideflow/heatmap.py
code served (permissive licence) · get_code("15f7d45767c330f3")
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 numpy as np
from unittest.mock import Mock
from PIL import Image

# Create a mock WSI object with required attributes
wsi = Mock()
wsi.tile_um = 256.0
wsi.mpp = 0.5
wsi.stride_div = 2
wsi.dimensions = (10000, 8000)

# Create a small thumbnail image
thumbnail = Image.new('RGB', (500, 400))

# Create a small grid numpy array (4x3 for distinct dimensions)
grid = np.random.rand(4, 3)

ARGS = {
    'wsi': wsi,
    'thumbnail': thumbnail,
    'grid': grid
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, 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 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
get_layer_index_by_name Ran
ran on a synthesized input
jamesdolezal/slideflow/slideflow/model/tensorflow_utils.py
code served (permissive licence) · get_code("84b9fad938f056de")
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 tensorflow as tf

# Create a simple Keras model with named layers
model = tf.keras.Sequential([
    tf.keras.layers.Dense(8, activation='relu', name='dense_1', input_shape=(4,)),
    tf.keras.layers.Dense(6, activation='relu', name='dense_2'),
    tf.keras.layers.Dense(3, name='output_layer')
])

# Build the model to initialize layers
model.build((None, 4))

ARGS = {
    'model': model,
    'name': 'dense_2'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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_module_by_name Ran
ran; our contract draft was wrong, not the code
jamesdolezal/slideflow/slideflow/model/torch_utils.py
code served (permissive licence) · get_code("09dddb2a3dd86eec")
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 Linear. 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 functools import reduce

torch.manual_seed(0)

# Build a nested module structure
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Sequential(
            nn.Linear(3, 2),
            nn.ReLU()
        )
        self.layer3 = nn.Linear(2, 1)

module = SimpleModule()

ARGS = {
    "module": module,
    "access_string": "layer2.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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
negative_log_likelihood Ran
ran on a synthesized input
jamesdolezal/slideflow/slideflow/model/tensorflow_utils.py
code served (permissive licence) · get_code("db044050ec123a2d")
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 EagerTensor, 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 tensorflow as tf

# Create small tensors for testing
# y_true: shape [batch_size] - survival times
batch_size = 2
y_true = tf.constant([1.5, 3.2], dtype=tf.float32)

# y_pred: shape [batch_size, 2] where:
#   - column 0: predicted hazard ratio (pred_hr)
#   - column 1: event indicator (events)
y_pred = tf.constant(
    [[0.5, 1.0],
     [0.8, 0.0]],
    dtype=tf.float32
)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
print_module_summary Ran
ran on a synthesized input
jamesdolezal/slideflow/slideflow/model/torch_utils.py
code served (permissive licence) · get_code("4b76772761f0cc1a")
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 str. 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)

# Create a simple module with some layers
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.relu = nn.ReLU()
        self.linear2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.relu(x)
        x = self.linear2(x)
        return x

# Create module instance
module = SimpleNet()

# Create input tensors - batch size 2, input dim 4
inputs = [torch.randn(2, 4)]

# Create arguments dict
ARGS = {
    'module': module,
    'inputs': inputs,
    'max_nesting': 3,
    'skip_redundant': True
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
register_vcs_handler Ran
ran; our contract draft was wrong, not the code
jamesdolezal/slideflow/slideflow/_version.py
code served (permissive licence) · get_code("c55cafde08716f01")
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 function. 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.

# Global HANDLERS dict that the function uses
HANDLERS = {}

# Define arguments for register_vcs_handler
ARGS = {
    "vcs": "git",
    "method": "commit"
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
run_command Ran
ran; our contract draft was wrong, not the code
jamesdolezal/slideflow/slideflow/_version.py
code served (permissive licence) · get_code("dbb37355631dabcf")
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 subprocess
import sys

ARGS = {
    "commands": ["echo"],
    "args": ["hello", "world"],
    "cwd": None,
    "verbose": False,
    "hide_stderr": False,
    "env": None,
}
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, 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
versions_from_parentdir Ran
ran; our contract draft was wrong, not the code
jamesdolezal/slideflow/slideflow/_version.py
code served (permissive licence) · get_code("5032e3b81c0fffb3")
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 os
import tempfile

ARGS = {
    'parentdir_prefix': 'myproject-',
    'root': '/tmp/myproject-1.2.3/src',
    'verbose': False
}
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
convert_dataset Not yet run
unverified (harvested, no recorded run)
jamesdolezal/slideflow/slideflow/model/adv_utils.py
code served (permissive licence) · get_code("7d98ff8e54bdaca6")
How it ran

no invocation recorded.

get_uq_predictions Not yet run
unverified (harvested, no recorded run)
jamesdolezal/slideflow/slideflow/model/torch_utils.py
code served (permissive licence) · get_code("61499d2ec0c1fa05")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 3 later) and 7 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
register_vcs_handler 26 other papers
15 dated earlier, 11 later
1806.00550 (2018-06)
A Swiss Army Infinitesimal Jackknife
1806.03146 (2018-06)
Neural Message Passing with Edge Updates for Predicting Properties of Molecules and Materials
1806.03720 (2018-06)
Stochastic seismic waveform inversion using generative adversarial networks as a geological prior
and 23 more not named here
versions_from_parentdir 9 other papers
2 dated earlier, 7 later
1806.03146 (2018-06)
Neural Message Passing with Edge Updates for Predicting Properties of Molecules and Materials
2104.08691 (2021-04)
The Power of Scale for Parameter-Efficient Prompt Tuning
2205.10242 (2022-05)
EXODUS: Stable and Efficient Training of Spiking Neural Networks
and 6 more not named here
run_command 7 other papers
2 dated earlier, 5 later
1806.03146 (2018-06)
Neural Message Passing with Edge Updates for Predicting Properties of Molecules and Materials
2104.08691 (2021-04)
The Power of Scale for Parameter-Efficient Prompt Tuning
2205.10242 (2022-05)
EXODUS: Stable and Efficient Training of Spiking Neural Networks
and 4 more not named here
get_module_by_name 1 other paper
1 dated earlier
2106.10860 (2021-06)
Multiplying Matrices Without Multiplying

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

A model's ability to express its own predictive uncertainty is an essential attribute for maintaining clinical user confidence as computational biomarkers are deployed into real-world medical settings. In the domain of cancer digital histopathology, we describe a novel, clinically-oriented approach to uncertainty quantification (UQ) for whole-slide images, estimating uncertainty using dropout and calculating thresholds on training data to establish cutoffs for low- and high-confidence predictions. We train models to identify lung adenocarcinoma vs. squamous cell carcinoma and show that high-confidence predictions outperform predictions without UQ, in both cross-validation and testing on two large external datasets spanning multiple institutions. Our testing strategy closely approximates real-world application, with predictions generated on unsupervised, unannotated slides using predetermined thresholds. Furthermore, we show that UQ thresholding remains reliable in the setting of domain shift, with accurate high-confidence predictions of adenocarcinoma vs. squamous cell carcinoma for out-of-distribution, non-lung cancer cohorts.

For agents

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

get_harvested_code_for_paper("2204.04516")
get_code_for_paper("2204.04516")
have("2204.04516")

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

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

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

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

Connect an agent — have() is free.