ODDN: Addressing Unpaired Data Challenges in Open-World Deepfake Detection on Online Social Networks

Renshuai Tao, Manyi Le, Chuangchuang Tan, Huan Liu, Haotong Qin, Yao Zhao

Introduction

Deepfake detection has become a critical challenge as synthetic media proliferates across Online Social Networks (OSNs). Most existing detectors are optimized for "closed-world" laboratory scenarios, where high-quality, raw images are readily available. However, real-world OSN environments involve heavy, lossy compression that obscures the subtle digital fingerprints used for detection. A significant hurdle in this "open-world" context is the lack of paired data—instances where both the raw and compressed versions of the same image are available for training.

Comparison of traditional paired training versus the proposed open-world paradigm.

In practice, unpaired compressed images vastly outnumber paired ones. Traditional models struggle to generalize under these conditions, leading to performance degradation when faced with the unpredictable compression artifacts of platforms like Twitter or WeChat. To address this, we present the Open-world Deepfake Detection Network (ODDN), which leverages a novel data aggregation strategy and gradient correction to handle the data imbalance found in the wild.

Methodology

ODDN is designed to leverage both scarce paired data and abundant unpaired data through two primary modules: Open-world Data Aggregation (ODA) and Compression-discard Gradient Correction (CGC).

The ODDN architecture, detailing the Open-world Data Aggregation (ODA) and Compression-discard Gradient Correction (CGC) modules.

Open-world Data Aggregation (ODA)

To handle the data imbalance (e.g., 20% paired, 80% unpaired), ODA employs a dual strategy. For paired data, it utilizes the Hilbert-Schmidt Independence Criterion (HSIC) to maximize feature correlation between raw and compressed counterparts. For the majority unpaired data, ODA implements a coarse-grained correlation approach by calculating and clustering four distinct feature centers: real, compressed-real, fake, and compressed-fake. This clustering forces the model to learn robust class representations even in the absence of direct image pairs, effectively extracting value from the "noise" of unpaired data.

Compression-discard Gradient Correction (CGC)

The CGC module aims to make the detector invariant to compression artifacts. It uses an adversarial learning framework with a Gradient Reversal Layer (GRL) to prevent the model from learning features specific to compression types. To resolve potential conflicts between the primary detection task and the adversarial compression-discard task, ODDN incorporates PCGrad (Projecting Conflicting Gradients). This "gradient surgery" technique projects conflicting gradient vectors onto each other’s normal planes, ensuring that the optimization process remains focused on the primary goal of forgery detection without being hindered by the sub-task of ignoring compression.

Experimental Setup

The ODDN framework was evaluated against 17 popular deepfake datasets. Training was conducted using the ForenSynths (ProGAN) and LSUN datasets. Testing spanned 16 additional GAN-based datasets, including StyleGAN, CycleGAN, and StarGAN, to assess cross-model generalization. To simulate real-world OSN conditions, the training set was structured with a 20/80 split of paired and unpaired data, respectively, and images were subjected to varying levels of JPEG compression.

Results and Discussion

ODDN consistently outperformed state-of-the-art (SOTA) baselines, including QAD, FF++, and F3Net, across both quality-aware and quality-agnostic scenarios:

  • Detection Accuracy: In quality-aware settings, ODDN achieved a mean accuracy of 71.4%, surpassing the best baseline by 2.2%. In more challenging quality-agnostic tests—where compression levels are unknown and varied—ODDN maintained a robust 72.1% accuracy, whereas other models saw significant performance drops.
  • Feature Representation: t-SNE visualizations confirmed that ODDN produces superior feature separation. While baseline models often struggled to distinguish real and fake features under heavy compression, ODDN maintained clear, distinct clusters.
  • Robustness: By forcing the encoder to ignore compression variations, the model successfully learned generalized forgery indicators that are resilient to the harsh processing typical of social media platforms.

Conclusion

ODDN effectively bridges the gap between laboratory-constrained deepfake detection and the complexities of open-world social networks. By integrating coarse-grained data aggregation and gradient-corrected adversarial learning, the model achieves high robustness against compression artifacts even when paired training data is scarce. Future work will focus on expanding the framework to handle a wider variety of image degradations beyond JPEG compression and exploring performance at even lower paired-data ratios.

Summary updated

BibTeX
@inproceedings{tao2025oddn,
  author = {Renshuai Tao and Manyi Le and Chuangchuang Tan and Huan Liu and Haotong Qin and Yao Zhao},
  title = {{ODDN: Addressing Unpaired Data Challenges in Open-World Deepfake Detection on Online Social Networks}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i1.32063},
}
Figure