Trustworthy Classification through Rank-Based Conformal Prediction Sets

Rui Luo, Zhixin ZhouarXiv 2024 · DOI

Introduction

Modern deep learning classifiers frequently suffer from overconfidence. While they may achieve high accuracy, their softmax outputs often fail to represent true posterior probabilities. This miscalibration poses a significant challenge for safety-critical applications where understanding model uncertainty is paramount.

Conformal Prediction (CP) offers a solution by generating prediction sets that are guaranteed to contain the true label with a specified probability (e.g., 90%). However, traditional CP methods like Threshold-based (THR) or Adaptive Prediction Set (APS) can produce overly large or inconsistent sets when models are poorly calibrated. This paper introduces RANK, a novel CP framework that prioritizes the rank of labels over their raw probability scores to provide more reliable uncertainty quantification.

The RANK Method

The core intuition behind RANK is that while a model's absolute probability estimates might be skewed, its ability to correctly order labels is typically more robust. For example, a model might incorrectly estimate an 85% probability for a class, but it is much more likely to correctly identify that class as the "1st most likely" option.

The RANK algorithm operates in two primary stages:

  1. Rank-Based Scoring: It determines the rank of the true label across a calibration dataset to establish a baseline for expected performance.
  2. Two-Step Thresholding with Tie-Breaking: To achieve a target coverage of $1-\alpha$, the method identifies a rank threshold $r^*_\alpha$. To further refine the prediction set and minimize its size, a secondary tie-breaking step uses the probability values of the "borderline" rank to decide its inclusion.
The RANK method utilizes the distribution of true class ranks (left) and applies a secondary probability-based threshold (right) to refine prediction sets through tie-breaking.

This approach ensures that the resulting sets are not only mathematically sound but also as compact as possible, bypassing the need for complex recalibration techniques like temperature scaling.

Evaluation and Key Results

The researchers benchmarked RANK against standard CP methods across diverse domains, including computer vision (MNIST, CIFAR) and Natural Language Processing (MMLU, AG News, 20 Newsgroups).

A key finding is that RANK consistently produces smaller, more efficient prediction sets. For instance, on the CIFAR-10 dataset, RANK achieved 90% coverage with an average set size of 0.92, outperforming the APS method which averaged a size of 1.00.

Distribution of true class ranks for the CIFAR-10 dataset, where the high frequency of rank 1 predictions allows the RANK method to maintain very small set sizes.

Beyond set size, RANK demonstrated superior consistency through the Size-Stratified Coverage Violation (SSCV) metric. This indicates that RANK provides reliable coverage regardless of whether the model is certain (small set) or uncertain (large set) about a specific input. The method also proved highly effective for Large Language Models (LLMs) on the MMLU benchmark, offering tighter uncertainty bounds for multiple-choice question answering.

Conclusion and Future Directions

RANK represents a significant step toward more trustworthy machine learning by leveraging the inherent stability of label rankings. By "conformalizing" rank rather than probability, the authors provide a method that is robust to miscalibration and highly efficient in its output.

While RANK excels in many scenarios, the authors note challenges in high-cardinality datasets with hundreds of classes, where rank distributions become more dispersed. Future work aims to hybridize RANK with tail-probability minimization techniques (like RAPS) and extend the framework to multi-label classification tasks where multiple categories can be correct simultaneously.

Summary updated

BibTeX
@misc{luo2024trustworthy,
  author = {Rui Luo and Zhixin Zhou},
  title = {{Trustworthy Classification through Rank-Based Conformal Prediction Sets}},
  year = {2024},
  eprint = {2407.04407},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.04407},
}
Figure