Undercover Deepfakes: Detecting Fake Segments in Videos

Sanjay Saha, Rashindrie Perera, Sachith Seneviratne, Tamasha Malepathirana, Sanka Rasnayaka, Deshani Geethika, Terence Sim, Saman K. HalgamugeWorkshops @ ICCV 2023 · DOI · arXiv

Abstract

Traditional deepfake detection methods often treat video analysis as a binary classification task, labeling an entire clip as either real or synthetic. However, a more insidious threat is emerging: "undercover" deepfakes, where only brief, strategic segments of a video are manipulated to alter context or spread misinformation. This paper presents a novel two-stage architecture designed to pinpoint these temporal manipulations. By integrating a Vision Transformer (ViT) enhanced with Scaling and Shifting (SSF) for spatial feature extraction and a Timeseries Transformer (TsT) for temporal modeling, the proposed model can identify fake segments as short as 0.2 seconds. Our approach achieves state-of-the-art performance, with an Intersection over Union (IoU) of up to 0.98 on targeted benchmarks.

The Challenge of Partially Manipulated Content

Most current research in deepfake detection focuses on videos that are entirely synthetic. In real-world scenarios, malicious actors are more likely to use "partially fake" videos—altering a few seconds of a political speech or a news broadcast while leaving the rest of the footage authentic. These surgical edits are harder to detect because the high proportion of real content can dilute the signals of manipulation.

Comparison of classical binary detectors vs. the proposed temporal segment detector.

Beyond simple detection, identifying the exact start and end points of a manipulation (temporal segmentation) is vital for human moderators. It allows for rapid verification without requiring reviewers to watch hours of footage to find a single altered sentence.

Architecture: Spatial and Temporal Synergy

To address the dual challenge of spatial artifacts and temporal inconsistencies, we propose a two-stage pipeline that captures both the appearance of individual frames and the dynamics of their transitions.

1. Spatial Feature Extraction with ViT and SSF

The first stage utilizes a Vision Transformer (ViT) to extract high-dimensional features from individual video frames. To ensure the model is both efficient and adaptable to new types of deepfakes, we employ Scaling and Shifting (SSF). This parameter-efficient fine-tuning method inserts small, learnable parameters into the pre-trained ViT. Instead of retraining the entire massive network, SSF modulates existing features to focus on deepfake-specific artifacts, significantly reducing computational overhead while maintaining high sensitivity.

2. Temporal Modeling with Timeseries Transformers (TsT)

The features extracted by the ViT are then processed by a Timeseries Transformer (TsT). While the ViT identifies spatial glitches within a frame, the TsT is designed to recognize temporal "seams"—the subtle inconsistencies that occur when a video transitions from a real segment to a fake one. This sequential analysis is critical for detecting manipulations that might look perfect in a single frame but move unnaturally over time.

The proposed two-stage architecture combining a Vision Transformer (ViT) with Scaling and Shifting (SSF) and a Timeseries Transformer (TsT).

3. Post-Processing and Smoothing

To ensure the predicted segments are continuous and realistic, the model employs a majority-voting technique over a sliding window. This smoothing process filters out isolated frame misclassifications, resulting in more reliable temporal boundaries.

Benchmarking and Datasets

Evaluating temporal segmentation requires specialized data. In addition to training on the standard FaceForensics++ (FF++) dataset, we introduced a new Temporal Deepfake Segment Dataset. This benchmark includes videos with one or two fake segments, featuring "hand-crafted" transitions designed to be as subtle as possible. We specifically focused on challenging methods like Neural Textures (NT) and Face2Face (F2F), which manipulate facial expressions and mouth movements rather than replacing the entire face.

To test the model's robustness, we also evaluated it on generalization sets including CelebDF, DFDC, and WildDeepFakes, which contain manipulation techniques not seen during the training phase.

Key Results and Insights

Our experiments yielded several critical insights into the nature of modern deepfakes:

  • Temporal Precision: The model achieved an IoU of up to 0.98 on our new benchmark, significantly outperforming previous methods like CADDM. It remains highly accurate (AUC > 0.91) even for segments shorter than one second.
  • The Transition is the Giveaway: The "seam" between real and fake content is often the most detectable element. The TsT's ability to exploit these temporal inconsistencies is a major driver of the model's success.
  • Neural Textures Challenge: Neural Textures (NT) remain the most difficult manipulation to detect. Because NT only alters specific facial regions (like the mouth), models trained on identity-swapping often fail to generalize to them.
  • Efficiency and Generalization: By using SSF, we demonstrated that state-of-the-art results can be achieved without exhaustive retraining. The model also showed strong generalization, achieving a 0.790 AUC on the CelebDF dataset.

Conclusion and Future Work

This research shifts the focus of deepfake detection from binary classification to precise temporal localization. While our ViT+TsT architecture provides a robust defense against undercover deepfakes, challenges remain in closing the generalization gap for "in-the-wild" videos. Future work will focus on refining detection for even more diverse, professionally edited transitions and optimizing the architecture for real-time deployment on consumer hardware.

Summary updated

BibTeX
@inproceedings{saha2023undercover,
  author = {Sanjay Saha and Rashindrie Perera and Sachith Seneviratne and Tamasha Malepathirana and Sanka Rasnayaka and Deshani Geethika and Terence Sim and Saman K. Halgamuge},
  title = {{Undercover Deepfakes: Detecting Fake Segments in Videos}},
  booktitle = {Workshops @ ICCV},
  year = {2023},
  doi = {10.1109/iccvw60793.2023.00048},
}
Figure