New Paradigms in Modern Statistics I
Fundamentals
Why a quantile of the nonconformity scores guarantees coverage, and what that guarantee does and does not promise.
Now, the question is: how can the conformal prediction algorithm guarantee coverage, i.e.,
The point of the theory is in choosing the threshold as a quantile of the nonconformity scores. The intuition is simple. Suppose the scores and are exchangeable. Then we can think of the real line split into slots by the calibration scores. With exchangeability, the probability that the new score lands in each slot is equal. Written mathematically:
Quantile Lemma
Let denote the -th smallest of the calibration scores. Then for any we have
with equality if the scores have no ties.
Choosing gives exactly the from the algorithm, and since , we get the coverage guarantee:
Coverage Theorem
If the scores are exchangeable, then
where the upper bound holds when the scores have no ties.
Note that this is a finite-sample guarantee. It holds for every , with no asymptotics and no assumption on the model or the data distribution beyond exchangeability.
Example: CQR
Now we can think of applying conformal prediction to continuous outputs, too. The best example is conformalized quantile regression (CQR) by Romano, Patterson, and Candès (2019), as presented in Angelopoulos & Bates. Quantile regression estimates the interval aiming at coverage, but it might actually fail the guarantee due to estimation noise and model misspecification. Setting the nonconformity score as the signed distance to the estimated quantiles,
we get the prediction set
However, the critical point to note is that the conformal prediction interval guarantees the marginal coverage,1 not the conditional coverage
Intuitively, we may need , a threshold that depends on , for conditional coverage, while CQR uses one for every . In fact, exact distribution-free conditional coverage is impossible in general.2
Footnotes
-
Marginal over the calibration set, too. For one fixed calibration set and without ties, the coverage follows with , so it concentrates around as grows. See Vladimir Vovk, Conditional validity of inductive conformal predictors, ACML 2012. ↩
-
Vovk (2012); Jing Lei, Larry Wasserman, Distribution-free prediction bands for non-parametric regression, JRSS-B 2014; Rina Foygel Barber, Emmanuel J. Candès, Aaditya Ramdas, Ryan J. Tibshirani, The limits of distribution-free conditional predictive inference, Information and Inference 2021. ↩