Introduction
Deepfake detection faces a significant hurdle on Online Social Networks (OSNs). When AI-generated images are uploaded to platforms like Twitter or WeChat, they undergo heavy compression. This process degrades image quality and obscures the subtle digital artifacts that detectors rely on. Most current state-of-the-art methods depend on paired data—datasets where every compressed image has a corresponding raw original. However, in real-world "open-world" scenarios, such pairs are virtually non-existent.
The Open-World Challenge
The scarcity of high-quality originals for compressed social media images creates a massive data imbalance. While compressed images are abundant (unpaired data), their raw counterparts are rare. Traditional models trained primarily on paired data struggle when faced with the diverse and unknown compression levels found in the wild. The Open-world Deepfake Detection Network (ODDN) is designed to bridge this gap by effectively utilizing the vast amount of available unpaired data.
Methodology: The ODDN Framework
ODDN introduces two core modules to handle the complexities of open-world data:
1. Open-world Data Aggregation (ODA)
The ODA module is designed to train on a mixture of 20% paired and 80% unpaired data. For paired data, it employs the Hilbert-Schmidt Independence Criterion (HSIC) to identify fine-grained correlations between raw and compressed versions. For the more abundant unpaired data, ODA uses a "coarse-grained" clustering approach. It calculates aggregation centers for four categories: real, compressed-real, fake, and compressed-fake. A specialized distance loss is then applied to maximize the separation between "real" and "fake" clusters, ensuring the model remains robust regardless of compression state.
2. Compression-discard Gradient Correction (CGC)
The CGC module utilizes adversarial learning to force the model to ignore compression-related features, which often act as a bias. By treating compression as a "fingerprint" to be discarded, the model can focus exclusively on forgery artifacts. To manage the potential conflict between the detection task and the compression-discarding task, ODDN incorporates PCGrad (Projected Conflicting Gradients). This ensures that training directions for these two goals are aligned, preventing model confusion and promoting stable convergence.
Experimental Results
ODDN was evaluated against 17 popular deepfake datasets, including ForenSynths and various GAN-based generators like StyleGAN and CycleGAN. The framework consistently outperformed state-of-the-art baselines such as QAD and SBIs.
- Quality-Aware Inference: When test compression matched training conditions, ODDN achieved a mean accuracy between 71.4% and 72.6%.
- Quality-Agnostic Inference: In unpredictable open-world scenarios with random compression levels, ODDN maintained a high mean accuracy of 70.7% to 72.1%.
Visual analysis using t-SNE confirmed that ODDN produces a much clearer separation between real and fake features in latent space compared to baseline models, which often fail to distinguish between compressed real and compressed fake images.
Conclusion
ODDN represents a significant step forward in making deepfake detection practical for social media. By leveraging unpaired data and explicitly correcting for compression bias, it achieves superior robustness in open-world environments. Future work will look into extending this framework to handle temporal compression in video deepfakes and other social media distortions like resizing and blurring.
Summary updated