Abstract
Unsupervised medical anomaly detection aims to identify pathologies without the need for large, manually labeled datasets. This paper presents a novel approach using image-conditioned diffusion models to create high-fidelity "pseudo-healthy" versions of medical scans. By training the model to explicitly restore synthetic anomalies while preserving healthy anatomical structures, the proposed method achieves state-of-the-art performance in localizing pathologies across brain MRI and retinal imaging datasets.
Introduction
In medical imaging, unsupervised anomaly detection is a critical challenge. The standard approach is reconstruction-based, where a model (such as a VAE or GAN) is trained exclusively on healthy data. At test time, the model attempts to reconstruct a patient's scan. Theoretically, the model should fail to reconstruct anomalies it has never seen, allowing the difference between the original scan and the reconstruction to reveal the pathology.
However, this approach relies on two fragile assumptions: (A1) the model cannot reconstruct anomalies, and (A2) the model can perfectly reconstruct healthy tissue. In practice, high-capacity models often fail A1 by accidentally reconstructing tumors, or fail A2 by struggling with complex healthy structures, leading to false positives. This work introduces image-conditioned diffusion to address these limitations by shifting from simple reconstruction to guided restoration.
Methodology
Training with Synthetic Anomalies
The core of the approach is a Denoising Diffusion Probabilistic Model (DDPM) enhanced with image conditioning. During training, the model is presented with healthy images corrupted by synthetic anomalies—such as blending, deformation, and intensity shifts. The model, an Attention U-Net, is trained to predict the noise added to these corrupted images, effectively learning to restore them to their original healthy state.
By explicitly training the model to "fix" synthetic anomalies, the authors ensure that assumption (A1) holds: the model learns to actively replace anomalous features with healthy ones.
Inference and Localization
At inference time, a potentially anomalous input image serves as the conditioning signal. The reverse diffusion process starts from Gaussian noise and iteratively generates a "pseudo-healthy" restoration. Unlike masking or inpainting methods that lose fine-grained details, this conditioning allows the model to "attend" to the entire image, ensuring that healthy regions are preserved with high fidelity.
The final anomaly map is produced by comparing the original input image with the restored version using the Structural Similarity Index Measure (SSIM). SSIM is chosen over simple pixel subtraction because it is more robust to variations in lighting and contrast, which is essential for detecting low-contrast pathologies.
Datasets and Evaluation
The model was evaluated on a diverse set of benchmarks to prove its versatility across different modalities:
- CamCAN: 653 healthy brain MRI scans used for training.
- BraTS (T1 & T2): Brain tumor scans with varying contrast levels.
- ATLAS: MRI scans of stroke patients with small, hypo-intense lesions.
- DDR: Retinal fundus images containing tiny, scattered diabetic retinopathy lesions.
Results and Key Insights
The method established a new state-of-the-art for residual-based anomaly detection on three out of four datasets. Notably, on BraTS-T2, it achieved a pixel-wise Average Precision ($AP_p$) of 0.74, a +0.24 improvement over previous methods. It also showed significant gains on the challenging DDR retinal dataset (+0.09 $AP_p$) and the ATLAS stroke dataset.
Key insights from the study include:
- Conditioning vs. Masking: Using the whole image as conditioning preserves healthy tissue details better than masking, which often loses fine-grained structural information.
- The Power of Synthetic Tasks: Training on synthetic anomalies guarantees the model's ability to remove real pathologies by defining a clear restoration objective.
- SSIM Superiority: Comparing images in structural space is far more effective than pixel-wise intensity differences for anomaly localization, especially in low-contrast scenarios.
Conclusion
While the model excels in many areas, challenges remain for extremely low-contrast pathologies (e.g., BraTS-T1) where tumors closely resemble healthy tissue. Additionally, domain shifts between training and testing scanners can impact performance. Future work will explore integrating feature-space comparisons into the diffusion training process to further improve detection of subtle, low-contrast anomalies.
Summary updated