Probabilistically Robust Conformal Prediction

Subhankar Ghosh, Yuanjie Shi, Taha Belkhouja, Yan Yan, Jana Doppa, Brian Jones

Abstract

Conformal prediction (CP) is a framework to quantify uncertainty of machine learning classifiers including deep neural networks. Given a testing example and a trained classifier, CP produces a prediction set of candidate labels with a user-specified coverage. Almost all the existing work on CP assumes clean testing data and there is not much known about the robustness of CP algorithms w.r.t natural/adversarial perturbations to testing examples. This paper studies the problem of probabilistically robust conformal prediction (PRCP) which ensures robustness to most perturbations around clean input examples. PRCP generalizes the standard CP and adversarially robust CP to achieve better trade-offs between nominal performance and robustness. We propose a novel adaptive PRCP (aPRCP) algorithm to achieve probabilistically robust coverage. The key idea behind aPRCP is to determine two parallel thresholds, one for data samples and another one for the perturbations on data (aka "quantile-of-quantile" design). Our experiments on CIFAR-10, CIFAR-100, and ImageNet datasets demonstrate that aPRCP achieves better trade-offs than state-of-the-art CP and adversarially robust CP algorithms.

Introduction

Deep neural networks are notoriously overconfident and vulnerable to small perturbations, such as random noise or intentional adversarial attacks. Conformal Prediction (CP) has emerged as a popular tool to quantify this uncertainty by producing a prediction set of possible labels guaranteed to contain the true label with a user-defined probability (e.g., 90%).

However, standard CP assumes that test data follows the same distribution as the calibration data. When test data is perturbed, these reliability guarantees vanish. Existing "adversarially robust" versions of CP (RSCP) attempt to fix this by ensuring coverage for every possible perturbation within a defined range. While safe, this "worst-case" approach often results in massive, uninformative prediction sets, rendering the model's output practically useless for human decision-makers.

Methodology: Probabilistically Robust Coverage

This research introduces Probabilistically Robust Conformal Prediction (PRCP), a framework that shifts the focus from worst-case robustness to probabilistic robustness. Instead of covering 100% of potential perturbations, PRCP aims to cover a significant majority, allowing for a more efficient trade-off between reliability and set size.

The core of this approach is the adaptive PRCP (aPRCP) algorithm, which utilizes a "quantile-of-quantile" design:

  1. Inner Quantile: For a specific data point, it calculates a "robust quantile" accounting for a large fraction of its possible perturbations.
  2. Outer Quantile: It determines a global threshold across the calibration dataset to ensure the final marginal coverage meets the target.
Conceptual illustration of the aPRCP setting. The goal is to find a threshold that covers most perturbations (blue circle) across the feature space.

Unlike previous methods requiring pre-defined inflation constants, aPRCP is adaptive, learning necessary adjustments directly from the data distribution. This design allows the algorithm to ignore extreme, highly unlikely outliers in the perturbation space while maintaining formal guarantees.

Experimental Evaluation

The researchers evaluated aPRCP using standard deep learning benchmarks:

  • Datasets: CIFAR-10, CIFAR-100, and ImageNet.
  • Models: ResNet-110 (CIFAR) and ResNet-50 (ImageNet).
  • Baselines: Vanilla CP and Robust Conformal Prediction (RSCP).
  • Training: Both standard training and Gaussian augmented training were tested.

Results and Discussion

The experiments demonstrate that aPRCP significantly outperforms both vanilla CP and the previous robust state-of-the-art (RSCP) in terms of the efficiency-robustness trade-off.

  • Reliability: Under adversarial attacks, Vanilla CP's coverage often plummets below 30%. In contrast, aPRCP consistently maintains the target 90% coverage.
  • Efficiency: On the CIFAR-100 dataset, RSCP often produced prediction sets containing approximately 30 labels to ensure robustness. aPRCP achieved the same 90% robust coverage with sets of only ~10 labels.
  • Scalability: On ImageNet, aPRCP reduced the average prediction set size by roughly 20 labels compared to RSCP, making the uncertainty quantification much more interpretable.
Results on CIFAR-100 showing that aPRCP (rightmost bars in each plot) achieves a better trade-off between coverage and set size compared to Vanilla CP and RSCP.

A key advantage of aPRCP is that it incurs no additional test-time overhead. The heavy computational lifting occurs during the calibration phase, ensuring that inference remains fast and suitable for real-time applications.

Conclusion

PRCP provides a robust yet efficient framework for uncertainty quantification in machine learning. By relaxing the worst-case requirement of previous robust CP methods, aPRCP produces smaller, more useful prediction sets while maintaining high reliability against perturbations. Future work includes exploring hyperparameter sensitivity for the trade-off parameter $s$, integrating PRCP constraints directly into model training, and extending the framework to handle complex semantic perturbations like lighting or weather changes.

Summary updated

BibTeX
@inproceedings{ghosh2023probabilistically,
  author = {SUBHANKAR GHOSH and Yuanjie Shi and Taha Belkhouja and Yan Yan and Jana Doppa and Brian Jones},
  title = {{Probabilistically Robust Conformal Prediction}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=4xI4oaqIs2},
}
Figure