Fooling the Watchers: Breaking AIGC Detectors via Semantic Prompt Attacks

Run Hao, Peng Ying · 2025

Read Fooling the Watchers: Breaking AIGC Detectors via Semantic Prompt Attacks by Run Hao, Peng Ying (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-2505-23192.txt.

Introduction

Run Hao and Peng Ying build an attack that fools tools meant to spot AI-made images in a 2025 paper. Text-to-image tools now make portraits that look like real photos. That skill raises fears of fake identity use, so guard tools try to flag made images. The team asked how weak those guards are when an attacker crafts prompts with care, word by word.

Their method grows prompts on a grammar tree and searches the tree with a Monte Carlo method. The prompts it finds stay varied and can be steered by the user. Across many image tools, the prompts slipped past both free and paid detectors. The method won first place in a real contest on this task. The team also notes a good use: such prompts can stock test sets that train tougher guards.

Catalog record

CREATORRun Hao, Peng Ying
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE27 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-23192

Browse the full library · About the Tower of Babel

Full text

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

Fooling the Watchers: Breaking AIGC Detectors via Semantic Prompt Attacks Run Hao, Peng Ying Abstract The rise of text-to-image (T2I) models has enabled the synthesis of photorealistic human portraits, raising serious concerns about identity misuse and the robustness of AIGC detectors. In this work, we propose an automated adversarial prompt generation framework that leverages a grammar tree structure and a variant of the Monte Carlo tree search algorithm to systematically explore the semantic prompt space. Our method generates diverse, controllable prompts that consistently evade both open-source and commercial AIGC detectors. Extensive experiments across multiple T2I models validate its effectiveness, and the approach ranked first in a real-world adversarial AIGC detection competition. Beyond attack scenarios, our method can also be used to construct high-quality adversarial datasets, providing valuable resources for training and evaluating more robust AIGC detection and defense systems. † † affiliationnotice: Equal contribution 1 Introduction In recent years, text-to-image (T2I) models have witnessed significant advancements, driven by breakthroughs in deep learning and generative modeling. Early works such as AttnGAN ( Xu et al. 2018 ) and StackGAN ( Zhang et al. 2017 ) laid the foundation for generating coherent images from textual descriptions by integrating attention mechanisms and multi-stage refinement strategies. With the emergence of large-scale diffusion models, notably DALL \cdot E 2 ( Ramesh et al. 2022 ) , Imagen ( Saharia et al. 2022 ) , and Stable Diffusion ( Rombach et al. 2022 ) , the quality and realism of generated images have drastically improved, enabling high-fidelity synthesis conditioned on natural language prompts. Alongside the rapid development of T2I models, the proliferation of AI-generated content (AIGC) has raised concerns regarding authenticity and misuse. In particular, their ability to synthesize photorealistic human portraits has introduced new challenges in identity and privacy protection. Hyper-realistic faces can be fabricated with arbitrary attributes, potentially enabling malicious actors to create fake IDs, impersonate real individuals, or even generate sensitive visuals of non-consenting subjects ( Karras et al. 2019 ; Chesney & Citron 2022 ; Douglas & Yampolskiy 2021 ) . Such misuse raises pressing ethical and legal questions, particularly when these synthetic faces are indistinguishable from real ones by both humans and machines ( Mirsky & Lee 2021 ; Verdoliva 2020 ) . This has led to growing interest in AIGC detection, which aims to distinguish between real and synthetic content. Recent works in this domain, such as GAN-generated image detectors ( Wang et al. 2020a ) and diffusion-specific classifiers ( Wang et al. 2023 ) , have leveraged both low-level artifacts (e.g., color statistics ( Durall et al. 2020 ) , sensor noise ( Frank et al. 2020 ) , frequency domain inconsistencies ( Durall et al. 2020 ) ) and high-level semantic cues (e.g., unnatural textures ( Zhang et al. 2019 ) , unrealistic object layouts, or prompt-image mismatches ( Chen et al. 2023 ; Liang et al. 2023 ) ) to achieve robust detection. Despite the increasing sophistication of these detectors, many rely on assumptions about known generation models or artifacts, leaving them vulnerable to adaptive or black-box attacks. In high-stakes scenarios involving human portraits, failure to detect synthetic content may lead to severe consequences, including misinformation, reputational harm, or privacy breaches, motivating the need for rigorous evaluation of detector robustness under adversarial conditions. However, conducting such evaluations poses several unique challenges in the context of T2I generation. First, the inherently stochastic nature of modern T2I models limits the precision with which image content can be controlled. Unlike traditional adversarial attacks that directly manipulate pixel-level features or inject specific noise patterns, prompt-based attacks must rely on indirect, semantic-level perturbations—often resulting in only approximate control over the generated outputs ( Nichol et al. 2021 ) . Second, the process of manually crafting effective prompts is prohibitively costly and inefficient. Identifying combinations of textual cues that consistently induce detection failures requires substantial human effort and insight, and it remains difficult to determine which elements of a prompt are most responsible for the success or failure of an attack. To overcome these challenges, we develop a grammar tree-based prompt generation mechanism, where each node in the tree corresponds to a semantic component (e.g., portrait attributes or stylistic features), and prompts are constructed through a recursive top-down traversal of this tree. To further optimize this process, we integrate a variant of the Monte Carlo Tree Search (MCTS) algorithm—specifically, the UCT-Rand algorithm ( Zheng et al. 2024 ) —which replaces greedy selection with weighted random sampling. This allows for broader and more effective exploration of the prompt space, increasing the likelihood of generating photorealistic portraits capable of evading both open and closed-source AIGC detectors. To demonstrate the practical effectiveness of our approach, we deployed the proposed method in a real-world AIGC adversarial detection competition ( Tencent 2025 ) , where it achieved first place. Furthermore, we applied our method across multiple state-of-the-art T2I models and evaluated its performance against both open-source and commercial AIGC detectors. Experimental results show that existing detectors are highly susceptible to prompts generated by our framework, further highlighting the fragility of current detection mechanisms when facing prompt-level semantic attacks. Our contributions are summarized as follows: • We propose semantic prompt attack methods targeting both closed-source and open-source AIGC detectors, revealing detector’s susceptibility to such attacks. To the best of our knowledge, this is the first study on prompt-level semantic attacks against AIGC detectors. • We design a hierarchical grammar tree to structure semantic segments of prompts, such as portrait attributes and stylistic features to enable automated and controllable prompt generation, thereby allowing text-to-image models to produce images that can bypass AIGC detectors. • Our method achieves strong evasion performance across both open- and closed-source detectors, and ranks first in a real-world competition. Furthermore, the generated prompts can serve as valuable adversarial datasets to support the development and evaluation of more robust and adaptive detection models. 2 Related Work 2.1 AI-generated Image Detection Recent advancements in AIGC detection have introduced a range of effective defense strategies. Zhong et al. ( Zhong et al. 2024 ) propose a method that suppresses global semantic information and enhances local texture features by analyzing inter-pixel correlations between rich and poor texture regions, improving generalization across unseen generative models. Frank et al. ( Frank et al. 2020 ) reveal that GAN-generated images exhibit consistent artifacts in the frequency domain caused by upsampling operations, which can be effectively exploited for detection. Liu et al. ( Liu et al. 2022 ) focus on learning the noise patterns inherent to real images in both spatial and frequency domains, enabling the detection of generated images by identifying deviations from these natural patterns. Zhengzhe Liu et al. ( Liu et al. 2020 ) design a detector that extracts global texture representations using Gram matrices, achieving robustness to image distortions and strong generalization to unseen fake images. Cazenavette et al. ( Cazenavette et al. 2024 ) extract inversion features from a pre-trained diffusion model by reconstructing latent noise maps and denoised outputs, allowing their detector to generalize well to high-fidelity text-to-image models. Luo et al. ( Luo et al. 2024 ) propose a lightweight approach that calculates latent-space reconstruction error in a single denoising step and refines image features based on

Read the complete text