Conformal Prediction for Class-wise Coverage via Augmented Label Rank Calibration

Yuanjie Shi, Subhankar Ghosh, Taha Belkhouja, Janardhan Rao Doppa, Yan Yan · DOI

Abstract

This paper introduces RC3P, a novel conformal prediction algorithm designed to provide valid class-conditional coverage while minimizing prediction set sizes. By employing a "double calibration" strategy that integrates standard score thresholding with an augmented label rank calibration, RC3P achieves significant efficiency gains, particularly in imbalanced and high-dimensional datasets. Experimental results demonstrate a 26.25% average reduction in prediction set size compared to existing baselines while maintaining strict mathematical coverage guarantees.

Introduction

In high-stakes domains like medical diagnosis, model predictions must be accompanied by rigorous uncertainty estimates. Conformal Prediction (CP) provides a framework for generating prediction sets that contain the true label with a guaranteed probability. However, achieving class-conditional coverage—where the guarantee holds for every individual class—often leads to excessively large, "bloated" prediction sets, especially in long-tail data distributions. This lack of efficiency limits the utility of CP in real-world human-AI collaboration.

Methodology

The proposed RC3P (Rank Calibrated Class-conditional CP) method addresses this efficiency gap through a two-stage "double-calibration" process.

  1. Standard Score Calibration: Like traditional class-conditional CP (CCP), it calculates class-wise quantiles of non-conformity scores (how "unusual" a sample looks to the model).
  2. Augmented Label Rank Calibration: RC3P introduces a class-specific rank threshold, $\widehat{k}(y)$, based on the model's internal ranking of labels and its top-$k$ error for that specific class.

A label is included in the final prediction set only if it satisfies both the score threshold and falls within the calibrated rank threshold. This approach is proven to be model-agnostic and distribution-free, ensuring that coverage guarantees hold regardless of the underlying model architecture.

Algorithm 1: The RC3P method for class-conditional conformal prediction.

Experimental Setup

RC3P was evaluated across a wide range of scenarios to test its robustness to data imbalance:

  • Imbalanced Datasets: Long-tail versions of CIFAR-10, CIFAR-100, mini-ImageNet, and Food-101 were created using exponential (EXP), polynomial (POLY), and majority-based (MAJ) decay.
  • Balanced Benchmarks: Testing also included standard versions of Places365, iNaturalist, and ImageNet using pre-trained ResNet-50 models.

Results and Discussion

RC3P demonstrated a 26.25% average reduction in prediction set sizes across imbalanced datasets compared to the standard CCP baseline. On more complex datasets (excluding CIFAR-10), the reduction in set size reached approximately 35%.

Performance comparison of RC3P against CCP and Cluster-CP on various imbalanced datasets.

Key insights from the results include:

  • Efficiency-Coverage Synergy: By being smarter about which labels to consider via rank calibration, RC3P maintains strict 90% class-conditional coverage while discarding uncertain labels that do not contribute to the true label's coverage.
  • Robustness to Imbalance: The method is particularly effective for minority classes because the rank $\widehat{k}(y)$ is calibrated per class, adapting to the specific difficulty the model faces with rare categories.
  • Superiority over Clustering: RC3P outperformed "Cluster-CP" by providing tighter sets without requiring model-dependent clustering assumptions.

Conclusion

RC3P offers a robust solution for efficient class-conditional conformal prediction. While its efficiency gains depend on the underlying classifier's ability to rank labels reasonably well, it provides a significant step forward for practical AI safety. Future research may explore extending this rank-based logic to other conditional settings, such as object-conditional or group-conditional conformal prediction.

Summary updated

BibTeX
@inproceedings{shi2024conformal,
  author = {Yuanjie Shi and Subhankar Ghosh and Taha Belkhouja and Janardhan Rao Doppa and Yan Yan},
  title = {{Conformal Prediction for Class-wise Coverage via Augmented Label Rank Calibration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=T7dS1Ghwwu},
}
Figure