# Detecting Out-of-Distribution Inputs to Deep Generative Models Using Typicality

arXiv: https://arxiv.org/abs/1906.02994 · HTML: https://mlsanity.com/paper/1906.02994/

## Key facts

- Cited by 31 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 7 Jun 2019.

## Built on by (most cited first, 30 of 31)

- [CutPaste: Self-Supervised Learning for Anomaly Detection and Localization](https://mlsanity.com/paper/2104.04015/) (2021)
- [Unsupervised Out-of-Distribution Detection with Diffusion Inpainting](https://mlsanity.com/paper/2302.10326/) (2023)
- [Score-Based Generative Classifiers](https://mlsanity.com/paper/2110.00473/) (2021)
- [On the Out-of-distribution Generalization of Probabilistic Image Modelling](https://mlsanity.com/paper/2109.02639/) (2021)
- [Conditional Invertible Neural Networks for Diverse Image-to-Image Translation](https://mlsanity.com/paper/2105.02104/) (2021)
- [Distribution Shift Inversion for Out-of-Distribution Prediction](https://mlsanity.com/paper/2306.08328/) (2023)
- [Reliable and Trustworthy Machine Learning for Health Using Dataset Shift Detection](https://mlsanity.com/paper/2110.14019/) (2021)
- [Do We Really Need to Learn Representations from In-domain Data for Outlier Detection?](https://mlsanity.com/paper/2105.09270/) (2021)
- [Model-agnostic out-of-distribution detection using combined statistical tests](https://mlsanity.com/paper/2203.01097/) (2022)
- [Variational Inference MPC using Normalizing Flows and Out-of-Distribution Projection](https://mlsanity.com/paper/2205.04667/) (2022)
- [CADet: Fully Self-Supervised Out-Of-Distribution Detection With Contrastive Learning](https://mlsanity.com/paper/2210.01742/) (2022)
- [Task Agnostic and Post-hoc Unseen Distribution Detection](https://mlsanity.com/paper/2207.13083/) (2022)
- [Falsehoods that ML researchers believe about OOD detection](https://mlsanity.com/paper/2210.12767/) (2022)
- [ODIM: Outlier Detection via Likelihood of Under-Fitted Generative Models](https://mlsanity.com/paper/2301.04257/) (2023)
- [Detecting Anomalous Event Sequences with Temporal Point Processes](https://mlsanity.com/paper/2106.04465/) (2021)
- [Data Invariants to Understand Unsupervised Out-of-Distribution Detection](https://mlsanity.com/paper/2111.13362/) (2021)
- [Exploiting Inter-Sample Affinity for Knowability-Aware Universal Domain Adaptation](https://mlsanity.com/paper/2207.09280/) (2022)
- [Multi-Resolution Continuous Normalizing Flows](https://mlsanity.com/paper/2106.08462/) (2021)
- [Out-of-Distribution Detection with Class Ratio Estimation](https://mlsanity.com/paper/2206.03955/) (2022)
- [Nystr"om Kernel Stein Discrepancy](https://mlsanity.com/paper/2406.08401/) (2024)
- [Self-Supervised Anomaly Detection by Self-Distillation and Negative Sampling](https://mlsanity.com/paper/2201.06378/) (2022)
- [Generative Max-Mahalanobis Classifiers for Image Classification, Generation and More](https://mlsanity.com/paper/2101.00122/) (2021)
- [Learning by Erasing: Conditional Entropy based Transferable Out-Of-Distribution Detection](https://mlsanity.com/paper/2204.11041/) (2022)
- [Shaken, and Stirred: Long-Range Dependencies Enable Robust Outlier Detection with PixelCNN++](https://mlsanity.com/paper/2208.13579/) (2022)
- [Sparse, self-organizing ensembles of local kernels detect rare statistical anomalies](https://mlsanity.com/paper/2511.03095/) (2025)
- [Provably Uncertainty-Guided Universal Domain Adaptation](https://mlsanity.com/paper/2209.09616/) (2022)
- [Pseudo-OOD training for robust language models](https://mlsanity.com/paper/2210.09132/) (2022)
- [On the Connection of Generative Models and Discriminative Models for Anomaly Detection](https://mlsanity.com/paper/2211.08910/) (2022)
- [Learning Non-Linear Invariants for Unsupervised Out-of-Distribution Detection](https://mlsanity.com/paper/2407.04022/) (2024)
- [Resultant: Incremental Effectiveness on Likelihood for Unsupervised Out-of-Distribution Detection](https://mlsanity.com/paper/2409.03801/) (2024)

## Abstract (arXiv)

Recent work has shown that deep generative models can assign higher likelihood to out-of-distribution data sets than to their training data (Nalisnick et al., 2019; Choi et al., 2019). We posit that this phenomenon is caused by a mismatch between the model's typical set and its areas of high probability density. In-distribution inputs should reside in the former but not necessarily in the latter, as previous work has presumed. To determine whether or not inputs reside in the typical set, we propose a statistically principled, easy-to-implement test using the empirical distribution of model likelihoods. The test is model agnostic and widely applicable, only requiring that the likelihood can be computed or closely approximated. We report experiments showing that our procedure can successfully detect the out-of-distribution sets in several of the challenging cases reported by Nalisnick et al. (2019).
