Anytime-Valid Conformal Risk Control

Bror Hultberg, Dave Zachariah, Antônio H. RibeiroNeurIPS 2026

TL;DR

Standard conformal prediction gives your machine learning model statistically valid uncertainty guardrails, but those guarantees quietly break if you continuously add new calibration data and update your thresholds on the fly. This paper introduces an anytime-valid framework for conformal risk control, ensuring your model’s error rate stays safely below a target ceiling across an infinitely growing dataset. Even better, the authors prove their closed-form safety margin shrinks at the fastest rate mathematically possible.

What Problem Does This Paper Address?

Instead of outputting a single, overconfident point prediction, conformal prediction outputs a set of plausible answers (like an interval or a shortlist of labels) calibrated on held-out data so that the true answer is missed at most $\alpha$ percent of the time. Conformal risk control generalizes this from simple "miscoverage" to any bounded, monotone error metric—like controlling the false negative rate in multi-label classification.

However, standard conformal guarantees have two catches:

  1. Marginal vs. Conditional: Standard guarantees only hold on average across parallel universes of possible calibration sets. For the actual dataset sitting on your hard drive, the error might be much worse (e.g., with 500 samples and a 10% target, there is a 48% chance your specific calibration set exceeds the error limit).
  2. Fixed-Time vs. Sequential: Existing "PAC-style" (sample-conditional) fixes guarantee low error on your specific dataset with high probability ($1 - \delta$), provided you lock in a single, fixed sample size $n$.

In the real world, data arrives in streams. As your calibration set grows, you naturally want to recompute and tighten your prediction sets. If you repeatedly apply fixed-time corrections as $n$ grows, random fluctuations ensure you will eventually violate your risk threshold—an effect governed by a classic probability result called the law of the iterated logarithm. The authors ask: how can we keep risk strictly below $\alpha$ across every step $n$ simultaneously, while still letting the sets shrink toward optimal efficiency?

Miscoverage trajectories across calibration sample sizes for standard, fixed-time, and anytime-valid methods.

Methods

In conformal risk control, you pick the smallest set-size threshold $\lambda_n$ that keeps empirical risk on your $n$ calibration points below $\alpha - \gamma_n$, where $\gamma_n$ is a "safety margin" (correction term) accounting for finite-sample noise.

Rather than tracking complex wealth processes for every candidate threshold like some sequential methods, the authors derive a closed-form correction term $\gamma_n$ that plugs directly into the standard conformal recipe:

  • Oracle Reduction & Time-Uniform Bounds: They show you only need to bound the deviation between empirical and true risk at a single, deterministic "oracle" threshold. Using sub-gamma concentration arguments, they build a Bernstein-type bound where the fixed-time $\log(1/\delta)$ penalty is replaced by an iterated-logarithm term ($\sim \log \log n$) that budgets failure probability across all $n \in \mathbb{N}$.
  • Distribution Shift Extension: When test data differs from calibration data ($P^* \neq P$), they incorporate known importance weights $\omega(x,y) = \mathrm{d}P^*/\mathrm{d}P$ directly into the empirical risk and construct an adaptive variance proxy based on the observed squared weights.
Figure 2: Correction term γn in (6) versus n. Using (7), (8), and (10), guarantees marginal, fixed-time and anytime validity, respectively.

Datasets

No new benchmarks are introduced. The authors evaluate their framework across five setups:

  • Synthetic Linear Regression: Uniformly distributed features with Gaussian noise.
  • Synthetic Regression under Covariate Shift: Polynomial data generation following Shimodaira (2000), with shifted Gaussian test inputs.
  • ImageNet-1K: 1,000-class single-label image classification.
  • Synthetic Multilabel Classification: 3D Gaussian features predicting 3 independent binary labels.
  • MS COCO (via Angelopoulos & Bates, 2022 setup): Real-world multilabel image classification controlling False Negative Rate (FNR).

Key Insights and Ideas

  • Fixed-time corrections inevitably fail in streaming setups: Under mild continuity conditions, any deterministic safety margin decaying faster than $\sqrt{n^{-1} \log \log n}$—including standard $O(n^{-1})$ and fixed-time $O(n^{-1/2})$ corrections—will violate the risk limit infinitely many times with 100% certainty (almost surely).
  • Optimal $\sqrt{n^{-1} \log \log n}$ convergence: The proposed correction decays at $O(\sqrt{n^{-1} \log \log n})$, matching the theoretical lower bound from the law of the iterated logarithm. You literally cannot shrink the safety margin faster without breaking anytime validity.
  • Asymptotic tightness from below: Instead of remaining overly conservative forever, the true risk of the generated prediction sets smoothly approaches the target $\alpha$ from below as $n$ grows (provided empirical risk jumps vanish).

Key Results

  • Uniform Risk Control: Across synthetic regression ($\alpha = 5\%, \delta = 10\%$) and FNR control ($\alpha = 10\%, \delta = 10\%$), standard and fixed-time trajectories frequently cross the error ceiling as $n$ grows from $10^2$ to $10^6$, whereas anytime-valid trajectories stay below $\alpha$ at the prescribed $1-\delta$ rate.
  • Minimal Set-Size Overhead: On ImageNet-1K ($\alpha = 10\%, \delta = 10\%$) and multilabel image classification, anytime-valid prediction sets require only a modest increase in calibration sample size to match the average set sizes of fixed-time and marginal methods.
  • Graceful Handling of Shift: Under synthetic covariate shift, anytime validity holds at $\alpha = 10\%$, though convergence to $\alpha$ requires roughly an order of magnitude more data compared to the unshifted setting due to weight variance.

Limitations and Future Work

  • Small-Sample Conservatism ("Burn-in"): Until a minimum sample size $m^*$ is reached, $\gamma_n > \alpha$, forcing the algorithm to output uninformative, maximal prediction sets (e.g., all labels).
  • Known Importance Weights: The distribution-shift guarantee assumes exact knowledge of the likelihood ratio $\omega(x,y)$; handling estimated or misspecified weights remains an open problem.
  • Static Base Models & i.i.d. Streams: Calibration data is assumed i.i.d. (or shifted at test time) around a fixed model $f$. Extending anytime-valid guarantees to time-series data and models that continuously retrain online is highlighted as a prime direction for future work.

Summary updated

Abstract

Prediction sets provide a means of quantifying the uncertainty in predictive tasks. Using held out calibration data, conformal prediction and risk control can produce prediction sets that exhibit statistically valid error control in a computationally efficient manner. However, in the standard formulations, the error is only controlled on average over many possible calibration datasets of fixed size. In this paper, we extend the control to remain valid with high probability over a cumulatively growing calibration dataset at any time point. We derive such guarantees using quantile-based arguments and illustrate the applicability of the proposed framework to settings involving distribution shift. We further show that our guarantees are asymptotically tight, in the sense that the risks converge to the target level from below, and that the rate of our correction cannot be improved. Finally, we demonstrate the practical performance of our methods through both simulations and real-world numerical examples.
BibTeX
@inproceedings{hultberg2026anytime,
  author = {Bror Hultberg and Dave Zachariah and Antônio H. Ribeiro},
  title = {{Anytime-Valid Conformal Risk Control}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=FCHpcvgVme},
}
Figure