Vulnerabilities in AI-generated Image Detection: The Challenge of Adversarial Attacks

Yunfeng Diao, Naixin Zhai, Changtao Miao, Xun Yang, Meng Wang · OpenReview

Abstract

Recent advancements in image synthesis, particularly with the advent of GAN and Diffusion models, have amplified public concerns regarding the dissemination of disinformation. To address such concerns, numerous AI-generated Image (AIGI) Detectors have been proposed and achieved promising performance in identifying fake images. However, there still lacks a systematic understanding of the adversarial robustness of these AIGI detectors. In this paper, we examine the vulnerability of state-of-the-art AIGI detectors against adversarial attack under white-box and black-box settings, which has been rarely investigated so far. For the task of AIGI detection, we propose a new attack containing two main parts. First, inspired by the obvious difference between real images and fake images in the frequency domain, we add perturbations under the frequency domain to push the image away from its original frequency distribution. Second, we explore the full posterior distribution of the surrogate model to further narrow this gap between heterogeneous models, e.g. transferring adversarial examples across CNNs and ViTs. This is achieved by introducing a novel post-train Bayesian strategy that turns a single surrogate into a Bayesian one, capable of simulating diverse victim models using one pre-trained surrogate, without the need for re-training. We name our method as frequency-based post-train Bayesian attack, or FPBA. Through FPBA, we show that adversarial attack is truly a real threat to AIGI detectors, because FPBA can deliver successful black-box attacks across models, generators, defense methods, and even evade cross-generator detection, which is a crucial real-world detection scenario.

Introduction: The Robustness Gap in AIGI Detection

The rapid evolution of generative models, such as GANs and Diffusion models, has made the detection of AI-generated images (AIGI) a critical task for maintaining information integrity. While current AIGI detectors have achieved high accuracy on standard benchmarks, their robustness against adversarial manipulation remains largely unexplored. Unlike traditional image classification, AIGI detection often relies on subtle, low-level "generative artifacts" or fingerprints. These artifacts vary significantly across different model architectures (e.g., CNNs vs. Vision Transformers), creating a "transferability gap" that makes black-box adversarial attacks particularly challenging.

Comparison of adversarial attack strategies: Deterministic, Bayesian, and the proposed Frequency-based Post-train Bayesian Attack (FPBA).

Methodology: Frequency-based Post-train Bayesian Attack (FPBA)

To address these challenges, we propose the Frequency-based Post-train Bayesian Attack (FPBA). FPBA introduces two key innovations designed to bridge the transferability gap and bypass sophisticated detectors:

  1. Frequency-Domain Perturbations: AI-generated images possess distinct spectral distributions compared to real images. By applying perturbations in the frequency domain using the Discrete Cosine Transform (DCT), FPBA "pushes" the image's spectral signature away from its original distribution. This targets the very artifacts that many detectors rely on, making the attack more universal across different detection methods.
  2. Post-train Bayesian Strategy: Improving attack transferability typically requires an ensemble of surrogate models, which is computationally expensive. FPBA utilizes a "post-train" shortcut: a single pre-trained surrogate model is frozen, and a small, trainable Bayesian Multi-Layer Perceptron (MLP) is appended via a skip connection. Sampling from this lightweight Bayesian component allows the simulation of a diverse ensemble of victim models at a fraction of the training cost.
The FPBA pipeline, integrating spatial and frequency domain perturbations with a post-train Bayesian ensemble strategy.

Experimental Evaluation and Key Results

The effectiveness of FPBA was evaluated across three major benchmarks: Synthetic LSUN (ProGAN), GenImage (including Stable Diffusion V1.4), and Synthetic FFHQ (StyleGAN2).

  • White-Box and Black-Box Performance: FPBA achieved a near-perfect 99.6% success rate in white-box settings. More importantly, it demonstrated superior transferability in black-box scenarios, achieving an average success rate of 50.5%, significantly outperforming standard PGD and specialized frequency attacks like SSAH.
  • Resilience to Defenses: The attack maintained high performance even when images were subjected to common defensive measures such as JPEG compression and Gaussian blurring. While other attacks saw their success rates plummet under heavy compression, FPBA remained robust.
  • Cross-Generator Generalization: FPBA successfully fooled detectors trained on one generator (e.g., ProGAN) when applied to images from another (e.g., Stable Diffusion), highlighting its potential as a real-world threat.

Conclusion and Future Directions

Our findings reveal that adversarial attacks pose a significant threat to the reliability of current AIGI detectors. By exploiting frequency-domain discrepancies and employing efficient Bayesian ensembling, FPBA exposes critical vulnerabilities in state-of-the-art detection systems. Future work will focus on developing adversarially trained detectors that can withstand such spectral manipulations and exploring the robustness of high-level semantic features in AIGI detection.

Summary updated

BibTeX
@misc{diao2024vulnerabilities,
  author = {Yunfeng Diao and Naixin Zhai and Changtao Miao and Xun Yang and Meng Wang},
  title = {{Vulnerabilities in AI-generated Image Detection: The Challenge of Adversarial Attacks}},
  year = {2024},
  eprint = {2407.20836},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.20836},
}
Figure