Skip to content

Conformal Prediction Through the Lens of Hypothesis Testing: Universality, Impossibility, and Optimality

Ryan J. Tibshirani, Rina Foygel Barber, Aaditya Ramdas

math.STarXiv:2608.27310

Abstract

The connections between conformal prediction and permutation tests are already widely-known in the literature. Some authors motivate conformal prediction by saying that it computes a permutation p-value for the hypothesis H0 : Yn+1 = y, and then inverts this to form a prediction set for Yn+1 (i.e., accepts all values y into the prediction set for which the p-value is large). In this paper, we examine an alternative view, which is less well-known: we again cast conformal prediction via the inversion of a permutation test, but for the null of exchangeability of the joint distribution of the n+1 samples. This change in perspective, while simple, adheres more closely to traditional formalization in hypothesis testing, which offers several benefits. First, we use the duality between conformal sets and testing to show that foundational universality and impossibility results in the conformal prediction literature can be reproduced directly using classical hypothesis testing theory (due to Neyman, Lehmann, Scheffé, Kraft, Le Cam, and others). Furthermore, we show that an optimality result for conformal prediction can be derived using standard Neyman-Pearson theory: for any joint distribution of the covariates and response X,Y, and any sample size, the optimal method for prediction sets---which delivers the most efficient set among all methods with valid coverage for exchangeable distributions---is a conformal predictor whose score is the inverse conditional density of Y|X.

Create a lesson