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

ProHOC: Probabilistic Hierarchical Out-of-Distribution Classification via Multi-Depth Networks

Erik Wallin, Fredrik Kahl, Lars Hammarstrand · DOI

TL;DR

ProHOC (Probabilistic Hierarchical OOD Classification) moves beyond binary "In-Distribution vs. Out-of-Distribution" detection by placing OOD samples at their most appropriate level in a class hierarchy. By leveraging networks trained at multiple depths, the framework can informatively label an unknown object as a "Dog" or "Cat" even if it doesn't recognize the specific breed.

What Problem Does This Paper Address?

In traditional deep learning, Out-of-Distribution (OOD) detection is a binary "gatekeeper" task: a sample is either known (In-Distribution, ID) or unknown (OOD). This approach ignores semantic nuance. For an autonomous vehicle, misclassifying a unicycle as a bicycle is bad, but simply labeling it "OOD" is unhelpful. Ideally, the system should recognize it as a "slow-moving vehicle"—a higher-level category in the hierarchy.

Hierarchical classification of In-Distribution (ID) and Out-of-Distribution (OOD) samples within a taxonomy.

Existing hierarchical classification methods often focus only on ID data or rely on complex, manually-tuned thresholds at every node to decide when to stop "descending" the tree. ProHOC aims to provide a fully probabilistic, threshold-free framework that handles both ID and OOD samples gracefully within a predefined taxonomy.

Methods

The core of ProHOC is a probabilistic hierarchy framework that factorizes the probability of a sample belonging to any node in a tree.

  1. Multi-Depth Networks: Instead of a single "flat" classifier, the authors train separate neural networks for every depth level of the hierarchy. The intuition is that high-level networks learn broad, robust features (e.g., "has wings"), while leaf-level networks focus on fine-grained details (e.g., "specific feather pattern").
The multi-depth network architecture models probabilities $p(c|x; \theta_d)$ independently at each depth $d$.
  1. Modeling the "None of the Above": Since no OOD data is available during training, the authors use two proxies for OOD-ness at each internal node:
  2. Complementary Probability: The probability that a sample belongs to none of the known child nodes.
  3. Entropy: High entropy among child nodes indicates the model is confused, suggesting the sample might be OOD relative to those specific children.
  4. Inference via Expected Distance: Rather than just picking the node with the highest probability (argmax), ProHOC selects the node that minimizes the expected hierarchical distance. This "hedges" the prediction, favoring a safe internal node if the model is uncertain about specific leaf classes.

Datasets

The authors evaluated ProHOC on three datasets with predefined hierarchies:

  • FGVC-Aircraft: A shallow 3-level hierarchy of airplane manufacturers, families, and variants.
  • iNaturalist19: A deep 6-level taxonomic hierarchy of biological species.
  • SimpleHierImageNet: A newly introduced benchmark derived from tieredImageNet. The authors reorganized the original WordNet-based hierarchy to ensure that "sibling" classes share visual similarities, making it a more realistic testbed for computer vision.

Key Insights and Ideas

  • High-Level Models are OOD Experts: A surprising finding is that networks trained on broad categories (e.g., "Bird") are significantly more accurate at classifying OOD samples into those categories than "leaf-level" models are when you sum up their predictions. Leaf models often overfit to specific features that OOD samples lack, leading to erratic behavior.
  • The Power of "Averaging" in Trees: Minimizing expected hierarchical distance consistently outperforms simple argmax. It naturally pushes uncertain predictions "up" the tree to more general, but correct, parent nodes.
  • Threshold-Free Robustness: Unlike previous state-of-the-art methods like HSC, ProHOC doesn't require OOD validation data to set sensitive per-node thresholds, making it much easier to deploy in real-world settings.

Key Results

ProHOC consistently outperformed baselines across all metrics, particularly in Balanced Mean Hierarchical Distance (BMHD), which measures how many "steps" the prediction is from the ground truth in the tree.

  • iNaturalist19: ProHOC achieved a balanced accuracy (MixBAcc) of 46.7% compared to the previous best (HSC) at 38.2%.
  • FGVC-Aircraft: ProHOC reached 50.3% MixBAcc, while the standard leaf-only model managed only 42.3% (largely because it couldn't predict internal nodes at all).
  • Qualitative Success: In the supplementary material, the authors show that ProHOC correctly identifies "Boeing 737-500" (an OOD variant) as a "Boeing 737" (the parent node), whereas it struggles with "Game Equipment" because that category is visually diverse (cluttered images of balls, people, and fields).

Limitations and Future Work

The primary limitation is the Visual Similarity Assumption. ProHOC assumes that the class hierarchy reflects observable visual features. If a hierarchy is purely conceptual (e.g., grouping "analog clock" and "digital clock" under "timepiece"), the high-level networks will struggle to find common features to identify OOD members of that group.

Future work could explore more advanced "backbones" (the authors showed promising results with DINOv2 in the appendix) or look into weight-sharing between the multi-depth networks to reduce the computational footprint of training multiple models.

Summary updated

BibTeX
@inproceedings{wallin2025prohoc,
  author = {Erik Wallin and Fredrik Kahl and Lars Hammarstrand},
  title = {{ProHOC: Probabilistic Hierarchical Out-of-Distribution Classification via Multi-Depth Networks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01919},
}
Figure