Robust Conformal Prediction for Infrequent Classes

Jens-Michalis Papaioannou, Sebastian Jäger, Alexei Figueroa, David Stutz, Betty van Aken, Keno Bressem, Wolfgang Nejdl, Felix Gers, Alexander Löser, Felix Biessmann

TL;DR

This paper tackles the challenge of reliable uncertainty estimation in classification tasks with many rare classes, a common problem in fields like medical diagnosis. They introduce "Dynamically Grouped Conformal Prediction" (DGCP), a method that intelligently groups similar rare classes using domain knowledge to ensure accurate predictions, even when data is scarce. This approach significantly improves the trustworthiness of AI in critical applications.

What Problem Does This Paper Address?

Many real-world classification problems, especially in healthcare, involve a vast number of possible labels (classes), with most of them being very rare. This "long-tail" distribution makes it incredibly difficult for standard machine learning models to provide reliable uncertainty estimates for these infrequent classes. Conformal Prediction (CP) is a powerful technique that offers formal guarantees on prediction coverage (i.e., the true label will be in the predicted set with a certain probability). However, traditional class-conditional CP struggles when there's very little data for a specific class, leading to unreliable predictions. The authors aim to bridge this gap by developing a method that can provide robust uncertainty guarantees even for these underrepresented classes.

Methods

The core of the paper is the proposed Dynamically Grouped Conformal Prediction (DGCP) method. It's a post-hoc, model-agnostic approach that builds upon standard Conformal Prediction. The key innovation lies in how it handles classes with insufficient data for calibration.

Here's how it works:

  • Hyperparameter m: A threshold m is introduced, defining the minimum number of calibration samples required for a class to be considered "sufficiently represented."
  • Conditional Calibration: If a class has m or more calibration samples, standard class-conditional CP is applied, providing strong guarantees for that specific class.
  • Dynamic Grouping: If a class has fewer than m samples, DGCP uses domain knowledge (like medical taxonomies or label hierarchies) to group it with semantically related classes. This creates a "group" for which a shared prediction threshold is estimated.
  • Group-Conditional Guarantees: The method then provides group-conditional guarantees for these grouped classes. This is a weaker guarantee than class-conditional but significantly better than having no reliable guarantee at all.

This approach allows DGCP to maintain fine-grained class-level guarantees where data is sufficient, while still ensuring valid coverage for rare classes through informed grouping.

Datasets

The authors evaluate their method on three clinical datasets derived from the MIMIC (Medical Information Mart for Intensive Care) database:

  • MIMIC-III (CCSR): Contains approximately 4,000 records with 356 classes.
  • MIMIC-IV (CCSR): Contains approximately 44,000 records with 423 classes.
  • MIMIC-IV (ICD): Contains approximately 44,000 records with 1,054 classes.

These datasets are used for outcome diagnosis prediction, a task characterized by a large and imbalanced label space. The paper also mentions using two medical taxonomies: ICD-10 and CCSR (Clinical Classifications Software Refined).

Key Insights and Ideas

  • Domain knowledge is crucial for rare classes: The paper strongly emphasizes that leveraging existing domain knowledge (like hierarchical structures in medical diagnoses) is essential for improving uncertainty estimation in low-data regimes.
  • A pragmatic trade-off: DGCP offers a smart compromise: it preserves strong class-level guarantees where possible but intelligently groups rare classes to provide some reliable guarantee, rather than none.
  • Robustness to hyperparameters: The method shows robustness to the choice of the m hyperparameter, suggesting it's not overly sensitive to fine-tuning.
  • Clinical relevance: The findings are particularly impactful for clinical applications, where misdiagnoses due to unreliable uncertainty can have severe consequences.

Key Results

  • Improved Class-Conditional Coverage: DGCP consistently improves class-conditional coverage for infrequent diagnoses compared to standard class-conditional CP, with improvements ranging from 1.7x to 2.9x.
  • Comparable to Class-Conditional CP for Frequent Classes: When classes have sufficient data (≥ m samples), DGCP performs comparably to standard class-conditional CP.
  • Trade-off with Prediction Set Size: The improvement in coverage for rare classes comes with a slight increase in prediction set sizes, highlighting the inherent trade-off between efficiency and reliability.
  • DGCP|Body System Outperforms: The DGCP variant that uses "body system" as a grouping mechanism (DGCP|Body System) consistently achieved the best macro coverage across datasets.
  • Non-conformal methods are good but lack guarantees: Adaptive top-k methods showed strong empirical performance but, crucially, lack formal coverage guarantees, making them less suitable for safety-critical applications.

Limitations and Future Work

  • Prediction Set Efficiency: While the focus is on coverage, the paper acknowledges that optimizing prediction set efficiency (making them smaller) is an important aspect for future work.
  • Alternative Metrics: Exploring other metrics like F1-score in conjunction with conformal prediction is suggested for future research.
  • Domain Knowledge Availability: The effectiveness of DGCP relies on the availability of suitable domain knowledge for grouping. In domains lacking such structures, alternative data-driven grouping methods might be necessary.

Summary updated

BibTeX
@article{papaioannou2025robust,
  author = {Jens-Michalis Papaioannou and Sebastian Jäger and Alexei Figueroa and David Stutz and Betty van Aken and Keno Bressem and Wolfgang Nejdl and Felix Gers and Alexander Löser and Felix Biessmann},
  title = {{Robust Conformal Prediction for Infrequent Classes}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=nJ4p8rh3Ig},
}
Figure