# Improving Reconstruction Autoencoder Out-of-distribution Detection with Mahalanobis Distance

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

## Key facts

- Cited by 74 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 6 Dec 2018.

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

- [Generalized Out-of-Distribution Detection: A Survey](https://mlsanity.com/paper/2110.11334/) (2021)
- [OpenOOD: Benchmarking Generalized Out-of-Distribution Detection](https://mlsanity.com/paper/2210.07242/) (2022)
- [Towards Open Vocabulary Learning: A Survey](https://mlsanity.com/paper/2306.15880/) (2023)
- [Denoising diffusion models for out-of-distribution detection](https://mlsanity.com/paper/2211.07740/) (2022)
- [Rethinking Reconstruction Autoencoder-Based Out-of-Distribution Detection](https://mlsanity.com/paper/2203.02194/) (2022)
- [Unsupervised Out-of-Distribution Detection with Diffusion Inpainting](https://mlsanity.com/paper/2302.10326/) (2023)
- [Diffusion Policies for Out-of-Distribution Generalization in Offline Reinforcement Learning](https://mlsanity.com/paper/2307.04726/) (2023)
- [Envisioning Outlier Exposure by Large Language Models for Out-of-Distribution Detection](https://mlsanity.com/paper/2406.00806/) (2024)
- [DiffGuard: Semantic Mismatch-Guided Out-of-Distribution Detection using Pre-trained Diffusion Models](https://mlsanity.com/paper/2308.07687/) (2023)
- [Unknown Sniffer for Object Detection: Don't Turn a Blind Eye to Unknown Objects](https://mlsanity.com/paper/2303.13769/) (2023)
- [Out-of-Distribution Detection with Semantic Mismatch under Masking](https://mlsanity.com/paper/2208.00446/) (2022)
- [Unsupervised 3D out-of-distribution detection with latent diffusion models](https://mlsanity.com/paper/2307.03777/) (2023)
- [Out-of-Distribution Detection with a Single Unconditional Diffusion Model](https://mlsanity.com/paper/2405.11881/) (2024)
- [Efficient Out-of-Distribution Detection Using Latent Space of β-VAE for Cyber-Physical Systems](https://mlsanity.com/paper/2108.11800/) (2021)
- [Embedding Trajectory for Out-of-Distribution Detection in Mathematical Reasoning](https://mlsanity.com/paper/2405.14039/) (2024)
- [Do We Really Need to Learn Representations from In-domain Data for Outlier Detection?](https://mlsanity.com/paper/2105.09270/) (2021)
- [Benchmarking Safety Monitors for Image Classifiers with Machine Learning](https://mlsanity.com/paper/2110.01232/) (2021)
- [Detecting Out-Of-Distribution Earth Observation Images with Diffusion Models](https://mlsanity.com/paper/2404.12667/) (2024)
- [Resisting Out-of-Distribution Data Problem in Perturbation of XAI](https://mlsanity.com/paper/2107.14000/) (2021)
- [Out-of-distribution Detection with Boundary Aware Learning](https://mlsanity.com/paper/2112.11648/) (2021)
- [Rethinking Jailbreak Detection of Large Vision Language Models with Representational Contrastive Scoring](https://mlsanity.com/paper/2512.12069/) (2025)
- [Likelihood-based Out-of-Distribution Detection with Denoising Diffusion Probabilistic Models](https://mlsanity.com/paper/2310.17432/) (2023)
- [WOOD: Wasserstein-based Out-of-Distribution Detection](https://mlsanity.com/paper/2112.06384/) (2021)
- [MCROOD: Multi-Class Radar Out-Of-Distribution Detection](https://mlsanity.com/paper/2303.06232/) (2023)
- [Autoencoders for Anomaly Detection are Unreliable](https://mlsanity.com/paper/2501.13864/) (2025)
- [Dynamic Horizon Value Estimation for Model-based Reinforcement Learning](https://mlsanity.com/paper/2009.09593/) (2020)
- [Out-of-distribution detection algorithms for robust insect classification](https://mlsanity.com/paper/2305.01823/) (2023)
- [What do we learn? Debunking the Myth of Unsupervised Outlier Detection](https://mlsanity.com/paper/2206.03698/) (2022)
- [READ: Aggregating Reconstruction Error into Out-of-distribution Detection](https://mlsanity.com/paper/2206.07459/) (2022)
- [Reconstruction-based Out-of-Distribution Detection for Short-Range FMCW Radar](https://mlsanity.com/paper/2302.14192/) (2023)

## Abstract (arXiv)

There is an increasingly apparent need for validating the classifications made by deep learning systems in safety-critical applications like autonomous vehicle systems. A number of recent papers have proposed methods for detecting anomalous image data that appear different from known inlier data samples, including reconstruction-based autoencoders. Autoencoders optimize the compression of input data to a latent space of a dimensionality smaller than the original input and attempt to accurately reconstruct the input using that compressed representation. Since the latent vector is optimized to capture the salient features from the inlier class only, it is commonly assumed that images of objects from outside of the training class cannot effectively be compressed and reconstructed. Some thus consider reconstruction error as a kind of novelty measure. Here we suggest that reconstruction-based approaches fail to capture particular anomalies that lie far from known inlier samples in latent space but near the latent dimension manifold defined by the parameters of the model. We propose incorporating the Mahalanobis distance in latent space to better capture these out-of-distribution samples and our results show that this method often improves performance over the baseline approach.
