TL;DR
DiffusionFF is a novel framework that simultaneously detects deepfakes and localizes fine-grained forgery artifacts. By pairing a pretrained forgery detector (acting as an encoder) with a denoising diffusion model (acting as a decoder), it progressively synthesizes highly detailed Structural Dissimilarity (DSSIM) maps that pinpoint subtle manipulation traces, significantly boosting both model explainability and detection accuracy.
What Problem Does This Paper Address?
As deepfake technologies become increasingly sophisticated, forged facial images are becoming visually indistinguishable from real ones. While traditional deepfake detectors focus purely on binary classification (determining whether an image is real or fake), they function as "black boxes" lacking human-interpretable evidence.
To build user trust, models must precisely localize forgery clues. However, existing artifact localization methods fall short: mask-based approaches only highlight broad, coarse regions, while existing pixel-level Structural Dissimilarity (DSSIM) mapping methods rely on direct regression frameworks that smooth over subtle anomalies, resulting in blurry and less informative maps. DiffusionFF addresses this dual challenge by providing both state-of-the-art detection accuracy and sharp, fine-grained artifact localization.
Methods
The authors introduce an elegant encoder-decoder architecture called DiffusionFF. Instead of training a generative model from scratch, they cleverly repurpose a pretrained face forgery detector (such as ConvNeXt) to serve as a powerful "artifact encoder" that extracts multi-scale, forgery-related features from an input image.
The "artifact decoder" is a denoising diffusion probabilistic model (DDPM). Conditioned on the encoder's multi-scale features via custom-designed conditioning projectors, the diffusion model progressively refines random noise over multiple timesteps to synthesize a highly detailed pixel-level DSSIM map.
To prevent training collapse from jointly optimizing two vastly different tasks, the authors implement a two-stage training strategy:
- Stage 1 (Localization Focus): The pretrained forgery detector is frozen. The framework trains the conditioning projectors and the diffusion model to accurately estimate the ground-truth DSSIM map using a Mean Squared Error (MSE) loss on the predicted noise.
- Stage 2 (Detection Focus): The diffusion components are frozen. An Artifact Feature Extractor encodes the generated DSSIM map into artifact-aware features. These features are then fused with high-level semantic features from the detector via a gating mechanism, allowing a classifier head to output the final forgery score.
Datasets
The framework was trained and evaluated using several prominent deepfake benchmarks:
- FaceForensics++ (FF++): Used for model training and intra-dataset evaluation. It contains 5,000 videos across four manipulation types: DeepFakes (DF), Face2Face (F2F), FaceSwap (FS), and NeuralTextures (NT).
- Cross-Dataset Benchmarks: To evaluate generalization capability on unseen data and perturbations, the authors tested on Celeb-DeepFake-v2 (CDF2), DeepFake Detection Challenge (DFDC), DFDC Preview (DFDCP), and FFIW-10K (FFIW).
Key Insights and Ideas
- Localization Quality Drives Detection Accuracy: The authors demonstrated a strong positive correlation between the visual quality of localized artifact maps and overall binary detection performance. Integrating higher-quality DSSIM maps into the network consistently yields greater classification gains.
- Diffusion Over Regression: Direct pixel regression tends to average out high-frequency details, causing blurriness. Diffusion models, through iterative denoising, excel at capturing the subtle, fine-grained pixel inconsistencies typical of deepfakes.
- The Necessity of Pre-learned Knowledge: Attempting to train the detector and diffusion model together from scratch leads to training collapse. Injecting pre-learned forgery knowledge from a frozen detector stabilizes the generative process and enables effective knowledge transfer.
Key Results
- State-of-the-Art Generalization: DiffusionFF outperformed 16 SOTA baselines in cross-dataset evaluation, achieving top-tier Area Under the Curve (AUC) scores: 97.24% on CDF2, 85.05% on DFDC, and 92.56% on DFDCP.
- Superior Localization Metrics: On the FF++ dataset, DiffusionFF drastically improved DSSIM map estimation quality. It reduced the Frechet Inception Distance (FID) from previous baselines' scores of >240 down to 43.093, demonstrating a massive leap in generating visually faithful artifact maps.
- Robustness to Degradation: The model proved highly resilient against real-world image corruptions (such as JPEG compression, blur, and noise), exhibiting significantly smaller performance declines than robust baselines like Self-Blended Images (SBI).
Limitations and Future Work
The primary limitation of DiffusionFF stems from its architectural dependency on multi-scale feature conditioning. Because it relies on extracting features across hierarchical stages, it is inherently incompatible with standard Vision Transformers (ViTs) that utilize single-scale feature representations.
Future research directions could focus on adapting the conditioning projectors to accommodate single-scale foundation models or extending this joint detection-localization paradigm to video-level temporal dynamics to capture inter-frame inconsistencies.
Summary updated