Skip to content

Can AI-generated text be reliably detected?Can AI-Generated Text be Reliably Detected?

arXiv· arXiv:2303.11156· Vinu Sankar Sadasivan, Aounon Kumar, Sriram Balasubramanian, Wenxiao Wang, Soheil FeiziDepartment of Computer Science, University of Maryland; Department of Computer Science, Harvard UniversityIndexed by this site · 24 days ago· Originally publishedSelected AttacksSelectedAttention40

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors stress-test four categories of AI text detectors with a recursive paraphrasing attack; the authors state that the TPR@1%FPR of 300-token watermarked text can drop from 99.3% to 9.7%.

Threat modelThe attacker obtains AI text generated by the target model L and automatically and scalably paraphrases it with an AI paraphraser P to evade detection (type-II error); the Best of ppi variant assumes black-box query access to the detector. In the deception attack, the attacker has no white-box access and infers the hidden signature by querying the target LLM multiple times, writing text that is misclassified as AI-generated (type-I error).

Questions
Whether AI-generated text detectors (watermark, neural network, zero-shot, retrieval-based) are reliable in the presence of an attacker matters for preventing misuse such as plagiarism and fake news, and also for the risk of misjudging human authors.
Methods
Propose a recursive paraphrasing attack, using paraphrasers such as DIPPER and LLaMA-2-7B-Chat to paraphrase AI text over multiple rounds to evade detection; also propose a deception attack, in which the green list is inferred by querying a watermarked LLM multiple times to write text that is misclassified; additionally give a theoretical upper bound on the relationship between detector AUROC and the TV distance between human and machine text distributions.
Experiments and results
The authors report: after recursive paraphrasing of 300-token watermarked text, TPR@1%FPR drops from 99.3% to 9.7%; the AUROC of zero-shot detectors drops from 96.5% to 25.2%; the accuracy of retrieval-based detectors drops from 100% to below 60%; human evaluation says the quality of most paraphrased text remains high.
Limitations and future work
The authors note: existing paraphrasers may perform poorly in specific technical domains such as clinical ones; whether watermarks are more reliable on long text requires further study; the generalization of trained detectors to out-of-distribution human text is not considered. The target models tested are OPT, GPT-2 Medium and Llama-2-13B.
Experimental setupOPT-13B、OPT-1.3B et al. · XSum、PubMedQA et al. · TPR@1%FPR、AUROC et al.
Evaluated models
OPT-13BOPT-1.3BGPT-2 MediumLlama-2-13BRoBERTa-Large-DetectorRoBERTa-Base-DetectorMAGELongformerGPT-2-SmallGPT-2-LargeGPT-2-XLsingle-layer LSTM
Benchmarks
XSumPubMedQAKafkaiSQuAD-v2WebTextGPT-2 output datasets
Metrics
TPR@1%FPRAUROCdetection accuracyperplexityQA accuracyTV distance
AI summaryand selection rationaleResearchers from the University of Maryland and Harvard University propose a recursive paraphrasing attack; stress testing shows that four types of AI text detectors—watermark, neural network, zero-shot, and retrieval—are all unreliable against the attacker. After paraphrasing ~300-token watermarked text over multiple rounds with paraphrasers such as DIPPER and LLaMA-2-7B-Chat, the detection rate (TPR@1%FPR) dropped from 99.3% to 9.7%, and the retrieval-based detector's accuracy fell from 100% to below 60%; in human evaluation, 77% of paraphrased texts retained content well and 89% had high grammatical quality. On the deception attack side, an attacker querying the watermarked OPT-1.3B one million times can infer the green list, passing off human-written text as AI-generated, dropping watermark detection AUROC from 99.8% to 1.3%. Theoretically, the AUROC upper bound of the optimal detector is determined by the total variation distance between human and AI text distributions; the smaller the distance, the harder reliable detection is. Code is open-sourced at github.com/vinusankars/Reliability-of-AI-text-detectors.

Researchers from the University of Maryland and Harvard University propose a recursive paraphrasing attack; stress testing shows that four types of AI text detectors—watermark, neural network, zero-shot, and retrieval—are all unreliable against the attacker. After paraphrasing ~300-token watermarked text over multiple rounds with paraphrasers such as DIPPER and LLaMA-2-7B-Chat, the detection rate (TPR@1%FPR) dropped from 99.3% to 9.7%, and the retrieval-based detector's accuracy fell from 100% to below 60%; in human evaluation, 77% of paraphrased texts retained content well and 89% had high grammatical quality. On the deception attack side, an attacker querying the watermarked OPT-1.3B one million times can infer the green list, passing off human-written text as AI-generated, dropping watermark detection AUROC from 99.8% to 1.3%. Theoretically, the AUROC upper bound of the optimal detector is determined by the total variation distance between human and AI text distributions; the smaller the distance, the harder reliable detection is. Code is open-sourced at github.com/vinusankars/Reliability-of-AI-text-detectors.

Why it was selectedThe paper reports the drop in detection rates of four types of AI text detectors under the recursive rewriting attack; teams using such detection for review can use this to assess the risk of being bypassed.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors stress-test the robustness of four categories of AI text detectors against attackers, including evasion and deception attacks.

    Core question: whether existing AI-generated text detectors are reliable in the presence of an attacker.

    • Scenario and motivation: The authors note that LLMs may be misused for plagiarism, fake news, spam and the like, making reliable detection of AI-generated text a key problem; but blindly relying on detectors also causes harms such as misjudging human plagiarism.
    • Shortcomings of existing methods: The authors note that watermark, neural network, zero-shot and retrieval-based detectors are effective in their respective settings, but some popular detectors fail in real-world scenarios (the paper cites several news reports); neural network and zero-shot detectors may also be susceptible to adversarial and poisoning attacks.
    • Core observation: The authors argue that an attacker can use a paraphraser to erase the model signature in AI text, and can also infer hidden watermark signatures without white-box access, thereby amplifying type-II and type-I errors respectively.
    • Contributions of the paper: Propose a recursive paraphrasing attack to stress-test the four detector categories; propose spoofing attacks against watermark and retrieval-based detectors; give a theoretical framework relating the optimal detector's AUROC to the TV distance between human and machine text distributions (Theorem 1). The authors call these the first systematic analyses in the respective directions.
    • Threat model:
      • Goal: Evasion attacks amplify type-II errors (AI text judged as human text); spoofing attacks amplify type-I errors (human text misjudged as AI-generated), which the authors say can be used to damage the reputation of LLM developers.
      • Knowledge: In spoofing attacks the attacker has no white-box access to the detection method; the Best of ppi variant assumes black-box query access to the detector.
      • Capability: The attacker uses an AI paraphraser P to automatically and scalably paraphrase the target model L's output; in spoofing attacks the attacker can query the target watermarked LLM many times (1 million in the experiments) to learn the watermarking scheme.
      • Victim systems: Soft watermark detectors, the OpenAI RoBERTa trained detector, zero-shot detectors such as DetectGPT, and the retrieval-based detector of Krishna et al.
  2. What related research exists?

    Related work covers four categories of detection methods and two types of paraphrasing attacks; the authors state that this paper is a systematic stress test of the robustness of the four categories of detectors.

    Neural network trained detectors

    • OpenAI (2019) — a GPT-2 detector fine-tuned from RoBERTa for binary classification; the paper notes that such detectors require supervised fine-tuning anew for each newly released LLM.
    • Jawahar et al. (2020), Bakhtin et al. (2019), Fagni et al. (2020), Li et al. (2024, MAGE) — similar trained-detector work, cited together in the paper.

    Zero-shot detectors

    • Solaiman et al. (2019), Ippolito et al. (2019), Gehrmann et al. (2019) — detect using statistics such as per-token log probabilities with a threshold, requiring no additional training.
    • Mitchell et al. (2023) — DetectGPT, exploiting the observation that AI text lies in regions of negative curvature of log probability; the paper notes that zero-shot methods require access to the original model that generated the text to achieve best performance.

    Watermarking and retrieval-based detection

    • Kirchenbauer et al. (2023a) — soft watermarking, partitioning tokens into green/red lists; the authors say it can achieve 99.8% TPR at 1% FPR; the paper notes that watermarking is only effective if enforced on all mainstream LLMs, otherwise attackers can switch to unwatermarked models.
    • Krishna et al. (2023) — retrieval-based detection, storing LLM outputs in a database for semantic similarity retrieval; the paper notes the privacy risk of storing user conversations. Zhao et al. (2023a, 2023b), Kuditipudi et al. (2024) — other watermarking schemes.

    Paraphrasing and adversarial attacks

    • Span replacement in Kirchenbauer et al. (2023a) — replacing random tokens in place with an LLM; the paper says this paper's recursive paraphrasing is a stronger attack.
    • Zhang et al. (2024) — substitution attack; the paper notes its goal is only to preserve text quality, not semantic similarity, and it may change the original content.
    • Lu et al. (2023) — word/sentence-level substitution with in-context optimization via a proxy detector; the paper notes it is an adversarial algorithm, whereas this paper's recursive paraphrasing is non-adversarial.

    Baselines and benchmarks: The baseline detectors attacked are the four categories above (soft watermark, RoBERTa-Base/Large, DetectGPT and threshold-based zero-shot, retrieval-based detectors); the experimental datasets are XSum, PubMedQA and Kafkai, and text quality is evaluated with SQuAD-v2.

    The authors call this paper the first comprehensive analysis of the robustness of these four detector categories against attackers, and recursive paraphrasing the first method able to break watermark and retrieval-based detectors; Gu et al. (2024) is follow-up work on watermark distillation building on this paper's spoofing attack.

  3. How does the paper address this problem?

    Evade detection using recursive paraphrasing attacks, amplify false positives using spoofing attacks that infer the signature via queries, and give a theoretical upper bound on detection difficulty using TV distance.

    Overall approach: propose a recursive paraphrasing attack, using a neural paraphraser to paraphrase the target LLM's output over multiple rounds to erase the model signature; then design deception attacks against watermarks and retrieval-based detectors; finally, characterize the theoretical difficulty of the detection problem using total variation (TV) distance.

    Attack setup and paraphrasers

    • Attack pipeline: the target model L generates text S = L(C) for prompt C; the paraphraser P generates pp1(S) = f_strong(S, C), and recursively pp2(S) = f_strong(pp1(S), C), up to 5 rounds (Figure 2).
    • Paraphrasers: DIPPER (11B parameters) and LLaMA-2-7B-Chat (7B) can paraphrase whole passages and support context prompts; the T5-based paraphraser (222M) can only paraphrase sentence by sentence. The authors say they chose the first two for recursive paraphrasing because of higher paraphrase quality; LLaMA-2-7B-Chat acts as a paraphraser via the system prompt in Appendix B.2.
    • Best of ppi variant: for each passage, select the version from the paraphrase rounds with the worst detection score, assuming black-box query access to the detector.

    Evaluation of evasion attacks

    • Data: 1000 long news articles from XSum (about 300 tokens); the first 300 tokens are fed to the target LLM to generate AI text, and the last 300 tokens serve as the human text baseline, for 2000 passages total (1000 per class); Appendix A additionally uses PubMedQA and Kafkai (1000 passages each, about 200 tokens).
    • Target models: OPT-1.3B, OPT-13B (main text), GPT-2 Medium and Llama-2-13B (appendix).
    • Metrics: TPR@1%FPR, AUROC, detection accuracy; text quality measured with OPT-13B perplexity, SQuAD-v2 QA accuracy (judge model LLaMA-2-13B-Chat), and MTurk human evaluation (20 passages × 5 paraphrase rounds, 3 workers per passage, 1–5 Likert scale).

    Deception attacks

    • Soft watermark: the attacker queries the watermarked OPT-1.3B one million times, tallies the token distribution after 181 common words, and estimates a proxy green list for each prefix word; the attacker then manually writes text containing a high proportion of green list tokens. The authors say this learning only needs to be done once.
    • Retrieval-based detector: the attacker has the target LLM paraphrase a human text so that a semantically similar copy enters its database, causing the original human text to be misclassified as AI-generated.
    • Zero-shot and trained detectors: prepend a human text that the detector misclassifies as AI to other human texts (length not exceeding the original), and observe the overall misclassification.

    Theoretical framework

    • Theorem 1: the AUROC of any detector D satisfies AUROC(D) ≤ 1/2 + TV(M, H) − (TV(M, H)2)/2, i.e., the smaller the TV distance between human and machine text distributions, the lower the AUROC upper bound of the optimal detector.
    • Implication: the authors say that when TV < 0.2, the optimal detector's AUROC < 0.7; from this they derive the trade-off between type-I and type-II errors (Corollaries 2–3). Appendix C.3 gives a tightness analysis of the bound, and Theorem 2 extends the result to pseudorandomly sampled LLMs.
    • Empirical validation: (i) train single-layer LSTMs of different sizes on synthetic Markov text and compute exact TV; (ii) partition the token set into 5 meta-token partitions and estimate the TV between the outputs of four GPT-2 sizes and WebText, averaged over 30 repetitions.
  4. What experiments did the paper conduct?

    Recursive paraphrasing reduces watermark detection TPR@1%FPR from 99.8% to below 20%, and the deception attack reduces watermark AUROC from 99.8% to 1.3%.

    Experimental setup

    • Detectors tested: soft watermark (Kirchenbauer et al., 2023a), Kuditipudi et al. (2024) distortion-free watermark, OpenAI RoBERTa-Base/Large trained detectors, MAGE/Longformer, four DetectGPT variants (1d/1z/10d/10z), four threshold-based zero-shot detectors (likelihood/rank/log-rank/entropy), and the Krishna et al. retrieval-based detector.
    • Target models: OPT-13B, OPT-1.3B (main text), GPT-2 Medium, Llama-2-13B (Appendix A).
    • Paraphrasers: DIPPER (11B), LLaMA-2-7B-Chat (7B), T5-based paraphraser (222M).
    • Data: 2000 XSum passages (1000 per class, about 300 tokens); PubMedQA and Kafkai 1000 passages each (500 per class, about 200 tokens).
    • Metrics and judges: TPR@1%FPR, AUROC, detection accuracy; perplexity measured with OPT-13B; QA judge uses LLaMA-2-13B-Chat; human evaluation is 20 passages × 5 rounds, 3 MTurk workers per passage.
    • Number of repetitions: the main-text experiments do not report the number of repetitions; the TV estimation experiments use 30 repetitions, and the synthetic data experiments use 5 independent trials.

    Main results

    According to main text §1, §2.3–2.4 and Figures 3–6 (values as reported in the paper's main text):

    Swipe horizontally to read the table

    DetectorBefore attackAfter attackCondition
    Soft watermark (OPT-13B, DIPPER)TPR@1%FPR 99.8%80.7% (pp1); below 20% after pp5300 tokens, Figure 3
    Soft watermark (OPT-13B, LLaMA-2-7B-Chat)99.8%54.6% (pp1)300 tokens, §2.3
    Soft watermark (OPT-1.3B, Best of ppi)99.8%4.0%perplexity cost 1.5, Figure 4a
    DetectGPT (GPT-2 Medium, T5 paraphrase)AUROC 96.5%59.8%XSum, §2.4
    RoBERTa-Large (GPT-2 Medium, T5 paraphrase)TPR@1%FPR 100%about 92%; 80% after multiple queriesXSum, Figure 5
    Retrieval-based (OPT-1.3B, DIPPER pp5)accuracy 100%below about 60%perplexity cost 1.7, Figure 6
    • The authors say that in all settings pp2 (two paraphrase rounds) is enough to bring the TPR@1%FPR of watermark detection below 50%.
    • The authors say DIPPER's trend of improving attack effectiveness with more recursive rounds is more stable than LLaMA-2's, because DIPPER is trained specifically for paraphrasing.
    • Exception: the entropy threshold detector's detection score actually rises after paraphrasing; the authors explain that the LLM may give low entropy scores to human text due to memorization, and paraphrasing raises the entropy of human text; but this detector's detection rate is low both before and after the attack.

    Text quality evaluation

    • Human evaluation (Tables 1, 2): for DIPPER recursive paraphrasing, content preservation was rated 5 or 4 by 70.4% (mean 4.0 ± 0.9), and grammar/text quality was rated 5 or 4 by 89.12% (mean 4.14 ± 0.58); for LLaMA-2-7B-Chat the corresponding figures are 83.0% and 88.0%. The sample is 5 paraphrase rounds of 20 passages.
    • Automatic metrics (Table 3): after 5 paraphrase rounds, perplexity changes from 5.2 to 8.7 (DIPPER) and 10.5 (LLaMA-2-7B-Chat) respectively; SQuAD-v2 QA accuracy changes from 97% to 95.5% (DIPPER) and 97% (LLaMA-2-7B-Chat), on a sample of 200 data points with contexts of at least 300 tokens.
    • The authors therefore say recursive paraphrasing causes only a slight decline in text quality, and believe this trade-off will narrow further as paraphrasers improve in the future.

    Deception attacks

    • Soft watermark (Figure 7, Table 15): after querying OPT-1.3B one million times to estimate proxy green lists for 181 common words, detection AUROC drops from 99.8% to 1.3%; the example human text contains 42.6% green list tokens, with a z-score of 4.36 (detection threshold 4).
    • Retrieval-based (§3, Appendix A.4): the authors say the detector can be deceived 100% of the time, even if the database is private; Appendix A.4 says its performance can be reduced to 0%.
    • Zero-shot and trained (Table 16): after prepending misclassified text, DetectGPT's TPR@1%FPR drops from 0.240 to 0.055, and FPR@90%TPR rises from 0.145 to 0.555; RoBERTa-Large's two metrics are essentially unchanged (0.990→0.985, 0.000→0.000); the authors say most detectors' metrics worsen after deception.

    Empirical validation of the theory

    • Synthetic data (Figures 9, 15): as LSTM size increases, the exact TV distance between the learned distribution and the true synthetic distribution decreases (5 independent trials).
    • Projection estimates (Figure 10): the estimated TV between GPT-2-Small/Medium/Large/XL outputs and WebText decreases steadily as model size increases (30 repetitions, consistent across sequence lengths).
    • The authors say this provides empirical evidence for the hypothesis that "more advanced LLMs bring smaller TV distances and make detection harder."

    Other ablations and analyses

    • Text length: watermarked text of 50 or 100 tokens, after recursive paraphrasing, has detection performance close to a random detector (Figure 4b).
    • Multiple queries: assuming the detector can be queried 10 times, Figure 5 shows that all tested detectors' TPR@1%FPR decreases.
    • Llama-2-13B as target (Table 4): the TPR@1%FPR of the Kuditipudi et al. watermark drops from 0.988 to 0.264 (pp5), with the attacker paraphrasing using the smaller Llama-2-7B.
    • Attack cost: DIPPER's five rounds of recursive paraphrasing take about 36 seconds per passage (300 tokens) on average (Appendix A.2).
  5. What are some points that can be further explored?

    The authors list directions including watermark reliability on long text, domain paraphrasers, and adversarially trained LLMs; experiments cover models including OPT, GPT-2 and Llama-2.

    Limitations and future directions noted by the authors

    • Watermarks and long text: The authors state that watermarks may be more reliable on tasks requiring long text, but cannot be guaranteed to be a foolproof defense and require more research, left as future work (§2.3).
    • Generalization of trained detectors: The authors state that trained detectors may overfit to the human text distribution used for their training and fail on out-of-distribution human text; this paper does not consider this aspect (§2.4).
    • Domain limitations: The authors state that existing paraphrasers may perform poorly in specific technical domains such as clinical text, and that stronger future paraphrasers may overcome this (Appendix E).
    • Adversarially trained LLMs: The authors state that future attackers could adversarially train an LLM to explicitly imitate a specific population to minimize TV distance and evade detection, which merits more research (Appendix E).
    • Difficulty of TV estimation: The authors state that precisely estimating the TV of text distributions from finite samples is very difficult, and their hypothesis that "more advanced LLMs bring smaller TV" is hard to analyze precisely (§4).

    Scope of experiments

    • The target models tested are OPT-1.3B, OPT-13B, GPT-2 Medium, and Llama-2-13B, 4 in total (§2.1, Appendix A).
    • The datasets are XSum, PubMedQA, and Kafkai; XSum has 1000 passages per class, about 300 tokens each, and the other two have 500 passages per class, about 200 tokens each (§2.3, Appendix A).
    • The detectors tested cover four categories: watermarking (soft watermark and Kuditipudi et al.), trained (RoBERTa-Base/Large, MAGE/Longformer), zero-shot (four DetectGPT variants and four threshold-based), and retrieval-based (Krishna et al.) (Table 4–6).
    • The human evaluation sample is 20 passages × 5 rounds of paraphrasing, with 3 MTurk workers per passage (Appendix B.1).
    • The main-text experiments do not report the number of repetitions or confidence intervals; the query volume for the deception attack is stated as 1 million (§3).
  6. Summarize the main content of the paper

    The authors stress-test four categories of AI text detectors, stating that recursive paraphrasing and deception attacks can substantially reduce their detection performance, and provide a theoretical difficulty upper bound.

    A paper on attack and theoretical analysis of the reliability of AI-generated text detection. The problem the authors address is: in the presence of attackers, are the four types of detectors—watermark, trained, zero-shot, and retrieval-based—reliable?

    • Methods: propose a recursive paraphrasing attack, using paraphrasers such as DIPPER and LLaMA-2-7B-Chat to paraphrase AI text over multiple rounds to evade detection; propose a deception attack that infers a proxy green list by querying a watermarked LLM one million times to write misclassified text; the theoretical part gives an upper bound on the AUROC of the optimal detector in terms of the TV distance between human and machine text distributions (Theorem 1).
    • Evasion attack results: the authors report that for 300-token watermarked text, TPR@1%FPR drops from 99.3% to 9.7% (introduction); two paraphrase rounds are enough to bring watermark detection below 50%; DetectGPT's AUROC drops from 96.5% to 59.8% (§2.4); the retrieval-based detector's accuracy drops from 100% to below about 60% (Figure 6).
    • Text quality: in the MTurk evaluation, 89.12% of DIPPER paraphrases were rated as high-quality grammar (Table 1); SQuAD-v2 QA accuracy changes from 97% to 95.5% (Table 3). The authors say the quality decline is slight.
    • Deception attack results: watermark detection AUROC drops from 99.8% to 1.3% (Figure 7); the retrieval-based detector can be deceived 100% of the time (§3).
    • Theoretical results: the authors say that as TV distance shrinks, the optimal detector's AUROC upper bound decreases, and GPT-2 series experiments show that larger models have smaller TV estimates, meaning detection will become harder as models improve.
    • The authors' conclusion: existing detectors are susceptible to both evasion and deception attacks in the presence of attackers, and blind reliance on detectors may misjudge human authors; the authors believe stress-testing existing and future detectors is necessary to avoid a false sense of security.

Related papers

Read originalarxiv.org