Breaking Latent Prior Bias in Detectors for Generalizable AIGC Image Detection

Yue Zhou, Xinan He, KaiQing Lin, Bin Fan, Feng Ding, Bin Li · 2025

Read Breaking Latent Prior Bias in Detectors for Generalizable AIGC Image Detection by Yue Zhou, Xinan He, KaiQing Lin, Bin Fan, Feng Ding, Bin Li (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-00874.txt.

Introduction

Yue Zhou and co-authors trace a hidden bias that makes AI-image detectors fail on new generators, in a 2025 paper. Detectors often score near perfectly on images from their training generator, then stumble on unseen ones. The team blames shortcuts tied to the starting noise pattern of the generator, rather than true forgery traces.

Their fix trains detectors on crafted examples made by tuning the starting noise itself, so fakes stay within what the generator can truly make. A new test set drawn from advanced generators, with varied prompts and styles, checks real-world strength. Applied to two standard detectors, the training lifted cross-generator scores without changing network design. The authors draw lessons for future data and test building.

Catalog record

CREATORYue Zhou, Xinan He, KaiQing Lin, Bin Fan, Feng Ding, Bin Li
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE72 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2506-00874

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Breaking Latent Prior Bias in Detectors for Generalizable AIGC Image Detection Yue Zhou, Xinan He, KaiQing Lin, Bin Fan, Feng Ding, Bin Li Abstract Current AIGC detectors often achieve near-perfect accuracy on images produced by the same generator used for training but struggle to generalize to outputs from unseen generators. We trace this failure in part to latent prior bias: detectors learn shortcuts tied to patterns stemming from the initial noise vector rather than learning robust generative artifacts. To address this, we propose On-Manifold Adversarial Training (OMAT) : by optimizing the initial latent noise of diffusion models under fixed conditioning, we generate on-manifold adversarial examples that remain on the generator’s output manifold—unlike pixel-space attacks, which introduce off-manifold perturbations that the generator itself cannot reproduce and that can obscure the true discriminative artifacts. To test against state-of-the-art generative models, we introduce GenImage++, a test-only benchmark of outputs from advanced generators (Flux.1, SD3) with extended prompts and diverse styles. We apply our adversarial-training paradigm to ResNet50 and CLIP baselines and evaluate across existing AIGC forensic benchmarks and recent challenge datasets. Extensive experiments show that adversarially trained detectors significantly improve cross-generator performance without any network redesign. Our findings on latent-prior bias offer valuable insights for future dataset construction and detector evaluation, guiding the development of more robust and generalizable AIGC forensic methodologies. 1 Introduction The rapid advancement of generative AI, from early GANs goodfellow2020generative to modern diffusion models song2020score , has produced increasingly realistic synthesized images, creating a critical need for robust AI-generated content (AIGC) forensic methodologies. While current AIGC detectors perform well on images from their training generator, they often exhibit a significant generalization gap when faced with outputs from unseen generative architectures zhu2023genimage . This suggests that detectors may learn ‘shortcuts’–features specific to the training generator rather than fundamental generative artifacts. Indeed, recent methods achieving better generalization often leverage Stable Diffusion rombach2022high for data augmentation wang2023dire ; cazenavette2024fakeinversion ; chen2024drct , indicating valuable forensic signals within SD data that baseline detectors underutilize. We hypothesize that a key reason for this shortcut learning is the detector’s sensitivity to characteristics tied to the initial latent noise vector, z_{T} . This is related to findings in Xu et al. xu2025good , which showed that the specific ‘torch.manual_seed()’ for z_{T} can be identified from generated images, implying learnable patterns in the noise sampling process. To investigate this, we conducted white-box attacks by optimizing only z_{T} (keeping text condition c and the SD generator fixed) against pre-trained CLIP+Linear radford2021learning and ResNet50 he2016deep AIGC detectors. Our experiments revealed that standard, detectable generated images could consistently be transformed into undetectable ones via these z_{T} perturbations. Since the generation process remains otherwise unchanged, these resulting adversarial examples lie on the generator’s output manifold. We term these ‘on-manifold adversarial examples’, distinguishing them from often off-manifold pixel-space attacks. Their successful generation highlights the baseline detectors’ reliance on non-robust features linked to z_{T} ’s influence. Building on this, we propose an on-manifold adversarial training paradigm. Incorporating these specialized adversarial examples into training significantly improves detector generalization, with our LoRA hu2022lora fine-tuned CLIP-based model achieving state-of-the-art performance on multiple benchmarks. Furthermore, to facilitate rigorous evaluation against contemporary generative models like Black Forest Flux.1 flux2024 and Stability AI’s Stable Diffusion 3 esser2024scaling , which feature advanced architectures (e.g., DiT peebles2023scalable ) and text encoders (e.g., T5-XXL chung2024scaling ), we introduce GenImage++ , a novel test-only benchmark. Our adversarially trained detectors maintain strong performance on this challenging new dataset. Our contributions are threefold: (1) We are the first to systematically expose a vulnerability linked to the detector’s sensitivity to initial latent noise variations, identifying this as a significant factor contributing to poor generalization in AIGC detection. (2) We are the first to apply on-manifold adversarial training—using only a small set of additional latent-optimized examples—to achieve state-of-the-art generalization in AIGC detection. (3) We propose GenImage++, a benchmark incorporating outputs from cutting-edge generators to advance future AIGC forensic evaluation. Collectively, our findings on the detector’s latent-space vulnerabilities and the efficacy of on-manifold adversarial training provide valuable insights for future dataset construction and the development of more robust and broadly applicable AIGC forensic methodologies. 2 Related Work The detection of fully synthesized AI-generated content (AIGC) has evolved significantly. Early efforts targeting Generative Adversarial Networks (GANs) goodfellow2020generative often found success with conventional CNNs or by identifying salient frequency-domain artifacts wang2020cnn . However, the rise of high-fidelity diffusion models song2020denoising ; rombach2022high has presented a more formidable challenge, primarily concerning the generalization of detectors: models trained on one generator often fail dramatically on outputs from unseen architectures zhu2023genimage ; ojha2023towards . This generalization gap indicates that detectors frequently learn superficial, generator-specific "shortcuts" rather than fundamental generative fingerprints. Current state-of-the-art AIGC detectors increasingly leverage powerful pre-trained Vision-Language Models (VLMs) like CLIP radford2021learning , as seen in methods such as UnivFD ojha2023towards , C2P-CLIP tan2025c2p , and RIGID he2024rigid . Another prominent strategy involves utilizing diffusion models themselves, either for reconstruction-based analysis (e.g., DIRE wang2023dire ) or extensive training data augmentation (e.g., DRCT chen2024drct ), effectively expanding the training manifold. Our work diverges by hypothesizing and exposing a "latent prior bias," where detectors learn non-generalizable shortcuts tied to the initial latent noise z_{T} . We address this by proposing on-manifold adversarial training with a relatively small, targeted set of z_{T} -optimized examples . This approach efficiently compels the learning of more robust features, achieving state-of-the-art generalization without relying on massive data augmentation or complex reconstruction pipelines. 3 Unveil Latent Prior Bias within AIGC detectors 3.1 Standard AIGC Detection and the Generalization Challenge The fundamental task in AI-generated content (AIGC) forensics is to distinguish between real images, drawn from a distribution P_{R} , and AI-generated images. A standard approach involves training a neural network detector, D_{\phi}:\mathcal{X}\rightarrow\mathbb{R} parameterized by \phi , using samples from P_{R} (labeled as real, y=0 ) and samples generated by a specific source generative model G , drawn from distribution P_{G} (labeled as fake, y=1 ). The detector is typically trained by minimizing an expected loss, such as the Binary Cross-Entropy (BCE): \mathcal{L}_{std}(\phi)=\mathbb{E}_{x_{R}\sim P_{R}}[\ell(D_{\phi}(x_{R}),0)]+\mathbb{E}_{x_{G}\sim P_{G}}[\ell(D_{\phi}(x_{G}),1)], (1) where \ell(s,y) is the BCE loss function. Minimizing \mathcal{L}_{std} enables the detector D_{\phi} to learn a set of discriminable features effective for separating the specific distributions P_{R} and P_{G} encountered during training. However, a critical objective in AIGC forensics is generalization : the ability of the detector D_{\phi} , trained primarily on data from generator G , to effectively detect images produced by novel, previously unseen generators G^{\prime} (with distributions P_{G^{\prime}} ). Ideally, the features learned by minimizing Eq. ( 1 ) should capture fundamental properties indicative of the AI generation process itself, allowing for robust performance across diverse generative models. Yet, empirical evidence often reveals a significant performance degradation when detectors are evaluated on unseen generators, indicating that the learned features may be overly specific to the artifacts of the training generator G , a phenomenon often attributed to sample bias and shortcut learning. Addressing this generalization gap is a central challenge we tackle in this work. 3.2 Disentangling Process-Inherent Artifacts from Input Conditioning To develop detectors capable of robust generalization, we must first understand how inputs influence the output of typical generative models and then aim to disentangle true forensic features from

Read the complete text