On the Expected Size of Conformal Prediction Sets

Guneet S. Dhillon, George Deligiannidis, Tom Rainforth

TL;DR

This paper provides the first theoretical quantification of the expected size of conformal prediction sets in finite-sample settings. By introducing a "multiplicative factor" that bridges non-conformity scores and label space, the authors derive practical point and interval estimates that allow researchers to predict how large their uncertainty sets will be without needing expensive, repeated Monte Carlo simulations.

What Problem Does This Paper Address?

Conformal Prediction (CP) is a powerful framework for uncertainty quantification because it provides rigorous, distribution-free guarantees on error rates. Instead of a single point prediction, it outputs a set of possible labels that is guaranteed to contain the true label with a user-defined probability (e.g., 90%).

However, a guarantee on error is only half the battle. A model that always predicts "every possible label" has zero error but is completely useless. For CP to be practical, the prediction sets must be small. Until now, there has been a lack of finite-sample analysis to tell practitioners how large these sets are expected to be for a given significance level ($\alpha$) or number of calibration points ($n$). Currently, the only way to estimate this is through "Monte Carlo averaging"—repeatedly running the algorithm on different data splits—which is computationally expensive and requires large amounts of labeled data.

Methods

The authors focus on the split conformal prediction framework. Their core contribution is Theorem 1, which quantifies the expected size of a prediction set.

The key innovation is the introduction of a multiplicative factor, denoted as $\#_R(r)$. This factor acts as a translator: it maps the reference measure from the space of non-conformity scores (how "unusual" a data point looks to the model) back to the original label space (e.g., the range of a regression target or the number of classes).

Table 1: Multiplicative factor under different settings. We summarize the multiplicative factor under different settings that we will utilize in Section 6 for the experiments. Most settings utilize M(x), the model prediction for input x; for LAC [Sadinle et al., 2019], My(x) is the predicted probability for label y and for CQR [Romano et al., 2019], Mβ(x) is the prediction for the β’th level quantile and M∆(x) = (M1−α/2(x) − Mα/2(x))/2. Details of these settings and the derivations of their multiplicative factors are provided in Appendix B.

For practical use, the authors derive two types of estimators:

  1. Known Multiplicative Factor: For standard losses like $l_1$ or $l_p$ regression, the factor is analytically known. They use the empirical distribution of scores and the Dvoretzky–Kiefer–Wolfowitz (DKW) inequality to provide high-probability interval bounds.
  2. Unknown Multiplicative Factor: For complex methods like Conformalized Quantile Regression (CQR) or Least Ambiguous Classifiers (LAC), the factor depends on the data distribution. The authors provide a nested Monte Carlo approach to estimate the size using a single set of accessible data.
Table 2: Practical estimates under different settings. We summarize our point and interval estimates derived when the multiplicative factor is known (cf. Section 5.1) and when it is unknown (cf. Section 5.2).

Datasets

The authors validated their theory using a wide array of real-world datasets from the UCI Machine Learning Repository:

  • Regression: Abalone, AirFoil, AirQuality, BlogFeedback, CTSlices, FacebookComments, OnlineNews, PowerPlant, Superconductivity, and WhiteWineQuality.
  • Classification: APSFailure, Adult, Avila, BankMarketing, CardDefault, Landsat, LetterRecognition, MagicGamma, SensorLessDrive, and Shuttle.
  • High-Dimensional Regression: The Parkinson dataset (2-dimensional target).

Key Insights and Ideas

  • Decoupling Model Quality and Geometry: The expected set size is influenced by two distinct components: the distribution of non-conformity scores (which reflects how well the model generalizes) and the multiplicative factor (which reflects the geometry of the loss function).
  • Single-Pass Estimation: Unlike standard Monte Carlo methods that require re-running the entire conformal pipeline for every new $\alpha$ or $n$, the proposed point estimates can be computed for any parameter configuration using just one set of pre-calculated scores.
  • Stochastic Dominance: The paper shows that if one non-conformity function's score distribution "stochastically dominates" another (while keeping the multiplicative factor the same), it will guaranteed-ly produce larger prediction sets. This provides a formal way to compare different scoring functions.

Key Results

The experimental results show that the proposed point estimates are remarkably accurate, often matching the results of expensive Monte Carlo averages with very low absolute error.

Table 3: Marginal expected prediction set sizes. We illustrate the marginal expected sizes of split conformal prediction sets using different non-conformity functions and UCI datasets. The estimates are obtained via Monte Carlo averaging, our point estimates, and our interval estimates (lower-upper bounds with γ = 0.1). We also compute the absolute error between our individual point estimates and the mean Monte Carlo average. We report the means and standard deviations. For classification, the number of classes/labels is provided in parentheses.

As seen in Table 3, for both regression ($l_1$, CQR) and classification (0-1, LAC, APS), the "Our point estimate" column is nearly identical to the "Monte Carlo average" column. Crucially, the authors achieved these results using 3x fewer data points than the Monte Carlo baseline. Furthermore, the interval estimates successfully bounded the true expected size with the desired confidence level ($\gamma$) in the vast majority of cases.

Limitations and Future Work

  • Intractable Factors: For some advanced non-conformity functions, the multiplicative factor cannot be solved analytically. While the authors provide a nested Monte Carlo workaround, this introduces additional approximation error.
  • I.I.D. Assumption: The current derivation assumes that calibration and test data are independent and identically distributed (i.i.d.). Extending this to settings with covariate shift or non-exchangeable data remains an open challenge.
  • Conditional vs. Marginal: While the paper extends the theory to conditional expectations (size given a specific input $x$), the practical estimation of conditional size is naturally more difficult due to the "curse of dimensionality" when conditioning on specific features.

Summary updated

BibTeX
@inproceedings{dhillon2024expected,
  author = {Guneet S. Dhillon and George Deligiannidis and Tom Rainforth},
  title = {{On the Expected Size of Conformal Prediction Sets}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=MiuqbtKUVX},
}
Figure