# Fine-grain Inference on Out-of-Distribution Data with Hierarchical Classification

**Authors:** Randolph Linderman, Jingyang Zhang, Nathan Inkawhich, Hai Li, Yiran Chen  
**arXiv:** [2209.04493](https://arxiv.org/abs/2209.04493)  
**Date:** 2022-09-09  
**Summary page:** https://www.summarizepaper.com/en/paper/2209.04493v1/

## Key points

- Machine learning models must be able to make appropriate decisions in real-world environments, even when faced with out-of-distribution (OOD) samples.
- Current approaches that simply detect OOD examples and alert the user provide little information and are not interpretable or explainable when the OOD sample significantly overlaps with the training data.
- A new model for OOD detection is proposed in this study that makes predictions at varying levels of granularity as inputs become more ambiguous.
- The model's predictions become coarser and more conservative as uncertainty increases.
- Hierarchical classifiers are used for both fine- and coarse-grained OOD tasks, improving interpretability and explainability of their predictions.
- Poor OOD detection performance on fine-grain datasets has been identified in recent works, emphasizing the importance of OOD granularity.
- This study proposes a novel approach to improve machine learning models' ability to handle out-of-distribution samples by making predictions at varying levels of granularity based on input ambiguity.
- This method enhances interpretability and explainability while also improving overall performance on both fine- and coarse-grained tasks.
- Future studies can explore utilizing improved feature extractors or leveraging hierarchical transformers to further enhance these models' capabilities for better OOD detection results.

## Summary

Machine learning models must be able to make appropriate decisions in real-world environments, even when faced with out-of-distribution (OOD) samples. However, current approaches that simply detect OOD examples and alert the user provide little information and are not interpretable or explainable when the OOD sample significantly overlaps with the training data. To address this issue, a new model for OOD detection is proposed in this study that makes predictions at varying levels of granularity as inputs become more ambiguous. The model's predictions become coarser and more conservative as uncertainty increases. For instance, if an animal classifier encounters an unknown bird species and a car, it recognizes that its uncertainty over the particular species is too large and predicts bird instead of detecting it as OOD. Furthermore, classifiers' performance is diagnosed at each level of hierarchy to improve interpretability and explainability of their predictions. The effectiveness of hierarchical classifiers for both fine- and coarse-grained OOD tasks is demonstrated in this study. Several recent works have identified poor OOD detection performance on fine-grain datasets with current methods. These works emphasize the importance of OOD granularity, especially when developing new methods to address fine-grained OOD detection. In conclusion, this study proposes a novel approach to improve machine learning models' ability to handle out-of-distribution samples by making predictions at varying levels of granularity based on input ambiguity. This method enhances interpretability and explainability while also improving overall performance on both fine- and coarse-grained tasks. Future studies can explore utilizing improved feature extractors or leveraging hierarchical transformers to further enhance these models' capabilities for better OOD detection results.
