Diffusion models have shown remarkable success in visual synthesis, but have also raised concerns about potential abuse for malicious purposes. In this paper, we seek to build a detector for telling apart real images from diffusion-generated images. We find that existing detectors struggle to detect images generated by diffusion models, even if we include generated images from a specific diffusion model in their training data. To address this issue, we propose a novel image representation called DIffusion Reconstruction Error (DIRE), which measures the error between an input image and its reconstruction counterpart by a pre-trained diffusion model. We observe that diffusion-generated images can be approximately reconstructed by a diffusion model while real images cannot. It provides a hint that DIRE can serve as a bridge to distinguish generated and real images. DIRE provides an effective way to detect images generated by most diffusion models, and it is general for detecting generated images from unseen diffusion models and robust to various perturbations. Furthermore, we establish a comprehensive diffusion-generated benchmark including images generated by eight diffusion models to evaluate the performance of diffusion-generated image detectors. Extensive experiments on our collected benchmark demonstrate that DIRE exhibits superiority over previous generated-image detectors. The code and dataset are available at https://github.com/ZhendongWang6/DIRE.
翻译:传播模型在视觉合成方面表现出了显著的成功,但也引起了对恶意用途的潜在滥用的担忧。 在本文中,我们寻求建立一个探测器,以便从扩散产生的图像中分离出真实的图像。 我们发现,现有的探测器在探测扩散模型产生的图像方面挣扎,即使我们在其培训数据中包括了特定传播模型产生的图像。为了解决这一问题,我们提议了一个叫作Difmunt Reformation错误(DIRE)的新型图像代号,用来测量输入图像与其通过预先训练的传播模型进行的重建对应方之间的错误。我们观察到,扩散产生的图像可以通过一个扩散模型来大致地重建,而真实的图像则无法进行。它提供了一种提示,即DIRE可以作为一个桥梁来区分生成的图像和真实的图像。DIRE为检测大多数传播模型产生的图像提供了一种有效的方法,对于探测从看不见的传播模型中生成的图像和各种扰动力都十分普遍。 此外,我们建立了一个全面的传播生成基准,包括由八个传播模型生成的图像,用以评价扩散- 生成图像探测器的性能。关于我们收集的基准的广泛实验表明,DIRERED能够比以前生成的DMZ. 可用的代码和数据设置。</s>