Abstract
Deepfake detection models often struggle with a "generalization gap," where high performance on specific training datasets fails to translate to novel manipulation methods. This paper introduces the Transfer learning-based Autoencoder with Residuals (TAR) framework. By utilizing a novel Facilitator module to partition the latent space and a sequential few-shot transfer learning approach, TAR achieves over 98% accuracy across multiple domains and nearly 90% accuracy on unseen, real-world "in-the-wild" deepfakes.
Introduction
Deepfake generation has become an arms race. While researchers have developed highly accurate detectors, most are overfit to specific generation techniques. For instance, a model trained to find FaceSwap artifacts might be blind to Face2Face manipulations. In real-world digital forensics, tools must be generalized to detect new, unseen types of deepfakes with minimal retraining data.
The authors identify two major hurdles in current research:
- Domain Mismatch: Detection performance drops significantly when testing on a different generation method than the one used for training.
- Data Scarcity: Collecting thousands of samples for every new deepfake method is impractical. Models must learn from "few-shot" samples, such as just a few seconds of video.
Methodology
The TAR Architecture
The TAR framework is built upon an autoencoder structure rather than a standard CNN classifier. To prevent vanishing gradients across its 45 convolutional layers, the authors integrated Residual (skip) connections, allowing the model to capture both high-level semantic features and low-level pixel inconsistencies.
A core innovation is the Facilitator Module. During training, this module explicitly forces the latent space—the compressed representation of the image—to divide into two distinct parts: one for "real" features and one for "fake" features. By zeroing out the "opposite" class activations during training, the encoder is forced to learn highly discriminative features for each category, avoiding the feature interference that plagues standard classifiers.
Sequential Few-Shot Transfer Learning
Instead of training on all domains simultaneously, the model follows a sequential fine-tuning process. It is initially trained on a base domain and then sequentially updated for others using only 50 frames (roughly 2 seconds of video) per new method. This simulates a real-world scenario where a forensic analyst might only have a single short clip of a new deepfake type to update their tools.
Datasets and Experimental Setup
The study utilizes two primary data sources:
- FaceForensics++: The industry standard, containing videos generated by four methods: DeepFakes (DF), FaceSwap (FS), Face2Face (F2F), and NeuralTextures.
- Deepfake-in-the-Wild (DW): A dataset compiled by the authors consisting of 200 real-world deepfake videos of 50 celebrities collected from the internet. This serves as the ultimate "stress test" for generalization.
During development, the authors discovered that Leaky ReLU was critical. Standard ReLUs often lead to "zero activations" on small or low-quality input images; switching to Leaky ReLU with a small slope (10⁻⁷) ensured the model could still process low-resolution or highly compressed frames.
Key Results
- Base Performance: TAR achieved >99% accuracy on the FaceForensics++ base datasets, outperforming state-of-the-art baselines like Xception and ForensicTransfer.
- Generalization: After sequential transfer learning, the model maintained an average accuracy of 98.01% across all tested domains.
- Real-World Testing: On the "Deepfake-in-the-Wild" dataset, TAR achieved 89.49% zero-shot accuracy (after brightness/contrast adjustment). This was a 10.77% improvement over the best-performing baseline model, proving its utility for actual digital forensic work.
Conclusion and Future Work
A significant finding was the "Lighting Gap": real-world deepfakes (DW dataset) often have different contrast levels than lab-created benchmarks. Manually adjusting brightness/contrast by 30% significantly boosted detection accuracy, suggesting that environmental lighting is a major "tell" in current deepfakes.
While the TAR framework is architecturally sound, future iterations should incorporate automated data augmentation (specifically varying brightness and contrast) during training. This would allow the model to learn "lighting invariance" natively, removing the need for manual inference-stage adjustments.
Summary updated