TL;DR
This paper introduces the first unsupervised framework to explain the decisions of black-box Out-of-Distribution (OOD) detectors using high-level, human-understandable concepts. By defining new metrics for detection completeness and concept separability, the authors demonstrate that concepts optimized solely for standard classification fail to explain OOD behavior, whereas their joint optimization framework successfully uncovers why a detector flags or misses anomalous inputs.
What Problem Does This Paper Address?
Deep neural networks (DNNs) are notoriously overconfident when encountering inputs outside their training distribution (OOD data). To ensure safe deployment in critical domains like medical imaging or autonomous driving, classifiers are typically paired with OOD detectors to flag these anomalous inputs.
However, these detectors operate as black boxes. Existing interpretability methods, such as pixel-level feature attributions (saliency maps), are often noisy, unintuitive, and fail to highlight the structural or semantic differences between In-Distribution (ID) and OOD data. This paper addresses this gap by creating a method to explain why an OOD detector makes a decision, using high-level, human-understandable concepts (e.g., "wavy surface of the sea" or "furry skin") rather than raw pixels.
Methods
The authors propose a "two-world" framework to map and evaluate concepts:
- Canonical World: The original, unmodified DNN classifier and OOD detector.
- Concept World: A parallel space where intermediate feature representations are projected onto a learned concept subspace and then reconstructed using a non-linear mapping.
To guide the unsupervised learning of these concepts, they introduce two novel metrics:
- Detection Completeness: Quantifies whether the learned concepts are sufficient to accurately replicate the original detector's decisions (measured via AUROC).
- Concept Separability: Inspired by Fisher’s Linear Discriminant Analysis (LDA), this measures how well the concept scores separate the data flagged as ID from the data flagged as OOD.
The final objective function jointly optimizes the concept vectors and the reconstruction network by balancing classification accuracy, feature reconstruction error, instance-level detector score matching (via Mean Squared Error), and concept separability. Post-hoc, a modified Shapley value formulation calculates the marginal contribution of each concept to rank its importance.
Datasets
- In-Distribution (ID) Dataset: Animals with Attributes (AwA), consisting of 50 animal classes.
- Auxiliary OOD Dataset (for training concepts): MSCOCO (curated to remove overlapping animal classes) and an augmented version of the AwA dataset.
- Test OOD Datasets (for evaluation): Places365, SUN, and Textures.
Key Insights and Ideas
- Classifier concepts $\neq$ Detector concepts: Concepts that are excellent at explaining a model's classification choices (e.g., identifying a dolphin) are often terrible at explaining OOD detection. They fail to capture the background or distribution shifts that trigger OOD alarms.
- Per-sample alignment is crucial: Matching aggregate statistics (like overall accuracy) between the real world and the concept world isn't enough. Introducing an instance-level mean-squared error (MSE) regularization is vital to accurately replicate the detector's score distribution.
- A tool for model debugging: Concept profiles allow practitioners to diagnose why a detector failed. For instance, if an OOD image of a beach is mistakenly flagged as an ID "Dolphin", the concept score pattern can reveal if the detector was tricked by a high activation of the "wavy surface of the sea" concept.
Key Results
The proposed method was evaluated across five popular OOD detectors: MSP, ODIN, Generalized-ODIN, Energy, and Mahalanobis.
- Quantitative Improvements: For the MSP detector evaluated on the SUN dataset, the detection completeness score jumped from 0.774 (using baseline classification concepts) to 0.960 using the proposed method. Simultaneously, the relative concept separability score increased from 0.694 to 2.756.
- Distribution Alignment: Unlike prior concept-learning methods, the proposed framework closely mirrors the empirical score distributions of the target detectors, ensuring that the explanations are faithful to the black-box model's actual behavior.
Limitations and Future Work
- Dependence on Auxiliary OOD Data: A key limitation is the requirement of an unlabeled auxiliary OOD dataset during the concept learning phase, which might be difficult to obtain in specialized domains. While the authors show that synthetic data augmentation can act as a substitute, optimizing this selection remains an open question.
- Lack of Human Subject Studies: Although the generated concepts are visually distinct and intuitive, the authors note that a formal user study is still required to evaluate how effectively these explanations help human practitioners debug and trust OOD detectors in practice.
Summary updated