SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.14193 · ICLR · 2021

Uncertainty Sets for Image Classifiers using Conformal Prediction

Michael Jordan, Jitendra Malik, Anastasios Angelopoulos, Stephen Bates

arXiv · PDF · Open in the Atlas

Code that ran

26 of 63 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 13 failures of our instrument; 37 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/2009.14193.json · badge: /api/ran/2009.14193.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/conformal_classification canonical (classifier label)
classifier basis: census
5 ran · 11 no recorded run
lightning-uq-box/lightning-uq-box community
Papers with Code archive
10 ran · 11 no recorded run
matinmoezzi/ups_conformal_classification community
Papers with Code archive
9 ran · 10 no recorded run
aangelopoulos/conformal-classification marked official in Papers with Code
Papers with Code archive
1 ran · 4 no recorded run
cambridge-mlg/acp community
Papers with Code archive
1 ran · 1 no recorded run
FunctionStatusWhere it lives
ACP_D Ran
ran; our contract draft was wrong, not the code
cambridge-mlg/acp/src/acp/methods.py
code served (permissive licence) · get_code("31ac51fceb1bed9c")
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 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
import numpy as np

torch.manual_seed(0)

class SimpleModel(nn.Module):
    """Minimal model that implements required methods for ACP_D"""
    
    def __init__(self, input_dim=4, output_dim=2):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
        self.input_dim = input_dim
        self.output_dim = output_dim
    
    def forward(self, x):
        if isinstance(x, np.ndarray):
            x = torch.from_numpy(x).float()
        if x.dim() == 1:
            x = x.unsqueeze(0)
        return self.linear(x)
    
    def fit(self, x_train, y_train, seed=42):
        """Dummy fit method"""
        pass
    
    def count_params(self):
        """Count total parameters"""
        return sum(p.numel() for p in self.parameters())
    
    def grad_z(self, x, y, flatten=True):
        """Compute gradient of loss w.r.t. parameters for a single point"""
        if isinstance(x, np.ndarray):
            x = torch.from_numpy(x).float().unsqueeze(0)
        if isinstance(y, np.ndarray):
            y = torch.from_numpy(y).long()
        else:
            y = torch.tensor(y).long()
        
        x.requires_grad_(True)
        for p in self.parameters():
            p.requires_grad_(True)
        
        output = self.forward(x)
        loss = nn.CrossEntropyLoss()(output, y.unsqueeze(0) if y.dim() == 0 else y)
        
        grads = torch.autograd.grad(loss, self.parameters(), create_graph=False, retain_graph=False)
        if flatten:
            grad_vec = torch.cat([g.view(-1) for g in grads])
        else:
            grad_vec = grads
        
        return grad_vec.detach()
    
    def compute_loss(self, x, y):
        """Compute loss for a single point"""
        if isinstance(x, np.ndarray):
            x = torch.from_numpy(x).float().unsqueeze(0)
        if isinstance(y, np.ndarray):
            y = torch.from_numpy(y).long()
        else:
            y = torch.tensor(y).long()
        
        output = self.forward(x)
        loss = nn.CrossEntropyLoss()(output, y.unsqueeze(0) if y.dim() == 0 else y)
        return loss
    
    def hessian_all_points(self, x_batch, y_batch):
        """Compute Hessian for a batch of points"""
        n_params = self.count_params()
        H = torch.zeros(n_params, n_params)
        
        if isinstance(x_batch, np.ndarray):
            x_batch = torch.from_numpy(x_batch).float()
        if isinstance(y_batch, np.ndarray):
            y_batch = torch.from_numpy(y_batch).long()
        
        for x, y in zip(x_batch, y_batch):
            x = x.unsqueeze(0)
            y = torch.tensor(y).long()
            
            for p in self.parameters():
                p.requires_grad_(True)
            
            output = self.forward(x)
            loss = nn.CrossEntropyLoss()(output, y.unsqueeze(0) if y.dim() == 0 else y)
            
            grads = torch.autograd.grad(loss, self.parameters(), create_graph=True, retain_graph=True)
            grad_vec = torch.cat([g.view(-1) for g in grads])
            
            for i, g in enumerate(grad_vec):
                g2 = torch.autograd.grad(g, self.parameters(), retain_graph=True, allow_unused=True)
                g2_vec = torch.cat([gg.view(-1) if gg is not None else torch.zeros_like(p.view(-1)) 
                                   for gg, p in zip(g2, self.parameters())])
                H += torch.outer(grad_vec, g2_vec)
        
        return H / len(x_batch) if len(x_batch) > 0 else H
    
    def to(self, device):
        """Override to method to handle device"""
        return super().to(device)

model = SimpleModel(input_dim=4, output_dim=2)

x_train = np.random.randn(2, 4).astype(np.float32)
y_train = np.array([0, 1])

x_test = np.random.randn(2, 4).astype(np.float32)

labels = [0, 1]

ARGS = {
    'model': model,
    'x_train': x_train,
    'y_train': y_train,
    'x_test': x_test,
    'labels': labels,
    'out_file': None,
    'seed': 42,
    'damp': 1e-3,
    'batches': 1
}
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 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
AverageMeterNamed Ran
ran on a synthesized input · constructed an object; no result was computed
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("233fd8c72fe7bee3")
How it ran

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

EmpiricalCoverageBase Ran
ran on a synthesized input
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("2df4a9fc1d319ad7")
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 NoneType. 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
from torch import Tensor

# INIT_ARGS for EmpiricalCoverageBase.__init__
INIT_ARGS = {
    'alpha': 0.1,
    'topk': 2,
}

# ARGS for EmpiricalCoverageBase.update
# The metric follows the typical torchmetrics pattern: update() then compute()
METHOD = 'update'

# Create prediction set as a tensor of shape [batch_size=3, num_classes=5]
# These are logits/scores where higher values indicate more likely classes
pred_set = torch.tensor([
    [0.8, 0.6, 0.3, 0.2, 0.1],
    [0.2, 0.9, 0.7, 0.4, 0.3],
    [0.5, 0.4, 0.8, 0.6, 0.2],
], dtype=torch.float32)

# Targets of shape [batch_size=3]
targets = torch.tensor([0, 1, 2], dtype=torch.long)

ARGS = {
    'pred_set': pred_set,
    'targets': targets,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch, torchmetrics — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
accuracy_RAPS Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("ad9b2ac4522ac726")
How it ran

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

adaptiveness_table Ran
ran on a synthesized input
aangelopoulos/conformal_classification/experiments/table4.py
code served (permissive licence) · get_code("af6e06025c2d3e9e")
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 pandas as pd
import numpy as np

# Create a small dataframe with the required columns: 'lamda', 'size', 'topk'
np.random.seed(0)

data = {
    'lamda': [0.1, 0.1, 0.1, 0.5, 0.5, 0.5, 0.9, 0.9, 0.9,
              0.1, 0.1, 0.5, 0.5, 0.9, 0.9,
              0.1, 0.5, 0.9,
              0.1, 0.5, 0.9,
              0.1, 0.5, 0.9,
              0.1, 0.5, 0.9],
    'size': [0, 1, 1, 0, 1, 2, 0, 2, 3,
             2, 3, 3, 4, 4, 5,
             5, 6, 8,
             7, 9, 10,
             15, 50, 100,
             200, 500, 800],
    'topk': [0, 1, 0, 0, 1, 2, 0, 1, 2,
             2, 2, 3, 3, 4, 4,
             4, 5, 7,
             6, 8, 9,
             14, 48, 95,
             190, 480, 750]
}

df_big = pd.DataFrame(data)

ARGS = {
    'df_big': df_big
}
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 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
coverage_size Ran
ran on a synthesized input
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("f246b8eb9dcd2a55")
How it ran

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

difficulty_table Ran
ran on a synthesized input
aangelopoulos/conformal_classification/experiments/table10.py
code served (permissive licence) · get_code("b8814251e2dc9f83")
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 pandas as pd
import numpy as np

# Create a small DataFrame with the required columns: 'topk' and 'size'
np.random.seed(0)
data = {
    'topk': [1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 8, 10, 11, 50, 100, 150, 500, 1000],
    'size': np.random.uniform(0.5, 20, 18)
}
df_big = pd.DataFrame(data)

ARGS = {
    'df_big': df_big,
}
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 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
find_kreg_param Ran
ran, honoured the contract we drafted
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("d540f5e805ba1e82")
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 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 torch
from torch.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)

# Create small sample data for paramtune_logits
# The function expects batches where each sample is (logits, target)
# logits shape: (batch_size, num_classes)
# target shape: (batch_size,)

batch_size = 2
num_classes = 4

# Create logits tensor: shape (batch_size, num_classes)
logits = torch.randn(batch_size, num_classes)

# Create target tensor: shape (batch_size,) with class indices
targets = torch.tensor([1, 2], dtype=torch.long)

# Create a TensorDataset
dataset = TensorDataset(logits, targets)

# Create a DataLoader
paramtune_logits = DataLoader(dataset, batch_size=2)

# Alpha parameter: 1 - alpha is the desired coverage
# Using alpha=0.1 means we want 90% coverage
alpha = 0.1

ARGS = {
    "paramtune_logits": paramtune_logits,
    "alpha": alpha,
}
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 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
gcq Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("91bbe02deed691ad")
How it ran

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

gen_cond_quantile_function Ran
ran; our contract draft was wrong, not the code
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("9f1c82f5fda99c76")
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 list. 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
from torch import Tensor

torch.manual_seed(0)

batch_size = 2
num_classes = 4

# scores: shape [batch_size x num_classes]
scores = torch.randn(batch_size, num_classes)

# tau: a scalar tensor
tau = torch.tensor(0.9)

# sorted_score_indices: shape [batch_size x num_classes]
# Contains indices sorted by score
sorted_score_indices = torch.argsort(scores, descending=True)

# ordered: shape [batch_size x num_classes]
# The sorted scores in descending order
ordered = torch.sort(scores, descending=True)[0]

# cumsum: shape [batch_size x num_classes]
# Cumulative sum of ordered scores
cumsum = torch.cumsum(ordered, dim=1)

# penalties: shape [1 x num_classes]
penalties = torch.ones(1, num_classes) * 0.1

# randomized: boolean
randomized = False

# allow_zero_sets: boolean
allow_zero_sets = True

ARGS = {
    "scores": scores,
    "tau": tau,
    "sorted_score_indices": sorted_score_indices,
    "ordered": ordered,
    "cumsum": cumsum,
    "penalties": penalties,
    "randomized": randomized,
    "allow_zero_sets": allow_zero_sets,
}
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 list — a list 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
gen_inverse_quantile_function Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("355136b6943fb837")
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 Tensor, ndim 1, dtype family float, shape (2,) 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 numpy as np

torch.manual_seed(0)

# Set up small tensors for testing
batch_size = 2
num_classes = 4

# targets: shape [batch_size] - class indices
targets = torch.tensor([1, 2], dtype=torch.long)

# sorted_score_indices: shape [batch_size x num_classes]
# Contains indices that would sort scores, values should be class indices 0 to num_classes-1
sorted_score_indices = torch.tensor([
    [3, 1, 2, 0],
    [0, 2, 1, 3]
], dtype=torch.long)

# ordered: shape [batch_size x num_classes]
# Appears to be ordered scores or similar values
ordered = torch.tensor([
    [0.9, 0.7, 0.5, 0.3],
    [0.8, 0.6, 0.4, 0.2]
], dtype=torch.float32)

# cumsum: shape [batch_size x num_classes]
# Cumulative sum of some values
cumsum = torch.tensor([
    [0.3, 1.0, 1.5, 1.8],
    [0.2, 0.8, 1.2, 1.4]
], dtype=torch.float32)

# penalties: shape [1 x num_classes]
# Penalty values for each class
penalties = torch.tensor([
    [0.1, 0.15, 0.2, 0.25]
], dtype=torch.float32)

# randomized: boolean flag
randomized = False

# allow_zero_sets: boolean flag
allow_zero_sets = True

ARGS = {
    "targets": targets,
    "sorted_score_indices": sorted_score_indices,
    "ordered": ordered,
    "cumsum": cumsum,
    "penalties": penalties,
    "randomized": randomized,
    "allow_zero_sets": allow_zero_sets
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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_logits_targets Ran
ran on a synthesized input
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("3a9dae3b91f61830")
How it ran

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

get_tau Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("ffb82a3e85bf0356")
How it ran

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

get_violation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("f43a6e1abc3d5ba6")
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 torch
import torch.nn as nn
import numpy as np
import pandas as pd
from torch.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)

# Define a minimal conformal model that satisfies the usage in get_violation
class ConformalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, logit):
        # Returns (something, S) where S is a list of sets/tensors for each batch element
        batch_size = logit.shape[0]
        # S should be a list of size batch_size, each element containing indices of predicted classes
        S = [torch.tensor([0, 1]) for _ in range(batch_size)]
        return None, S

# Create a tiny conformal model
cmodel = ConformalModel()

# Create tiny loader data: (logits, targets)
# logits: [batch_size=2, num_classes=3]
# targets: [batch_size=2] with class indices
batch_size = 2
num_classes = 3
logits = torch.randn(batch_size, num_classes)
targets = torch.tensor([0, 1])
dataset = TensorDataset(logits, targets)
loader_paramtune = DataLoader(dataset, batch_size=2)

# Define strata: list of [min_size, max_size] ranges
strata = [[1, 2], [2, 3]]

# Define alpha (1 - alpha is desired coverage)
alpha = 0.1

ARGS = {
    'cmodel': cmodel,
    'loader_paramtune': loader_paramtune,
    'strata': strata,
    'alpha': alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, torch — 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
identity Ran
ran, honoured the contract we drafted
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("9adf3e5a14a94f24")
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 Tensor, 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 torch
from torch import Tensor

torch.manual_seed(0)

# Create a small tensor for testing
x = torch.randn(2, 4)

# The function accepts x and an optional dim parameter
# dim is unused according to the docstring, but we should still provide a value
dim = None

ARGS = {
    "x": x,
    "dim": dim,
}
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 Tensor, 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
make_table Ran
ran on a synthesized input
aangelopoulos/conformal_classification/experiments/table1.py
code served (permissive licence) · get_code("8ce51944e3958c60")
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 pandas as pd
import numpy as np

# Create a minimal DataFrame with the required columns
data = {
    'alpha': [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1],
    'Model': ['ResNet50', 'ResNet50', 'ResNet50', 'ResNet50', 'VGG16', 'VGG16', 'VGG16', 'VGG16'],
    'Top1': [0.76, 0.76, 0.76, 0.76, 0.71, 0.71, 0.71, 0.71],
    'Top5': [0.93, 0.93, 0.93, 0.93, 0.90, 0.90, 0.90, 0.90],
    'Predictor': ['Fixed', 'Naive', 'APS', 'RAPS', 'Fixed', 'Naive', 'APS', 'RAPS'],
    'Coverage': [0.899, 0.901, 0.900, 0.902, 0.898, 0.900, 0.899, 0.901],
    'Size': [2.1, 2.3, 2.2, 2.15, 2.4, 2.6, 2.5, 2.35]
}

df = pd.DataFrame(data)

ARGS = {
    'df': df,
    'alpha': 0.1
}
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 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
make_table Ran
ran on a synthesized input
aangelopoulos/conformal_classification/experiments/table11.py
code served (permissive licence) · get_code("837d496b65e5409a")
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 numpy as np
import pandas as pd

# Create a sample dataframe with the structure expected by make_table
data = {
    'Model': ['ModelA', 'ModelB', 'ModelC'],
    'alpha': [0.1, 0.1, 0.1, 0.05, 0.05, 0.05],
    'APS violation': [0.045, 0.052, 0.038, 0.023, 0.028, 0.019],
    'RAPS violation': [0.041, 0.048, 0.035, 0.020, 0.025, 0.016],
    'LAC violation': [0.047, 0.054, 0.040, 0.024, 0.030, 0.021]
}

# Create dataframe by repeating models for each alpha value
df_list = []
for model in ['ModelA', 'ModelB', 'ModelC']:
    for i, alpha in enumerate([0.1, 0.05]):
        df_list.append({
            'Model': model,
            'alpha': alpha,
            'APS violation': 0.045 + np.random.rand() * 0.01,
            'RAPS violation': 0.041 + np.random.rand() * 0.01,
            'LAC violation': 0.047 + np.random.rand() * 0.01
        })

df = pd.DataFrame(df_list)

ARGS = {
    'df': df
}
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 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
make_table Ran
ran on a synthesized input
aangelopoulos/conformal_classification/experiments/table2.py
code served (permissive licence) · get_code("3e5323ecb83f4191")
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 pandas as pd
import numpy as np

# Create a minimal DataFrame that satisfies the function's requirements
data = {
    'alpha': [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1],
    'Model': ['ResNet50', 'ResNet50', 'ResNet50', 'ResNet50', 'VGG16', 'VGG16', 'VGG16', 'VGG16'],
    'Top1': [0.76, 0.76, 0.76, 0.76, 0.71, 0.71, 0.71, 0.71],
    'Top5': [0.93, 0.93, 0.93, 0.93, 0.90, 0.90, 0.90, 0.90],
    'Predictor': ['Fixed', 'Naive', 'APS', 'RAPS', 'Fixed', 'Naive', 'APS', 'RAPS'],
    'Coverage': [0.90, 0.91, 0.92, 0.93, 0.89, 0.90, 0.91, 0.92],
    'Size': [3.2, 3.5, 3.8, 4.1, 3.0, 3.3, 3.6, 3.9],
}

df = pd.DataFrame(data)

ARGS = {
    'df': df,
    'alpha': 0.1,
}
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 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
platt_logits Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("27301ab04f721d1b")
How it ran

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

process_classification_prediction Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("162981b9545d9250")
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 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 torch
from torch import nn

torch.manual_seed(0)

# Create logits tensor of shape [batch_size, num_classes, num_samples]
# batch_size=2, num_classes=4, num_samples=3
logits = torch.randn(2, 4, 3)

# Define aggregate function - torch.mean is already available
aggregate_fn = torch.mean

# Small epsilon value
eps = 1e-07

# Task type
task = 'multiclass'

ARGS = {
    'logits': logits,
    'aggregate_fn': aggregate_fn,
    'eps': eps,
    'task': task
}
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 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
run_temperature_optimization Ran
ran; our contract draft was wrong, not the code
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("334697eb3983e90d")
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 Parameter, ndim 2, 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
from torch import nn
import torch.nn.functional as F
from functools import partial
from torch.optim import LBFGS

torch.manual_seed(0)

# Set up logits: [batch_size=2 x num_outputs=4]
logits = torch.randn(2, 4, dtype=torch.float32)

# Set up labels: [batch_size=2]
labels = torch.tensor([0, 1], dtype=torch.long)

# Set up criterion (loss function)
criterion = nn.CrossEntropyLoss()

# Set up temperature parameter: [batch_size=2 x 1]
temperature = nn.Parameter(torch.ones(2, 1, dtype=torch.float32))

# Set up optimizer as a callable that returns an optimizer instance
DEFAULT_LBFGS = partial(LBFGS, lr=0.01, max_iter=50)
optimizer = DEFAULT_LBFGS

# Set up max_iter
max_iter = 50

ARGS = {
    "logits": logits,
    "labels": labels,
    "criterion": criterion,
    "temperature": temperature,
    "optimizer": optimizer,
    "max_iter": max_iter,
}
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 Parameter, ndim 2, dtype family float — no output shape is stated: observe_signature.py recorded Tensor ndim 2, 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
sort_sum Ran
ran, honoured the contract we drafted
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("ce9cdd0a73c5e072")
How it ran

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

sort_sum Ran
ran; our contract draft was wrong, not the code
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("0915e08c6d516b48")
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 3, 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
from torch import Tensor

torch.manual_seed(0)

# Create a small scores tensor: [batch_size=2, num_classes=4]
scores = torch.randn(2, 4)

ARGS = {
    "scores": scores,
}
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 3, 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
temp_scale_logits Ran
ran, honoured the contract we drafted
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("6fd34088368dcdbf")
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 Tensor, 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 torch

torch.manual_seed(0)

# Create logits tensor of shape [batch_size x num_outputs]
# batch_size=2, num_outputs=4
logits = torch.randn(2, 4)

# Create temperature tensor of shape [batch_size x 1]
# batch_size=2, 1 column
temperature = torch.randn(2, 1) + 2.0  # Add 2.0 to ensure positive values

ARGS = {
    "logits": logits,
    "temperature": temperature,
}
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 Tensor, 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
validate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("cf250d297edd395d")
How it ran

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

validate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aangelopoulos/conformal-classification/conformal.py
code served (permissive licence) · get_code("bd14e9d95bb7ddfc")
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 1, 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)

# Create a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 10)
    
    def forward(self, x):
        # output: logits for top-k accuracy computation
        output = self.linear(x)
        
        # S: list of sets containing predicted class indices for each sample
        batch_size = x.shape[0]
        S = []
        for i in range(batch_size):
            # Create a set of predicted classes (simulating conformal prediction sets)
            S.append(torch.tensor([0, 1, 2]))
        
        return output, S

# Create a minimal data loader (list of batches)
val_loader = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([2, 0])),
]

# Create the model
model = MinimalModel()

# Define arguments
ARGS = {
    'val_loader': val_loader,
    'model': model,
    'print_bool': False,
}
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 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
BaseModule Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("466b72a3e0124a34")
How it ran

no invocation recorded.

ConformalModel Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("d70924ef3a0c1d8c")
How it ran

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

ConformalModelLogits Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("b1c2b43f4d3b155b")
How it ran

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

ConformalModelLogits Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal-classification/conformal.py
code served (permissive licence) · get_code("47a75f97f3f91fb8")
How it ran

no invocation recorded.

ConformalModelLogits Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("b55f91e7bf34638e")
How it ran

no invocation recorded.

EmpiricalCoverage Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("99e14fdcc6ff711f")
How it ran

no invocation recorded.

PosthocBase Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("ed0742b3cda42dbb")
How it ran

no invocation recorded.

RAPS Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("e151158cfc4459c8")
How it ran

no invocation recorded.

SetSize Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("8ad44ec25960a4a2")
How it ran

no invocation recorded.

compute_q_hat Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("b21986df9d596afb")
How it ran

no invocation recorded.

conformal_calibration_logits Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("2faec253bfdad8a3")
How it ran

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

experiment Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal_classification/experiments/figure2.py
code served (permissive licence) · get_code("dd37044d7fcf6f2e")
How it ran

no invocation recorded.

experiment Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal_classification/experiments/table11.py
code served (permissive licence) · get_code("8609f9ffa4a463bb")
How it ran

no invocation recorded.

find_lamda_param_adaptiveness Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("0e425cc3cb76f358")
How it ran

no invocation recorded.

find_lamda_param_size Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("5002e7982e88d68b")
How it ran

no invocation recorded.

get_single_tau Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("8834b23ad655655f")
How it ran

no invocation recorded.

get_violation Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("a1271a87af4e4175")
How it ran

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

get_worst_violation Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal_classification/experiments/table11.py
code served (permissive licence) · get_code("51f746f61feab779")
How it ran

no invocation recorded.

get_worst_violation Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal_classification/experiments/table5.py
code served (permissive licence) · get_code("482667afefc89fc3")
How it ran

no invocation recorded.

giq Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("28513efa13e9bf63")
How it ran

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

log_to_file Not yet run
unverified (harvested, no recorded run)
cambridge-mlg/acp/src/acp/methods.py
code served (permissive licence) · get_code("69d3f5abde3456e2")
How it ran

no invocation recorded.

make_table Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal_classification/experiments/table5.py
code served (permissive licence) · get_code("153f3eb42aa57f6e")
How it ran

no invocation recorded.

pick_kreg Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("925e3a758022b8dc")
How it ran

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

pick_lamda_adaptiveness Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("b2728fc9fde250ba")
How it ran

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

pick_lamda_adaptiveness Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal-classification/conformal.py
code served (permissive licence) · get_code("d4fe06777aaee19f")
How it ran

no invocation recorded.

pick_lamda_size Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("cc2739d79cf32721")
How it ran

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

pick_lamda_size Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal-classification/conformal.py
code served (permissive licence) · get_code("417da00712c1c058")
How it ran

no invocation recorded.

pick_parameters Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("1ce010bfb1ac1994")
How it ran

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

pick_parameters Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal-classification/conformal.py
code served (permissive licence) · get_code("4fcc55d02d28d664")
How it ran

no invocation recorded.

platt Not yet run
unverified (harvested, no recorded run)
matinmoezzi/ups_conformal_classification/conformal_classification/conformal.py
pointer only (licence: NONE) · get_code("f43467eedb43283d")
How it ran

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

save_classification_predictions Not yet run
unverified (harvested, no recorded run)
lightning-uq-box/lightning-uq-box/lightning_uq_box/uq_methods/raps.py
code served (permissive licence) · get_code("75313f9955e8f579")
How it ran

no invocation recorded.

sizes_topk Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal_classification/experiments/figure4.py
code served (permissive licence) · get_code("87ad8de994d4aae2")
How it ran

no invocation recorded.

sizes_topk Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal_classification/experiments/table10.py
code served (permissive licence) · get_code("22b3af80b38fd3f2")
How it ran

no invocation recorded.

sizes_topk Not yet run
unverified (harvested, no recorded run)
aangelopoulos/conformal_classification/experiments/table4.py
code served (permissive licence) · get_code("39885834be3c21d8")
How it ran

no invocation recorded.

Showing the first 60. An agent gets every one from get_harvested_code_for_paper("2009.14193").

Also present in other papers' code

Of 63 samples lifted from this paper's linked repositories, 63 carry a function identity and 0 do not. Of the 59 distinct functions with an identity, 15 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 15 later) and 44 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
brick of this paper's assembly: helper
5 other papers
5 later · 1 only as an assembly brick
2110.01052 (2021-10)
Learn then Test: Calibrating Predictive Algorithms to Achieve Risk Control
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
BaseModule
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2211.11435 (2022-11)
ZigZag: Universal Sampling-free Uncertainty Estimation Through Two-Step Inference
2404.11599 (2024-04)
Variational Bayesian Last Layers
coverage_size
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
2310.06430 (2023-10)
Conformal Prediction for Deep Classifier via Label Ranking
validate
brick of this paper's assembly: helper
2 other papers
2 later
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
2206.01067 (2022-06)
Practical Adversarial Multivalid Conformal Prediction
ConformalModelLogits
brick of this paper's assembly: entry, helper
1 other paper
1 later
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
conformal_calibration_logits
brick of this paper's assembly: helper, model
1 other paper
1 later · 1 only as an assembly brick
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
gcq
brick of this paper's assembly: helper, model
1 other paper
1 later · 1 only as an assembly brick
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
get_tau
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
get_violation
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
giq
brick of this paper's assembly: helper, model
1 other paper
1 later · 1 only as an assembly brick
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
pick_kreg
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
pick_lamda_adaptiveness
brick of this paper's assembly: helper
1 other paper
1 later
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
pick_lamda_size
brick of this paper's assembly: helper
1 other paper
1 later
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
pick_parameters
brick of this paper's assembly: helper
1 other paper
1 later
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes
platt_logits
brick of this paper's assembly: helper, update_rule
1 other paper
1 later · 1 only as an assembly brick
2202.11091 (2022-02)
Efficient and Differentiable Conformal Prediction with General Function Classes

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

Convolutional image classifiers can achieve high predictive accuracy, but quantifying their uncertainty remains an unresolved challenge, hindering their deployment in consequential settings. Existing uncertainty quantification techniques, such as Platt scaling, attempt to calibrate the network's probability estimates, but they do not have formal guarantees. We present an algorithm that modifies any classifier to output a predictive set containing the true label with a user-specified probability, such as 90%. The algorithm is simple and fast like Platt scaling, but provides a formal finite-sample coverage guarantee for every model and dataset. Our method modifies an existing conformal prediction algorithm to give more stable predictive sets by regularizing the small scores of unlikely classes after Platt scaling. In experiments on both Imagenet and Imagenet-V2 with ResNet-152 and other classifiers, our scheme outperforms existing approaches, achieving coverage with sets that are often factors of 5 to 10 smaller than a stand-alone Platt scaling baseline. * equal contribution † Project website here.

For agents

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

get_harvested_code_for_paper("2009.14193")
get_code_for_paper("2009.14193")
have("2009.14193")

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

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

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

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

Connect an agent — have() is free.