Dual Frequency Branch Framework with Reconstructed Sliding Windows Attention for AI-Generated Image Detection
Jiazhen Yan, Ziqiang Li, Fan Wang, Ziwen He, Zhangjie Fu
TL;DR
This work tackles the challenge of generalizing AI-generated image detection across diverse generators by addressing two core shortcomings: limited sensitivity to intra-local element dependencies and reliance on a single frequency domain. It introduces a reconstructed sliding window attention mechanism to capture fine-grained local artifacts and a dual-frequency framework combining four DWT subbands with FFT phase to enrich local features from multiple perspectives. The method achieves strong cross-model performance across 65 generative models (GANs and diffusion) and sets new baselines on multiple datasets, including GANGen-Detection, DiffusionForensics, UniversalFakeDetect, GenImage, and AIGIBench, with notable improvements in accuracy and robustness to perturbations. Extensive ablation and visualization studies confirm the complementary roles of the DWT tiling and FFT phase branches and the efficacy of the RSWAttention in modeling local dependencies, highlighting practical gains for robust AI-generated image detection in real-world scenarios.
Abstract
The rapid advancement of Generative Adversarial Networks (GANs) and diffusion models has enabled the creation of highly realistic synthetic images, presenting significant societal risks, such as misinformation and deception. As a result, detecting AI-generated images has emerged as a critical challenge. Existing researches emphasize extracting fine-grained features to enhance detector generalization, yet they often lack consideration for the importance and interdependencies of internal elements within local regions and are limited to a single frequency domain, hindering the capture of general forgery traces. To overcome the aforementioned limitations, we first utilize a sliding window to restrict the attention mechanism to a local window, and reconstruct the features within the window to model the relationships between neighboring internal elements within the local region. Then, we design a dual frequency domain branch framework consisting of four frequency domain subbands of DWT and the phase part of FFT to enrich the extraction of local forgery features from different perspectives. Through feature enrichment of dual frequency domain branches and fine-grained feature extraction of reconstruction sliding window attention, our method achieves superior generalization detection capabilities on both GAN and diffusion model-based generative images. Evaluated on diverse datasets comprising images from 65 distinct generative models, our approach achieves a 2.13\% improvement in detection accuracy over state-of-the-art methods.
