Abstract
The proliferation of sophisticated face manipulation techniques, commonly known as "Deepfakes," presents significant security and privacy challenges. Traditional detection methods often struggle with generalization, performing well on known datasets but failing in cross-domain scenarios. This paper presents a novel framework that leverages a Vision Transformer (ViT) backbone combined with Low-Rank Adaptation (LoRA) and a Single-Center Loss (SCL). By freezing the pretrained ViT and training only low-rank adapter modules, the model preserves general image features while adapting to forgery-specific artifacts. Experimental results demonstrate that this approach significantly improves cross-dataset and cross-manipulation performance, establishing a robust baseline for general face forgery detection.
Introduction
The rapid advancement of generative AI has democratized the creation of highly realistic face forgeries. While early detection models achieved high accuracy on specific benchmarks, their performance typically degrades when encountering unseen manipulation methods or variations in environmental conditions, such as lighting and compression. This "generalization gap" stems from models overfitting to the specific digital artifacts present in training data.
To address this, recent research has shifted toward developing "general" detectors. The goal is to identify universal indicators of forgery rather than specific manipulation signatures. This paper proposes a methodology that combines the global feature extraction capabilities of Vision Transformers with parameter-efficient fine-tuning and a specialized loss function designed for anomaly detection.
Methodology
The proposed framework consists of three core components designed to maximize robustness and efficiency.
Vision Transformer (ViT) Backbone
Unlike traditional Convolutional Neural Networks (CNNs) that focus on local textures, Vision Transformers (ViTs) utilize self-attention mechanisms to capture global dependencies across an entire image. This global perspective is crucial for face forgery detection, as it allows the model to identify structural inconsistencies and long-range artifacts that local filters might miss. The authors utilize a ViT pretrained on ImageNet to provide a strong foundation of general visual features.
Low-Rank Adaptation (LoRA)
A major hurdle in using large-scale models like ViT is the risk of "catastrophic forgetting" during full fine-tuning. When the entire model is updated for a specific task, it often loses the broad, robust representations learned during pretraining. To mitigate this, the authors employ Low-Rank Adaptation (LoRA).
In this setup, the original weights of the ViT backbone are frozen. Small, trainable low-rank matrices are inserted into the attention layers. This approach reduces the number of trainable parameters from $3Dd$ to $r(D+d)$, where $r$ is the rank. This parameter-efficient tuning allows the model to adapt to the nuances of face forgery while retaining the general-purpose features of the pretrained backbone, leading to better generalization on unseen data.
Single-Center Loss (SCL)
Standard binary classification (real vs. fake) often fails because there are infinite ways to create a "fake" face. The authors instead treat forgery detection as an anomaly detection problem. By implementing a Single-Center Loss (SCL), the model is trained to cluster the features of "real" faces tightly around a single center in the feature space. Any face that falls outside this compact cluster is classified as a forgery. This "real-as-anchor" strategy makes the model more resilient to new manipulation techniques, as it focuses on what a real face should look like rather than what a specific fake does look like.
Experimental Evaluation
The model was rigorously tested using the FaceForensics++ (FF++) dataset as the primary training source, which includes four distinct manipulation types: Deepfakes (DF), Face2Face (FF), FaceSwap (FS), and NeuralTextures (NT).
Cross-Manipulation Performance
In "leave-one-out" experiments—where the model is trained on three manipulation types and tested on a fourth—the proposed method achieved an average AUC of 0.792 on high-quality data. This significantly outperformed the standard ViT baseline (0.623) and surpassed previous state-of-the-art methods like LTW (0.786).
Cross-Dataset Generalization
To evaluate real-world applicability, the model was tested on unseen datasets, including CelebDF, DeepFakeDetection (DFD), and the Deepfake Detection Challenge (DFDC). The results showed an average 11.19% AUC improvement over the baseline ViT, achieving an average AUC of 71.69% across all external test sets.
Robustness to Compression
The model also demonstrated superior performance on low-quality, heavily compressed videos (LQ/c40), showing a 6.6% AUC boost over the baseline. This suggests that the combination of LoRA and SCL helps the model ignore compression noise and focus on more fundamental forgery artifacts.
Conclusion
This research highlights the potential of combining Vision Transformers with parameter-efficient adaptation for the task of face forgery detection. By focusing on the compactness of "real" face features and avoiding the pitfalls of full fine-tuning, the proposed framework achieves state-of-the-art generalization. Future work will explore alternative tuning methods such as Visual Prompt Tuning (VPT) and the development of more lightweight backbones to facilitate real-time detection on edge devices.
Summary updated