Dual Data Alignment Makes AI-Generated Image Detector Easier Generalizable

Xu Chen (Renmin University of China) · Zhiyuan Yan (Peking University) · Isabel Guan (Hong Kong University of Science and Technology) · Ke-Yue Zhang (Tencent) · Taiping Yao (Tencent Youtu Lab) · Shouhong Ding (Tencent Youtu Lab) · Shuang Wu (Nanjing University, Nanjing, China) · Lei Xu (Shanghai Jiaotong University) · Ruoxin Chen (Tencent YouTu Lab) · Junwei Xi (East China University of Science and Technology) · Jingyi Xie (Renmin University of China)
ai-generated imagesbiased datasetsdata alignmentdda-cocodetection methodsdetector performance.dual data alignmentevalgenfrequency-level misalignmentgenerative reconstructionhigh-frequency featuresoverfittingpixel and frequency domainsspurious correlationssynthetic labels

The rapid increase in AI-generated images (AIGIs) underscores the need for detection methods. Existing detectors are often trained on biased datasets, leading to overfitting on spurious correlations between non-causal image attributes and real/synthetic labels. While these biased features enhance performance on the training data, they result in substantial performance degradation when tested on unbiased datasets. A common solution is to perform data alignment through generative reconstruction, matching the content between real and synthetic images. However, we find that pixel-level alignment alone is inadequate, as the reconstructed images still suffer from frequency-level misalignment, perpetuating spurious correlations. To illustrate, we observe that reconstruction models restore the high-frequency details lost in real images, inadvertently creating a frequency-level misalignment, where synthetic images appear to have richer high-frequency content than real ones. This misalignment leads to models associating high-frequency features with synthetic labels, further reinforcing biased cues. To resolve this, we propose Dual Data Alignment (DDA), which aligns both the pixel and frequency domains. DDA generates synthetic images that closely resemble real ones by fusing real and synthetic image pairs in both domains, enhancing the detector's ability to identify forgeries without relying on biased features. Moreover, we introduce two new test sets: DDA-COCO, containing DDA-aligned synthetic images, and EvalGEN, featuring the latest generative models. Our extensive evaluations demonstrate that a detector trained exclusively on DDA-aligned MSCOCO improves across diverse benchmarks. Code is available at https://github.com/roy-ch/Dual-Data-Alignment.