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.
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.
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