Motivation
Split conformal prediction turns the output of any trained model into prediction sets C(Xn+1) that contain the true label with probability at least 1−α:
P(Yn+1∈/C(Xn+1))≤α.
The guarantee needs no assumption on the model or on the data distribution beyond exchangeability of the calibration and test points. In many tasks, miscoverage is not the right measure of error. Examples are the fraction of missed classes in multilabel classification, the false negative rate of a segmentation mask, and a token-level F1-score.
Angelopoulos, Bates, Fisch, Lei and Schuster extend conformal prediction to control the expected value of any bounded monotone loss,
E[ℓ(Cλ^(Xn+1),Yn+1)]≤α,
and recover the coverage guarantee as the special case of the indicator loss. This mission formalizes the theory of Sections 2 and 4 and Appendix A of the paper.
Setting
The parameter set is a set Λ⊂R with λmax=supΛ∈Λ. Larger parameters give more conservative predictions. The data enter only through an exchangeable collection of random functions
L1,…,Ln+1:Λ→(−∞,B],
non-increasing and right-continuous in λ, with Li(λmax)≤α. The first n are calibration losses and Ln+1 is the test loss. Typically Li(λ)=ℓ(Cλ(Xi),Yi). With R^n(λ)=n1∑i≤nLi(λ), conformal risk control chooses
λ^=inf{λ: n+1nR^n(λ)+n+1B≤α},
with λ^=λmax when the set is empty.
Formalization targets
Goal: conformal risk control (Theorem 1)
If the Li are exchangeable, non-increasing, right-continuous, bounded above by B and satisfy Li(λmax)≤α almost surely, then E[Ln+1(λ^)]≤α.
Milestones
- Lemma 1 (Jump Lemma): for i.i.d. losses in [0,B] that have a jump at any fixed λ with probability 0, every jump of the empirical risk R^m is at most B/m almost surely.
- Theorem 2 (as proved): for i.i.d. losses in [0,B] without fixed jumps, E[Ln+1(λ^)]≥α−2B/(n+1). The statement adds a hypothesis at the left endpoint of Λ, without which the printed theorem is false.
- Proposition 1 (as proved): without monotonicity, the risk of λ^ can be at least B−ϵ for any ϵ>0.
- Corollary 1: running the procedure on the monotonized losses L~i(λ)=supλ′≥λLi(λ′) controls the risk of the original losses.
- Proposition 2: under covariate shift with known likelihood ratio w, a weighted version λ^(Xn+1) controls the risk under the test distribution.
- Proposition 3 (as proved): for independent, non-identically distributed data and losses in [0,B], the risk of λ^ is within B∑iTV(Zi,Zn+1) of the exchangeable bounds.
- Proposition 4: a variant λ^β controls the β-quantile of the test loss.
- Proposition 7: a variant λ^k controls risks that are expectations of order-k U-statistics.
- Theorem A.1 (as proved): the monotonized procedure controls the risk of non-monotone losses asymptotically, limsupnE[Ln+1(λ^n↑)]≤α.
Significance
Conformal risk control is a widely used extension of conformal prediction. It is applied to tumor segmentation, multilabel classification, hierarchical classification and question answering. Its guarantee rests on a short exchangeability argument.
Making that argument machine-checked fixes exactly which hypotheses the guarantees need. Formalizing the paper exposed several conditions the printed statements omit:
- a left-endpoint condition in the lower bound;
- independence and nonnegativity in the total-variation bound;
- right-continuity in Corollary 1;
- exchangeability in the U-risk bound.
Difficulty
- Theorem 1, Corollary 1, Propositions 4 and 7: a symmetrization argument. Conditional on the multiset of losses, the test loss is uniformly distributed over them. In Lean this needs exchangeability of random functions, measurability of the random parameter, and expectations of variables bounded only from above.
- Lemma 1 and Theorem 2: independent random functions almost surely share no discontinuity, which requires Fubini over countable random sets of jump points.
- Proposition 2: weighted exchangeability under covariate shift (Lemma 3 of Tibshirani et al., 2019).
- Proposition 3: a coupling or total-variation estimate for product measures.
- Proposition 1: an explicit construction with i.i.d. Bernoulli values on a grid and a binomial computation.
- Theorem A.1: the paper's uniform (Glivenko–Cantelli) law can fail for non-monotone losses. A valid proof uses one-sided Hoeffding bounds along a countable sequence of parameters, together with independence of the test loss from the calibration losses.
Formalization scope
- Parameter set: a nonempty compact Λ⊂R. The paper gives no topology for Λ. Compactness ensures that every infimum used by the procedures lies in Λ, as the proofs require. Lemma 1, Theorem 2 and the lower half of Proposition 3 take Λ=[a,b], a<b, because the jump function is a left limit.
- Random losses: functions R→R used only on Λ. Exchangeability and the i.i.d. property refer to the restrictions to Λ, as random elements of RΛ with the product σ-algebra.
- Expectations: losses are bounded above but not below, so E[X] is taken in [−∞,B] as B−E[B−X].
- Statements marked "(as proved)" carry the hypotheses or the form that the paper's proof establishes. The reasons are given in each statement's Formalization Note.
Not included:
- Proposition 5 (multiple risks). It applies Theorem 1 for each γ, and as printed it needs α(γ)>0, which the paper does not state.
- Proposition 6 (adversarial risks). It applies Theorem 1 to supγLi(⋅;γ). For uncountable Γ the paper gives no condition making this supremum a random variable, so the statement cannot be made precise from the paper.
- The equivalence with split conformal prediction in Section 2.3 and the examples of Section 3. These are computations and experiments, not numbered results.
Selected references
- A. N. Angelopoulos, S. Bates, A. Fisch, L. Lei and T. Schuster, Conformal Risk Control, ICLR 2024; arXiv:2208.02814. https://arxiv.org/abs/2208.02814
- V. Vovk, A. Gammerman and G. Shafer, Algorithmic Learning in a Random World, Springer, 2005. https://doi.org/10.1007/b106715
- J. Lei, M. G'Sell, A. Rinaldo, R. J. Tibshirani and L. Wasserman, Distribution-Free Predictive Inference for Regression, JASA 113 (2018). https://arxiv.org/abs/1604.04173
- R. J. Tibshirani, R. Foygel Barber, E. J. Candès and A. Ramdas, Conformal Prediction Under Covariate Shift, NeurIPS 2019. https://arxiv.org/abs/1904.06019
- R. Foygel Barber, E. J. Candès, A. Ramdas and R. J. Tibshirani, Conformal Prediction Beyond Exchangeability, Annals of Statistics 51 (2023). https://arxiv.org/abs/2202.13415