Zero-Shot Detection of AI-Generated Images

Davide Cozzolino,Giovanni Poggi,Matthias Nießner,Luisa Verdoliva
2024-09-24
Abstract:Detecting AI-generated images has become an extraordinarily difficult challenge as new generative architectures emerge on a daily basis with more and more capabilities and unprecedented realism. New versions of many commercial tools, such as DALLE, Midjourney, and Stable Diffusion, have been released recently, and it is impractical to continually update and retrain supervised forensic detectors to handle such a large variety of models. To address this challenge, we propose a zero-shot entropy-based detector (ZED) that neither needs AI-generated training data nor relies on knowledge of generative architectures to artificially synthesize their artifacts. Inspired by recent works on machine-generated text detection, our idea is to measure how surprising the image under analysis is compared to a model of real images. To this end, we rely on a lossless image encoder that estimates the probability distribution of each pixel given its context. To ensure computational efficiency, the encoder has a multi-resolution architecture and contexts comprise mostly pixels of the lower-resolution version of the image.Since only real images are needed to learn the model, the detector is independent of generator architectures and synthetic training data. Using a single discriminative feature, the proposed detector achieves state-of-the-art performance. On a wide variety of generative models it achieves an average improvement of more than 3% over the SoTA in terms of accuracy. Code is available at <a class="link-external link-https" href="https://grip-unina.github.io/ZED/" rel="external noopener nofollow">this https URL</a>.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to detect AI - generated images without using AI - generated training data. With new generative models emerging continuously, these models are becoming more and more powerful and the generated images are more and more realistic, which makes it extremely difficult to detect AI - generated images. Traditional supervised learning methods require a large number of real and fake images to train the model, but this method is difficult to deal with continuously updated generative models. Therefore, this paper proposes a zero - sample detection method (ZED), which only relies on real images to learn their underlying distributions without any data of specific generative methods. By using a lossless image encoder to estimate the probability distribution of each pixel given the context, ZED can measure the degree of mismatch between the image to be analyzed and the real - image model, thereby achieving effective detection of AI - generated images. Experimental results show that this method achieves state - of - the - art performance on multiple generative models, with an average accuracy improvement of more than 3%.