SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.24230 · 2026

A Variational Estimator for L p Calibration Errors

Michael Jordan, David Holzmüller, Francis Bach, Sacha Braun, Eugène Berta

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2602.24230.json · badge: /api/ran/2602.24230.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
dholzmueller/probmetrics canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
binary_probs_to_logits Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dholzmueller/probmetrics/probmetrics/utils.py
code served (permissive licence) · get_code("e6b6f9883a773d53")
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 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 numpy as np

# Test case 1: 1D array of probabilities
probs_1d = np.array([0.1, 0.5, 0.9, 0.3], dtype=np.float32)

# Test case 2: 2D array with shape (n, 2) - binary class probabilities
probs_2d = np.array([
    [0.7, 0.3],
    [0.2, 0.8],
    [0.6, 0.4],
    [0.1, 0.9]
], dtype=np.float32)

# Use the 1D case for the primary test
ARGS = {
    "probs": probs_1d
}
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 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
expand_binary_probs Ran
ran, violated the contract we drafted
dholzmueller/probmetrics/probmetrics/utils.py
code served (permissive licence) · get_code("1c974eb881748181")
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 (3, 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 numpy as np

# Test case 1: 1D array (binary probabilities)
probs_1d = np.array([0.3, 0.7, 0.5])

# Test case 2: 2D array with shape (n, 1)
probs_2d_single = np.array([[0.2], [0.8], [0.6]])

# Test case 3: 2D array with shape (n, 2) - already expanded
probs_2d_expanded = np.array([[0.3, 0.7], [0.4, 0.6], [0.2, 0.8]])

# Use the 1D case as the primary test
ARGS = {
    "probs": probs_1d
}
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 (3, 2) — shape (3, 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
flatten_binary_probs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dholzmueller/probmetrics/probmetrics/utils.py
code served (permissive licence) · get_code("4f061e7766969d71")
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 (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

# Test case 1: 1D array (already positive class probabilities)
probs_1d = np.array([0.1, 0.5, 0.9, 0.3], dtype=np.float32)

# Test case 2: 2D array with shape (n, 2) (negative and positive class probabilities)
probs_2d = np.array([
    [0.9, 0.1],
    [0.4, 0.6],
    [0.2, 0.8],
    [0.7, 0.3]
], dtype=np.float32)

ARGS = {
    "probs": probs_1d
}
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 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
logloss_np Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dholzmueller/probmetrics/probmetrics/calibrators/logistic.py
code served (permissive licence) · get_code("b520f244f7de193e")
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 float32, 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

# Construct valid arguments for logloss_np
# The function expects:
# - y_true: np.ndarray of shape (batch_size,) containing class indices
# - y_proba: np.ndarray of shape (batch_size, num_classes) containing probabilities

batch_size = 2
num_classes = 4

# y_true: class indices for each sample in the batch
y_true = np.array([0, 2], dtype=np.int64)

# y_proba: probability distributions over classes
# Each row sums to 1, values are positive (valid probabilities)
y_proba = np.array([
    [0.7, 0.1, 0.1, 0.1],
    [0.1, 0.2, 0.6, 0.1]
], dtype=np.float32)

ARGS = {
    "y_true": y_true,
    "y_proba": y_proba,
}
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 float32, 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
remove_missing_classes Ran
ran; our contract draft was wrong, not the code
dholzmueller/probmetrics/probmetrics/torch_utils.py
code served (permissive licence) · get_code("8a0e2aefa9ff37f6")
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

torch.manual_seed(0)

# Create sample tensors
# y_pred: shape (n_samples, n_classes) - predictions/logits
# We'll use shape (2, 4) - 2 samples, 4 classes
y_pred = torch.randn(2, 4)

# y: shape (n_samples,) - class labels
# We'll only use classes 0 and 2 to test the missing class removal
y = torch.tensor([0, 2])

ARGS = {
    "y_pred": y_pred,
    "y": y,
}
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
to_one_hot Ran
ran; our contract draft was wrong, not the code
dholzmueller/probmetrics/probmetrics/distributions.py
code served (permissive licence) · get_code("3836d7ad343a7f8b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (5, 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 a tensor of class labels
y = torch.tensor([0, 1, 2, 1, 0], dtype=torch.long)

# Number of classes
n_classes = 4

# Label smoothing epsilon
label_smoothing_eps = 0.1

ARGS = {
    "y": y,
    "n_classes": n_classes,
    "label_smoothing_eps": label_smoothing_eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (5, 4) — shape (5, 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 5 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
to_one_hot 1 other paper
1 later
2605.30188 (2026-05)
CalArena: A Large-Scale Post-Hoc Calibration Benchmark

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

Calibration-the problem of ensuring that predicted probabilities align with observed class frequencies-is a basic desideratum for reliable prediction with machine learning systems. Calibration error is traditionally assessed via a divergence function, using the expected divergence between predictions and empirical frequencies. Accurately estimating this quantity is challenging, especially in the multiclass setting. Here, we show how to extend a recent variational framework for estimating calibration errors beyond divergences induced induced by proper losses, to cover a broad class of calibration errors induced by L p divergences. Our method can separate over-and under-confidence and, unlike non-variational approaches, avoids overestimation. We provide extensive experiments and integrate our code in the open-source package probmetrics 1 for evaluating calibration errors.

For agents

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

get_harvested_code_for_paper("2602.24230")
get_code_for_paper("2602.24230")
have("2602.24230")

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

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

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

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

Connect an agent — have() is free.