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

Efficient Algorithms for Set-Valued Prediction in Multi-Class Classification

Thomas Mortier, Marek Wydmuch, Eyke Hüllermeier, Krzysztof Dembczynski, Willem WaegemanarXiv 2019

Introduction

In standard multi-class classification, models are typically forced to output a single label. However, in high-stakes domains such as medical diagnosis or autonomous navigation, forcing a single choice when uncertainty is high can lead to catastrophic errors. Set-valued prediction offers a robust alternative: instead of a single label, the model returns a subset of candidate classes that likely contains the true label.

The core challenge lies in balancing correctness (ensuring the true class is in the set) with precision (keeping the set size small enough to be useful). While this can be framed as an optimization problem to maximize expected utility, the search space is exponentially large, consisting of $2^K$ possible subsets for $K$ classes. This paper introduces a framework to solve this optimization efficiently, even for "extreme" classification problems.

The SVBOP Framework

The authors propose the Set-Valued Bayes-Optimal Prediction (SVBOP) framework. Their approach relies on two key theoretical insights that reduce the computational complexity of finding the optimal set:

  1. Nested Subsets (Top-$s$ Optimality): The authors prove that for most reasonable utility functions, the optimal set always consists of the top-$s$ classes with the highest conditional probabilities. This reduces the search space from $2^K$ to just $K$ candidate sets.
  2. $(1/x)$-Convexity: By identifying a property called $(1/x)$-convexity in utility functions (such as the $F_\beta$-measure), the authors show that expected utility is unimodal over the ranked list. This allows for an early stopping criterion: once the expected utility begins to decrease as classes are added to the set, the global maximum has been reached.

Algorithmic Implementations

To handle varying scales of classification problems, three versions of the algorithm are proposed:

  • SVBOP-Full: An exact algorithm that sorts all class probabilities to find the optimal prefix. This is suitable for problems with a moderate number of classes.
  • SVBOP-HSG: An approximate version utilizing Hierarchical Navigable Small World (H-NSW) graphs. This is designed for "extreme" classification where computing all $K$ probabilities is computationally infeasible.
  • SVBOP-HF: An approximate version using Hierarchical Factorization (tree-based classifiers) to achieve logarithmic time complexity relative to the number of classes, particularly effective when a natural hierarchy exists.

Empirical Evaluation

The framework was evaluated across a diverse set of benchmarks, ranging from standard image datasets (MNIST, Caltech-256) to extreme classification tasks with over 12,000 classes (LSHTC1, DMOZ).

Key Insights and Results

  • Optimality: SVBOP-Full consistently outperformed traditional baselines, such as fixed top-$k$ predictions or simple thresholding, across all tested utility functions.
  • Scalability: On the LSHTC1 dataset (12k+ classes), SVBOP-HSG achieved a 6x speedup over the exact version while maintaining nearly identical utility scores.
  • Hierarchical Gains: For biological datasets like "Bacteria" (2,631 classes), the tree-based SVBOP-HF was orders of magnitude faster (0.09ms vs 4.61ms per sample) by leveraging the natural taxonomic structure of the data.
  • Utility Selection: The research highlights that "Precision" (discounted accuracy) is often a poor choice for set-valued prediction because it lacks risk-aversion, frequently defaulting to single-label predictions even under high uncertainty.

Conclusion and Future Directions

SVBOP provides a mathematically rigorous and computationally efficient way to "hedge bets" in machine learning. While the framework effectively manages aleatoric uncertainty (noise inherent in the data), it does not explicitly model epistemic uncertainty (uncertainty due to a lack of training data). Future work may explore returning empty sets in cases of extreme epistemic uncertainty, such as out-of-distribution inputs, to signal that the model is entirely unsure.

Summary updated

BibTeX
@misc{mortier2019efficient,
  author = {Thomas Mortier and Marek Wydmuch and Eyke Hüllermeier and Krzysztof Dembczynski and Willem Waegeman},
  title = {{Efficient Algorithms for Set-Valued Prediction in Multi-Class Classification}},
  year = {2019},
  eprint = {1906.08129},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.08129},
}
Figure