Adversarial Attacks on AI-Generated Text Detection Models: A Token Probability-Based Approach Using Embeddings

Lei Jiao, Ahmed K. Kadhim, Lei Jiao 0001, Rishad A. Shafik, Ole-Christoffer GranmoarXiv 2025 · DOI

Abstract

As Large Language Models (LLMs) proliferate, the development of robust AI-generated text detectors has become a critical area of research. This paper explores the inherent vulnerabilities of these detectors through a novel adversarial attack framework. By systematically replacing a small fraction of words (approximately 5%) with semantically similar synonyms that possess low statistical probability, the researchers demonstrate that state-of-the-art detectors like Fast-DetectGPT can be effectively bypassed. Utilizing interpretable embedding models, specifically the Tsetlin Machine Auto-Encoder (TM-AE), the study achieves up to a 38% reduction in detection accuracy (AUROC), revealing that current statistical detection methods are highly susceptible to subtle, targeted perturbations.

Introduction

The rapid advancement of LLMs has initiated a "cat-and-mouse" game between content generators and detectors. Most contemporary AI text detectors operate on the "predictability principle": LLMs tend to select words with high conditional probabilities based on their training data, resulting in text that lacks the "burstiness" or "perplexity" characteristic of human writing. However, these detectors are often brittle. If an attacker can alter the text to lower its overall probability score without compromising its semantic integrity, the detector may misclassify the AI-generated content as human-written. This paper addresses the challenge of performing such alterations efficiently and semantically.

Methodology

The proposed adversarial framework perturbs AI-generated text using three primary strategies designed to find the optimal "disguise" for machine-generated tokens:

  1. Embedding Vector of Similarity: Standard models like Word2Vec or GloVe are used to identify semantically similar words that the detector perceives as having low probability.
  2. Synonym Similarity Vector: Synonyms are sourced from WordNet to ensure grammatical and semantic correctness, then ranked by embedding similarity to select the most effective replacement.
  3. The Hybrid TM-AE Scheme: The core innovation involves the Tsetlin Machine Auto-Encoder (TM-AE). Unlike "black-box" neural networks, the Tsetlin Machine uses logic-based clauses to create word embeddings. This interpretability allows for a more refined and traceable attack, as specific logical links (e.g., "car" to "wheels") guide the replacement process.
Overview of the adversarial attack workflow, illustrating the iterative process of token selection and embedding-based replacement to mislead AI content detectors.

Experimental Setup

The attack was evaluated across three diverse English datasets to ensure generalizability:

  • XSum: 500 news article summaries.
  • SQuAD: 300 Wikipedia-based Q&A pairs.
  • Writing Prompts: 500 creative stories.

Text was generated using five distinct LLMs, including GPT-2 XL, GPT-Neo, and OPT-2.7, to test the attack's efficacy against various source models.

Key Results and Insights

Statistical Camouflage and the 5% Threshold

A significant finding of this study is that a document does not need extensive rewriting to evade detection. By perturbing only about 5% of the tokens—roughly 8 words in a 150-word text—the researchers could effectively mask the AI's statistical signature. As shown in the experimental data, increasing the perturbation percentage leads to a sharp decline in the Area Under the Receiver Operating Characteristic (AUROC) curve for all tested models.

Impact of perturbation intensity on detection accuracy. The left panel shows AUROC declining as the percentage of perturbed tokens increases, while the right panel illustrates the effect of different perturbation thresholds.

The BERT Paradox and Embedding Performance

Interestingly, the study revealed a "BERT Paradox": using BERT embeddings for the attack was less effective than using older models like Word2Vec or the novel TM-AE. Because BERT’s transformer architecture is similar to the LLMs being detected, its probability distributions align too closely with the "AI signature," making the changes easier for detectors to identify. In contrast, Word2Vec and TM-AE provided distinct distributions that more successfully misled the detectors.

Detector Resilience

The attack demonstrated a substantial reduction in state-of-the-art detection scores. For the XSum dataset, the AUROC for Fast-DetectGPT dropped from 0.4431 to 0.2744 (a 38% reduction). While Fast-DetectGPT and Entropy-based methods showed some relative resilience, Rank-based detectors performed poorly, often falling below 0.1 AUROC under attack.

Discussion and Conclusion

The success of this embedding-based attack underscores a fundamental weakness in current AI detection logic. While WordNet helps maintain meaning, automated perturbations still face risks of semantic drift. Furthermore, the limited vocabulary of embedding models remains a constraint. However, the use of interpretable models like the Tsetlin Machine suggests that future attacks could be "hand-crafted" using logical rules. As LLMs continue to evolve, detection methods must move beyond simple probability checks to account for the diverse and sophisticated ways in which machine-generated text can be camouflaged.

Summary updated

BibTeX
@misc{jiao2025adversarial,
  author = {Lei Jiao and Ahmed K. Kadhim and Lei Jiao and Rishad A. Shafik and Ole-Christoffer Granmo},
  title = {{Adversarial Attacks on AI-Generated Text Detection Models: A Token Probability-Based Approach Using Embeddings}},
  year = {2025},
  eprint = {2501.18998},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.18998},
}
Figure