Papers › Learn then Test: Calibrating Predictive Algorithms to Achieve Risk Control

Learn then Test: Calibrating Predictive Algorithms to Achieve Risk Control

3 Oct 2021arXiv:2110.01052archive 2025-07-28

Anastasios N. Angelopoulos, Stephen Bates, Emmanuel J. Candès, Michael I. Jordan, Lihua Lei

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

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 22 code samples harvested from 1 repository linked to this paper: 17 ran (of which 0 constructed an object rather than computing a result; 17 with no instrument failure: 3 honoured, 3 violated, 11 with no contract checked; 0 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code; here there are none.

By repository: official repository: 22 samples from 1 repository, 17 ran (17 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

aangelopoulos/ltt officialmentioned in papermentioned on GitHubpytorchMITSyntology: 22 samples, 17 ran (0 instrument-failed) · 5 unverified report
kclip/r_autoeval_plus mentioned on GitHubSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Prediction-Powered Inference (arXiv:2301.09633; that paper's own run record: 12 ran (of which 0 constructed an object rather than computing a result; 7 with no instrument failure: 5 honoured, 2 violated, 0 with no contract checked; 5 where Syntology's instrument failed) · 4 unverified) and Adaptive Prediction-Powered AutoEval with Reliability and Efficiency Guarantees (arXiv:2505.18659; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 2 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

22 samples harvested: 17 ran (of which 0 constructed an object rather than computing a result; 17 with no instrument failure: 3 honoured, 3 violated, 11 with no contract checked; 0 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

3ran · honoured contract
3ran · violated contract
11ran
5unverified

Licence: 3 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. For 3 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from aangelopoulos/ltt. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

aangelopoulos/ltt official repository 22 samples, 17 ran (0 instrument-failed) · 5 unverified
cacheable core/utils.py ran MIT (permissive) · 0587a692aa8a759d · report fixture: signature func:callable/0/? · returned function · level recorded 2026-09-24
eval_detector experiments/detection/loss_table.py ran MIT (permissive) · da5d46b4724c02dd · report fixture: signature roi_masks:list/1/MockROIMask, boxes:list/1/Tensor, softmax_outputs:list/1/Tensor, gt_classes:list/1/Tensor, gt_masks:list/1/Tensor, confidence_threshold:float/0/float, segmentation_threshold:float/0/float, aps_threshold:float/0/float, iou_correct:bool/0/bool · returned tuple · level recorded 2026-09-24
eval_image experiments/detection/loss_table.py ran MIT (permissive) · 9a6b6722d0017533 · report fixture: signature roi_mask:callable/0/?, box:Tensor/2/float, softmax_output:Tensor/2/float, gt_classes:Tensor/1/int, gt_masks:Tensor/3/float, confidence_threshold:float/0/float, segmentation_threshold:float/0/float, aps_threshold:float/0/float, iou_correct:bool/0/bool · returned tuple · level recorded 2026-09-24
expand_grid core/uniform_concentration.py ran · honoured contract fingerprinted MIT (permissive) here; the stored copy is pointer only · 8b8d750f24ed95e2 · report fixture: signature arr1:ndarray/1/int, arr2:ndarray/1/int · returned tuple · level recorded 2026-09-22
formatFloat experiments/imagenet/table.py ran fingerprinted MIT (permissive) · 7ee13d7a01cb35a2 · report fixture: signature val:float/0/float · returned str · level recorded 2026-09-24
get_nus_rs_n core/pfdr.py ran MIT (permissive) · 77bf34d6bcd8a4dd · report fixture: signature score_vector:Tensor/1/float, correct_vector:Tensor/1/float, lambdas:list/1/float · returned tuple · level recorded 2026-09-24
h1 in 5 papers core/bounds.py ran · violated contract fingerprinted MIT (permissive) · 86294eacaecc7ea5 · report fixture: signature y:ndarray/2/float, mu:ndarray/2/float · returned ndarray · level recorded 2026-09-22
h2 core/bounds.py ran · violated contract fingerprinted MIT (permissive) · cbecdda63cea8201 · report fixture: signature y:ndarray/1/float · returned ndarray · level recorded 2026-09-22
hoeffding_plus core/bounds.py ran · honoured contract MIT (permissive) · 47b7bbfae0285051 · report fixture: signature mu:float/0/float, x:float/0/float, n:int/0/int · returned float64 · level recorded 2026-09-22
pfdr_loss_table core/pfdr.py ran MIT (permissive) · 71af0e9d6912d492 · report fixture: signature score_vector:ndarray/1/float, correct_vector:ndarray/1/int, lambdas:ndarray/1/float, alpha:float/0/float · returned ndarray · level recorded 2026-09-24
quantile in 8 papers experiments/imagenet/table.py ran MIT (permissive) · 3f8f32096b61daee · report fixture: signature s:Series/1/float · returned float64 · level recorded 2026-09-24
risk_size experiments/imagenet/utils.py ran MIT (permissive) · dbcdd2b46781b966 · report fixture: signature S:list/1/ndarray, targets:Tensor/1/int, losses:dict/0/? · returned tuple · level recorded 2026-09-24
romano_wolf core/concentration.py ran MIT (permissive) · 6fc5e8b6054560fc · report fixture: signature inputs:ndarray/1/float, subset_scoring_function:callable/0/? · returned ndarray · level recorded 2026-09-24
romano_wolf_CLT core/concentration.py ran MIT (permissive) · 394b954980f78fc7 · report fixture: signature loss_table:ndarray/2/float, lambdas:ndarray/1/float, alpha:float/0/float, delta:float/0/float · returned ndarray · level recorded 2026-09-24
safe_min core/uniform_concentration.py ran · violated contract fingerprinted MIT (permissive) here; the stored copy is pointer only · 8f4174eb8bea74e1 · report fixture: signature x:ndarray/1/float · returned float64 · level recorded 2026-09-22
sort_sum in 5 papers experiments/imagenet/utils.py ran · honoured contract fingerprinted MIT (permissive) here; the stored copy is pointer only · ce9cdd0a73c5e072 · report fixture: signature scores:ndarray/2/float · returned tuple · level recorded 2026-09-22
trial_precomputed experiments/imagenet/pfdr_histogram.py ran MIT (permissive) · 4d529ca40b514587 · report fixture: signature rejection_region_function:callable/0/?, top_scores:Tensor/1/float, corrects:Tensor/1/int, alpha:float/0/float, delta:float/0/float, lambdas:ndarray/1/float, num_calib:int/0/int, maxiter:int/0/int · returned tuple · level recorded 2026-09-24
cacheable core/uniform_concentration.py unverified MIT (permissive) · 4011969a3bfc90e8 · report
get_images in 21 papers experiments/imagenet/grid_fig.py unverified MIT (permissive) · 91a92d35cc14ae7d · report
get_lambdas_vs_pfdps_frac_predict experiments/imagenet/lambda_vs_pfdr.py unverified MIT (permissive) · 6804c5f0e3efce41 · report
platt_logits experiments/imagenet/grid_fig.py unverified MIT (permissive) · c23944476f3cabe3 · report
validate in 313 papers experiments/imagenet/utils.py unverified MIT (permissive) · bc281c57b11f153e · report

Tasks

BIG-bench Machine LearningInstance SegmentationMUlTI-LABEL-ClASSIFICATIONMulti-Label ClassificationOutlier DetectionSemantic Segmentation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections