# Context-encoding Variational Autoencoder for Unsupervised Anomaly Detection

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

## Key facts

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

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

- [Diffusion Models for Medical Image Analysis: A Comprehensive Survey](https://mlsanity.com/paper/2211.07804/) (2022)
- [Diffusion Models for Medical Anomaly Detection](https://mlsanity.com/paper/2203.04306/) (2022)
- [Self-Supervised Predictive Convolutional Attentive Block for Anomaly Detection](https://mlsanity.com/paper/2111.09099/) (2021)
- [What is Healthy? Generative Counterfactual Diffusion for Lesion Localization](https://mlsanity.com/paper/2207.12268/) (2022)
- [Consistency Regularization for Variational Auto-Encoders](https://mlsanity.com/paper/2105.14859/) (2021)
- [Patched Diffusion Models for Unsupervised Anomaly Detection in Brain MRI](https://mlsanity.com/paper/2303.03758/) (2023)
- [Detecting Outliers with Poisson Image Interpolation](https://mlsanity.com/paper/2107.02622/) (2021)
- [Diffusion Models for Counterfactual Generation and Anomaly Detection in Brain Images](https://mlsanity.com/paper/2308.02062/) (2023)
- [MedIAnomaly: A comparative study of anomaly detection in medical images](https://mlsanity.com/paper/2404.04518/) (2024)
- [Unsupervised Anomaly Detection in Medical Images Using Masked Diffusion Model](https://mlsanity.com/paper/2305.19867/) (2023)
- [The role of noise in denoising models for anomaly detection in medical images](https://mlsanity.com/paper/2301.08330/) (2023)
- [Rethinking Autoencoders for Medical Anomaly Detection from A Theoretical Perspective](https://mlsanity.com/paper/2403.09303/) (2024)
- [Constrained unsupervised anomaly segmentation](https://mlsanity.com/paper/2203.01671/) (2022)
- [Proxy-bridged Image Reconstruction Network for Anomaly Detection in Medical Images](https://mlsanity.com/paper/2110.01761/) (2021)
- [Guided Reconstruction with Conditioned Diffusion Models for Unsupervised Anomaly Detection in Brain MRIs](https://mlsanity.com/paper/2312.04215/) (2023)
- [Implicit field learning for unsupervised anomaly detection in medical images](https://mlsanity.com/paper/2106.05214/) (2021)
- [OLED: One-Class Learned Encoder-Decoder Network with Adversarial Context Masking for Novelty Detection](https://mlsanity.com/paper/2103.14953/) (2021)
- [Many tasks make light work: Learning to localise medical anomalies from multiple synthetic tasks](https://mlsanity.com/paper/2307.00899/) (2023)
- [Unsupervised Anomaly Segmentation using Image-Semantic Cycle Translation](https://mlsanity.com/paper/2103.09094/) (2021)
- [CardiacNet: Learning to Reconstruct Abnormalities for Cardiac Disease Assessment from Echocardiogram Videos](https://mlsanity.com/paper/2410.20769/) (2024)
- [Evaluation of pseudo-healthy image reconstruction for anomaly detection with deep generative models: Application to brain FDG PET](https://mlsanity.com/paper/2401.16363/) (2024)
- [Leveraging the Mahalanobis Distance to enhance Unsupervised Brain MRI Anomaly Detection](https://mlsanity.com/paper/2407.12474/) (2024)
- [Masked Autoencoders for Unsupervised Anomaly Detection in Medical Images](https://mlsanity.com/paper/2307.07534/) (2023)
- [A Survey of Emerging Applications of Diffusion Probabilistic Models in MRI](https://mlsanity.com/paper/2311.11383/) (2023)
- [StRegA: Unsupervised Anomaly Detection in Brain MRIs using a Compact Context-encoding Variational Autoencoder](https://mlsanity.com/paper/2201.13271/) (2022)
- [What do we learn? Debunking the Myth of Unsupervised Outlier Detection](https://mlsanity.com/paper/2206.03698/) (2022)
- [MAEDiff: Masked Autoencoder-enhanced Diffusion Models for Unsupervised Anomaly Detection in Brain Images](https://mlsanity.com/paper/2401.10561/) (2024)
- [Towards Universal Unsupervised Anomaly Detection in Medical Imaging](https://mlsanity.com/paper/2401.10637/) (2024)
- [Scale-Aware Contrastive Reverse Distillation for Unsupervised Medical Anomaly Detection](https://mlsanity.com/paper/2503.13828/) (2025)
- [Conditional diffusion models for guided anomaly detection in brain images using fluid-driven anomaly randomization](https://mlsanity.com/paper/2506.10233/) (2025)

## Abstract (arXiv)

Unsupervised learning can leverage large-scale data sources without the need for annotations. In this context, deep learning-based auto encoders have shown great potential in detecting anomalies in medical images. However, state-of-the-art anomaly scores are still based on the reconstruction error, which lacks in two essential parts: it ignores the model-internal representation employed for reconstruction, and it lacks formal assertions and comparability between samples. We address these shortcomings by proposing the Context-encoding Variational Autoencoder (ceVAE) which combines reconstruction- with density-based anomaly scoring. This improves the sample- as well as pixel-wise results. In our experiments on the BraTS-2017 and ISLES-2015 segmentation benchmarks, the ceVAE achieves unsupervised ROC-AUCs of 0.95 and 0.89, respectively, thus outperforming state-of-the-art methods by a considerable margin.
