Out-of-Distribution Detection
Also known as: OOD Detection, Novelty Detection, Open-Set Recognition, Dağılım Dışı Tespit
Out-of-Distribution (OOD) detection is a set of techniques that identify when a deployed machine learning model receives inputs that differ significantly from its training data distribution. Introduced as a formal problem by Hendrycks and Gimpel in 2017, these methods enable models to flag unfamiliar inputs rather than silently produce unreliable predictions, making them foundational to trustworthy and safe AI deployment in high-stakes domains.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use OOD detection when deploying classifiers in open-world settings where the test distribution may not match training data — such as medical diagnosis, autonomous driving, fraud detection, and industrial inspection. The baseline approach assumes a well-calibrated classifier and a representative in-distribution validation set. It is less effective when in-distribution and OOD classes share similar feature representations. Alternatives include energy-based scoring, Mahalanobis distance methods, and deep ensemble uncertainty estimation for more challenging detection scenarios.
Strengths & limitations
- Simple and training-free: the baseline method requires no model retraining, making it easy to bolt onto any existing classifier.
- Strong empirical baseline: maximum softmax probability provides competitive OOD detection performance across many benchmarks.
- Interpretable scoring: a single scalar confidence score is easy to communicate and threshold for operational use.
- Broadly applicable: the framework applies to any neural network that outputs a probability distribution over classes.
- Neural networks can produce high-confidence softmax scores even for clearly OOD inputs due to the nature of the softmax function.
- Threshold calibration requires a representative in-distribution validation set, which may be difficult to curate in practice.
- Performance degrades when OOD data is semantically close to training data (near-OOD detection is harder than far-OOD).
- Does not provide fine-grained uncertainty estimates; only a binary in/out decision at a fixed threshold.
Frequently asked
Is OOD detection the same as anomaly detection?
They are closely related but not identical. Anomaly detection traditionally assumes no labeled normal data and focuses on density estimation, while OOD detection typically leverages a pre-trained supervised classifier. OOD detection specifically addresses the reliability of classifiers in open-world deployment, whereas anomaly detection is a broader paradigm used across unsupervised settings as well.
Why does the softmax baseline sometimes fail to detect OOD examples?
Softmax outputs are not calibrated probability estimates — they can be arbitrarily high for inputs far from the training manifold due to the unbounded nature of the logit space. Because the softmax function forces outputs to sum to one, OOD inputs can land in regions of logit space that still yield high maximum scores, causing confident but incorrect predictions.
What evaluation metrics are used for OOD detection?
The two most common metrics are AUROC (Area Under the Receiver Operating Characteristic curve), which summarizes performance across all thresholds, and FPR-at-95%-TPR (false positive rate when 95% of in-distribution samples are correctly retained). Both are threshold-independent summary statistics that allow comparison across methods and datasets.
Sources
- Hendrycks, D., & Gimpel, K. (2017). A baseline for detecting misclassified and out-of-distribution examples in neural networks. International Conference on Learning Representations. link ↗
How to cite this page
ScholarGate. (2026, June 2). Out-of-Distribution Detection. ScholarGate. https://scholargate.app/en/machine-learning/out-of-distribution-detection
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Isolation ForestMachine learning↔ compare
- Model CalibrationMachine learning↔ compare
- Uncertainty QuantificationSimulation↔ compare