SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.02988 · NeurIPS · 2024

Confidence Calibration of Classifiers with Many Classes

Adrien Le Coz, Stéphane Herbin, Faouzi Adjed, Irt Systemx

arXiv · PDF · Open in the Atlas

Code that ran

10 of 18 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 8 no recorded run), measured 2026-11-24; 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/2411.02988.json · badge: /api/ran/2411.02988.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
lifan-yuan/PLMCalibration canonical (classifier label)
classifier basis: census
4 ran · 5 no recorded run
mominabbass/LinC canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
allglc/tva-calibration canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
AUROC Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
allglc/tva-calibration/evaluation.py
pointer only (licence: NONE) · get_code("97600a3445a5f8c5")
How it ran

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

ECE_calc Ran
ran; our contract draft was wrong, not the code
allglc/tva-calibration/evaluation.py
pointer only (licence: NONE) · get_code("a3002e7b9386d6dd")
How it ran

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

chunk_size_helper Ran
ran, honoured the contract we drafted
mominabbass/LinC/utils.py
pointer only (licence: NONE) · get_code("e775486237d19cbf")
How it ran

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

ece_equal_interval Ran
ran; our contract draft was wrong, not the code
lifan-yuan/PLMCalibration/metric.py
code served (permissive licence) · get_code("47774a4ca35cf0e3")
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 float, 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 torch
import math

torch.manual_seed(0)

# The function expects three iterables:
# - allprobs: probabilities (floats between 0 and 1)
# - allpreds: predicted labels (integers)
# - alllabels: ground truth labels (integers)

# Create small sample data
allprobs = [0.1, 0.25, 0.5, 0.75, 0.9, 0.15, 0.55, 0.85]
allpreds = [0, 0, 1, 1, 1, 0, 1, 1]
alllabels = [0, 1, 1, 1, 1, 0, 1, 0]

ARGS = {
    "allprobs": allprobs,
    "allpreds": allpreds,
    "alllabels": alllabels,
}
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 float, 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
ece_equal_mass Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lifan-yuan/PLMCalibration/metric.py
code served (permissive licence) · get_code("4427a224ec9b8f4f")
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 float, 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 torch
import math

torch.manual_seed(0)

# Analyze the function:
# - allprobs: iterable of numeric values (probabilities), will be sorted
# - allpreds: iterable of numeric values (predictions), will be sorted with allprobs
# - alllabels: iterable of numeric values (labels), will be sorted with allprobs
# The function zips them together, sorts by allprobs, then unpacks
# It compares preds with labels using == operator
# It sums probabilities and counts matches

# Create small sample data
num_samples = 10

# allprobs: confidence scores between 0 and 1
allprobs = [0.1, 0.9, 0.3, 0.8, 0.2, 0.7, 0.4, 0.6, 0.5, 0.95]

# allpreds: predicted class labels (integers)
allpreds = [0, 1, 0, 1, 0, 1, 1, 1, 0, 1]

# alllabels: ground truth class labels (integers)
alllabels = [0, 1, 0, 1, 1, 1, 1, 0, 0, 1]

ARGS = {
    'allprobs': allprobs,
    'allpreds': allpreds,
    'alllabels': alllabels
}
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 float, 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
expected_calibration_error Ran
ran; our contract draft was wrong, not the code
mominabbass/LinC/utils.py
pointer only (licence: NONE) · get_code("dc60c15158733e34")
How it ran

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

fit_scaling_model Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
allglc/tva-calibration/calibrators.py
pointer only (licence: NONE) · get_code("96ab79467959b134")
How it ran

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

preprocess Ran
ran; our contract draft was wrong, not the code
lifan-yuan/PLMCalibration/train-bow-tf_idf.py
code served (permissive licence) · get_code("2b34620ed2edab90")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. 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

ARGS = {
    'dataset': {
        'train': [
            ('text_a_1', 'text_b_1', 0),
            ('text_a_2', 'text_b_2', 1),
        ],
        'test': [
            ('text_a_3', 'text_b_3', 0),
            ('text_a_4', 'text_b_4', 1),
        ]
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
random_sampling Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mominabbass/LinC/utils.py
pointer only (licence: NONE) · get_code("c6b46764733c312e")
How it ran

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

vectorize Ran
ran; our contract draft was wrong, not the code
lifan-yuan/PLMCalibration/train-bow-tf_idf.py
code served (permissive licence) · get_code("6824958e0d4a8b02")
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 pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer

# Create a simple vectorizer
vectorizer = TfidfVectorizer(max_features=10)

# Create small sample text data for training
train_data_features = [
    "hello world",
    "this is a test",
    "sample text data"
]

# Create small sample text data for testing
test_data_features = [
    "hello there",
    "another test"
]

ARGS = {
    "vectorizer": vectorizer,
    "train_data_features": train_data_features,
    "test_data_features": test_data_features
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, sklearn — 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
compute_hidden Not yet run
unverified (harvested, no recorded run)
lifan-yuan/PLMCalibration/utils/calibration_methods.py
code served (permissive licence) · get_code("e115d79cf282ebb9")
How it ran

no invocation recorded.

eval_accuracy Not yet run
unverified (harvested, no recorded run)
mominabbass/LinC/run_classification.py
pointer only (licence: NONE) · get_code("4db3f48d30d8c5af")
How it ran

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

evaluate Not yet run
unverified (harvested, no recorded run)
lifan-yuan/PLMCalibration/prompt-dynamics.py
code served (permissive licence) · get_code("e2ecbd7ff12e83d5")
How it ran

no invocation recorded.

evaluation Not yet run
unverified (harvested, no recorded run)
lifan-yuan/PLMCalibration/prompt-ood.py
code served (permissive licence) · get_code("5439c7c6310eaacf")
How it ran

no invocation recorded.

evaluation Not yet run
unverified (harvested, no recorded run)
lifan-yuan/PLMCalibration/prompt-emergent.py
code served (permissive licence) · get_code("85faff7a2af04107")
How it ran

no invocation recorded.

get_label_probs Not yet run
unverified (harvested, no recorded run)
mominabbass/LinC/run_classification.py
pointer only (licence: NONE) · get_code("77347b697708c203")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mominabbass/LinC 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_p_content_free Not yet run
unverified (harvested, no recorded run)
mominabbass/LinC/run_classification.py
pointer only (licence: NONE) · get_code("f1916eb36c894684")
How it ran

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

wrap_feature_based_testloader Not yet run
unverified (harvested, no recorded run)
lifan-yuan/PLMCalibration/utils/calibration_methods.py
code served (permissive licence) · get_code("69772baf34349d01")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_label_probs 3 other papers
3 dated earlier
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2102.09690 (2021-02)
Calibrate Before Use: Improving Few-Shot Performance of Language Models
2401.12406 (2024-01)
Enhancing In-context Learning via Linear Probe Calibration
chunk_size_helper 1 other paper
1 dated earlier
2401.12406 (2024-01)
Enhancing In-context Learning via Linear Probe Calibration
compute_hidden 1 other paper
1 dated earlier
2211.00151 (2022-11)
A Close Look into the Calibration of Pre-trained Language Models
ece_equal_interval 1 other paper
1 dated earlier
2211.00151 (2022-11)
A Close Look into the Calibration of Pre-trained Language Models
ece_equal_mass 1 other paper
1 dated earlier
2211.00151 (2022-11)
A Close Look into the Calibration of Pre-trained Language Models
eval_accuracy 1 other paper
1 dated earlier
2401.12406 (2024-01)
Enhancing In-context Learning via Linear Probe Calibration
evaluation 1 other paper
1 dated earlier
2211.00151 (2022-11)
A Close Look into the Calibration of Pre-trained Language Models
expected_calibration_error 1 other paper
1 dated earlier
2401.12406 (2024-01)
Enhancing In-context Learning via Linear Probe Calibration
get_p_content_free 1 other paper
1 dated earlier
2401.12406 (2024-01)
Enhancing In-context Learning via Linear Probe Calibration
random_sampling 1 other paper
1 dated earlier
2401.12406 (2024-01)
Enhancing In-context Learning via Linear Probe Calibration
wrap_feature_based_testloader 1 other paper
1 dated earlier
2211.00151 (2022-11)
A Close Look into the Calibration of Pre-trained Language Models

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

For classification models based on neural networks, the maximum predicted class probability is often used as a confidence score. This score rarely predicts well the probability of making a correct prediction and requires a post-processing calibration step. However, many confidence calibration methods fail for problems with many classes. To address this issue, we transform the problem of calibrating a multiclass classifier into calibrating a single surrogate binary classifier. This approach allows for more efficient use of standard calibration methods. We evaluate our approach on numerous neural networks used for image or text classification and show that it significantly enhances existing calibration methods. Our code can be accessed at the following link: https://github.com/allglc/tva-calibration.

For agents

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

get_harvested_code_for_paper("2411.02988")
get_code_for_paper("2411.02988")
have("2411.02988")

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

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

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

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

Connect an agent — have() is free.