Detecting Deepfake by Creating Spatio-Temporal Regularity Disruption

Jiazhi Guan, Hang Zhou, Mingming Gong, Errui Ding, Jingdong Wang, Youjian Zhao

TL;DR

Current deepfake detectors struggle to generalize to new, unseen forgery techniques because they overfit to specific generative artifacts. This paper introduces a novel approach that trains detectors using only real videos by intentionally disrupting their natural spatial and temporal statistical regularities to create "pseudo-fake" (p-fake) data. Combined with a specialized Spatio-Temporal Enhancement (STE) block, this method achieves state-of-the-art generalization across multiple challenging deepfake benchmarks.

What Problem Does This Paper Address?

Deepfake detection has become an arms race. While current detection models perform exceptionally well on datasets they were trained on, their performance plummets when encountering new forgery techniques. This is because traditional models learn to recognize the specific "fingerprints" or artifacts left behind by particular generative models (e.g., GAN architectures).

Instead of chasing ever-evolving forgery artifacts, the authors ask a fundamental question: What common property do all deepfakes share, regardless of the generator used?

They observe that the process of creating a fake video—modifying and re-assembling facial parts—inevitably breaks the underlying statistical homogeneity ("regularity") inherent to real videos. This disruption happens in two places:

  1. Spatially: Modifying pixels breaks the uniform noise structure introduced by camera sensors and compression pipelines.
  2. Temporally: Re-assembling separately generated frames destroys natural frame-to-frame continuity.
Overview of regularity disruption in deepfakes compared to real and pseudo-fake data.

The authors leverage this "regularity disruption" to build a detector that doesn't need to see a single real deepfake during training to be highly effective.

Methods

The proposed framework consists of two core components: a Pseudo-fake (P-fake) Generator and a Spatio-Temporal Enhancement (STE) block.

1. The P-fake Generator

This is a plug-and-play data augmentation module applied on-the-fly to pristine videos during training. It simulates realistic deepfake irregularities through three sub-modules controlled by a Random Parameter Generator (RPG):

  • Image Editor: Applies disruptions across three domains:
  • Photometric: Altering brightness, contrast, saturation, or adding ISO noise.
  • Geometric: Applying elastic transforms, dense warps, or triangular stretches to distort spatial relations.
  • Frequency Domain: Disrupting Discrete Cosine Transform (DCT) responses to simulate compression inconsistencies.
  • Mask Generator & Blender: Extracts facial landmarks to create various masks (e.g., mouth region, full face) and blends the edited face back into the original frame using alpha or Poisson blending.
  • Random Parameter Generator (RPG): Crucially, the RPG varies these parameters frame-by-frame. This ensures that the temporal continuity of the video is broken, mimicking the frame-to-frame jitter common in deepfakes.
Detailed architecture of the P-fake Generator module.

2. Spatio-Temporal Enhancement (STE) Block

To effectively capture these self-created disruptions, the authors design the STE block, which is integrated into a standard ResNet-34 backbone. The STE block processes sequential spatial features by first applying a channel-wise 3D temporal convolution to capture adjacent frame interactions, followed by a patch-wise self-attention mechanism to capture long-range spatial anomalies.

The architecture of the proposed Spatio-Temporal Enhancement (STE) block.

Datasets

The method was rigorously evaluated on several widely recognized deepfake benchmarks:

  • FaceForensics++ (FF++): The primary dataset, containing 1,000 real videos and 4,000 fakes generated by four distinct techniques (Deepfakes, FaceSwap, Face2Face, NeuralTextures). It includes raw and compressed formats (c23, c40).
  • WildDeepfake (Deepwild): A challenging dataset consisting of diverse deepfakes manually collected from the internet.
  • Celeb-DF (CDF): A high-quality dataset featuring reduced temporal artifacts, making it highly challenging for temporal detectors.
  • DeepFake Detection Challenge preview (DFDCP) and DeepfakeDetection (DFD).
  • Face Shifter (FSh): Used specifically to test generalization against high-fidelity identity swapping.

Key Insights and Ideas

  • Defending the "Real" vs. Chasing the "Fake": By framing deepfake detection as identifying the absence of natural video regularities rather than the presence of specific forgery clues, the model inherently generalizes better to unseen attacks.
  • Temporal Cues Survive Compression: When videos are heavily compressed (e.g., the c23 and c40 settings in FF++), spatial artifacts are often wiped out. The authors show that temporal regularity disruptions are much more robust to compression, making joint spatio-temporal modeling essential.
  • Global Attention Matters: Activation visualizations (via CAM) reveal that models trained without p-fake data overfit to semantic facial features (like eyes or mouths). In contrast, models trained with p-fake data pay global attention to both the face boundaries and the background, capturing the overall structural inconsistency.

Key Results

  • Zero-Fake Training Success: When trained only on the real videos of FF++ (using p-fakes as negative samples), the model achieved an average AUC of 99.62% on the FF++ raw test set, outperforming methods trained on actual deepfakes.
  • Superior Cross-Dataset Generalization: In cross-dataset evaluations (trained on FF++ c23 real videos and tested on entirely different datasets), the proposed method significantly outperformed the state-of-the-art:
  • Deepwild: Achieved 81.85% AUC, outperforming the next best method (EB4+SBI) by 10.67%.
  • Celeb-DF: Achieved 90.17% AUC, demonstrating high robustness even against deepfakes with smoothed temporal transitions.

Limitations and Future Work

The authors do not explicitly detail failure modes or limitations in the text. However, an inherent limitation of regularity-disruption approaches is their reliance on the assumption that deepfakes will always introduce statistical anomalies. As generative models become more sophisticated—perhaps by explicitly optimizing for temporal coherence and blending homogeneity—the disruptions introduced during fake video creation may become too subtle for current regularity-based detectors to capture. Future work will likely need to explore even finer-grained statistical properties or adaptive p-fake generation strategies to keep pace.

Summary updated

BibTeX
@misc{guan2022detecting,
  author = {Jiazhi Guan and Hang Zhou and Mingming Gong and Errui Ding and Jingdong Wang and Youjian Zhao},
  title = {{Detecting Deepfake by Creating Spatio-Temporal Regularity Disruption}},
  year = {2022},
  eprint = {2207.10402},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.10402},
}
Figure