Abstract
Image Forgery Detection and Localization (IFDL) faces significant challenges due to the increasing sophistication of AI-driven editing tools. We present DiffForensics, a novel two-stage framework that leverages the structural priors of diffusion models to identify "mesoscopic" anomalies—subtle structural traces left by both manual and AI-generated manipulations. By employing a denoising pretext task with spatially correlated Simplex noise and a frozen semantic encoder, DiffForensics bridges the gap between high-level semantic context and low-level noise patterns. Our method achieves state-of-the-art performance across multiple benchmarks, demonstrating superior accuracy and robustness to common post-processing operations.
Introduction: The Mesoscopic Challenge
Traditional forensic methods typically operate at two extremes: microscopic analysis of pixel-level artifacts (e.g., sensor noise) or macroscopic analysis of high-level semantic inconsistencies. While microscopic methods are precise, they are easily defeated by "social media laundering" (resizing and re-compression). Macroscopic methods are robust but often lack the granularity required for precise localization.
DiffForensics targets the "mesoscopic" middle ground—intermediate structural properties and noise patterns. The goal is to build a model that integrates semantic understanding with subtle structural cues without sacrificing one for the other.
Methodology
The DiffForensics framework consists of two primary stages: self-supervised pre-training and multi-task fine-tuning.
Stage 1: Denoising Diffusion Pre-training
The model utilizes a Denoising Diffusion Probabilistic Model (DDPM) as a pretext task. A key design choice is the use of a frozen semantic encoder (SegFormer pre-trained on ADE20K), ensuring the model retains macroscopic knowledge of object structures.
A critical innovation in this stage is the replacement of standard Gaussian noise with Simplex noise. Unlike Gaussian noise, Simplex noise is spatially correlated, creating "blob-like" structures. This forces the decoder to learn how to reconstruct structured regions, making it significantly more sensitive to the boundaries and shapes characteristic of forged patches.
Stage 2: Multi-task Fine-tuning
The pre-trained model is fine-tuned on labeled forgery datasets to perform both binary classification (detection) and pixel-level masking (localization). To further refine localization, an Edge Cue Enhancement Module (ECEM) is introduced, which computes multi-scale gradients in the decoder to highlight the sharp "seams" often found at the edges of tampered regions.
Evaluation and Results
DiffForensics was evaluated on a wide range of benchmarks, including traditional forgery datasets (CASIA, Columbia, NIST16) and AI-generated (DGM) datasets (AutoSplicing, OpenForensics).
Performance Metrics
The model demonstrated significant improvements over state-of-the-art (SOTA) methods like HiFi-Net and PSCC-Net:
- Localization: Achieved an average F1 score of 0.466 and an AUC of 0.862 across eight datasets.
- Detection: Reached the highest average AUC (0.916) and the lowest Equal Error Rate (EER of 0.131).
- Robustness: The focus on mesoscopic structures allows the model to maintain high performance even after JPEG compression or Gaussian blurring, common operations that typically degrade microscopic forensic features.
Conclusion
DiffForensics effectively leverages diffusion priors to bridge the gap between semantic and structural forensic analysis. By utilizing Simplex noise in a self-supervised denoising task, the model learns to identify the subtle structural traces of image manipulation. This approach provides a robust and accurate solution for detecting both traditional and AI-generated forgeries, setting a new standard for the IFDL task.
Summary updated