On the Calibration of Aggregated Conformal Predictors

Henrik Linusson, Ulf Norinder, Henrik Boström, Ulf Johansson, Tuve Löfström

Introduction

Conformal Prediction (CP) provides a robust framework for machine learning models to issue predictions with rigorous, mathematically guaranteed confidence levels. For instance, a 95% confidence set is guaranteed to contain the true label with a probability of at least 0.95. However, traditional CP methods face a trade-off: Transductive CP is data-efficient but computationally expensive, while Inductive CP (ICP) is fast but requires a data split that can be wasteful in small-data regimes.

Aggregated Conformal Predictors (ACPs), such as Cross-Conformal and Bootstrap Conformal predictors, aim to bridge this gap by ensembling multiple ICPs trained on different data folds. While promising, this paper reveals that ACPs do not automatically inherit the validity guarantees of standard CP.

Methodology: Nonconformity and Stability

The core of CP is the "nonconformity score," a measure of how "strange" a new data point appears relative to the training data. For an ACP to be valid, the underlying model must exhibit high stability. This means that small changes in the training set (e.g., changing a fold in cross-validation) should not drastically alter how the model ranks the nonconformity of a test instance.

The distribution of nonconformity scores for the calibration and test sets should ideally align to ensure valid p-value generation.

The researchers introduced formal definitions like "approximately ranking invariant" to quantify this stability. They tested their hypotheses using the spambase dataset, comparing stable models (SVMs, 500-tree Random Forests) against unstable ones (5-tree Random Forests).

Key Insights: The Uniformity Requirement

For a conformal predictor to be perfectly calibrated—meaning it makes errors at exactly the user-specified rate $\epsilon$—the p-values of the true labels must follow a uniform distribution between 0 and 1.

A well-calibrated predictor produces a uniform distribution of p-values for true labels, matching the expected theoretical density.

When the underlying model is unstable, the p-values from different folds become independent. Averaging these independent uniform distributions results in an Irwin-Hall distribution (a bell curve). This clustering around the mean (0.5) makes extreme p-values (near 0 or 1) rare. Consequently, at low significance levels (small $\epsilon$), the predictor becomes "conservatively valid"—it rejects fewer labels than it should, leading to unnecessarily large and inefficient prediction sets.

Key Results

  • Stability is Mandatory: Using a stable Support Vector Machine or a large Random Forest ensemble (500 trees) resulted in p-values that closely followed a uniform distribution, maintaining perfect calibration.
  • Unstable Models Break Validity: A 10-fold Cross-Conformal Predictor using an unstable 5-tree Random Forest produced a sigmoidal calibration curve, failing to meet the expected error rates at higher significance levels.
  • Aggregation Strategies Matter: The study found that using the median p-value instead of the mean helps mitigate the negative effects of model instability on both validity and informational efficiency.

Conclusion

Aggregated Conformal Predictors are a powerful tool for efficient uncertainty quantification, but their validity is contingent on the stability of the base learner. Practitioners must ensure their models are sufficiently robust to data perturbations, or opt for aggregation methods like the median, to preserve the mathematical guarantees that make Conformal Prediction so valuable.

Summary updated

BibTeX
@inproceedings{linusson2017calibration,
  author = {Henrik Linusson and Ulf Norinder and Henrik Boström and Ulf Johansson and Tuve Löfström},
  title = {{On the Calibration of Aggregated Conformal Predictors}},
  booktitle = {COPA},
  year = {2017},
}
Figure