[Paper Review] Using Semantic Information for Defining and Detecting OOD Inputs
This paper proposes a novel OOD detection method that leverages semantic information from training data to define and detect out-of-distribution inputs more effectively. By focusing on semantic content rather than distributional statistics, the approach reduces false alarms and significantly improves detection of OOD inputs with spurious features, achieving state-of-the-art performance on benchmarks including MNIST, COCO, Birds, and CelebA.
As machine learning models continue to achieve impressive performance across different tasks, the importance of effective anomaly detection for such models has increased as well. It is common knowledge that even well-trained models lose their ability to function effectively on out-of-distribution inputs. Thus, out-of-distribution (OOD) detection has received some attention recently. In the vast majority of cases, it uses the distribution estimated by the training dataset for OOD detection. We demonstrate that the current detectors inherit the biases in the training dataset, unfortunately. This is a serious impediment, and can potentially restrict the utility of the trained model. This can render the current OOD detectors impermeable to inputs lying outside the training distribution but with the same semantic information (e.g. training class labels). To remedy this situation, we begin by defining what should ideally be treated as an OOD, by connecting inputs with their semantic information content. We perform OOD detection on semantic information extracted from the training data of MNIST and COCO datasets and show that it not only reduces false alarms but also significantly improves the detection of OOD inputs with spurious features from the training data.
Motivation & Objective
- Address the limitation of existing OOD detectors that inherit biases from training data distributions.
- Reframe OOD detection by defining in-distribution as inputs containing relevant semantic content, regardless of background or spurious features.
- Improve detection of OOD inputs that lack semantic relevance to training classes, even when they share class labels.
- Develop a method that is robust to spurious features like background, color, or texture variations common in real-world data.
- Demonstrate superior performance on OOD detection benchmarks, especially for inputs with semantic deficits despite label overlap.
Proposed method
- Define the intended in-distribution as inputs containing semantic information relevant to training class labels, irrespective of background or spurious features.
- Use semantic segmentation networks (e.g., FPN-ResNet50, Lee et al. 2020) to extract and isolate semantically relevant image regions.
- Apply a two-step segmentation algorithm ($\mathcal{N}_r$) to binarize images, marking central segments as semantically relevant and peripheral ones as irrelevant.
- Compute structural similarity (SSIM) between test images and a reference set of digit images (from Mix-MNIST) to assess semantic match.
- Declare an input OOD if it fails to match any reference digit in the semantic reference set based on SSIM similarity.
- Evaluate detection performance using AUROC and TNR at 95% TPR across multiple benchmarks including Vizwiz, Fashion-MNIST, Birds, and CelebA.

Experimental results
Research questions
- RQ1What constitutes a true OOD input when semantic content is the primary criterion, rather than distributional statistics?
- RQ2How does semantic-based OOD detection compare to distribution-based methods in detecting inputs with spurious features?
- RQ3Can semantic segmentation improve OOD detection on datasets with high spurious feature bias, such as Birds and CelebA?
- RQ4To what extent does the proposed method reduce false positives on inputs that are semantically relevant but distributionally different?
- RQ5How does the method perform on OOD inputs with quality degradation (e.g., blur, darkness) or disjoint class labels?
Key findings
- The proposed method achieves an AUROC of 97.31% on ImageNet and 99.57% on LSUN, outperforming SOTA detectors like ODIN and Mahala.
- On the Vizwiz OOD test set (blurry, dark, obstructed images), the method achieves a TNR of 67.15% at 95% TPR, outperforming ODIN (66.67%) and Mahala (54.16%).
- On Fashion-MNIST OOD inputs (disjoint class labels), the method achieves an AUROC of 84.27%, comparable to Mahala’s 86.03%, and a TNR of 44.67% at 95% TPR, second-best among baselines.
- The method significantly improves detection on OOD inputs with spurious features—such as waterbirds on land or grey-haired males—where existing detectors fail due to training data bias.
- Semantic-based detection reduces false alarms on in-distribution inputs with non-standard backgrounds (e.g., birds on snow), improving model utility in real-world deployment.
- The approach demonstrates robustness across diverse datasets, including MNIST, COCO, Birds, and CelebA, confirming its generalization capability beyond specific architectures or data types.

Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.