Skip to main content
QUICK REVIEW

[Paper Review] DiffusionFake: Enhancing Generalization in Deepfake Detection via Guided Stable Diffusion

Ke Sun, Chen Shen|arXiv (Cornell University)|Oct 6, 2024
Digital Media Forensic DetectionComputer Science5 citations
TL;DR

DiffusionFake improves cross-domain generalization for deepfake detectors by guiding a frozen Stable Diffusion model to reconstruct source and target images, enabling learning of disentangled, robust features without extra inference parameters.

ABSTRACT

The rapid progress of Deepfake technology has made face swapping highly realistic, raising concerns about the malicious use of fabricated facial content. Existing methods often struggle to generalize to unseen domains due to the diverse nature of facial manipulations. In this paper, we revisit the generation process and identify a universal principle: Deepfake images inherently contain information from both source and target identities, while genuine faces maintain a consistent identity. Building upon this insight, we introduce DiffusionFake, a novel plug-and-play framework that reverses the generative process of face forgeries to enhance the generalization of detection models. DiffusionFake achieves this by injecting the features extracted by the detection model into a frozen pre-trained Stable Diffusion model, compelling it to reconstruct the corresponding target and source images. This guided reconstruction process constrains the detection network to capture the source and target related features to facilitate the reconstruction, thereby learning rich and disentangled representations that are more resilient to unseen forgeries. Extensive experiments demonstrate that DiffusionFake significantly improves cross-domain generalization of various detector architectures without introducing additional parameters during inference. Our Codes are available in https://github.com/skJack/DiffusionFake.git.

Motivation & Objective

  • Identify universal features distinguishing Deepfake images from real faces by analyzing the generative process of face forgery.
  • Develop a plug-and-play framework that leverages a frozen pre-trained Stable Diffusion model to guide detectors in learning source- and target-related features.
  • Improve cross-domain generalization of existing detectors without increasing inference parameters or computational burden.
  • Demonstrate effectiveness across multiple backbone architectures and unseen datasets.

Proposed method

  • Propose a plug-and-play DiffusionFake framework that injects detector features into a frozen Stable Diffusion model to reconstruct source and target faces.
  • Use a Feature Filter module (Fs and Ft) with convolutional and attention mechanisms to extract source- and target-related features from detector embeddings.
  • Use a Weight Module (Ws and Wt) to adaptively weigh source vs. target information based on similarity in the Stable Diffusion latent space.
  • Introduce a Guide Module that injects guided features into the diffusion U-Net via trainable copy and zero convolution layers, enabling reconstruction of source/target images.
  • Train with a joint loss L = L_ce + λs Ls + λt Lt + Lws + Lwt, where Ls and Lt are diffusion-guided reconstruction losses, and Lws/Lwt align feature weights with source/target similarity.
  • During inference, only the encoder and classifier are used, with no extra parameters added.

Experimental results

Research questions

  • RQ1Can reversing the forgery generation process via guided diffusion yield more generalizable detection features?
  • RQ2Do source- and target-specific feature disentanglement and guided reconstruction improve cross-domain forgery detection performance?
  • RQ3Is DiffusionFake effective across different backbone architectures without increasing inference overhead?
  • RQ4How does the inclusion of the Stable Diffusion guide affect feature separability for unseen forgeries?

Key findings

  • DiffusionFake yields significant cross-domain gains for multiple backbones (e.g., EfficientNet-B4 shows around 6-11% average AUC increase across unseen datasets).
  • DiffusionFake improves generalization without adding inference parameters or computational cost.
  • Ablation shows the pre-trained Stable Diffusion, the Feature Filter, and the Weight modules are all important for performance gains.
  • Visualizations indicate real faces have smaller source-target feature distances, while forged faces show larger divergence, supporting disentanglement of source/target information.
  • t-SNE reveals clearer separability of real vs fake features on unseen datasets when using DiffusionFake.
  • DiffusionFake achieves strong performance on diffusion-based and non-diffusion-based datasets, including DiffSwap.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.