Conformity Score Averaging for Classification

Rui Luo, Zhixin ZhouICML 2025

Introduction

In machine learning, we often need more than just a single "best guess" (point prediction); we need a prediction set that is guaranteed to contain the true label with a high probability (e.g., 95%). This is the domain of Conformal Prediction (CP).

The "tightness" or efficiency of these sets depends entirely on the conformity score function used to rank potential labels. Currently, researchers have proposed many different score functions (like THR, APS, or RANK), but choosing the "best" one for a specific dataset is difficult. A sub-optimal choice leads to "lazy" prediction sets that are too large to be useful.

This paper introduces a method to optimally average multiple score functions, using Vapnik–Chervonenkis (VC) theory to prove that we can achieve much tighter prediction sets while still maintaining rigorous mathematical guarantees on coverage.

Methods: Conformal Score Averaging

The authors propose treating the selection of a score function as an optimization problem rather than a static choice.

  1. Weighted Averaging: They define a new score as a linear combination of existing scores: $\langle w, s(x, y) \rangle = \sum w_j s_j(x, y)$.
  2. Weight Optimization: Using a validation set, the algorithm performs a grid search to find the weight vector $w$ that minimizes the average size of the resulting prediction sets.
  3. Data Splitting Strategies: The paper explores four ways to partition data to balance "validity" (guaranteed coverage) and "efficiency" (small sets):
  4. VFCP (Validity First): Strictly separates data to ensure the most robust coverage guarantees.
  5. EFCP (Efficiency First): Uses more data for weight optimization, requiring stronger assumptions for its guarantees.
  6. DLCP/DLCP+ (Data Leakage): Innovative methods that utilize test-set features to further squeeze out efficiency.
Data splitting and weight optimization pipeline.
  1. Theoretical Framework: They use VC Theory to provide a formal proof that the "selection bias" introduced by picking the best weights doesn't break the coverage guarantees, provided the calibration set is sufficiently large.

Key Insights

  • Ensemble Thinking for Uncertainty: Just as ensemble models (like Random Forests) usually outperform single models, "ensemble scores" outperform single conformity scores. By averaging, the method can leverage the strengths of different scoring philosophies (e.g., one that looks at raw probabilities vs. one that looks at label rankings).
  • The "Free Lunch" of VC Theory: The authors show that we can optimize weights over a continuous space without losing the finite-sample coverage guarantee. The "cost" of this optimization is a negligible term that disappears as the dataset grows.
  • Adaptability: The method naturally assigns higher weights to the most effective scores for a given task. For "easy" tasks like CIFAR-10, it might favor simple thresholding (THR), while for complex tasks like CIFAR-100, it leans on more sophisticated adaptive scores (APS).

Key Results

The method was evaluated on standard computer vision benchmarks (CIFAR-10, CIFAR-100, MNIST, ImageNet-Val) across various architectures (ResNet-50, VGG16, ShuffleNetV2).

  • Smaller Sets, Same Coverage: On CIFAR-100 with a 99% coverage requirement ($\alpha=0.01$), the weighted approach (VFCP) produced prediction sets with an average size of 13.78, compared to 40.21 for the popular APS method and 26.94 for THR.
  • Consistency: Across all tested values of $\alpha$ (0.01 to 0.05), the weighted method consistently sat at the bottom of the "Size vs. Coverage" graphs, meaning it provided the tightest sets for any given level of reliability.
Size vs. Coverage on CIFAR-10 and CIFAR-100.
  • Model Agnostic: The performance gains held true regardless of whether the underlying classifier was a ResNet, VGG, or MobileNet.

Limitations and Future Work

  • Regression Complexity: While the theory works beautifully for classification (discrete labels), extending this to regression (continuous outputs) is harder. The "union bound" logic used in their proofs doesn't directly apply to infinite sets of possible outcomes.
  • Optimization Scalability: The current implementation uses a grid search for weights. While fine for 3-5 score functions, this becomes computationally expensive as the number of scores increases. Future iterations may move toward gradient-based optimization or differentiable conformal objectives.
  • Computational Overhead: Finding the optimal weights adds an extra step to the calibration pipeline, which might be a hurdle for real-time systems with very limited compute.

Summary updated

BibTeX
@inproceedings{luo2025conformity,
  author = {Rui Luo and Zhixin Zhou},
  title = {{Conformity Score Averaging for Classification}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=Pvfd7NiUS6},
}
Figure