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

Conformal prediction (CP) is an emerging uncertainty quantification framework that allows us to construct a prediction set to cover the true label with a pre-specified marginal or conditional probability. Although the valid coverage guarantee has been extensively studied for classification problems, CP often produces large prediction sets which may not be practically useful. This issue is exacerbated for the setting of class-conditional coverage on imbalanced classification tasks with many and/or imbalanced classes. This paper proposes the Rank Calibrated Class-conditional CP (RC3P) algorithm to reduce the prediction set sizes to achieve class-conditional coverage, where the valid coverage holds for each class. In contrast to the standard class-conditional CP (CCP) method that uniformly thresholds the class-wise conformity score for each class, the augmented label rank calibration step allows RC3P to selectively iterate this class-wise thresholding subroutine only for a subset of classes whose class-wise top-k error is small. We prove that agnostic to the classifier and data distribution, RC3P achieves class-wise coverage. We also show that RC3P reduces the size of prediction sets compared to the CCP method. Comprehensive experiments on multiple real-world datasets demonstrate that RC3P achieves class-wise coverage and 26.25% reduction in prediction set sizes on average.

Paper

References (70)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer 2LUb6/10 · confidence 5/52024-07-08

Summary

This paper introduces the Rank Calibrated Class-conditional Conformal Prediction (RC3P) algorithm, designed to address the issue of large prediction sets in conformal prediction (CP), especially in imbalanced classification tasks. The RC3P algorithm enhances class-conditional coverage by selectively applying class-wise thresholding based on a label rank calibration strategy. This method reduces the size of prediction sets compared to the standard class-conditional CP (CCP) method while maintaining valid class-wise coverage. The authors demonstrate that RC3P achieves significant reductions in prediction set sizes across multiple real-world datasets.

Strengths

1) The introduction of a rank calibration strategy to the class-conditional CP framework is a novel contribution. It offers a practical solution to the challenge of large prediction sets in CP, especially for imbalanced datasets. 2) The paper provides comprehensive experimental results across various datasets and imbalance types, showing a significant reduction in prediction set sizes while maintaining valid class-wise coverage. 3) The authors provide rigorous theoretical guarantees for the class-wise coverage and improved predictive efficiency of the RC3P algorithm, demonstrating its robustness and general applicability. 4) The paper is well-structured and clearly written, with detailed explanations of the algorithm, theoretical analyses, and experimental setups.

Weaknesses

1) While the paper provides theoretical guarantees for coverage, the theoretical analysis of the predictive efficiency could be expanded. Specifically, a deeper exploration of the conditions under which RC3P outperforms CCP in terms of predictive efficiency would strengthen the paper. 2) Although the experiments are thorough, additional experiments on more diverse and larger-scale datasets could further validate the generalizability of the RC3P method. 3) One additional comment is to verify the predictive efficiency using approximate conditional coverage metrics suggested in the literature, for example, by "Cauchois, M., Gupta, S., and Duchi, J. (2021). Knowing what you know: valid and validated confidence sets in multiclass and multilabel prediction. Journal of Machine Learning Research, 22(81):1–42" to ensure that approximate conditional coverage is not negatively impacted.

Questions

1) Can the authors provide more details on the computational complexity of the RC3P algorithm compared to the CCP and Cluster-CP methods? 2) How does the RC3P algorithm perform on larger and more diverse datasets beyond the ones tested in this paper?

Rating

6

Confidence

5

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes

Reviewer vcMw6/10 · confidence 3/52024-07-11

Summary

This paper introduces the Rank Calibrated Class-conditional CP (RC3P) algorithm, which reduces prediction set sizes while ensuring valid class-conditional coverage by selectively applying class-wise thresholding. The RC3P algorithm achieves class-wise coverage regardless of the classifier and data distribution, and show improvement empirically.

Strengths

The idea is simple but effective, supported by solid theoretical and empirical evidence.

Weaknesses

- Some notions, especially the Y and y, are confusing. Similarly, k is for label class, $\hat{k}(y)$ is for a different notion of label rank, but both uses k. - More extra illustrations may be helpful for understanding. For example, regarding the tony example in para 1 of section 4, try give a concrete figure example. Also, give a table of important dataset statistics, e.g., total sample size, number of class, imbalance rate.

Questions

- For fairness evaluation, especially for many classes, what's the worst under coverage ratio? Only the mean is provided.

Rating

6

Confidence

3

Soundness

3

Presentation

2

Contribution

3

Limitations

Yes

Reviewer Bzsm6/10 · confidence 4/52024-07-13

Summary

This paper aims to reduce the prediction set sizes of conformal predictors while achieving class-conditional coverage. The authors identify that class-wise conformal prediction (CCP) scans all labels uniformly, resulting in large prediction sets. To address this issue, they propose Rank Calibrated Class-conditional Conformal Prediction (RC3P), which augments the label rank calibration strategy within CCP. Theoretical analysis and experimental results demonstrate that RC3P outperforms CCP.

Strengths

1. The proposed method is well-motivated, and the paper is easy to follow. The authors find that CCP scans all labels uniformly, resulting in large prediction sets. 2. The proposed method introduces a novel conformal predictor for class-conditional coverage, achieving smaller set sizes than other classical methods on imbalanced datasets.

Weaknesses

1. The proposed methods and experiments appear logically incoherent. The authors provide an explanation for the large prediction sets of CCP, but the interesting conclusion is not related to imbalanced data. Why do the authors only consider imbalanced datasets? Additionally, could the authors report the performance of different methods on balanced data? 2. The datasets used in the experiments are small, which is impractical for real-world applications. As shown in Section 5, the number of classes in the four datasets is fewer than 101. Moreover, Cluster-CP was proposed for datasets with many classes, so it may be unfair to compare these methods only on small-scale datasets. Furthermore, the classical method THR[1] should be considered in the experiments. 3. The contribution of Lemma 4.2 is limited. The assumption in Lemma 4.2 is very strong, which can directly infer the final results. [1] Mauricio Sadinle, Jing Lei, and Larry Wasserman. Least ambiguous set-valued classifiers with bounded error levels. Journal of the American Statistical Association

Questions

- What is the ratio of training set, calibration set and test set? Does RC3P still outperform other methods when the size of calibration set is small? I think an ablation experiment about the size of calibration set is better. - How do you control the UCR of RC3P? Please provide some details.

Rating

6

Confidence

4

Soundness

2

Presentation

3

Contribution

2

Limitations

They are adequately discussed.

Reviewer yaTg4/10 · confidence 3/52024-07-13

Summary

The paper proposes a new algorithm called Rank Calibrated Class-conditional CP (RC3P) that augments the label rank calibration to conformal classification calibration step. It theoretically proves it

Strengths

- Overall, the idea is clearly presented, and the motivation behind the problem—improving efficiency in CCP for imbalanced data—is compelling. - The idea of only using top-k classes in the conformal calibration is intuitive. - The experimental results are adequate, covering different datasets/settings.

Weaknesses

- R3CP heavily relies on the ranking of candidate class labels. If the classifier's ranking is not reliable, the result could be more conservative. - Lemma 4.2 is not very convincing, since the assumption is basically the conclusion itself. Theorem 4.3 tries to give a condition on when Lemma 4.2 holds, but it is still not very informative. It's not clear to me that R3CP is better than CCP.

Questions

In the simulation result, you "set the UCR of RC3P the same as or smaller (more restrictive) than that of other methods under 0.16 on CIFAR-10 and 0.03 on other datasets". I though UCR is a metric and why would you be able to do that.

Rating

4

Confidence

3

Soundness

3

Presentation

3

Contribution

2

Limitations

See above.

Reviewer Bzsm2024-08-11

Response

Thank you for your response. I still have concerns about the controlled UCR. I think tunning the $g$ on the calibration data breaks the basic assumption of CP, i.e., exchangeability. Tunning the hyper-parameters on fresh/hold-out data is reasonable.

Authorsrebuttal2024-08-13

**FQ1: “I think tunning the $g$ on the calibration data breaks the basic assumption of CP, i.e., exchangeability. Tunning the hyper-parameters on fresh/hold-out data is reasonable.”** FA1: Thank you for your feedback. In the following response, we (1) clarify that tuning the $g$ will not violate the exchangeability assumption. (2) elaborate our experiment setting and show additional experimental results, where RC3P significantly outperforms the best baseline with $30.627\\%$ (four datasets) or $40.8\\%$ (excluding CIFAR-10) reduction in APSS ($\downarrow$ better). It is similar to the improvements of RC3P that we report in our main paper ($26.25\\%$ (four datasets) or $35\\%$ (excluding CIFAR-10) reduction). (3) explain that limited calibration samples may result in inaccurate quantile and thus inaccurate coverage/efficiency measures. (4) elaborate the experiment where RC3P still outperforms baselines without tuning $g$ in Table 7 of rebuttal PDF. Conditioned on similar APSS of all methods, RC3P significantly outperforms the best baselines with $35.18\\%$ reduction in UCG on average. **(1) Adding inflation on calibration dataset will not violate the exchangeability assumption**: The exchangeability is defined [fr1] by the invariance of the joint distribution of the variables $\\{ Z_1, \cdots, Z_n\\}$ to every permutation $\pi$ for $\\{1,…,n\\}$, i.e., $P(Z_1, …, Z_n) \\overset{d}{=} P(Z_{\pi(1)}, …, Z_{\pi(n)})$. The exchangeability is the property of distribution. In our experiments, adding inflation on nominal coverage is an algorithm design and will not change the data distribution, where calibration and testing datasets still consist of i.i.d. samples form the same distribution. The same algorithm design (i.e., inflating the coverage during calibration) is applied in previous CP papers, such as ARCP (see Theorem 2, Equation 8 in [fr2]) that uses an inflated nominal coverage. **(2) New experiment on hold-out data for tuning $g$: RC3P achieves the same level of improvement in the reduction of APSS ($30.627\\% \downarrow$ from the best baseline).** Below we report the experiments where $g$ is tuned on hold-out samples on four datasets with the APS scoring function and imbalance EXP, 0.1. We first split calibration dataset into calibration and hold-out samples (50-50 split), where hold-out samples are used to tune $g$ and calibration samples are used to compute class-wise quantiles. UCR is controlled to $\leq 0.10$ on CIFAR-10 and $0.08$ on other datasets. |Dataset|CIFAR-10|CIFAR-100| mini-ImageNet|FOOD-101| |-|-|-|-|-| |\# hold-out samples per class| 250 |25 |75|62 | |CCP| 1.940 $\pm$ 0.020 | 38.937 $\pm$ 0.335 | 32.249 $\pm$ 0.419 |33.253 $\pm$ 0.367| |Cluster-CP| 2.212$\pm$ 0.019 |34.125 $\pm$ 0.990 | 36.372 $\pm$0.270 | 40.762 $\pm$ 0.343| |RC3P| 1.940$\pm$ 0.020 |19.668 $\pm$ 0.005 |17.736 $\pm$ 0.002 |21.565 $\pm$ 0.007| These results shows that RC3P significantly outperforms the best baseline with $30.627\\%$ (four datasets) or $40.8\\%$ (excluding CIFAR-10) reduction in APSS ($\downarrow$ better). Similar order of improvements of RC3P can be found in our main paper ($26.25\\%$ on four datasets or $35\\%$ excluding CIFAR-10 APSS reduction from the best baseline, Table 1). **(3) Limited calibration samples may result in inaccurate quantile and thus inaccurate coverage/efficiency measures**: There are few training data samples for the tail classes and a limited number of calibration samples (e.g., 50 calibration samples of each class in CIFAR-100, see A5 for Q5) in our setting. If we split the calibration datasets into calibration and hold-out samples, the limited samples may cause inaccurate class-wise quantiles compared to the true quantiles, and thus inaccurate coverage and efficiency measures. In practice, our experiment in the main paper used as many samples as possible for calibration. For instance, comparing the results in the above table with Table 1 in our main paper, there are minor perturbations in APSS measures. **(4) Without tuning $g$, RC3P still outperforms than baselines ($35.18\\%$ reduction in UCG on average)**: We add the experiments without controlling UCR in Experiment (1) of GR1 (Table 7 in PDF) under the same setting with the main paper. The model is trained from scratch using LDAM [fr3]. UCR is not controlled. We then use the total under coverage gap (UCG, $\downarrow$ better) between class conditional coverage and target coverage $1-\alpha$ of all under-covered classes. We choose UCG as the fine-grained metric to differentiate the coverage performance in our experiment setting. Conditioned on similar APSS of all methods, RC3P significantly outperforms the best baselines with $35.18\\%$ reduction in UCG on average. [fr1] Shafer, G. and Vovk, V., 2008. A tutorial on conformal prediction [fr2] Gendler et al., 2021. Adversarially robust conformal prediction [fr3] Cao et al, 2019. Learning imbalanced datasets with label-distribution-aware margin loss

Reviewer Bzsm2024-08-13

Thank the authors for the detailed response. Most of my concerns have been addressed. I have increased my score to 6. Moreover, in Table 1 of the manuscript, how do you choose the number of clusters for Cluster-CP?(I cannot find this experiment setting in the manuscript.) In the original paper on Cluster-CP, the number of clusters is determined by hold-out data.

Authorsrebuttal2024-08-13

Cluster CP experimental setting

Thanks for your feedback and questions. We employed the Cluster-CP code from the authors and the same methodology to choose the number of clusters.

Reviewer 2LUb2024-08-12

I thank the authors for the detailed response. i maintain my positive score of weak accept.

Area Chair 9TTc2024-08-12

Author-Reviewer Discussion Phase

Dear Authors and Reviewers! Thank you for your reviews, rebuttal, additional comments, questions and responses! We have the last two days of the discussion phase! Please use this time as efficiently as possible :) The submission is borderline. The authors have made an effort to address all the issues raised in your comments. @Reviewers: Please read each other's reviews, the authors' rebuttal, and the discussion. Please acknowledge the authors' efforts and actively participate in the final discussion! Thank you, NeurIPS 2024 Area Chair

Reviewer yaTg2024-08-12

Thank you for the detailed rebuttal. I acknowledge that I have read it and it addresses most of my concerns. I'll maintain my score for now.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC