Attending Generalizability in Course of Deep Fake Detection by Exploring Multi-task Learning

Pranav Balaji, Abhijit Das, Srijan Das, Antitza DantchevaWorkshops @ ICCV 2023

Abstract

Current deepfake detection models often struggle with generalizability, failing to identify manipulation techniques not encountered during training. This research investigates Multi-task Learning (MTL) as a strategy to enhance robustness. By employing a dual-stream architecture that simultaneously performs binary classification and specific manipulation identification, the proposed model develops a more generalized feature encoder. Experimental results on the FaceForensics++ dataset demonstrate that this approach significantly outperforms existing state-of-the-art models in cross-manipulation scenarios.

Introduction

Deepfake detection has become a critical area of AI safety as synthetic media becomes increasingly sophisticated. While many detectors achieve high accuracy on known datasets, they frequently exhibit a "generalizability gap"—a sharp decline in performance when tested against novel forgery methods. This suggests that models often overfit to specific artifacts of a generation process rather than learning the intrinsic characteristics of facial manipulation. This paper explores whether Multi-task Learning (MTL) can serve as an effective regularizer to bridge this gap by forcing the model to understand the nature of different forgery types.

Methodology: Dual-Stream Multi-task Learning

The core of the proposed approach is a dual-stream training setup utilizing a video-based S3D encoder pre-trained with CoCLR. Unlike standard detectors that only perform binary classification, this architecture forces the model to learn richer, more nuanced representations through two concurrent tasks:

  1. Binary Stream: A standard classification task distinguishing between "Original" (Real) and "Fake" (Manipulated) content.
  2. Multi-class Stream: An auxiliary task where the model must identify the specific manipulation technique used (e.g., FaceSwap, NeuralTextures).
The Dual Stream architecture: The Binary stream groups all manipulations under a single label, while the Multi-class stream distinguishes between specific forgery techniques.

By requiring the encoder to distinguish between different types of fakes, the model is incentivized to identify universal forgery features that are useful across various generation methods. The multi-class stream is utilized exclusively during the training phase to "shape" the encoder's feature space and is discarded during testing to maintain a streamlined binary detector.

Datasets and Experimental Setup

The researchers evaluated their approach using the FaceForensics++ (FF++) benchmark. This dataset contains 1,000 original videos and 4,000 manipulated versions generated via four distinct methods: Deepfakes (DF), Face2Face (F2F), FaceSwap (FS), and NeuralTextures (NT).

The five classification labels used in the multi-task learning framework, representing the original footage and four distinct manipulation methods.

To test generalizability, the study employed a cross-manipulation protocol: the model was trained on three manipulation techniques and evaluated on the fourth, previously unseen technique. This setup mimics real-world scenarios where a detector must face a novel forgery method.

Key Insights and Discussion

  • Temporal Features vs. Spatial Resolution: Interestingly, the video-based S3D models outperformed frame-based state-of-the-art models (including the DFDC winner) even when operating at lower resolutions. This suggests that temporal inconsistencies—such as unnatural lip movements or frame-to-frame jitters—are more reliable "tells" for deepfakes than static image artifacts.
  • Loss Function Dynamics: The study found that combining standard Cross-Entropy (CE) loss with Contrastive loss (specifically Label-Informed MoCo) resulted in "conflicting gradients" that hindered performance. Consequently, the most effective configuration utilized Cross-Entropy for both the binary and multi-class streams.
  • Manipulation Complexity: Techniques like Face2Face and NeuralTextures proved more challenging for generalizability. These methods focus on subtle texture and expression reenactment rather than full-face replacement, requiring more sophisticated temporal attention to detect.

Results

The proposed Binary CE + Multi CE model demonstrated superior performance in cross-manipulation tests. It achieved an average accuracy of 77.74% across all scenarios, a significant improvement over the 67.41% average of the DFDC (Deepfake Detection Challenge) winner. Notably, when tested on the "Deepfakes" (DF) method after being trained on the other three, the model reached 85.16% accuracy. While standard binary training achieved 77.15%, the multi-task objective provided a consistent boost in generalizability.

Conclusion

This research confirms that Multi-task Learning is a viable path toward more generalizable deepfake detection. By framing the detection problem as both a binary and a multi-class task, models can be guided toward learning more fundamental features of facial manipulation. Future work will explore non-contrastive self-supervised learning tasks, such as VideoMAE or SVT, to further enhance feature extraction without the gradient conflicts observed in contrastive approaches.

Summary updated

BibTeX
@inproceedings{balaji2023attending,
  author = {Pranav Balaji and Abhijit Das and Srijan Das and Antitza Dantcheva},
  title = {{Attending Generalizability in Course of Deep Fake Detection by Exploring Multi-task Learning}},
  booktitle = {Workshops @ ICCV},
  year = {2023},
  doi = {10.1109/iccvw60793.2023.00054},
}
Figure