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

Abstract: Unsupervised Anomaly Localization Using Variational Auto-Encoders

David Zimmerer, Fabian Isensee, Jens Petersen, Simon Kohl, Klaus H. Maier-Hein

Abstract

Standard Variational Auto-Encoders (VAEs) typically localize anomalies by identifying regions with high reconstruction errors. However, this approach is often brittle and highly sensitive to model architecture and hyperparameter choices. This paper demonstrates that incorporating the Kullback-Leibler (KL) divergence gradient significantly improves the robustness and accuracy of unsupervised anomaly localization, particularly in complex medical imaging tasks such as brain tumor detection.

Introduction

In medical imaging, unsupervised anomaly detection represents a significant goal: models that learn "normal" anatomy from unannotated scans can theoretically flag any pathological deviation. Variational Auto-Encoders (VAEs) are a popular tool for this, compressing images into a latent space and reconstructing them. The prevailing assumption is that anomalies will result in high reconstruction errors. However, this error is highly dependent on hyperparameters like latent space size. Overly large latent spaces may reconstruct anomalies perfectly, while overly small ones may fail to reconstruct normal tissue, leading to false positives.

Methods

The authors propose utilizing the full Evidence Lower Bound (ELBO), which comprises a reconstruction term and a KL-divergence term. They introduce several gradient-based localization strategies:

  • ELBO-grad: The derivative of the total ELBO with respect to input pixels.
  • KL-grad: The gradient of the KL term, measuring statistical deviation from the prior.
  • Rec-grad: The gradient of the reconstruction term.
  • Combi: A hybrid approach multiplying raw reconstruction error by the KL-gradient, effectively filtering for regions that are both poorly reconstructed and statistically improbable.

Key Insights: The Robustness of the KL Term

A critical finding is that the KL term contains more robust information about anomalies than the reconstruction term alone. While reconstruction error is often sensitive to model configuration, the KL term and the combined ELBO maintain consistent performance across various architectures.

AUROC performance for sample-wise detection across varying latent variable dimensions, demonstrating the stability of the KL-Term and ELBO compared to reconstruction error.

By using the gradient of the loss with respect to the input ($\nabla_x \mathcal{L}$), the model identifies pixels causing the most "statistical stress." This approach provides reliable performance without requiring labeled validation sets for hyperparameter tuning.

Experimental Results

The approach was validated on FashionMNIST (as a proof-of-concept) and medical datasets including the Human Connectome Project (HCP) for training and BraTS 2017 for testing.

AUROC for sample-wise anomaly detection on FashionMNIST across different "odd classes," showing that KL and ELBO terms often outperform or match reconstruction error.

On the BraTS tumor segmentation task, the "Combi" method achieved a Dice score of 0.44, outperforming standard VAE reconstruction (0.42) and $\alpha$-GAN (0.37). Qualitative results showed that KL-based gradients produced cleaner localization maps with fewer noise artifacts. For sample-wise detection, the ELBO and KL terms consistently outperformed reconstruction error in identifying which images contained anomalies.

Limitations and Conclusion

Despite these improvements, deep learning models still trail behind traditional methods that leverage brain symmetry (e.g., GHMRF), which reach Dice scores of ~0.75. Future work should focus on incorporating structural domain knowledge, such as anatomical priors or symmetry, into the flexible VAE framework to bridge this performance gap.

Summary updated

BibTeX
@inproceedings{zimmerer2020abstract,
  author = {David Zimmerer and Fabian Isensee and Jens Petersen and Simon Kohl and Klaus H. Maier-Hein},
  title = {{Abstract: Unsupervised Anomaly Localization Using Variational Auto-Encoders}},
  booktitle = {Bildverarbeitung für die Medizin},
  year = {2020},
  doi = {10.1007/978-3-658-29267-6\_43},
}
Figure