Universal deepfake detection aims to identify AI-generated images across a broad range of generative models, including unseen ones. This requires robust generalization to new and unseen deepfakes, which emerge frequently, while minimizing computational overhead to enable large-scale deepfake screening, a critical objective in the era of Green AI. In this work, we explore frequency-domain masking as a training strategy for deepfake detectors. Unlike traditional methods that rely heavily on spatial features or large-scale pretrained models, our approach introduces random masking and geometric transformations, with a focus on frequency masking due to its superior generalization properties. We demonstrate that frequency masking not only enhances detection accuracy across diverse generators but also maintains performance under significant model pruning, offering a scalable and resource-conscious solution. Our method achieves state-of-the-art generalization on GAN- and diffusion-generated image datasets and exhibits consistent robustness under structured pruning. These results highlight the potential of frequency-based masking as a practical step toward sustainable and generalizable deepfake detection. Code and models are available at https://github.com/chandlerbing65nm/FakeImageDetection.
翻译:通用深度伪造检测旨在识别广泛生成模型(包括未见模型)生成的AI图像。这需要对新出现的、频繁出现的未见深度伪造具有鲁棒泛化能力,同时最小化计算开销以实现大规模深度伪造筛查——这是绿色AI时代的关键目标。在本工作中,我们探索将频域掩码作为深度伪造检测器的训练策略。与严重依赖空间特征或大规模预训练模型的传统方法不同,我们的方法引入了随机掩码和几何变换,并重点研究频域掩码因其卓越的泛化特性。我们证明频域掩码不仅能提升跨多样生成器的检测准确率,还能在显著模型剪枝下保持性能,提供可扩展且资源节约的解决方案。我们的方法在GAN和扩散生成图像数据集上实现了最先进的泛化性能,并在结构化剪枝下表现出一致的鲁棒性。这些结果凸显了基于频率的掩码作为迈向可持续、可泛化深度伪造检测的实用步骤的潜力。代码和模型可在 https://github.com/chandlerbing65nm/FakeImageDetection 获取。