Any-Resolution AI-Generated Image Detection by Spectral Learning

Dimitrios Karageorgiou,Symeon Papadopoulos,Ioannis Kompatsiaris,Efstratios Gavves
2024-11-29
Abstract:Recent works have established that AI models introduce spectral artifacts into generated images and propose approaches for learning to capture them using labeled data. However, the significant differences in such artifacts among different generative models hinder these approaches from generalizing to generators not seen during training. In this work, we build upon the key idea that the spectral distribution of real images constitutes both an invariant and highly discriminative pattern for AI-generated image detection. To model this under a self-supervised setup, we employ masked spectral learning using the pretext task of frequency reconstruction. Since generated images constitute out-of-distribution samples for this model, we propose spectral reconstruction similarity to capture this divergence. Moreover, we introduce spectral context attention, which enables our approach to efficiently capture subtle spectral inconsistencies in images of any resolution. Our spectral AI-generated image detection approach (SPAI) achieves a 5.5% absolute improvement in AUC over the previous state-of-the-art across 13 recent generative approaches, while exhibiting robustness against common online perturbations.
Computer Vision and Pattern Recognition,Machine Learning,Image and Video Processing
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: how to detect AI - generated images without relying on the training data of specific generation models. Current methods perform poorly when faced with unseen generation models because the artifacts introduced by different generation models vary greatly, making it difficult for these methods to generalize to images generated by new models. Moreover, due to the large number of generation models and their continuous updates, it is almost impossible to maintain an exhaustive and up - to - date training data set. To solve this problem, the authors propose a new method - SPectral AI - generated Image detection (SPAI), which utilizes the spectral distribution of real images as an invariant pattern, models this distribution through self - supervised learning, and uses Spectral Reconstruction Similarity (SRS) to detect AI - generated images. Specifically: 1. **Spectral Distribution Modeling**: The authors believe that the spectral distribution of real images is an invariant and highly discriminatory pattern that can be used to detect AI - generated images. They use masked spectral learning to self - supervise the learning of the spectral distribution of real images. 2. **Spectral Reconstruction Similarity (SRS)**: To detect AI - generated images, the authors introduce the concept of spectral reconstruction similarity. This metric measures the difference between the reconstructed frequency and the actual frequency, thereby being able to identify samples that do not belong to the real image distribution. 3. **Spectral Context Attention (SCA)**: To capture subtle spectral differences in images of any resolution, the authors introduce a spectral context attention mechanism, enabling the model to process images at their original resolution without the need for pre - processing operations. Through these techniques, SPAI achieves higher detection performance than existing methods on multiple generation models and has stronger robustness against common online perturbations. ### Main Contributions - Propose using the spectral distribution of real images as an invariant pattern to distinguish between real and AI - generated images. - Introduce masked spectral learning to model the spectral distribution of real images. - Propose Spectral Reconstruction Similarity (SRS) for detecting AI - generated images. - Introduce Spectral Context Attention (SCA) to capture subtle spectral differences in images of any resolution. - Achieve an absolute performance improvement of 5.5% on multiple generation models and show superior robustness against common online perturbations. ### Summary This paper provides a more general and robust method for detecting AI - generated images by introducing spectral learning and related techniques, solving the problem of poor generalization ability of existing methods when faced with new generation models.