The high performance of denoising diffusion models for image generation has paved the way for their application in unsupervised medical anomaly detection. As diffusion-based methods require a lot of GPU memory and have long sampling times, we present a novel and fast unsupervised anomaly detection approach based on latent Bernoulli diffusion models. We first apply an autoencoder to compress the input images into a binary latent representation. Next, a diffusion model that follows a Bernoulli noise schedule is employed to this latent space and trained to restore binary latent representations from perturbed ones. The binary nature of this diffusion model allows us to identify entries in the latent space that have a high probability of flipping their binary code during the denoising process, which indicates out-of-distribution data. We propose a masking algorithm based on these probabilities, which improves the anomaly detection scores. We achieve state-of-the-art performance compared to other diffusion-based unsupervised anomaly detection algorithms while significantly reducing sampling time and memory consumption. The code is available at https://github.com/JuliaWolleb/Anomaly_berdiff.
翻译:去噪扩散模型在图像生成中的高性能为其在无监督医学异常检测中的应用奠定了基础。针对基于扩散的方法需要大量GPU内存且采样时间较长的问题,我们提出了一种基于隐空间伯努利扩散模型的新型快速无监督异常检测方法。首先,我们利用自编码器将输入图像压缩为二值隐空间表示。随后,采用遵循伯努利噪声调度的扩散模型作用于该隐空间,并训练从扰动隐空间表示中恢复原始二值隐空间表示。该扩散模型的二值特性使我们能够识别隐空间中在去噪过程中具有高概率发生二值码翻转的条目,这指示了分布外数据。基于这些概率,我们提出了一种掩码算法,从而改善了异常检测得分。与其他基于扩散的无监督异常检测算法相比,我们在显著降低采样时间和内存消耗的同时达到了最先进的性能。代码可在 https://github.com/JuliaWolleb/Anomaly_berdiff 获取。