TL;DR
This paper evaluates how well Vision Transformers (ViTs) and Convolutional Neural Networks (CNNs) generalize to unseen deepfake generation techniques. By conducting cross-forgery experiments on the massive ForgeryNet dataset, the authors demonstrate that while CNNs excel at specializing in specific training methods, ViTs possess a superior ability to generalize, making them far more robust at detecting novel, unencountered types of deepfakes.
What Problem Does This Paper Address?
Deepfake generation techniques (such as GANs and Variational Autoencoders) are evolving at a breakneck pace, making it easy to create highly realistic facial manipulations. To counter this, researchers develop deepfake detectors, but these models face a major hurdle: cross-forgery generalization.
Most detectors are trained on specific, known manipulation methods. When deployed in the real world, they frequently fail against new forgery techniques because they have only learned to recognize the specific artifacts of their training data. Constantly retraining networks on every new deepfake method is unfeasible due to data scarcity and computational costs. This paper addresses this gap by investigating whether ViTs or CNNs are inherently better at learning the general concept of a deepfake rather than just memorizing specific manipulation signatures.
Methods
The authors set up a rigorous comparative study between two prominent network architectures:
- EfficientNetV2-M: A state-of-the-art CNN optimized for speed and accuracy, representing the traditional convolutional approach.
- ViT-Base: A standard Vision Transformer of similar dimensions, representing the self-attention-based approach.
Both networks are pre-trained on ImageNet-21k. To evaluate generalization, the authors fine-tune only the last two blocks of the networks using two distinct strategies:
- Single Method Training: Training on real images plus images manipulated by just one specific deepfake technique (e.g., FaceShifter, Talking Head Video, or StyleGAN2).
- Multiple Methods Training: Training on real images plus a group of distinct deepfake techniques belonging to the same broader category (e.g., various face transfer or face reenactment methods).
For preprocessing, faces are extracted using the MTCNN face detector to create square, unpadded crops. Data augmentation (isotropic resizing, compression, Gaussian noise, flips, and brightness/saturation distortions) is applied during training to improve robustness. Finally, both models are tested against 15 different deepfake generation methods to evaluate how well they perform on unseen forgeries.
Datasets
The study utilizes ForgeryNet, one of the largest and most diverse deepfake benchmarks available, consisting of 2.9 million images and 220,000 video clips. The dataset includes 15 different manipulation approaches categorized into two macro-categories:
- ID-remained: The subject's identity is preserved, but attributes or expressions are altered (e.g., Face Reenactment, Face Editing).
- ID-replaced: The subject's identity is replaced by transferring a different face (e.g., Face Swap, Face Transfer).
Key Insights and Ideas
- The Specialization vs. Generalization Trade-off: CNNs exhibit a strong tendency to specialize. EfficientNetV2 achieves excellent accuracy on the specific deepfake methods it was trained on, but its performance drops drastically when faced with novel techniques. It learns specific local artifacts rather than the abstract concept of a fake.
- ViTs as Stable Generalizers: Vision Transformers show significantly lower variance in accuracy across different forgery methods. Even if their peak accuracy on the training data is slightly lower than the CNN's, their performance remains remarkably stable when encountering completely new deepfake techniques.
- The StyleGAN2 Anomaly: When trained exclusively on StyleGAN2 data, both models suffered a severe drop in performance on unmanipulated (real) images. This indicates that highly advanced generation methods introduce far fewer obvious artifacts, making the boundary between real and fake exceptionally nuanced for neural networks to learn cleanly.
Key Results
To quantify generalization capability, the authors calculated the variance ($\sigma^2$) of the models' classification accuracies across all 15 fake methods plus real images. A lower variance indicates more consistent performance across diverse forgery types.
- Single-Method Experiments: When trained only on FaceShifter data, ViT-Base achieved a variance of 0.009, whereas EfficientNetV2-M showed a much higher variance of 0.018.
- Multi-Method Experiments: When trained on multiple Face Reenactment methods, ViT-Base maintained a lower variance (0.013) compared to EfficientNetV2-M (0.024). As seen in the evaluations, the CNN frequently hyper-focused on a single method within the training group (achieving up to 81.1% accuracy on one but dropping to 47% on another), while the ViT maintained a stable ~62% accuracy across the board.
Limitations and Future Work
- Low Absolute Accuracy on Novel Forgeries: Although ViTs generalize better than CNNs, the absolute accuracy on completely unseen deepfake methods remains relatively low for both architectures (often hovering around 50-60%, which is close to random guessing).
- Image-Only Constraints: This study focuses entirely on frame-based image detection. It does not exploit temporal inconsistencies across frames, which are crucial for robust video deepfake detection.
- Future Directions: The authors suggest that future research should explore hybrid architectures that combine the localized feature-extraction strengths of CNNs with the global context and generalization capabilities of Transformers.
Summary updated