UniGADD: Universal Generator-Agnostic Deepfake Detector¶
Authors: Bernard Tomczyk, Agil Aghasanli, Plamen Angelov Affiliation: School of Computing and Communications, Lancaster University, UK Venue: arXiv cs.SI, November 2026 — arxiv
TL;DR¶
UniGADD proposes a two-stage supervised contrastive learning framework for detecting deepfakes from previously unseen generators. The method learns discriminative embeddings from known fake generators in stage one, then refines cluster structure via intra-cluster compactness constraints in stage two. Evaluated on the AIGC dataset covering GAN and diffusion-based generators, UniGADD achieves 85.63% accuracy on unseen generators while maintaining high performance on known ones, substantially outperforming prior detection methods and demonstrating strong generalization to novel synthesis techniques.
Contributions¶
- Generator-agnostic detection framework combining supervised contrastive learning with prototype-based refinement to generalize beyond training generators.
- Two-stage approach that leverages real-image clustering to create pseudo-labels and then tightens cluster geometry through intra-cluster compactness and weak-positive/weak-negative loss terms.
- Comprehensive evaluation using leave-one-out and leave-N-out protocols on AIGC dataset, covering both GAN and diffusion-based synthesis methods with multiple backbone architectures.
- Competitive performance on both seen (>90% accuracy) and unseen generators (85.63% average, 18.51pp range), with lower variance across generators than prior methods.
Method¶
UniGADD addresses the challenge of deepfake detection when novel generators emerge at test time. The pipeline consists of:
Feature Extraction. The method extracts embeddings using state-of-the-art vision transformer architectures (CLIP ViT-L/14, DINOv2, or other frozen backbones) that provide a unified representation space for real and fake images.
Stage 1: Supervised Contrastive Learning. Real images are pseudo-labeled via k-means clustering, assigning cluster identities as pseudo-labels. Fake samples retain their ground-truth generator labels. A contrastive loss encourages samples with the same pseudo/true label to align in embedding space while pushing apart dissimilar instances. This creates an initial discriminative structure in the embedding space.
Stage 2: Intra-Cluster Refinement. The real cluster distribution is further refined by identifying super-positive regions (highly aligned, clean samples within each cluster) and weak-positive regions (peripheral samples). A two-part loss tightens the core while softly regularizing the periphery, improving robustness to out-of-distribution fakes from unseen generators.
Detection and Attribution. At test time, test embeddings are classified by Euclidean distance to cluster centroids (both real and generator-specific fake centroids), enabling simultaneous detection (real vs. fake) and generator attribution.
Results¶
Leave-One-Out Evaluation. Across 16 generators (GAN and diffusion models): - Seen generators: 90.16–95.16% accuracy (mean 94.80%) - Unseen generators: 58.04–88.50% accuracy (mean 85.63%) - UniGADD achieves best unseen accuracy (85.63%) with lower variance (14.85) than baselines (Wang et al. 15.09pp, DINOv2+Linear 30.86pp).
Leave-N-Out Evaluation. When N generators (3–13) are excluded during training: - Unseen accuracy remains stable: 92.47% (N=3) → 83.63% (N=13) - Outperforms Ojha et al., Wang et al., and DINOv2+Linear by substantial margins, even with 80% of training data excluded.
Backbone Robustness. Performance holds across frozen encoders (CLIP, DINOv2 variants), suggesting the refinement strategy is architecture-agnostic rather than dependent on a specific backbone.
Per-Generator Breakdown. On unseen generators, diffusion-based models (Stable Diffusion, Amused) show higher robustness (87–88% accuracy) than some GAN variants, highlighting that refinement captures broader generative characteristics beyond specific model families.
Connections¶
- Related to Ba et al. (2024) — Exposing the Deception: Uncovering More Forgery Clues for Deepfake Detection via multi-feature forensic approaches to detection.
- Related to survey literature on generalization to unseen deepfake generation techniques (e.g., Nattali et al. 2023, Rana et al. 2022).
- Related to Exposing the Deception: Uncovering More Forgery Clues for Deepfake Detection on using vision transformers for image forensics.
- Builds on prototypical network ideas from few-shot learning (Snell et al. 2017).
Notes¶
Strengths: - Novel two-stage architecture effectively decouples initial discriminability (stage 1) from robustness to distribution shift (stage 2). - Thorough evaluation protocol (LOO, L-N-O) honestly measures generalization under increasing distributional mismatch. - Results demonstrate consistent advantage over recent baselines, including both supervised (Ojha, Wang) and self-supervised (DINOv2) approaches. - Framework is architecture-agnostic across frozen vision transformers, suggesting the refinement strategy generalizes.
Limitations: - Evaluation limited to image-domain deepfakes; temporal coherence in videos and audio deepfakes remain unexplored. - Method assumes access to labeled examples from known generators at training time; full zero-shot scenarios not addressed. - Fixed clustering hyperparameters (40 clusters for real data) and fixed decision thresholds require validation per deployment; adaptive thresholding strategies not explored. - Performance on low-shot or imbalanced datasets untested; scalability to resource-constrained deployments not discussed. - Inference efficiency metrics not reported; prototype-based decisions should be fast, but latency not benchmarked against baselines.
Open questions: - How does performance degrade with adversarial perturbations on fake samples (e.g., compression, cropping, color shifts)? - Can the refinement objective be extended to multimodal (video + audio) deepfakes? - Does the method transfer to emerging generators (e.g., text-to-image models) without retraining?