Skip to content

GAN forensics

Forensic techniques for detecting images and media generated by Generative Adversarial Networks (GANs).

GAN forensics is the study of methods for detecting images, video, and audio generated or manipulated by Generative Adversarial Networks (GANs). Because GANs have become the dominant technology for creating photorealistic synthetic faces (StyleGAN, ProGAN, BigGAN) and performing face manipulations (deepfakes, face swaps), forensic detection of GAN-generated content is a critical problem in misinformation and media authenticity.

GAN architecture and fingerprints

GANs map a low-dimensional latent space to high-dimensional output (e.g., 512D to 1024×1024 images). This dimensionality increase requires upsampling operations, which introduce characteristic artifacts:

  • Frequency artifacts: Upsampling layers (strided transposed convolutions) create grid-like patterns in the frequency domain (DCT, Fourier), visible as high-frequency energy localized to specific corners of the spectrum.
  • Spectral bias: GAN generators tend to produce images with statistical properties (e.g., color distributions, spatial correlations) that differ from natural images.
  • Generator-specific fingerprints: Different GAN architectures leave distinguishable traces, enabling source attribution.

Detection approaches

Frequency-domain methods:

  • Analyze DCT or Fourier coefficients to detect grid artifacts and spectral anomalies.
  • Often achieve high accuracy and robustness with simple linear classifiers.

CNN-based methods:

  • Train deep networks to learn discriminative features from GAN-generated images.
  • Effective but may rely on spurious correlations that don't generalize across architectures or datasets.

Hybrid approaches:

  • Combine frequency-domain features with neural networks for improved generalization.

Challenges

  1. Generalization: Detectors trained on one GAN architecture (e.g., StyleGAN) must generalize to others (ProGAN, BigGAN) and to unseen generators.
  2. Post-processing: Real-world deepfake images are often compressed, blurred, or cropped, which may degrade detector robustness.
  3. Adversarial attacks: GAN generators and attackers may adapt to evade detectors.
  4. Dataset bias: Detection methods may overfit to dataset artifacts rather than learning fundamental GAN fingerprints.

Key papers in this wiki

  • 2020-frank-frequency-gan-detection — Comprehensive frequency-domain analysis showing that all tested GAN architectures exhibit severe grid-like artifacts in the DCT spectrum; demonstrates perfect separation of real from GAN-generated faces with linear classifiers and superior robustness to perturbations compared to spatial-domain methods.
  • 2019-wang-cnn-generated-images — CNN-based cross-generator detection; shows that frequency-domain statistics provide the generalization cue; trains on ProGAN and generalizes to StyleGAN, BigGAN, CycleGAN, and DeepFakes with 87–99.6% AP.
  • 2018-mccloskey-gan-color-detection — Forensic detection via color channel analysis; identifies color overlap and suppressed saturation as GAN fingerprints.
  • 2019-yu-attributing-fake-images-gans — Attribution of GAN-generated images to specific generators; analyzes GAN fingerprints for source identification.

Papers on this topic