Frequency-Aware Deepfake Detection: Improving Generalizability through Frequency Space Learning

Chuangchuang Tan, Yao Zhao, Shikui Wei, Guanghua Gu, Ping Liu, Yunchao Wei

Abstract

This research addresses the challenge of developing a universal deepfake detector that can effectively identify unseen deepfake images despite limited training data. Existing frequency-based paradigms have relied on frequency-level artifacts introduced during the up-sampling in GAN pipelines to detect forgeries. However, the rapid advancements in synthesis technology have led to specific artifacts for each generation model. Consequently, these detectors have exhibited a lack of proficiency in learning the frequency domain and tend to overfit to the artifacts present in the training data, leading to suboptimal performance on unseen sources. To address this issue, we introduce a novel frequency-aware approach called FreqNet, centered around frequency domain learning, specifically designed to enhance the generalizability of deepfake detectors. Our method forces the detector to continuously focus on high-frequency information, exploiting high-frequency representation of features across spatial and channel dimensions. Additionally, we incorporate a straightforward frequency domain learning module to learn source-agnostic features. It involves convolutional layers applied to both the phase spectrum and amplitude spectrum between the Fast Fourier Transform (FFT) and Inverse Fast Fourier Transform (iFFT). Extensive experimentation involving 17 GANs demonstrates the effectiveness of our proposed method, showcasing state-of-the-art performance (+9.8%) while requiring fewer parameters.

Introduction

Deepfake detection has become a high-stakes "cat-and-mouse" game. While current detectors can identify fakes from the specific AI models they were trained on, they often fail when faced with images from a new, "unseen" generator. This lack of generalizability stems from a fundamental flaw: most detectors overfit to specific "fingerprints" or artifacts (like checkerboard patterns from up-sampling) unique to a particular Generative Adversarial Network (GAN). As synthesis technology evolves, these artifacts change. As shown in the frequency analysis in Figure 1, different datasets and GANs exhibit wildly different spectral patterns, making static artifact detection unreliable.

Mean FFT spectra showing distinct artifact patterns across different GAN sources.

The authors argue that instead of treating frequency-level artifacts as a static input, a detector should "learn" how to navigate the frequency space to find universal indicators of forgery.

Methodology: The FreqNet Framework

FreqNet is designed to force a CNN classifier to operate within the frequency domain rather than relying solely on raw pixels. The architecture consists of three main innovative modules:

  1. High-Frequency Representation of Image (HFRI): Before entering the main network, images pass through a Fast Fourier Transform (FFT) and a high-pass filter. This strips away low-frequency structural information common to both real and fake images, forcing the model to focus on the high-frequency "noise" where forgery artifacts typically reside.
  2. High-Frequency Representation of Feature (HFRF): Applied to intermediate feature maps, this module extracts high-frequency components across both spatial and channel dimensions. This ensures the model maintains its focus on subtle details throughout its depth.
  3. Frequency Conv Layer (FCL): This module transforms features into the frequency domain, applying convolutions separately to the phase spectrum (capturing structural inconsistencies) and amplitude spectrum (capturing statistical artifacts) before using an Inverse FFT (iFFT) to return to the spatial domain.
The detailed architecture of FreqNet, including the HFRI, HFRF, and FCL blocks integrated into the overall network.

Experimental Results

To test generalizability, the researchers employed a "train on one, test on many" approach, training on limited categories from ProGAN and evaluating across 17 different GAN models (including StyleGAN, BigGAN, and CycleGAN).

Performance and Efficiency

FreqNet achieved a +9.8% improvement in mean accuracy across the 17 test models compared to previous state-of-the-art methods. Notably, FreqNet is highly efficient, utilizing only 1.9 million parameters—less than 1% of the parameters used by previous leading models (e.g., Ojha et al. 2023 at 304 million). This proves that targeting the frequency space is more effective than simply increasing model scale.

Cross-Category Generalization

A striking finding was the model's ability to generalize across domains. A FreqNet model trained only on images of horses and chairs successfully detected deepfake faces with accuracy rates between 98.7% and 99.5% on benchmarks like CelebA-HQ. This suggests that frequency-domain artifacts are a fundamental property of the GAN generation process itself, regardless of the subject matter.

Conclusion

FreqNet demonstrates that shifting deepfake detection into the frequency domain significantly enhances generalizability and efficiency. By learning source-agnostic features through phase and amplitude spectrum convolutions, it overcomes the limitations of traditional artifact-based detectors. Future work will explore extending this frequency-space learning to Diffusion Models and video-based deepfakes, where temporal frequency could provide additional clues for detection.

Summary updated

BibTeX
@inproceedings{tan2024frequency,
  author = {Chuangchuang Tan and Yao Zhao and Shikui Wei and Guanghua Gu and Ping Liu and Yunchao Wei},
  title = {{Frequency-Aware Deepfake Detection: Improving Generalizability through Frequency Space Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i5.28310},
}
Figure