Introduction
Traditional deep learning models typically treat Out-of-Distribution (OOD) detection as a binary task: a sample is either recognized as one of the training classes (In-Distribution, ID) or rejected as "unknown." However, this binary approach ignores the semantic relationships between OOD samples and known categories. For instance, an autonomous vehicle should ideally recognize an unseen unicycle as a "slow-moving vehicle" rather than just an generic unknown object.
ProHOC (Probabilistic Hierarchical OOD Classification) addresses this by leveraging class hierarchies to provide more informative labels. Instead of a binary flag, it classifies unseen objects into their most specific known parent category within a hierarchy.
Methodology
ProHOC introduces a framework to predict OOD data to correct internal nodes without requiring OOD data during training. It relies on three core pillars:
- Multi-Depth Networks: Rather than a single flat classifier, ProHOC utilizes separate networks for every depth level of the class hierarchy. Shallow networks learn broad, robust features (e.g., general animal shapes), while deeper networks focus on fine-grained details.
- Probabilistic Hierarchy Framework: The model factorizes the probability of a sample belonging to any node. To account for OOD samples, virtual OOD child nodes are attached to every internal node.
- Uncertainty-Based Scoring: Since OOD data is unavailable at training time, ProHOC estimates OOD probability using entropy (measuring uncertainty among child classes) and complementary probability (the sum of probabilities for classes outside the current branch).
- Inference via Expected Distance: ProHOC selects the node that minimizes the expected hierarchical distance. This "retreat" strategy makes the model cautious; if it is uncertain about a specific breed, it predicts a parent node (e.g., "Dog") to avoid the high penalty of a precise but incorrect leaf-level guess.
Experimental Evaluation
The authors evaluated ProHOC on three datasets with distinct hierarchies: FGVC-Aircraft (shallow), iNaturalist19 (deep biological taxonomy), and SimpleHierImageNet (a visually-aligned reorganization of tieredImageNet).
Key Results
ProHOC consistently outperformed the previous state-of-the-art, the Hierarchical Softmax Classifier (HSC), across multiple metrics. Notably, it achieved significant improvements in Mixed Balanced Accuracy (MixBAcc) and Balanced Mean Hierarchical Distance (BMHD), which measures how close a prediction is to the ground truth within the tree.
On the complex iNaturalist19 dataset, ProHOC achieved a MixBAcc of 46.7%, a substantial jump from HSC’s 38.2%. Furthermore, when presented with completely unrelated data (e.g., showing a bird to an aircraft model), ProHOC correctly pushed predictions to the "Root" node with high reliability.
Conclusion and Insights
A primary insight of this work is that high-level models are inherently more OOD-robust than leaf-level models. A general "Dog" detector can still identify a new breed as a dog, whereas a specific "Bulldog" detector simply sees "not a Bulldog." By formalizing this intuition into a probabilistic framework that requires no new hyperparameters or OOD training data, ProHOC provides a scalable and effective solution for more informative OOD detection in real-world hierarchical classification tasks.
Summary updated