Diffusion models have shown promising performance as data-driven priors for computational imaging, as well as some capacity to detect out-of-distribution (OOD) images. However, existing approaches to OOD detection often require some knowledge of the shifted distribution, fail to detect subtle or localized distribution shifts, and operate on full images, rather than the indirect measurements available in inverse problems. We propose an OOD detection metric based on the Kullback-Leibler divergence between the diffusion prior and the posterior distribution, that (i) does not require any calibration data or knowledge of the shifted distribution, and (ii) can detect whole images as OOD as well as localize OOD patches within an image. Experimentally, we show that this metric can detect subtle yet semantically meaningful distribution shifts, such as the shift from healthy liver CT scans to those with tumors, and generalizes across different types of diffusion models, datasets, and inverse problems. Our code can be found at https://github.com/voilalab/KLIP.
翻译:扩散模型在作为数据驱动先验用于计算成像方面展现出了令人瞩目的性能,同时在检测分布外图像方面也具备一定能力。然而,现有的分布外检测方法通常需要一定程度的偏移分布先验知识,难以检测细微或局部化的分布偏移,且通常针对完整图像而非逆问题中可获取的间接测量值进行操作。我们提出了一种基于扩散先验与后验分布之间Kullback-Leibler散度的分布外检测度量方法,该方法(i)无需任何标定数据或偏移分布的先验知识,(ii)既能检测出整体图像是否为分布外样本,也能定位图像内局部异常区域。实验表明,该度量能够检测细微但具有语义意义的分布偏移(例如从健康肝脏CT扫描到含肿瘤CT扫描的偏移),并可在不同类型的扩散模型、数据集及逆问题中泛化应用。我们的代码已开源至https://github.com/voilalab/KLIP。