SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.06487 · 2024

When is Multicalibration Post-Processing Necessary?

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 0 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/2406.06487.json · badge: /api/ran/2406.06487.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
dutchhansen/empirical-multicalibration canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
sid-devic/multicalibration canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
binnedECE Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dutchhansen/empirical-multicalibration/metrics.py
code served (permissive licence) · get_code("fe02f400422db56f")
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 numpy as np

# Construct test data for binnedECE
# The function expects:
# f: predicted probabilities/confidences (array-like, float values between 0 and 1)
# y: binary ground truth labels (array-like, 0 or 1)

np.random.seed(0)

# Create predicted confidences (floats between 0 and 1)
f = np.array([0.1, 0.3, 0.7, 0.9, 0.2, 0.8, 0.4, 0.6], dtype=np.float64)

# Create ground truth labels (0 or 1)
y = np.array([0, 0, 1, 1, 0, 1, 0, 1], dtype=np.float64)

ARGS = {
    'f': f,
    'y': y
}
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 — 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
calculate_average_labels Ran
ran; our contract draft was wrong, not the code
sid-devic/multicalibration/src/multicalibration/HJZ/utils.py
code served (permissive licence) · get_code("bad319c22646c7df")
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 numpy as np

# Create sample data for the function
np.random.seed(0)

# Number of datapoints
n_datapoints = 10

# Number of bins and classes
n_bins = 2
n_classes = 3

# Create labels: shape (n_datapoints, n_classes)
labels = np.random.rand(n_datapoints, n_classes)

# Create bins: shape (n_datapoints,) with values in range [0, n_bins^n_classes)
# Since n_bins=2 and n_classes=3, we have 2^3=8 possible bins
bins = np.random.randint(0, n_bins ** n_classes, size=n_datapoints)

# Create groups: list of index arrays, each representing a group of datapoints
groups = [
    np.array([0, 1, 2, 3]),  # group 0: indices 0-3
    np.array([4, 5, 6, 7]),  # group 1: indices 4-7
    np.array([8, 9])          # group 2: indices 8-9
]

ARGS = {
    "labels": labels,
    "bins": bins,
    "groups": groups,
    "n_bins": n_bins
}
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 — 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
calculate_calibration_errors Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sid-devic/multicalibration/src/multicalibration/HJZ/utils.py
code served (permissive licence) · get_code("a087c5f66c6bc62c")
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 4, dtype family float, shape (3, 2, 4, 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

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

# Define dimensions
n_bins = 3
n_groups = 2
n_classes = 4

# Create average_labels: shape (n_bins, n_groups, n_classes)
average_labels = np.random.rand(n_bins, n_groups, n_classes)

# Create predictions: shape (n_datapoints, n_classes)
# We need enough datapoints to cover all bins and groups
n_datapoints = 20
predictions = np.random.rand(n_datapoints, n_classes)

# Create bins: shape (n_datapoints,)
# Assign datapoints to bins (0, 1, or 2)
bins = np.random.randint(0, n_bins, size=n_datapoints)

# Create groups: list of index arrays for each group
# Group 0: indices 0-9, Group 1: indices 10-19
groups = [np.arange(0, 10), np.arange(10, 20)]

ARGS = {
    "average_labels": average_labels,
    "predictions": predictions,
    "bins": bins,
    "groups": groups,
}
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 4, dtype family float, shape (3, 2, 4, 2) — shape (3, 2, 4, 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
discretize_values Ran
ran; our contract draft was wrong, not the code
sid-devic/multicalibration/src/multicalibration/HJZ/utils.py
code served (permissive licence) · get_code("6591108004bbb9e8")
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 (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

# Create a small sample of values to discretize
# Shape should be (n_datapoints, n_classes)
# Using distinct dimensions: 2 datapoints, 3 classes
values = np.array([
    [0.1, 0.5, 0.9],
    [0.3, 0.7, 0.2]
], dtype=np.float32)

n_bins = 5
verbose = False

ARGS = {
    "values": values,
    "n_bins": n_bins,
    "verbose": verbose,
}
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 (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
groups_info_df Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dutchhansen/empirical-multicalibration/Dataset.py
code served (permissive licence) · get_code("e9fb66dca3077435")
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 DataFrame. 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

np.random.seed(0)

# Create sample data
X = np.random.randn(10, 5)  # 10 samples, 5 features
y = np.random.rand(10)  # 10 target values between 0 and 1

# Create groups - list of arrays containing indices
groups = [
    np.array([0, 1, 2]),      # Group 1: indices 0, 1, 2
    np.array([3, 4, 5, 6]),   # Group 2: indices 3, 4, 5, 6
    np.array([7, 8, 9])       # Group 3: indices 7, 8, 9
]

# Create group names
group_names = ['GroupA', 'GroupB', 'GroupC']

ARGS = {
    'X': X,
    'y': y,
    'groups': groups,
    'group_names': group_names
}
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 DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
reindex_group Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dutchhansen/empirical-multicalibration/Dataset.py
code served (permissive licence) · get_code("296c63119a01eca3")
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, ndim 1, dtype family int; 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

# Create valid arguments for reindex_group function
idxs = np.array([1, 2, 3, 4], dtype=np.int64)  # sorted indices
group_idxs = np.array([2, 4], dtype=np.int64)  # group indices to reindex

ARGS = {
    "idxs": idxs,
    "group_idxs": group_idxs,
}
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 list, ndim 1, dtype family int — a list 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
split_data Ran
ran; our contract draft was wrong, not the code
dutchhansen/empirical-multicalibration/Dataset.py
code served (permissive licence) · get_code("c6f527df4b311146")
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 numpy as np

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

# Create setup for split_data function
idxs = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])  # sorted indices
groups = [
    np.array([1, 3, 5]),      # group 1: indices 1, 3, 5
    np.array([2, 4, 6, 8]),   # group 2: indices 2, 4, 6, 8
    np.array([0, 7, 9])       # group 3: indices 0, 7, 9
]
num_in_p1 = 6  # split 6 items into part 1
seed = 123

ARGS = {
    'idxs': idxs,
    'groups': groups,
    'num_in_p1': num_in_p1,
    'seed': seed
}
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 — 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
update_hedge_algorithms Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dutchhansen/empirical-multicalibration/mcb_algorithms/HJZ/multicalibration.py
code served (permissive licence) · get_code("a6b5db919379b624")
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

class Hedge:
    """Stand-in Hedge algorithm object"""
    def __init__(self, n_actions):
        self.n_actions = n_actions
        self.learning_rate = 0.1
        self.weights = np.ones(n_actions)
    
    def update(self, loss):
        """Update weights based on loss"""
        self.weights *= np.exp(-self.learning_rate * loss)
        self.weights /= np.sum(self.weights)

# Create small hedge algorithm instances
n_algorithms = 5
n_actions = 3
hedge_algorithms = [Hedge(n_actions) for _ in range(n_algorithms)]

# Define which bin each algorithm belongs to
bins = np.array([0, 1, 0, 1, 2])

# Define groups as lists of algorithm indices
# Group 0: algorithms [0, 2]
# Group 1: algorithms [1, 3, 4]
groups = [[0, 2], [1, 3, 4]]

# Target indices for update
bad_bin = 1
bad_group = 0
bad_class = 1
underestimate = True
lr = 0.05

ARGS = {
    "hedge_algorithms": hedge_algorithms,
    "bad_bin": bad_bin,
    "bad_group": bad_group,
    "bad_class": bad_class,
    "underestimate": underestimate,
    "bins": bins,
    "groups": groups,
    "lr": lr,
}
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 (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

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 8 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.

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 is a well-studied property of predictors which guarantees meaningful uncertainty estimates. Multicalibration is a related notion -- originating in algorithmic fairness -- which requires predictors to be simultaneously calibrated over a potentially complex and overlapping collection of protected subpopulations (such as groups defined by ethnicity, race, or income). We conduct the first comprehensive study evaluating the usefulness of multicalibration post-processing across a broad set of tabular, image, and language datasets for models spanning from simple decision trees to 90 million parameter fine-tuned LLMs. Our findings can be summarized as follows: (1) models which are calibrated out of the box tend to be relatively multicalibrated without any additional post-processing; (2) multicalibration post-processing can help inherently uncalibrated models and large vision and language models; and (3) traditional calibration measures may sometimes provide multicalibration implicitly. More generally, we also distill many independent observations which may be useful for practical and effective applications of multicalibration post-processing in real-world contexts. We also release a python package implementing multicalibration algorithms, available via `pip install multicalibration'.

For agents

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

get_harvested_code_for_paper("2406.06487")
get_code_for_paper("2406.06487")
have("2406.06487")

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

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

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

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

Connect an agent — have() is free.