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

Generalized ODIN: Detecting Out-of-Distribution Image Without Learning From Out-of-Distribution Data

Yen-Chang Hsu, Yilin Shen, Hongxia Jin, Zsolt Kira

Abstract

Generalized ODIN (G-ODIN) introduces a robust framework for deep learning models to detect "out-of-distribution" (OoD) images—inputs from categories unseen during training—without requiring any examples of unknown data for tuning. By decomposing the standard classification score into distinct "class" and "domain" components, the proposed method achieves state-of-the-art detection performance while preserving the integrity of the model's original training objective.

Introduction

Standard deep neural networks typically operate under a "closed-world" assumption, where every input is expected to belong to one of the predefined training categories. Consequently, when presented with novel inputs (e.g., a cat shown to a vehicle classifier), these models often produce high-confidence but erroneous predictions.

While the original ODIN (Out-of-DIstribution detector for Neural networks) addressed this via temperature scaling and input preprocessing, it suffered from a significant limitation: the need for a representative set of OoD images to tune hyperparameters. This creates a "chicken-and-egg" dilemma in real-world deployment where the nature of future unknowns is unpredictable. G-ODIN eliminates this dependency, making OoD detection more practical and autonomous.

Methods

G-ODIN generalizes the detection process through two primary innovations:

1. Decomposed Confidence Scoring

Instead of relying on a standard softmax output, the authors propose a decomposition of the probability $p(y|d_{in}, x)$ into a quotient of two functions: $$f_i(x) = \frac{h_i(x)}{g(x)}$$ In this formulation, $h_i(x)$ captures class-specific features (identifying the object), while $g(x)$ captures domain-specific features (identifying if the input belongs to the training distribution). During training, $g(x)$ naturally learns to act as a confidence scale. The authors evaluated three distance metrics for $h_i(x)$: Inner-product, Euclidean distance, and Cosine similarity.

Figure 1: The G-ODIN architecture decomposes the network output into class-specific $h(x)$ and domain-specific $g(x)$ components to better estimate confidence.

2. Modified Input Preprocessing

Original ODIN methods used gradient-based perturbations to "nudge" images toward higher confidence, a boost that is more pronounced for in-distribution data. G-ODIN refines this by optimizing the perturbation magnitude ($\epsilon$) using only in-distribution validation data, ensuring the model remains effective without ever seeing an "enemy" example.

Experimental Results

The method was evaluated across standard benchmarks (CIFAR-10, CIFAR-100, SVHN) and large-scale datasets like DomainNet. DomainNet allowed for a nuanced study of semantic shift (new object categories) versus non-semantic shift (known objects in new styles, like sketches).

Performance Benchmarks

G-ODIN (specifically the "DeConf-C" variant using Cosine similarity) consistently outperformed both the original ODIN and Mahalanobis-based methods. On the challenging CIFAR-100 vs. SVHN task, G-ODIN achieved an AUROC of 95.9% and a TNR@TPR95 of 77.0%, a massive leap from the baseline's 78.1% and 18.9% respectively.

Figure 3: Quantitative comparison of G-ODIN (IPP) against various baselines across AUROC and TNR@TPR95 metrics.

Key Insights

  • Decomposition is Key: Forcing the network to separate identity from domain belonging allows the $g(x)$ function to effectively model the density of the training data.
  • Shift Difficulty: The research highlights that semantic shift remains significantly harder to detect than non-semantic shift. While G-ODIN excels at both, the "semantic wall" represents the next frontier for the field.

Conclusion

G-ODIN demonstrates that the internal uncertainty of a well-structured model is sufficient for effective OoD detection. While there is a minor trade-off in standard classification accuracy (approximately 1%), the gain in model reliability and the removal of the need for OoD tuning data make it a significant step forward for deploying safe and aware AI systems.

Summary updated

BibTeX
@inproceedings{hsu2020generalized,
  author = {Yen-Chang Hsu and Yilin Shen and Hongxia Jin and Zsolt Kira},
  title = {{Generalized ODIN: Detecting Out-of-Distribution Image Without Learning From Out-of-Distribution Data}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.01096},
}
Figure