arXiv:2611.07647cs.CVNov 2026

Manuscript Offprint

arXiv:2611.07647

UniGADD: Universal Generator-Agnostic Deepfake Detector

Bernard Tomczyk, Agil Aghasanli, Plamen Angelov

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

In this paper, we introduce Universal Generator-Agnostic Deepfake Detector (UniGADD), a novel method that employs supervised learning to achieve high accuracy on known deepfake generators, while maintaining robust performance on previously unseen ones. The proposed approach follows a two-stage optimisation process. In the first stage, a contrastive loss encourages the model to learn discriminative feature embeddings from real and known fake images, resulting in strong performance within the training domain. In the second stage, the embedding space is refined by promoting inter-cluster separation and intra-cluster compactness, applied exclusively to real samples. This refinement enhances generalisability, enabling the method to exhibit improved robustness against unseen deepfake generation techniques. UniGADD achieves accuracy on par with state-of-the-art methods for known generators, while significantly outperforming them on unseen cases, demonstrating its scalability and practical applicability for adversarial content detection.

Code: https://github.com/Aghasanli/UniGADD-Universal-Generator-Agnostic-Deepfake-Detector

1 Introduction

The rapid proliferation of deepfake generators poses an escalating challenge for forensic tools (Rana et al., 2022). Most published detectors are trained with labelled examples from a fixed set of generators, achieving high accuracy on those seen attacks yet faltering when confronted with novel manipulation pipelines. Pellicer et al. (Pellicer et al., 2024) frame the task as unsupervised anomaly detection, showing that generator-agnostic cues exist, although their reliance on nominal-only statistics leaves recent advances in representation learning under-explored.

To address the cold-start scenario where no fake examples are available, we refine foundation-model embeddings with a dedicated contrastive loss and derive prototypes that map the real-image distribution. Samples that deviate from these prototypes are flagged as potential anomalies, enabling detection without generator-specific supervision. This approach sidesteps the need for curated fake datasets and remains robust as synthesis methods evolve.

While such unsupervised strategies excel in generalisability, purely nominal training can sacrifice closed-set precision. Conversely, supervised detectors capture fine-grained artefacts but overfit to the generators present in the training set (Wang et al., 2024). We propose the Universal Generator-Agnostic Deepfake Detector (UniGADD), which unifies these complementary strengths. UniGADD first exploits labelled fakes, when available, to carve a discriminative margin between real and manipulated imagery, then tightens the real-image region through the prototype-based refinement introduced above. The result is a detector that preserves high precision on known attacks while degrading gracefully on unseen ones.

Two practical considerations guide our design. Authentic imagery is plentiful, yet collecting labelled samples for every new generator is unrealistic (Naitali et al., 2023). At the same time, detectors must remain reliable as synthesis technology evolves. By combining light supervision with feature-space regularisation, UniGADD meets both requirements without continual retraining.

We benchmark UniGADD on the AIGC datasets (Fan et al., 2024), which contain a diverse mixture of GAN-and diffusion-based generators and reflect varied real-world usage scenarios (Zhu et al., 2023). UniGADD matches or surpasses specialist baselines on their home domains and maintains competitive performance when confronted with previously unseen generators, supporting its suitability for real-world deployment.

Our main contributions are as follows:

  • We introduce UniGADD, a contrastive clustering framework that generalizes synthetic image detection to unseen generative models.

  • We propose a real-image clustering strategy that enables the model to leverage intrinsic data structure without supervision.

  • We establish a leave-one-out protocol covering both GAN- and diffusion-based generators, enabling rigorous evaluation of cross-domain transfer.

  • We demonstrate competitive performance on the challenging AIGC benchmark, highlighting strong one-to-many generalization.

Terminology. Throughout this paper we use the term “deepfake” in a broad sense to mean AI-generated visual content (AIGC). We adopt this wording because “deepfake” has become the prevalent public term for generated images, but whenever precise distinctions are required we explicitly refer to GAN- or diffusion-based synthesis.

References (38)