Abstract
Deep unsupervised generative models are regarded as a promising alternative to supervised counterparts in the field of MRI-based lesion detection. They denote a principled approach for detecting unseen types of anomalies without relying on large amounts of expensive ground truth annotations. To this end, deep generative models are trained exclusively on data from healthy patients and detect lesions as Out-of-Distribution (OOD) data at test time (i.e. low likelihood). While this is a promising way of bypassing the need for costly annotations, this work demonstrates that it also renders this widely used unsupervised anomaly detection approach particularly vulnerable to non-lesion-based OOD data (e.g. data from different sensors). Since models are likely to be exposed to such OOD data in production, it is crucial to employ safety mechanisms to filter for such samples and run inference only on input for which the model is able to provide reliable results. We first show extensively that conventional, unsupervised anomaly detection mechanisms fail when being presented with true OOD data. Secondly, we apply prior knowledge to disentangle lesion-based OOD from their non-lesion-based counterparts.
Introduction
Unsupervised Anomaly Detection (UAD) is often viewed as a "silver bullet" for medical imaging, particularly for identifying brain lesions without the need for extensive labeled datasets. By training models—typically Variational Autoencoders (VAEs)—exclusively on "healthy" brain scans, any deviation from this learned distribution at test time is flagged as an anomaly. However, this paper identifies a critical "OOD Blind Spot": these models often struggle to differentiate between actual pathology (lesional OOD) and harmless domain shifts, such as data from different MRI scanners or sensors (non-lesional OOD).
Methodology
The authors employ a standard VAE-based pipeline for lesion detection. During training, the encoder-decoder architecture learns the distribution of healthy brain slices from the CamCAN dataset. At inference, the model attempts to reconstruct input slices. Anomalies are detected by analyzing the discrepancy between the input and its reconstruction.
The study evaluates several metrics for anomaly detection:
- Standard Metrics: Reconstruction error ($l_1$), KL Divergence ($D_{KL}$), and the Evidence Lower Bound ($\mathcal{L}$).
- Advanced OOD Metrics: Watanabe–Akaike information criterion (WAIC) and Density of States Estimation (DoSE).
- Entropy-based Disentanglement: A proposed normalized sample-wise entropy ($H_{l_1}$) calculated on the residual map, intended to separate localized lesions from global domain shifts.
The Entanglement Problem
A core finding is that standard metrics are equally "surprised" by a tumor and a change in scanner settings. This conflation means a healthy patient scanned on a different machine might be incorrectly flagged as having a lesion.
As shown in the distribution plots, metrics like $l_1$ and $\mathcal{L}$ show substantial overlap between datasets like BraTS (lesional) and CamCAN (healthy), especially when domain shifts are present. This overlap represents the "blind spot" where the model cannot reliably distinguish the source of the anomaly.
Key Results
- WAIC as a Safety Filter: The WAIC metric proved highly effective at identifying domain-shifted samples, regardless of lesion presence, achieving AUROCs up to 0.99. This suggests WAIC could serve as a pre-inference safety filter.
- Segmentation Performance: For pinpointing lesions, the simple reconstruction error ($l_1$) remains the most robust baseline, though it remains sensitive to domain shifts.
- Preprocessing Limitations: While histogram matching improves performance, it does not solve the fundamental entanglement problem; the model still perceives shifted data as fundamentally different from its training distribution.
Conclusion
The study concludes that UAD research must move beyond the assumption that test data will perfectly match training distributions. Future efforts should focus on restoration-based methods or leveraging 3D volumetric context to better differentiate localized pathologies from global sensor noise. Implementing safety mechanisms like WAIC is a crucial step toward making unsupervised models reliable for clinical production.
Summary updated