When Semantics Regulate: Rethinking Patch Shuffle and Internal Bias for Generated Image Detection with CLIP
Beilin Chu, Weike You, Mengtao Li, Tingting Zheng, Kehan Zhao, Xuan Xu, Zhigao Lu, Jia Song, Moxuan Xu, Linna Zhou
TL;DR
The paper tackles AI-generated image detection under distribution shifts and shows that semantic bias undermines cross-domain robustness. It reveals that Patch Shuffle disrupts global semantics while preserving local artifact cues, making CLIP's semantic manifold a regulator of representations and enabling artifact-focused learning. The authors propose SemAnti, which freezes CLIP's semantic subspace and fine-tunes only artifact-sensitive layers under shuffled semantics, achieving state-of-the-art cross-domain performance on GenImage and AIGCDetectBenchmark. The results demonstrate that controlling semantics is key to unlocking CLIP's robustness for forgery detection, with insights supported by layer-wise analyses and visualizations. This approach promises more reliable AI-generated image detection across diverse generators and domains.
Abstract
The rapid progress of GANs and Diffusion Models poses new challenges for detecting AI-generated images. Although CLIP-based detectors exhibit promising generalization, they often rely on semantic cues rather than generator artifacts, leading to brittle performance under distribution shifts. In this work, we revisit the nature of semantic bias and uncover that Patch Shuffle provides an unusually strong benefit for CLIP, that disrupts global semantic continuity while preserving local artifact cues, which reduces semantic entropy and homogenizes feature distributions between natural and synthetic images. Through a detailed layer-wise analysis, we further show that CLIP's deep semantic structure functions as a regulator that stabilizes cross-domain representations once semantic bias is suppressed. Guided by these findings, we propose SemAnti, a semantic-antagonistic fine-tuning paradigm that freezes the semantic subspace and adapts only artifact-sensitive layers under shuffled semantics. Despite its simplicity, SemAnti achieves state-of-the-art cross-domain generalization on AIGCDetectBenchmark and GenImage, demonstrating that regulating semantics is key to unlocking CLIP's full potential for robust AI-generated image detection.
