AnoDDPM: Anomaly Detection with Denoising Diffusion Probabilistic Models using Simplex Noise
Julian Wyatt
Adam Leach
Sebastian M. Schmon
Chris G. Willcocks
Durham University
This work was accepted at the CVPR workshop: NTIRE June 2022
Abstract Generative models have been shown to provide a powerful mechanism for anomaly detection by learning to model healthy or normal reference data which can subsequently be used as a baseline for scoring anomalies. In this work we consider denoising diffusion probabilistic models (DDPMs) for unsupervised anomaly detection. DDPMs have superior mode coverage over generative adver- sarial networks (GANs) and higher sample quality than variational autoencoders (VAEs). However, this comes at the expense of poor scalability and increased sampling times due to the long Markov chain sequences required. We observe that within reconstruction-based anomaly detection a full-length Markov chain diffu- sion is not required. This leads us to develop a novel partial diffusion anomaly detection strategy that scales to high-resolution imagery, named AnoDDPM. A secondary problem is that Gaussian diffusion fails to capture larger anomalies; therefore we develop a multi-scale simplex noise diffusion process that gives control over the target anomaly size. AnoDDPM with simplex noise is shown to significantly outperform both f-AnoGAN and Gaussian diffusion for the tumorous dataset of 22 T1-weighted MRI scans (CCBS Edinburgh) qualitatively and quantitatively (improvement of +25.5% Sørensen–Dice coefficient, +17.6% IoU and +7.4% AUC).
Approach
AnoDDPM utilises the Denoising Diffusion Probabilistic Model framework to detect whether a region of an image lies outside of a learned healthy distribution. DDPMs consist of a forward process which slowly adds
noise to an image and then estimates that noise via a neural network. Through this estimation, new images can be generated by first starting with an approximated image such as white noise, then iteratively predicting the noise and gradually
reducing the severity of the noise over many steps, until no noise remains. DDPMs are the state of the art for sample quality on small datasets from the powerful procedure, and is therefore ideal for the medical imaging domain.
We
found typical Gaussian noise to be insuffient for anomaly detection as new samples would be generated rather than solely removing the anomaly. Additionally, natural images have been shown to have a power law distribution of frequencies,
where lower frequency components contribute more to the image. Therefore, we explore the use of simplex noise, a structured noise function, for the corruption and sample generation of medical images.
Algorithm
For our training procedure, we follow the DDPM outline above and predict the noise at a given timestep solely for healthy data. This subsequently learns a model which can generate healthy images. For the anomaly detection of a sample after training we apply noise to a parameterised timestep λ, and gradually remove this noise via the typical DDPM algorithm. Once the noise has been removed, we perform a square error pixel-wise comparison of the original and generated image and take a threshold of this to evaluate the model. We utilise simplex noise and Gaussian noise for this procedure, with demonstrations above.
Conclusion
- AnoDDPM outperforms popular anomaly detection technique: f-AnoGAN for MRI brain tumour detection.
- AnoDDPM with Gaussian noise produces high quality samples but struggles to segment anomalies.
- Use of simplex noise produces a slightly lower image quality but produces a more performant residual map.
Citation
@InProceedings{Wyatt_2022_CVPR,
author = {Wyatt, Julian and Leach, Adam and Schmon, Sebastian M. and Willcocks, Chris G.},
title = {AnoDDPM: Anomaly Detection With Denoising Diffusion Probabilistic Models Using Simplex Noise},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2022},
pages = {650-656}
}