UniForensics: Face Forgery Detection via General Facial Representation

Authors: Ziyuan Fang, Hanqing Zhao, Tianyi Wei, Wenbo Zhou, Ming Wan, Zhanyi Wang, Weiming Zhang, Nenghai Yu

Published: 2024-07-26 20:51:54+00:00

AI Summary

This paper introduces UniForensics, a novel deepfake detection framework that leverages a transformer-based video classification network initialized with a meta-functional face encoder to exploit high-level semantic facial features and temporal inconsistencies. The method proposes Dynamic Video Self-Blending (DVSB) to efficiently generate training samples with diverse spatio-temporal forgery traces and employs a two-stage training approach involving self-supervised contrastive learning followed by fine-tuning. UniForensics demonstrates superior generalization and robustness against unseen forgery methods and digital corruptions, achieving state-of-the-art performance on challenging cross-dataset evaluations.

Abstract

Previous deepfake detection methods mostly depend on low-level textural features vulnerable to perturbations and fall short of detecting unseen forgery methods. In contrast, high-level semantic features are less susceptible to perturbations and not limited to forgery-specific artifacts, thus having stronger generalization. Motivated by this, we propose a detection method that utilizes high-level semantic features of faces to identify inconsistencies in temporal domain. We introduce UniForensics, a novel deepfake detection framework that leverages a transformer-based video classification network, initialized with a meta-functional face encoder for enriched facial representation. In this way, we can take advantage of both the powerful spatio-temporal model and the high-level semantic information of faces. Furthermore, to leverage easily accessible real face data and guide the model in focusing on spatio-temporal features, we design a Dynamic Video Self-Blending (DVSB) method to efficiently generate training samples with diverse spatio-temporal forgery traces using real facial videos. Based on this, we advance our framework with a two-stage training approach: The first stage employs a novel self-supervised contrastive learning, where we encourage the network to focus on forgery traces by impelling videos generated by the same forgery process to have similar representations. On the basis of the representation learned in the first stage, the second stage involves fine-tuning on face forgery detection dataset to build a deepfake detector. Extensive experiments validates that UniForensics outperforms existing face forgery methods in generalization ability and robustness. In particular, our method achieves 95.3\\% and 77.2\\% cross dataset AUC on the challenging Celeb-DFv2 and DFDC respectively.


Key findings
UniForensics achieves state-of-the-art performance in generalization ability and robustness, outperforming existing face forgery detection methods. It achieved 95.3% and 77.2% cross-dataset AUC on Celeb-DFv2 and DFDC respectively, demonstrating strong performance on unseen datasets and robustness to various video corruptions. Ablation studies confirm the effectiveness of the pre-trained face encoder initialization, the Dynamic Video Self-Blending method, and the two-stage training strategy.
Approach
The proposed UniForensics framework uses a UniFormerV2-B/16 transformer-based video classification network, initialized with a meta-functional face encoder (FaRL) to extract robust, high-level semantic facial features and identify temporal inconsistencies. It introduces Dynamic Video Self-Blending (DVSB) to synthesize diverse spatio-temporal forgery samples from real videos by applying temporally smoothed transformations. A two-stage training strategy is employed: first, self-supervised contrastive learning on DVSB-generated samples to learn generic forgery traces, and second, fine-tuning on face forgery detection datasets.
Datasets
VoxCeleb2, FaceForensics++ (FF++), Celeb-DFv2 (CDF), DFDC, FaceShifter
Model(s)
FaRL (ViT-based general facial encoder), UniFormerV2-B/16 (transformer-based video classification network), RetinaFace (for face detection), Dlib (for landmark detection)
Author countries
China