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.
Figures & tables
Figure 1: Overview of the proposed method, consisting of feature extraction, supervised contrastive prototype refinement and anomaly detection.
Figure 2: t-SNE projections of the embedding space after training. Light blue indicates the real samples. Real samples form compact clusters, while unseen generator samples (held out during training) remain distinct or peripheral.
Figure 3: Average accuracy per generator under leave-one-out evaluation. Subfigure (a) shows accuracy on seen generators; (b) shows accuracy on unseen ones. UniGADD maintains high performance across both, outperforming previous methods in generalisation.
Method →
Cozzolino et al. ↑
Ohja et al. ↑
Wang et al. ↑
DINOv2 + Linear ↑
Ours ↑
↓ Generator
Seen
Unseen
Seen
Unseen
Seen
Unseen
Seen
Unseen
Seen
Unseen
GANs
BigGAN
79.92
60.47
91.49
80.79
91.03
66.12
91.16
52.50
94.80
88.50
CycleGAN
79.84
60.18
91.55
73.79
89.48
71.86
89.97
50.17
91.58
89.10
Faces
79.77
59.82
91.59
55.05
86.27
62.10
90.20
48.04
94.24
88.00
GauGAN
79.96
60.60
91.69
79.74
90.76
74.95
97.16
51.92
95.03
87.06
ProGAN
79.22
60.60
91.39
67.09
87.42
56.47
90.04
45.06
91.47
82.50
Table 1: Detection performance by generator across different methods for Leave-One-Out, showing Seen and Unseen accuracy. Generators are grouped by model type (GANs vs Diffusion). Our (UniGADD) results are highlighted in green.
Figure 4: Average accuracy as the number of generators excluded from training increases. UniGADD generalises more robustly than prior methods.
Method →
Cozzolino et al. ↑
Ohja et al. ↑
Wang et al. ↑
DINOv2 + Linear ↑
Ours ↑
↓N Unseen
Seen
Unseen
Seen
Unseen
Seen
Unseen
Seen
Unseen
Seen
Unseen
3
79.455
75.35
90.92
86.79
89.3
76.5
90.6
62.5
94.20
86.04
5
79.10
78.86
90.44
86.88
88.5
75.5
90.0
63.0
93.79
87.42
7
76.32
73.86
90.10
83.68
87.3
74.2
89.4
62.0
93.00
89.46
9
78.65
71.79
89.17
83.26
86.6
73.0
88.8
58.5
91.94
83.30
11
76.62
68.35
90.10
72.29
86.0
72.0
88.2
57.0
90.87
84.63
Table 2: Detection performance by generator across different methods for Leave- N -Out, showing Seen and Unseen accuracy. Our (UniGADD) results are highlighted in green.
Backbone →
ViT-B-32 ↑
ViT-L-14 ↑
DINOv2-B/14 ↑
DINOv2-S/14 ↑
↓ Generator
Seen
Unseen
Seen
Unseen
Seen
Unseen
Seen
Unseen
GANs
BigGAN
89.54
62.00
96.55
88.50
91.02
91.25
81.91
65.75
CycleGAN
87.57
71.50
96.68
88.50
92.83
84.25
79.93
69.50
Faces
86.74
57.25
96.68
86.50
89.70
76.25
79.11
63.25
GauGAN
90.72
67.75
96.38
83.50
91.41
87.25
82.47
68.25
ProGAN
89.12
76.25
96.91
81.25
94.22
77.92
81.56
76.25
Table 3: Detection accuracy by backbone across GAN and Diffusion generators under Leave-One-Out setting.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Clusters
nreal
Ratio
Seen
Unseen
20
3
0.19
87.6
45.8
30
13
0.81
87.0
54.8
40
23
1.44
87.4
54.0
60
43
2.69
88.4
54.5
80
63
3.94
88.3
52.2
100
83
5.19
88.6
56.6
Appendix
Table 4: Cluster ablation showing the effect of varying the total number of clusters.
σ
Seen Acc
Unseen Acc
1.0
91.5
46.2
1.5
90.4
51.3
2.0
89.7
54.0
2.5
89.3
55.2
3.0
89.2
55.7
3.5
89.1
56.0
Appendix
Table 5: Threshold ablation showing the effect of varying σ on detection accuracy.
Current generative models, including GANs and diffusion models, have reached an outstanding level of photorealism, posing significant risks to privacy and security. To ensure real-world applicability, deepfake detectors must generalise effectively to unseen generators. However, most existing approaches rely on supervised training with both real and fake images, which limits their generalisation especially across generators categories (e.g. GANs vs DMs). In this work, we introduce μFlow, a one-class deepfake detector trained only on real images without relying on pseudo-deepfakes or synthetic artifacts. Our approach builds on the observation that averaging multiple images amplifies consistent generative traces, producing highly discriminative feature representations. We leverage this property by modelling the distribution of features extracted from averaged images and training a normalizing flow to align the feature space of individual images with this distribution. This alignment yields a likelihood-based criterion that separates real and fake samples while promoting strong generalisation. We evaluate μFlow on a fully out-of-distribution setting, where both real and fake datasets are unseen during training. Experimental results show that our method significantly outperforms SOTA detectors. Project page: https://opontorno.github.io/MuFlow.
Orazio Pontorno, Mattia Litrico, Luca Guarnera +2
University of Catania, Catania, Italy · University of Nottingham, Nottingham, UK
Deepfake detectors face growing challenges in generalization as new image synthesis techniques emerge. In particular, deepfakes generated by diffusion models are highly photorealistic and often evade detectors trained on GAN-based forgeries. This paper addresses the generalization problem in deepfake detection by leveraging diffusion noise characteristics. We propose an Attention-guided Noise Learning (ANL) framework that integrates a pre-trained diffusion model into the deepfake detection pipeline to guide the learning of more robust features. Specifically, our method uses the diffusion model's denoising process to expose subtle artifacts: the detector is trained to predict the noise contained in an input image at a given diffusion step, forcing it to capture discrepancies between real and synthetic images, while an attention-guided mechanism derived from the predicted noise is introduced to encourage the model to focus on globally distributed discrepancies rather than local patterns. By harnessing the frozen diffusion model's learned distribution of natural images, the ANL method acts as a form of regularization, improving the detector's generalization to unseen forgery types. Extensive experiments demonstrate that ANL significantly outperforms existing methods on multiple benchmarks, achieving state-of-the-art accuracy in detecting diffusion-generated deepfakes. Notably, the proposed framework boosts generalization performance (e.g., improving ACC/AP by a substantial margin on unseen models) without introducing additional overhead during inference. Our results highlight that diffusion noise provides a powerful signal for generalizable deepfake detection.
The rapid progress of generative adversarial networks (GANs) and diffusion models has enabled the creation of synthetic faces that are increasingly difficult to distinguish from real images. This progress, however, has also amplified the risks of misinformation, fraud, and identity abuse, underscoring the urgent need for detectors that remain robust across diverse generative models. In this work, we introduce Counterfeit Image Pattern High-level Examination via Representation(CIPHER), a deepfake detection framework that systematically reuses and fine-tunes discriminators originally trained for image generation. By extracting scale-adaptive features from ProGAN discriminators and temporal-consistency features from diffusion models, CIPHER captures generation-agnostic artifacts that conventional detectors often overlook. Through extensive experiments across nine state-of-the-art generative models, CIPHER demonstrates superior cross-model detection performance, achieving up to 74.33% F1-score and outperforming existing ViT-based detectors by over 30% in F1-score on average. Notably, our approach maintains robust performance on challenging datasets where baseline methods fail, with up to 88% F1-score on CIFAKE compared to near-zero performance from conventional detectors. These results validate the effectiveness of discriminator reuse and cross-model fine-tuning, establishing CIPHER as a promising approach toward building more generalizable and robust deepfake detection systems in an era of rapidly evolving generative technologies.