NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On The Detection of Synthetic Images Generated by Diffusion Models

Riccardo Corvi, Davide Cozzolino, Giada Zingarini, Giovanni Poggi, Koki Nagano, Luisa Verdoliva

This paper, a collaboration between the University Federico II of Naples and NVIDIA, explores the forensic frontier of generative AI. As Diffusion Models (DMs) like DALL·E 2 and Stable Diffusion surpass GANs in popularity and photorealism, the authors ask a critical question: Can we still tell what’s real?

TL;DR

The researchers demonstrate that while Diffusion Models leave unique "fingerprints" in the frequency domain similar to GANs, these traces are often weaker and harder to detect. Current state-of-the-art detectors struggle to generalize across different model architectures, especially when images are compressed or resized for social media.

What Problem Does This Paper Address?

For years, the media forensics community focused on Generative Adversarial Networks (GANs). GANs leave distinct "artificial fingerprints"—mathematical artifacts created by the upsampling process—that allow detectors to identify them with high accuracy.

However, Diffusion Models (DMs) work differently, generating images by iteratively removing noise. This paper addresses whether DMs leave similar detectable traces and evaluates if the tools we built to catch GANs are effective against this new generation of "text-to-image" AI. The core challenge is generalization: a detector trained to catch one specific AI model often fails when faced with a new, unseen architecture.

Methods

The authors approached the problem through two main lenses:

  1. Artifact Analysis: To find "fingerprints," they used a denoising filter to extract the noise residual from 1,000 images per model. By averaging these residuals and applying a Fourier Transform, they looked for spectral peaks—visual evidence of periodic patterns inherent to the generation process.
  2. Detection Benchmarking: They tested four high-performing CNN-based detectors (Spec, PatchForensics, Wang2020, and Grag2021). They evaluated these detectors in two training scenarios:
  3. Training on a GAN (ProGAN).
  4. Training on a DM (Latent Diffusion).
  5. Robustness Testing: They didn't just test "perfect" images. They simulated social media conditions by applying random cropping, resizing, and JPEG compression to see if the forensic traces survived.

Datasets

The study utilized a massive variety of data to ensure a broad evaluation:

  • Synthetic Models: ProGAN, StyleGAN2, StyleGAN3, BigGAN, EG3D (GANs); Taming Transformer, DALL·E Mini (Transformers); and GLIDE, Latent Diffusion, Stable Diffusion, ADM, and DALL·E 2 (Diffusion Models).
  • Real Images: Sourced from COCO, ImageNet, and UCID datasets to serve as the "pristine" baseline.
  • Prompts: For text-to-image models, they used language prompts from the COCO validation and training sets.

Key Insights and Ideas

  • DMs have fingerprints, but they vary: Models like GLIDE and Stable Diffusion show clear spectral peaks in the frequency domain. However, newer or different architectures like ADM and DALL·E 2 have much weaker traces, making them "stealthier" than their predecessors.
  • The "Threshold" Problem: Even when a detector is good at ranking images (high AUC), it often fails at actually classifying them (low accuracy). This is because the "decision threshold" learned on one model (e.g., ProGAN) doesn't translate to another (e.g., DALL·E 2).
  • Calibration is Key: The authors found that using "Platt scaling"—a method to calibrate the output probabilities using just a few examples of the new model—drastically improved accuracy.
  • Social Media is a Forensic "Black Hole": Resizing and compression act as a filter that erases subtle high-frequency traces. While detectors can still perform well on uncompressed PNGs, their reliability drops significantly on processed JPEGs.

Key Results

  • Generalization: A detector trained on ProGAN (Grag2021) achieved an impressive 92.8% AUC across various models on uncompressed data. However, when those same images were resized and compressed, the performance on specific models like DALL·E 2 and ADM dropped toward random chance levels.
  • DM-Specific Training: When a detector was trained specifically on Latent Diffusion, it caught Stable Diffusion images with 100% AUC, but its performance on DALL·E 2 was much lower (74.2% AUC), highlighting that not all diffusion models are created equal forensically.
  • The Power of Fusion: Combining detectors and applying calibration (using a few "real" and "fake" samples from the target model) pushed accuracy for some models from near-random (50%) to over 90%.

Limitations and Future Work

The authors acknowledge that this is an opening salvo in a long-term "arms race." The main limitation is the lack of a "universal" detector that works across all architectures without needing prior examples for calibration.

Future work will likely focus on finding more robust features that survive heavy image processing and developing methods that can adapt to new generative architectures as soon as they are released. As DMs continue to evolve, the "invisible" traces they leave behind may become even more elusive.

Summary updated

BibTeX
@inproceedings{corvi2023detection,
  author = {Riccardo Corvi and Davide Cozzolino and Giada Zingarini and Giovanni Poggi and Koki Nagano and Luisa Verdoliva},
  title = {{On The Detection of Synthetic Images Generated by Diffusion Models}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10095167},
}
Figure