Adversarial Attacks on AI-Generated Text Detection Models: A Token Probability-Based Approach Using Embeddings
Ahmed Khalid & Lei Jiao, Rishad Shafik, Ole-Christoffer Granmo · 2025
Read Adversarial Attacks on AI-Generated Text Detection Models: A Token Probability-Based Approach Using Embeddings by Ahmed Khalid & Lei Jiao, Rishad Shafik, Ole-Christoffer Granmo (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-2501-18998.txt.
Introduction
Kadhim and co-authors attack the detectors that sniff out AI-written text in a 2025 paper. As generated essays and reports spread, services race to label machine text, and attackers race to disguise it. Their method rewrites generated text using word embeddings, hunting for swaps that lower a detector's score while keeping the meaning.
The swaps come from synonym lists plus similarity vectors from several embedding methods, including an interpretable Tsetlin Machine approach. Against a leading detector, scores dropped hard on two data sets. On the news data set, the key measure fell from forty-four hundredths to twenty-seven hundredths. On the question data set, it fell from fifty-one hundredths to thirty-five hundredths. Lower scores mean the disguised text looked more human. The work exposes how soft current detectors are.
Catalog record
| CREATOR | Ahmed Khalid & Lei Jiao, Rishad Shafik, Ole-Christoffer Granmo |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 54 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2501-18998
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Adversarial Attacks on AI-Generated Text Detection Models: A Token Probability-Based Approach Using Embeddings Ahmed Khalid & Lei Jiao, Rishad Shafik, Ole-Christoffer Granmo Abstract In recent years, text generation tools utilizing AI ( AI ) have occasionally been misused across various domains, such as generating student reports or creative writings. This issue prompts plagiarism detection services to enhance their capabilities in identifying AI-generated content. Adversarial attacks are often used to test the robustness of AI-text generated detectors. This work proposes a novel textual adversarial attack on the detection models such as Fast-DetectGPT. The method employs embedding models for data perturbation, aiming at reconstructing the AI generated texts to reduce the likelihood of detection of the true origin of the texts. Specifically, we employ different embedding techniques, including the TM ( TM ), an interpretable approach in machine learning for this purpose. By combining synonyms and embedding similarity vectors, we demonstrates the state-of-the-art reduction in detection scores against Fast-DetectGPT. Particularly, in the XSum dataset, the detection score decreased from 0.4431 to 0.2744 AUROC, and in the SQuAD dataset, it dropped from 0.5068 to 0.3532 AUROC. AI Artificial Intelligence NN Neural Network DL Deep Learning ML Machine Learning TM Tsetlin Machine NLP Natural Language Processing LLMs Large Language Models LLM Large Language Model TM-AE Tsetlin Machine Auto-Encoder RbE Reasoning by Elimination TW Target Word CoTM Coalesced Tsetlin Machine TA Tsetlin automaton TAT Tsetlin automaton team GPT Generative Pre-trained Transformer EDA Easy Data Augmentation PLM Pre-Trained Language Model PLMs Pre-Trained Language Models 1 Introduction The responsibility of integrating into the scientific research and higher education community entails adhering to numerous behaviors and principles essential to safeguarding the integrity of educational and scientific progress. Consequently, the utilization of tools such as text editors or language enhancement applications must align with sound practices and uphold the ethical standards of scientific research and education ( Lund et al., 2023 ; Foltynek et al., 2023 ) . Despite the substantial advancements in AI models, particularly within NLP ( NLP ) applications, there remains ongoing debate about the appropriate use of these tools for text generation ( Leidner & Plachouras, 2017 ; Šuster et al., 2017 ) . This issue could significantly impact the integrity of the academic domain ( Tauginienė et al., 2018 ) . LLM ( LLM ) such as GPT ( GPT ) ( Brown et al., 2020 ; OpenAI, 2022 ; OpenAI, 2023 ) , BERT ( Devlin et al., 2018 ) , and XLNet ( Yang et al., 2020 ) have gained widespread acceptance among users, demonstrating such high efficiency that distinguishing between human-generated and machine-generated content has become increasingly challenging ( Shahid et al., 2022 ; Ippolito et al., 2020 ) . In response to this surge in the use of AI techniques for text generation, various detection methods have been developed to ascertain the origin of text ( Solaiman et al., 2019 ; Fagni et al., 2021 ; Mitrović et al., 2023 ; Gehrmann et al., 2019 ; Mitchell et al., 2023 ; Su et al., 2023 ) . These methods are categorized as supervised and unsupervised. Unsupervised methods are notable for their versatility in text detection, as they are capable of handling diverse text domains due to the nature of their pretraining ( Gehrmann et al., 2019 ; Mitchell et al., 2023 ) . These tools calculate probabilities and distribute them throughout the text. Under the zero-shot framework, it is presumed that AI-generated text exhibits a higher degree of probability variation compared to human-authored text, which can demonstrate both stability and variation. To assess such changes, additional text generation is required, significantly increasing execution time. The latest approach, FastDetect ( Bao et al., 2024 ) , hypothesizes that AI-generated words are produced based on decisions made by the generative model, adhering to specific generation probabilities distinct from human word choices. For humans, word selection involves multiple influencing factors, rendering the output more personal and less statistically general. The majority of generated texts are fundamentally based on embedding principles in the initial stages of any LLMs ( LLMs ), where a dense vector in space is extracted for each word to encapsulate the contextual information present in the training dataset ( Goldberg & Levy, 2014 ; Pennington et al., 2014 ) . The embedding maps words or tokens into a high-dimensional continuous space, which the model employs to facilitate various stages of text generation. This embedding, coupled with additional layers and algorithms used in LLMs ( Vaswani et al., 2017 ) , informs the model’s predictions for subsequent words. Understanding this generative pattern enables the identification of AI-suggested content versus natural, human-like predictions, which are not strictly bound by patterns. Building on this foundation, in this paper, we propose an adversarial attack approach in which the embeddings are reverse engineered to exploit detection models by assigning low probability rates to predicted subsequent words, thereby lowering the overall text score as assessed by the detection systems. Among the various embedding schemes considered in this work, we place particular emphasis on the TM -based approach. The TM is an emerging machine learning technique that has demonstrated notable success in various applications ( Granmo, 2018 ; Yadav et al., 2021 ; Berge et al., 2019 ; Abeyrathna et al., 2021 ; Maheshwari et al., 2023 ) , including NLP and computer vision. One architecture employed within the TM framework is the TM-AE ( TM-AE ), which is used in NLP tasks to generate word embeddings ( Bhattarai et al., 2024 ) . The TM is distinguished by its interpretability and the transparency of its output ( Granmo, 2018 ; Sharma et al., 2023 ; Abeyrathna et al., 2023 ; Yadav et al., 2021 ) . TM-AE can produce word embeddings that encapsulate the contextual information conveyed by words derived from the training dataset ( Kadhim et al., 2024 ) . Consequently, TM can be leveraged to modify texts under examination, using its contextual insights to influence AI-generated text evaluation tools, thereby creating an interpretable adversarial attack that compromises their detection capabilities. This work makes two primary innovations: 1. Proposing a novel adversarial attack on AI-origin detection systems, reducing detection accuracy from 0.4431 to 0.2744 AUROC on the XSum dataset and from 0.5068 to 0.3532 AUROC on the SQuAD dataset, through data perturbation with embedding models leveraging similar word probability vectors. 2. Employing the interpretable TM model to gain deeper insights into the adversarial attack mechanism and its effects on text origin detection systems. 2 AI-Text Detection Exploration To understand the process of creating an adversarial attack on AI-text detection tools, it is essential first to comprehend the underlying mechanisms for detection. This section will explore advanced models like DetectGPT ( Mitchell et al., 2023 ) and Fast-DetectGPT ( Bao et al., 2024 ) . In Detect-GPT , the scoring process relies on perturbations introduced by making minor modifications, such as replacing or masking specific words. These perturbations are typically generated using GPT-based models, such as T5. That method engages the model’s execution logic through a sequence of operations, generally involving 100 perturbations per input, with the model processing each input independently. As a result, that approach increases the execution time for detection compared to, e.g.,