I-203Generative Residual Analysis

Sensor Forensicsimage2021

Extracts and analyzes residual noise patterns specific to generative models (GAN, diffusion) for source attribution.

Generative Model Residual
This method extracts and analyzes the unique residual noise fingerprints left by different generative AI architectures, enabling both detection and source attribution:\n\n1. High-Pass Residual Extraction: The image content is suppressed using a denoising filter (BM3D or DnCNN) to isolate the residual noise layer: R = I − Denoise(I). For authentic camera images, R contains sensor noise (Poisson-Gaussian). For AI-generated images, R contains generator-specific artifacts: GAN upsampling patterns, diffusion denoising residuals, or autoregressive prediction errors.\n\n2. GAN Fingerprint Detection: GANs using transposed convolution (deconvolution) layers for upsampling create periodic 'checkerboard' patterns in the residual at frequencies determined by the stride and kernel size. The method computes the 2D power spectrum of R and detects peaks at frequencies f = 1/stride (e.g., at π/2 for stride-2 upsampling). The peak magnitude and position serve as a GAN architecture fingerprint — StyleGAN2 shows peaks at (π/2, π/2), while ProGAN shows peaks at (π/4, π/4).\n\n3. Diffusion Model Residual: Diffusion models leave residuals characterized by spatially correlated Gaussian noise with correlation length determined by the denoising U-Net's receptive field. The method estimates the spatial autocorrelation function of R and fits an exponential decay model: ACF(r) ∝ exp(−r/ξ). The correlation length ξ is model-specific: Stable Diffusion v1.5 shows ξ ≈ 8 pixels, DALL-E 2 shows ξ ≈ 12 pixels.\n\n4. Model Attribution: A feature vector combining spectral peaks, correlation length, kurtosis, and higher-order statistics of R is compared against a database of known generator fingerprints using a nearest-centroid classifier. This enables not just detection but identification of the specific generative model used (e.g., StyleGAN2 vs. StyleGAN3 vs. Stable Diffusion vs. Midjourney).
Denoising filter: BM3D with σ = 3 or DnCNN blind denoiser\nSpectral analysis: 2D FFT with Hanning window\nCheckerboard peak detection: magnitude > 6 dB above noise floor\nCorrelation length estimation: exponential fit to ACF\nAttribution database: 20+ generator model fingerprints\nMinimum image size: 256×256 pixels
85–93% binary detection accuracy (real vs. AI-generated). Source attribution accuracy of 78% across 10+ generator models. GAN-specific checkerboard detection achieves 95% on uncompressed StyleGAN outputs. Diffusion model correlation analysis reaches 82%. JPEG compression (quality < 80) reduces attribution accuracy to 65%.
• Provides both detection and source attribution in a single analysis\n• GAN checkerboard patterns are highly specific and reliable fingerprints\n• Correlation length serves as a compact yet discriminative diffusion model feature\n• Works across fundamentally different generator architectures\n• Residual extraction is model-agnostic — no knowledge of the generator is required
• Post-processing (noise addition, sharpening) can mask generator residuals\n• JPEG compression significantly degrades spectral fingerprints\n• New generator architectures require database updates for attribution\n• Super-resolution post-processing adds its own residual patterns, confounding analysis\n• Very small images (<256px) provide insufficient signal for reliable fingerprinting
Detecting AI-generated images and identifying the specific generative model used. Source attribution for deepfake forensics — determining whether an image came from StyleGAN, Stable Diffusion, Midjourney, etc. Tracking the provenance of synthetic media in misinformation investigations.