NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Breaking Latent Prior Bias in Detectors for Generalizable AIGC Image Detection

Yue Zhou, Xinan He, Kaiqing Lin, Bing Fan, Feng Ding, Bin Li

Introduction

As diffusion models such as Flux.1 and Stable Diffusion 3 (SD3) continue to advance, the boundary between real and AI-generated content (AIGC) has become increasingly blurred. While modern forensic detectors achieve near-perfect accuracy when tested on images from the same generator used during training, their performance often collapses when encountering images from unseen architectures. This research identifies a fundamental flaw in current detection paradigms: latent prior bias.

Instead of identifying intrinsic generative artifacts—such as upsampling patterns or denoising dynamics—detectors frequently learn "shortcuts" tied to the initial random noise ($z_T$) used to seed the generation process. Essentially, these models function as "seed classifiers" rather than robust artifact detectors. When a new generator employs a different noise sampling process or architecture, the detector’s learned shortcut fails, leading to poor generalization.

Methodology

To address this bias, the authors propose On-Manifold Adversarial Training (OMAT). This approach shifts the focus from pixel-level perturbations to the latent space of the generator itself.

1. On-Manifold Adversarial Attack

Traditional adversarial attacks, such as Projected Gradient Descent (PGD), typically add "off-manifold" noise to pixels. Such noise is unnatural and rarely encountered in actual generative outputs. In contrast, the proposed on-manifold attack performs a white-box optimization within the latent space. By keeping the text prompt and generator weights fixed, the method iteratively optimizes the initial noise vector $z_T$ to produce an image that appears visually coherent to humans but successfully fools the detector. This ensures the adversarial examples remain within the natural distribution (the "manifold") of the generator.

2. On-Manifold Adversarial Training (OMAT)

By retraining baseline detectors (such as ResNet50 and CLIP) using a small set of these latent-optimized adversarial examples, the authors force the networks to ignore the "noise shortcut." This process encourages the model to focus on $f_{gen}$—the intrinsic generative artifacts shared across different model architectures.

3. LoRA Fine-tuning

To maximize efficiency and performance, the researchers utilized Low-Rank Adaptation (LoRA) to fine-tune CLIP-based detectors. This configuration proved to be the most effective, allowing the model to adapt to the adversarial distribution without the computational overhead of full-parameter fine-tuning.

Benchmarking with GenImage++

To rigorously test generalization, the authors introduced GenImage++, a test-only benchmark designed to challenge detectors with state-of-the-art models. It includes 114,000 images from Flux.1 and SD3, categorized into four distinct challenges:

  • Base Label: Standard generation.
  • Long-Prompt: Complex scenes with high semantic density.
  • Style Diversity: Images spanning 183 different artistic styles.
  • Photo Realism: High-fidelity images designed to mimic professional photography.

Key Insights and Results

The study yielded several critical findings regarding the nature of AIGC detection:

  • The Fragility of the Seed: The research confirms that standard detectors are highly sensitive to the torch.manual_seed() used during generation. If the detector can identify the noise distribution of the seed, it bypasses the need to analyze image quality.
  • Efficiency of Vulnerability: Most successful latent attacks required fewer than 10 optimization steps, suggesting that the decision boundaries of standard detectors are extremely brittle and reside very close to the typical noise distribution.
  • Superior Generalization: The OMAT-trained CLIP+LoRA (Rank 4) model achieved an average accuracy of 94.63% across all GenImage subsets, compared to a 79.20% baseline.
  • Performance on GenImage++: On the challenging Flux and SD3 images, standard forensic methods often dropped below 40% accuracy. The OMAT-trained model, however, maintained a staggering 96.78% average accuracy.
  • In-the-Wild Robustness: On the Chameleon dataset (diverse AI images collected from the internet), the proposed method reached 66.05% accuracy, outperforming specialized detectors like AIDE (62.60%).

Limitations and Future Work

Despite its effectiveness, OMAT faces practical hurdles. The white-box latent attack is computationally expensive, requiring backpropagation through the entire diffusion denoising chain. For instance, attacking a single image using SDv1.4 with 35 steps required nearly 79GB of VRAM on an NVIDIA A100. Furthermore, the method requires a fully differentiable pipeline, making it difficult to apply against "black-box" third-party detectors where preprocessing steps are unknown.

Future research directions include exploring gradient checkpointing to reduce the memory footprint and investigating whether these latent vulnerabilities extend to other generative tasks, such as image inpainting or localized editing.

Summary updated

BibTeX
@inproceedings{zhou2025breaking,
  author = {Yue Zhou and Xinan He and Kaiqing Lin and Bing Fan and Feng Ding and Bin Li},
  title = {{Breaking Latent Prior Bias in Detectors for Generalizable AIGC Image Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=sVSVgWIkb0},
}
Figure