Abstract
The prevalence of AI-generated images has evoked concerns regarding the potential misuse of image generation technologies. In response, numerous detection methods aim to identify AI-generated images by analyzing generative artifacts. Unfortunately, most detectors quickly become obsolete with the development of generative models. In this paper, we first design a low-level feature extractor that transforms spatial images into feature space, where different source images exhibit distinct distributions. The pretext task for the feature extractor is to distinguish between images that differ only at the pixel level. This image set comprises the original image as well as versions that have been subjected to varying levels of noise and subsequently denoised using a pre-trained diffusion model. We employ the diffusion model as a denoising tool rather than an image generation tool. Then, we frame the AI-generated image detection task as a one-class classification. We estimate the low-level intrinsic feature distribution of real photographic images and identify features that deviate from this distribution as indicators of AI-generated images. We evaluate our method against over 20 different generative models, including those in GenImage and DRCT-2M datasets. Extensive experiments demonstrate its effectiveness on AI-generated images produced not only by diffusion models but also by GANs, flow-based models, and their variants.
Introduction
The rapid advancement of generative AI has created a high-stakes game of cat-and-mouse in image detection. Traditional detectors are often trained as binary classifiers, learning to distinguish real photos from fakes produced by a specific generator (e.g., ProGAN). However, these models frequently overfit to specific generator "fingerprints," causing their accuracy to plummet when faced with newer models like Midjourney v6 or DALL-E 3.
As generative models improve, high-level semantic features—such as the general structure of a cat or a landscape—become indistinguishable from reality. This research argues that the key to robust detection lies in low-level intrinsic features: the subtle pixel-level textures and noise patterns inherent to camera sensors that AI struggles to replicate perfectly. By treating detection as an anomaly detection problem rather than a binary choice, we can identify fakes from unseen models by defining what "naturally real" looks like.
Methodology
The proposed approach consists of two primary stages: feature extraction via a pretext task and one-class classification.
1. Pretext Task for Feature Extraction
Instead of training a model directly on "real vs. fake" labels, a ViT-like feature extractor is trained to understand the relationship between a clean image and its denoised counterparts. Real images are subjected to varying levels of Gaussian noise and then restored using a pre-trained diffusion model (Stable Diffusion v1.4). The extractor is tasked with distinguishing the original image from these restored versions, forcing it to focus on minute, pixel-level details typically invisible to humans.
2. One-Class Classification
After training, the extractor maps 10,000 real photographic images into a feature space. This distribution of "real" features is modeled using a Gaussian Mixture Model (GMM). To test a suspicious image, its features are extracted and compared against the GMM to calculate a likelihood score. Images falling outside the expected distribution of real photography are flagged as AI-generated.
Experimental Evaluation
The method was evaluated against two massive benchmarks: GenImage, which includes images from 8 models (Midjourney, Stable Diffusion, ADM, Glide, etc.), and DRCT-2M, a comprehensive set featuring 16 types of diffusion-based images including ControlNet and SDXL variants.
Key Results
- Superior Generalization: The "Ours-basic" model achieved an average accuracy of 95.97% across GenImage, significantly outperforming baselines like CNNSpot (74.62%) and DIRE (71.24%).
- Cross-Architecture Success: Unlike many diffusion-based detectors that fail on GANs, this method maintained 95.71% accuracy on BigGAN, proving the learned "real image manifold" is universal.
- Dataset Independence: Performance remained stable when training on MSCOCO and testing on ImageNet, indicating the features are inherent to photography rather than specific dataset biases.
Discussion and Future Work
By framing detection as one-class classification, the model avoids the need for prior knowledge of specific "fake" artifacts. However, challenges remain. The model's reliance on low-level features makes it sensitive to heavy image distortions like JPEG compression or significant resizing, which can wipe out intrinsic textures. Future research will explore the impact of different sensor types and extreme lighting on the real image distribution, as well as methods to reduce the computational cost of the diffusion-based denoising process.
Summary updated