SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.01052 · 2021

Learn then Test: Calibrating Predictive Algorithms to Achieve Risk Control

arXiv · PDF · Open in the Atlas

Code that ran

17 of 22 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; 3 honoured the contract we drafted, 3 violated it and 11 have no contract verdict; 0 failures of our instrument; 5 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/2110.01052.json · badge: /api/ran/2110.01052.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
aangelopoulos/ltt canonical (classifier label)
classifier basis not recorded on the link
17 ran · 5 no recorded run
FunctionStatusWhere it lives
cacheable Ran
ran on a synthesized input
aangelopoulos/ltt/core/utils.py
code served (permissive licence) · get_code("0587a692aa8a759d")
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.

import os
import pathlib
import pickle as pkl
import tempfile

def cacheable(func):
    def cache_func(*args):
        fname = str(pathlib.Path(__file__).parent.absolute()) + '/.cache/' + str(func).split(' ')[1] + str(args) + '.pkl'
        os.makedirs('./.cache/', exist_ok=True)
        if os.path.exists(fname):
            filehandler = open(fname, 'rb')
            return pkl.load(filehandler)
        else:
            filehandler = open(fname, 'wb')
            result = func(*args)
            pkl.dump(result, filehandler)
            return result
    return cache_func

@cacheable
def sample_function(x, y):
    return x + y

ARGS = {
    'func': sample_function
}
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
eval_detector Ran
ran on a synthesized input
aangelopoulos/ltt/experiments/detection/loss_table.py
code served (permissive licence) · get_code("da5d46b4724c02dd")
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 2, dtype family float; no output shape is stated. 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 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 torch.nn as nn

torch.manual_seed(0)

class MockROIMask:
    """Mock ROI mask object that implements to_bitmasks method."""
    def __init__(self, tensor_data):
        self.tensor_data = tensor_data
    
    def to_bitmasks(self, box, height, width, threshold):
        # Return a mock object with a tensor attribute
        # Just return zeros with appropriate shape for simplicity
        result = type('obj', (object,), {
            'tensor': torch.zeros(self.tensor_data.shape[0], height, width)
        })()
        return result
    
    def __getitem__(self, idx):
        new_mask = MockROIMask(self.tensor_data[idx])
        return new_mask

# Create small tensors
batch_size = 2
num_classes = 4
height = 3
width = 3

# roi_masks: list of MockROIMask objects, one per image
roi_masks = [
    MockROIMask(torch.randn(2, 8)),  # 2 detections per image
    MockROIMask(torch.randn(2, 8)),
]

# boxes: list of box tensors, one per image
boxes = [
    torch.randn(2, 4),  # 2 boxes per image
    torch.randn(2, 4),
]

# softmax_outputs: list of softmax tensors, one per image
softmax_outputs = [
    torch.softmax(torch.randn(2, num_classes), dim=1),  # 2 predictions, 4 classes
    torch.softmax(torch.randn(2, num_classes), dim=1),
]

# gt_classes: list of ground truth class tensors, one per image
gt_classes = [
    torch.tensor([0, 2]),  # 2 ground truth objects
    torch.tensor([1, 3]),
]

# gt_masks: list of ground truth mask tensors, one per image
gt_masks = [
    torch.randint(0, 2, (2, height, width)).float(),  # 2 masks
    torch.randint(0, 2, (2, height, width)).float(),
]

# Scalar thresholds
confidence_threshold = 0.5
segmentation_threshold = 0.5
aps_threshold = 0.9
iou_correct = True

ARGS = {
    'roi_masks': roi_masks,
    'boxes': boxes,
    'softmax_outputs': softmax_outputs,
    'gt_classes': gt_classes,
    'gt_masks': gt_masks,
    'confidence_threshold': confidence_threshold,
    'segmentation_threshold': segmentation_threshold,
    'aps_threshold': aps_threshold,
    'iou_correct': iou_correct,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
eval_image Ran
ran on a synthesized input
aangelopoulos/ltt/experiments/detection/loss_table.py
code served (permissive licence) · get_code("9a6b6722d0017533")
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
import torch.nn as nn

torch.manual_seed(0)

class MockROIMask(nn.Module):
    def __init__(self):
        super().__init__()
    
    def to_bitmasks(self, box, height, width, threshold):
        # Returns object with .tensor attribute
        batch_size = box.shape[0]
        mask_tensor = torch.randint(0, 2, (batch_size, height, width)).float()
        
        class BitmaskResult:
            def __init__(self, tensor):
                self.tensor = tensor
        
        return BitmaskResult(mask_tensor)
    
    def __getitem__(self, idx):
        # Support indexing for filtering
        new_mask = MockROIMask()
        return new_mask

# Set up small tensors with distinct dimensions
batch_size = 2
num_classes = 4
img_height = 3
img_width = 5

# roi_mask: Mock object with to_bitmasks method and indexing support
roi_mask = MockROIMask()

# box: tensor of bounding boxes [batch_size, 4]
box = torch.randn(batch_size, 4)

# softmax_output: [batch_size, num_classes] with valid probabilities
softmax_output = torch.softmax(torch.randn(batch_size, num_classes), dim=1)

# gt_classes: [num_gt_masks] class indices
num_gt_masks = 3
gt_classes = torch.randint(0, num_classes, (num_gt_masks,))

# gt_masks: [num_gt_masks, img_height, img_width] binary masks
gt_masks = torch.randint(0, 2, (num_gt_masks, img_height, img_width)).float()

# confidence_threshold: float
confidence_threshold = 0.3

# segmentation_threshold: float
segmentation_threshold = 0.5

# aps_threshold: float
aps_threshold = 0.9

# iou_correct: appears unused in function body, but include it
iou_correct = True

ARGS = {
    "roi_mask": roi_mask,
    "box": box,
    "softmax_output": softmax_output,
    "gt_classes": gt_classes,
    "gt_masks": gt_masks,
    "confidence_threshold": confidence_threshold,
    "segmentation_threshold": segmentation_threshold,
    "aps_threshold": aps_threshold,
    "iou_correct": iou_correct,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
expand_grid Ran
ran, honoured the contract we drafted
aangelopoulos/ltt/core/uniform_concentration.py
pointer only (licence: MIT); the stored copy get_code serves, from kiarashRezaei/trace-crc, is pointer only (licence: NOASSERTION) · get_code("8b8d750f24ed95e2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from kiarashRezaei/trace-crc, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

formatFloat Ran
ran on a synthesized input
aangelopoulos/ltt/experiments/imagenet/table.py
code served (permissive licence) · get_code("7ee13d7a01cb35a2")
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 numpy as np

torch.manual_seed(0)

def formatFloat(val):
    ret = '%.3f' % val
    if ret.startswith('0.'):
        return ret[1:]
    if ret.startswith('-0.'):
        return '-' + ret[2:]
    return ret

# The function takes a single numeric parameter 'val'
# It formats it to 3 decimal places and handles edge cases for leading zeros
# We need to provide a numeric value that can be formatted

ARGS = {
    'val': 0.5
}
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 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
get_nus_rs_n Ran
ran on a synthesized input
aangelopoulos/ltt/core/pfdr.py
code served (permissive licence) · get_code("77bf34d6bcd8a4dd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# score_vector: needs .numpy() method (or be numpy already) and support indexing/comparison
# correct_vector: needs .numpy() method (or be numpy already) and support indexing
# lambdas: iterable of threshold values

score_vector = torch.tensor([0.1, 0.5, 0.8, 0.3], dtype=torch.float32)
correct_vector = torch.tensor([1, 0, 1, 0], dtype=torch.float32)
lambdas = [0.2, 0.6, 0.9]

ARGS = {
    "score_vector": score_vector,
    "correct_vector": correct_vector,
    "lambdas": lambdas
}
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 — 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
h1 Ran
ran, violated the contract we drafted
aangelopoulos/ltt/core/bounds.py
code served (permissive licence) · get_code("86294eacaecc7ea5")
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 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
import torch

torch.manual_seed(0)

# h1 computes a KL divergence-like metric between y and mu
# Both y and mu should be probability values (between 0 and 1)
# They can be scalars, arrays, or have the same shape

# Create small numpy arrays with probability values
y = np.array([[0.1, 0.9, 0.3, 0.7],
              [0.2, 0.8, 0.4, 0.6]])

mu = np.array([[0.15, 0.85, 0.35, 0.65],
               [0.25, 0.75, 0.45, 0.55]])

ARGS = {
    "y": y,
    "mu": mu
}
Setup block drafted by
a language model, Claude Haiku 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 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
h2 Ran
ran, violated the contract we drafted
aangelopoulos/ltt/core/bounds.py
code served (permissive licence) · get_code("cbecdda63cea8201")
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 ndarray, ndim 1, dtype family float, shape (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

def h2(y):
    return (1 + y) * np.log(1 + y) - y

# The function h2 takes a single parameter y and performs mathematical operations on it.
# y should be a numpy array or scalar that supports element-wise operations.
# The function computes (1 + y) * log(1 + y) - y, which requires y > -1 for log to be defined.

# Create a small numpy array with values that satisfy y > -1
y_values = np.array([0.5, 1.0, 2.0, 0.1])

ARGS = {
    "y": y_values
}
Setup block drafted by
a language model, Claude Haiku 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 1, dtype family float, shape (4,) — shape (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
hoeffding_plus Ran
ran, honoured the contract we drafted
aangelopoulos/ltt/core/bounds.py
code served (permissive licence) · get_code("47b7bbfae0285051")
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 float64, 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 numpy as np

# Analyze the function:
# hoeffding_plus(mu, x, n) takes three parameters:
# - mu: used in np.maximum and h1, appears to be a scalar or array
# - x: used in np.maximum, appears to be a scalar or array
# - n: used as a multiplier, appears to be a scalar

# The function computes: -n * h1(np.maximum(mu, x), mu)
# h1 expects y and mu to be compatible for element-wise operations

# Create valid arguments
mu = 0.5  # scalar probability value between 0 and 1
x = 0.3   # scalar probability value between 0 and 1
n = 100   # scalar count/sample size

ARGS = {
    "mu": mu,
    "x": x,
    "n": n
}
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 float64, 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
pfdr_loss_table Ran
ran on a synthesized input
aangelopoulos/ltt/core/pfdr.py
code served (permissive licence) · get_code("71af0e9d6912d492")
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 (4, 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 numpy as np

# Create small numpy arrays for the function parameters
score_vector = np.array([0.1, 0.5, 0.9, 0.3])  # shape (4,)
correct_vector = np.array([0, 1, 1, 0])  # shape (4,)
lambdas = np.array([0.2, 0.6, 0.8])  # shape (3,)
alpha = 0.5

ARGS = {
    "score_vector": score_vector,
    "correct_vector": correct_vector,
    "lambdas": lambdas,
    "alpha": alpha,
}
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 (4, 3) — shape (4, 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
quantile Ran
ran on a synthesized input
aangelopoulos/ltt/experiments/imagenet/table.py
code served (permissive licence) · get_code("3f8f32096b61daee")
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 float64, ndim 0, 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 pandas as pd
import numpy as np

# Create a simple pandas Series with numeric data
s = pd.Series([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0])

ARGS = {
    "s": s
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
risk_size Ran
ran on a synthesized input
aangelopoulos/ltt/experiments/imagenet/utils.py
code served (permissive licence) · get_code("dbcdd2b46781b966")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - S: indexed by i, each S[i] needs to support 'in' operator and .shape[0]
#   S[i] appears to be a set-like or array-like object
# - targets: tensor with .shape[0] and .item() method, integer values
# - losses: indexed by integer (target value), returns a numeric loss

# Create targets: small tensor with integer values
targets = torch.tensor([0, 2], dtype=torch.long)

# Create S: list of sets (one per sample)
# S[0] contains {0, 1}, S[1] contains {1, 2}
# This way, targets[0]=0 is in S[0], but targets[1]=2 is not in S[1] (will incur loss)
S = [
    np.array([0, 1]),  # S[0] as numpy array with shape (2,)
    np.array([1]),     # S[1] as numpy array with shape (1,)
]

# Create losses: dict mapping target indices to loss values
losses = {
    0: 0.5,
    1: 1.0,
    2: 2.0,
}

ARGS = {
    "S": S,
    "targets": targets,
    "losses": losses,
}
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 — 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
romano_wolf Ran
ran on a synthesized input
aangelopoulos/ltt/core/concentration.py
code served (permissive licence) · get_code("6fc5e8b6054560fc")
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 (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

def subset_scoring_function(S):
    """
    A simple scoring function that returns a scalar threshold.
    This function is called with a set S and should return a numeric value
    that the inputs are compared against.
    """
    # Return a threshold based on the size of the subset
    # This is a simple stand-in implementation
    return np.mean(np.arange(10)) if len(S) > 0 else 5.0

# Create inputs: shape (N,) where N is the number of elements
# We'll use small values to make the logic clear
inputs = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0])

ARGS = {
    "inputs": inputs,
    "subset_scoring_function": subset_scoring_function,
}
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 (4,) — shape (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
romano_wolf_CLT Ran
ran on a synthesized input
aangelopoulos/ltt/core/concentration.py
code served (permissive licence) · get_code("394b954980f78fc7")
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 float, shape (0,) 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 scipy.stats as stats

# Set random seed for reproducibility
np.random.seed(0)

# Create a small loss_table with shape (n_samples, n_methods)
# n_samples = 5, n_methods = 3 (distinct dimensions)
loss_table = np.array([
    [0.1, 0.2, 0.15],
    [0.12, 0.18, 0.14],
    [0.11, 0.19, 0.16],
    [0.13, 0.21, 0.17],
    [0.10, 0.20, 0.15]
])

# lambdas parameter - array of lambda values for regularization
lambdas = np.array([0.01, 0.05, 0.1])

# alpha parameter - significance level
alpha = 0.05

# delta parameter - used in subset scoring function
delta = 0.1

ARGS = {
    "loss_table": loss_table,
    "lambdas": lambdas,
    "alpha": alpha,
    "delta": delta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 float, shape (0,) — shape (0,) 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
safe_min Ran
ran, violated the contract we drafted
aangelopoulos/ltt/core/uniform_concentration.py
pointer only (licence: MIT); the stored copy get_code serves, from kiarashRezaei/trace-crc, is pointer only (licence: NOASSERTION) · get_code("8f4174eb8bea74e1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from kiarashRezaei/trace-crc, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

sort_sum Ran
ran, honoured the contract we drafted
aangelopoulos/ltt/experiments/imagenet/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from matinmoezzi/ups_conformal_classification, is pointer only (licence: NONE) · get_code("ce9cdd0a73c5e072")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from matinmoezzi/ups_conformal_classification, and GitHub detected no licence in that repository 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.

trial_precomputed Ran
ran on a synthesized input
aangelopoulos/ltt/experiments/imagenet/pfdr_histogram.py
code served (permissive licence) · get_code("4d529ca40b514587")
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

torch.manual_seed(0)

def rejection_region_function(calib_scores, calib_corrects, lambdas, alpha, delta):
    """
    Stand-in rejection region function.
    Takes numpy arrays and returns indices of valid lambdas.
    """
    # Simple heuristic: return indices where empirical error is below threshold
    valid_indices = []
    for i, lam in enumerate(lambdas):
        mask = calib_scores > lam
        if mask.sum() > 0:
            error_rate = 1.0 - calib_corrects[mask].mean()
            if error_rate <= alpha + delta:
                valid_indices.append(i)
    
    if valid_indices:
        return np.array(valid_indices, dtype=np.int64)
    else:
        return np.array([], dtype=np.int64)

# Create small test tensors
total_samples = 50
top_scores = torch.randn(total_samples)
corrects = torch.randint(0, 2, (total_samples,))

# Parameters
alpha = 0.1
delta = 0.05
lambdas = np.linspace(-2.0, 2.0, 15)
num_calib = 25
maxiter = 100

ARGS = {
    "rejection_region_function": rejection_region_function,
    "top_scores": top_scores,
    "corrects": corrects,
    "alpha": alpha,
    "delta": delta,
    "lambdas": lambdas,
    "num_calib": num_calib,
    "maxiter": maxiter,
}
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
cacheable Not yet run
unverified (harvested, no recorded run)
aangelopoulos/ltt/core/uniform_concentration.py
code served (permissive licence) · get_code("4011969a3bfc90e8")
How it ran

no invocation recorded.

get_images Not yet run
unverified (harvested, no recorded run)
aangelopoulos/ltt/experiments/imagenet/grid_fig.py
code served (permissive licence) · get_code("91a92d35cc14ae7d")
How it ran

no invocation recorded.

get_lambdas_vs_pfdps_frac_predict Not yet run
unverified (harvested, no recorded run)
aangelopoulos/ltt/experiments/imagenet/lambda_vs_pfdr.py
code served (permissive licence) · get_code("6804c5f0e3efce41")
How it ran

no invocation recorded.

platt_logits Not yet run
unverified (harvested, no recorded run)
aangelopoulos/ltt/experiments/imagenet/grid_fig.py
code served (permissive licence) · get_code("c23944476f3cabe3")
How it ran

no invocation recorded.

validate Not yet run
unverified (harvested, no recorded run)
aangelopoulos/ltt/experiments/imagenet/utils.py
code served (permissive licence) · get_code("bc281c57b11f153e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 6 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 5 later) and 16 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
sort_sum 5 other papers
1 dated earlier, 4 later · 1 only as an assembly brick
2009.14193 (2020-09)
Uncertainty Sets for Image Classifiers using Conformal Prediction
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
2206.01067 (2022-06)
Practical Adversarial Multivalid Conformal Prediction
and 2 more not named here
h1 3 other papers
1 dated earlier, 2 later
2101.02703 (2021-01)
Distribution-Free, Risk-Controlling Prediction Sets
2202.05265 (2022-02)
Image-to-Image Regression with Distribution-Free Uncertainty Quantification and Applications in Imaging
2207.10074 (2022-07)
Semantic uncertainty intervals for disentangled latent spaces
expand_grid 1 other paper
1 later
2608.27124 (2026-08)
TRACE-CRC: Trajectory-Adaptive Conformal Risk Control for Multi-Step Channel State Information Prediction
h2 1 other paper
1 dated earlier
2101.02703 (2021-01)
Distribution-Free, Risk-Controlling Prediction Sets
hoeffding_plus 1 other paper
1 later
2207.10074 (2022-07)
Semantic uncertainty intervals for disentangled latent spaces
safe_min 1 other paper
1 later
2608.27124 (2026-08)
TRACE-CRC: Trajectory-Adaptive Conformal Risk Control for Multi-Step Channel State Information Prediction

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

We introduce a framework for calibrating machine learning models so that their predictions satisfy explicit, finite-sample statistical guarantees. Our calibration algorithms work with any underlying model and (unknown) data-generating distribution and do not require model refitting. The framework addresses, among other examples, false discovery rate control in multi-label classification, intersection-over-union control in instance segmentation, and the simultaneous control of the type-1 error of outlier detection and confidence set coverage in classification or regression. Our main insight is to reframe the risk-control problem as multiple hypothesis testing, enabling techniques and mathematical arguments different from those in the previous literature. We use the framework to provide new calibration methods for several core machine learning tasks, with detailed worked examples in computer vision and tabular medical data.

For agents

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

get_harvested_code_for_paper("2110.01052")
get_code_for_paper("2110.01052")
have("2110.01052")

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

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

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

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

Connect an agent — have() is free.