NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hierarchical Selective Classification

Shani Goren, Ido Galil, Ran El-Yaniv

In high-stakes fields like medicine or autonomous driving, we cannot afford for AI to be "confident but wrong." Traditional selective classification addresses this by allowing models to abstain from a prediction when uncertainty is high. However, this is often an all-or-nothing choice: either the model predicts a specific leaf class (e.g., "Golden Retriever") or it says nothing at all.

A new paper from researchers at Technion and NVIDIA, titled Hierarchical Selective Classification, argues that we can do better. By leveraging the inherent relationships between classes, they show that models can "retreat" to more general, certain predictions (e.g., "Dog") instead of staying silent, providing valuable information even in the face of uncertainty.

TL;DR

This paper introduces Hierarchical Selective Classification (HSC), a framework that allows models to trade off prediction specificity for certainty by retreating to internal nodes in a class hierarchy. The authors provide novel inference rules, an efficient algorithm for guaranteed accuracy, and a massive empirical study showing that HSC significantly improves both model reliability and confidence calibration.

What Problem Does This Paper Address?

Standard selective classification is binary: predict or reject. This ignores a crucial middle ground. Imagine a medical AI classifying brain tumors. If it cannot distinguish between three specific malignant subtypes, a traditional selective model might simply reject the sample to avoid an error. However, knowing the tumor is malignant is still life-saving information.

The gap is that current models do not effectively use class hierarchies (like WordNet) to manage uncertainty. The authors aim to formalize how a model can "climb" up a hierarchy to find a level of abstraction where it can make a prediction with high confidence, thereby maximizing the information provided to the user while maintaining a target accuracy.

Hierarchical Selective Classification in action.

Methods

The authors introduce several key components to make HSC a reality:

  1. Hierarchical Risk and Coverage: They redefine "risk" as the probability of the predicted node being incorrect (not an ancestor of the true label) and "coverage" as the specificity of the prediction (measured by the information gain or entropy relative to the root).
  2. The Climbing Inference Rule: This is a simple yet effective algorithm. Starting from the most likely leaf node, the model "climbs" the path toward the root until it reaches a node whose confidence (the sum of its leaf descendants' probabilities) exceeds a user-defined threshold $\theta$.
  3. Optimal Threshold Algorithm: Finding the right $\theta$ to hit a specific accuracy target is tricky. The authors propose a novel algorithm inspired by split conformal prediction that finds an optimal threshold on a calibration set, providing high-probability guarantees that the model will meet the target accuracy on unseen data.
  4. Hierarchical RC and CC Curves: They introduce new visualization tools: Hierarchical Risk-Coverage (RC) curves to analyze the trade-off between error and specificity, and Calibration-Coverage (CC) curves to see how retreating up the hierarchy affects the model's "honesty" about its own confidence.
Hierarchical Risk-Coverage curves comparing inference rules.

Datasets and Empirical Study

The researchers conducted a massive empirical study to ensure their findings were robust across architectures:

  • ImageNet-1k: Evaluated over 1,115 different vision models.
  • iNaturalist 2021 (iNat21): A dataset with a deep, naturally occurring biological taxonomy (7 levels), used to test the framework on more complex hierarchies.

Key Insights and Ideas

  • The "Climbing" Advantage: Starting from the most likely leaf and moving up (Climbing) works significantly better than simply picking the most specific node that meets the threshold (Max-Coverage). This is because Climbing respects the model's primary classification intent.
  • CLIP is a Hierarchical Powerhouse: Models trained with Contrastive Language-Image Pretraining (CLIP) showed exceptional hierarchical performance, often improving by over 40% compared to vanilla counterparts. This suggests that learning from text helps models capture semantic relationships between classes more effectively.
  • Knowledge Distillation (KD) Helps: Models trained via KD also performed better in the HSC framework. The "soft" labels used in distillation likely help the model learn the relationships between similar classes.
  • Calibration Synergy: One of the most important findings is that HSC doesn't just reduce risk; it also improves confidence calibration. As models retreat to more general classes, their predicted probabilities become more representative of their actual accuracy.

Key Results

  • Hierarchical Gain: On ImageNet-1k, the Climbing rule achieved a 14.94% hierarchical gain over standard selective classification, meaning it provided significantly more useful information for the same level of risk.
  • Precision in Accuracy: Their threshold algorithm hit target accuracies much more precisely than previous state-of-the-art methods like DARTS. In many cases, DARTS would either fail to meet the accuracy constraint or "over-abstain," resulting in zero coverage, whereas the proposed algorithm maintained tight bounds around the target accuracy.

Limitations and Future Work

While HSC is a significant step forward, the authors note a few areas for improvement:

  • Confidence Functions: The current work relies primarily on softmax-based confidence. Exploring alternative uncertainty estimators (like those from Bayesian networks) could yield even better results.
  • Optimization: The study focused on post-hoc application to pretrained models. A promising future direction is "Hierarchical SelectiveNet"—training models from scratch specifically to optimize the hierarchical risk-coverage trade-off.
  • Hierarchy Source: The method assumes a hierarchy is given (like WordNet). While they mention LLMs can generate these, the impact of "noisy" or "incorrect" hierarchies on HSC performance remains an open question.

Summary updated

BibTeX
@inproceedings{goren2024hierarchical,
  author = {Shani Goren and Ido Galil and Ran El-Yaniv},
  title = {{Hierarchical Selective Classification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=wzof7Y66xs},
}
Figure