Skip to content

RADAR: Robust AI Text Detection via Adversarial LearningRADAR: Robust AI-Text Detection via Adversarial Learning

arXiv· arXiv:2307.03838· Xiaomeng Hu, Pin-Yu Chen, Tsung-Yi HoThe Chinese University of Hong Kong, Sha Tin; IBM ResearchIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Defenses

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

The authors propose RADAR, which adversarially trains an AI text detector with a paraphraser and a detector; the authors state that against GPT-3.5-Turbo paraphrasing it achieves an average AUROC of 0.857, outperforming the best baseline entropy's 0.651.

Threat modelThe defender trains an AI text detector; the attacker uses an LLM paraphraser (seen paraphraser is the Gσ trained by RADAR, unseen paraphraser is GPT-3.5-Turbo, which did not participate in training) to paraphrase AI text to evade detection. The victim system is the AI text detector; the evaluation includes 8 target LLMs and 4 datasets.

Questions
LLM-generated text (AI-text) and human text are hard to distinguish, bringing risks such as fake content, plagiarism, and falsely flagging innocent authors; existing detectors degrade substantially under LLM paraphrasing, and the authors aim to train a detector robust to paraphrasing.
Methods
RADAR uses adversarial learning to jointly train a paraphraser (initialized from T5-large, optimized with PPO, using the detector's output as reward) and a detector (initialized from RoBERTa-large, weighted logistic loss), with the two updated iteratively until validation AUROC converges.
Experiments and results
On 8 LLMs and 4 datasets, without paraphrasing RADAR's average AUROC is 0.856, close to the best baseline log rank's 0.904; against GPT-3.5-Turbo paraphrasing RADAR is 0.857 and the best baseline entropy is 0.651; the authors also state that detectors trained on instruction-tuned models transfer better, with a detector trained on Camel-5B reaching 0.915 on GPT-4 text.
Limitations and future work
In the Limitations section, the authors acknowledge: without paraphrasing, RADAR is sometimes worse than the best baseline, and the detector is not perfect and gives incorrect predictions, so detection results need further verification if used as evidence. The experiments cover only 8 open-source LLMs plus GPT-4 transfer, 4 English datasets, and 90–500 evaluation samples.
Experimental setupPythia-2.8B、Dolly-V2-3B et al. · WebText、Xsum et al. · AUROC、iBLEU et al.
Evaluated models
Pythia-2.8BDolly-V2-3BPalmyra-baseCamel-5BGPT-J-6BDolly-V1-6BLLaMA-7BVicuna-7BGPT-4
Benchmarks
WebTextXsumSQuADWritingPrompts (WP)TOFELQuora Question Pairs (QQP)
Metrics
AUROCiBLEUdetection transferability ratio F(A,B)
AI summaryResearchers propose the RADAR framework, which trains a more robust AI-generated text detector through adversarial learning between a paraphraser and a detector, to address problems such as fabricated content, plagiarism, and falsely accusing innocent writers caused by the difficulty of distinguishing text generated by large language models. The paraphraser's goal is to generate realistic content that can bypass detection, and RADAR uses feedback from the detector to update the paraphraser, and vice versa. Experiments on 8 large language models—Pythia, Dolly 2.0, Palmyra, Camel, GPT-J, Dolly 1.0, LLaMA, and Vicuna—and 4 datasets show that RADAR clearly outperforms existing AI text detection methods, with the advantage especially pronounced when text is paraphrased. The authors also find that RADAR has strong transferability from instruction-tuned models to other models, and evaluate its improved capability via GPT-3.5-Turbo.

Researchers propose the RADAR framework, which trains a more robust AI-generated text detector through adversarial learning between a paraphraser and a detector, to address problems such as fabricated content, plagiarism, and falsely accusing innocent writers caused by the difficulty of distinguishing text generated by large language models. The paraphraser's goal is to generate realistic content that can bypass detection, and RADAR uses feedback from the detector to update the paraphraser, and vice versa. Experiments on 8 large language models—Pythia, Dolly 2.0, Palmyra, Camel, GPT-J, Dolly 1.0, LLaMA, and Vicuna—and 4 datasets show that RADAR clearly outperforms existing AI text detection methods, with the advantage especially pronounced when text is paraphrased. The authors also find that RADAR has strong transferability from instruction-tuned models to other models, and evaluate its improved capability via GPT-3.5-Turbo.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Existing AI text detectors are easily bypassed by LLM paraphrasing, so the authors propose an adversarial training framework, RADAR, to train a robust detector.

    Core question: how to train an AI text detector that remains effective under LLM paraphrasing attacks.

    • Problem setting and importance: The authors state that the boundary between LLM-generated text and human text is increasingly blurred, and that the difficulty of distinguishing them brings risks such as fake content generation, AI plagiarism (e.g., using an LLM to write exam essays), and falsely flagging innocent authors. In the evaluation reported by OpenAI, its classifier correctly identified only 26% of AI text and misclassified 9% of human text; another study [21] found that detectors are biased against non-native English writers.
    • Shortcomings of existing methods: The authors cite [27, 17] to state that using an LLM as a paraphraser can bypass many existing detection methods, even when the original text has been watermarked; [27] argues theoretically that AI text is hard to detect, while [3] proves that a reliable detector is possible as long as the human/machine distributions are not exactly the same.
    • Core idea: Drawing on the two-player game idea of GANs, a paraphraser (whose goal is to paraphrase AI text to evade detection) and a detector (whose goal is to improve detectability) are trained adversarially, with the detector's feedback used to update the paraphraser and vice versa.
    • What the paper proposes: The RADAR framework—the paraphraser is updated with PPO and the detector with a weighted logistic loss; evaluated on 8 LLMs and 4 datasets, and detection ability is examined for cross-model transfer.
    • Threat model:
      • Attacker goal: use a paraphraser to paraphrase AI-generated text so that the detector classifies it as human text.
      • Attacker capability/knowledge: seen paraphraser refers to the paraphraser Gσ returned by RADAR training; unseen paraphraser refers to a new paraphraser that did not participate in RADAR training, by default the OpenAI GPT-3.5-Turbo API.
      • Victim system: AI text detectors (statistical methods, the OpenAI RoBERTa classifier, DetectGPT, and RADAR itself).
      • Success criterion: AUROC measures the detector's ability to distinguish human text from (possibly paraphrased) AI text.
  2. What related research exists?

    Related work falls into three categories: AI text detection (statistical/classification/watermarking), adversarial learning for text generation, and paraphrasing-based adversarial examples.

    AI text detection—statistical methods

    • GLTR [8] (2019)—detection using statistics such as entropy, probability, and probability rank.
    • DetectGPT [23] (2023)—assumes machine text lies in regions of negative curvature of the target LLM's log probability, perturbs the text with a mask-filling model such as T5, and compares log probabilities.
    • Other statistics: entropy [19], n-gram frequency, perplexity, etc. are used as thresholds.

    AI text detection—classification and watermarking methods

    • Classification methods: detection is framed as a binary classification task, with classifiers trained for the target language model [37, 29, 26, 13]; OpenAI fine-tuned RoBERTa on WebText and GPT-2 generated data to obtain a detector [29], and later released an AI-Classifier based on data from multiple sources (released January 2023, discontinued July).
    • Watermarking methods: including rule-based methods [1, 15, 31], deep learning methods [6, 32], and inference-time soft watermarking [16] (partitioning the vocabulary and sampling the next token differentially). The paper notes that [27] shows many existing detectors are significantly weakened by paraphrasing.

    Adversarial learning for text generation

    • Continuous relaxation line: discrete sampling is replaced by continuous approximations such as Gumbel-Softmax [14, 22] [35, 5].
    • Reinforcement learning line: generation is treated as a decision process; SeqGAN [36] collects rewards from the discriminator via Monte Carlo search; Diversity-Promoting GAN [34] uses a unidirectional LSTM discriminator combined with word-level and sentence-level rewards; TextGAIL [33] uses imitation learning and optimizes the generator with PPO; [7] trains a language GAN from scratch. The paper notes that these works all warm up the generator with MLE, whereas RADAR differs in that its goal is to train a robust AI text detector with a tunable paraphraser.

    Paraphrasing-based adversarial examples

    • [20, 4] use paraphrasing techniques to find adversarial examples for NLP tasks and perform adversarial training; the paper notes that they focus on the correctness of natural language understanding and are not within the scope of AI text detection.

    Baselines and benchmarks: the comparison baselines are 6 in total: OpenAI (RoBERTa), log probability, rank, log rank, entropy, and DetectGPT; the evaluation datasets are Xsum, SQuAD, WritingPrompts, and TOFEL (the training corpus is WebText). Authors' positioning: RADAR is the first study to train a robust AI text detector via adversarial learning between a paraphraser and a detector (the authors state "to the best of our knowledge").

  3. How does the paper address this problem?

    RADAR pits a PPO-trained paraphraser against a logistic-loss-trained detector in adversarial iteration until validation AUROC converges.

    Overall approach: RADAR consists of three language models—a frozen target model Tθ, a detector Dϕ, and a paraphraser Gσ; the paraphraser and detector are updated iteratively as adversaries, and the target LLM is frozen throughout.

    Data preparation and overall pipeline

    • AI corpus construction: Tθ is used to continue each text in the human corpus H from its first 30 tokens, generating an AI text corpus M with length limited to 200 tokens.
    • Iterative training: sample xh and the corresponding xm, use Gσ to paraphrase xm to obtain xp; update Gσ with PPO using the detector output as reward; then update Dϕ with the logistic loss using the (xh, xm, xp) triples; repeat until validation-set AUROC no longer improves.
    • Validation and deployment: during training the WebText test set is used as the validation set, and finally the detector with the best validation AUROC and its paired paraphraser are returned; at evaluation time the detector predicts, for any input, the likelihood that it is AI-generated.

    Paraphraser: Clipped PPO with Entropy Penalty

    • Reward design: paraphrasing is treated as a decision process, with xm as the state and xp as the action; the reward is R(xp, ϕ) = Dϕ(xp) ∈ [0,1], i.e., the detector's predicted probability that xp is human text, normalized over the PPO sample buffer to obtain the advantage term.
    • Loss: LG(σ) consists of the clipped PPO term LA and the entropy penalty term LE; LE encourages diversity in the generation policy, and the coefficient γ balances the two (γ = 0.01 in the experiments).

    Detector: Reweighted Logistic Loss

    • Sample imbalance: each xh corresponds to two AI samples, xm and xp, so the number of AI texts is twice that of human texts.
    • Weighted loss: LD(ϕ) consists of the human text loss LH, the original AI text loss L1M, and the paraphrased AI text loss L2M; the two AI-side terms are multiplied by a coefficient λ ∈ [0,1] to mitigate the imbalance (default λ = 0.5).

    Implementation details

    • Initialization: the paraphraser is initialized with pretrained T5-large and the detector with pretrained RoBERTa-large; the PPO buffer B stores 256 pairs of data.
    • Optimization settings: batch size 32, AdamW, initial learning rate 1e-5, linear decay, trained until validation loss converges; experiments run on 2 NVIDIA Tesla V100 32GB GPUs.
    • Paraphrasing configuration: the seen paraphraser takes the input prefix "Paraphrase: [s]", and decoding uses top-k (k=50) plus nucleus sampling (p=0.95); the unseen paraphraser uses the GPT-3.5-Turbo API, with the instruction to make the sentence read more like it was written by a human (the full instruction is given in Appendix D).
  4. What experiments did the paper conduct?

    Comparing 6 baselines on 8 LLMs × 4 datasets, RADAR has the highest AUROC in the paraphrasing setting, and transferability and paraphraser quality are also examined.

    Experimental setup

    • Target LLMs (8): Pythia-2.8B, Dolly-V2-3B, Palmyra-base, Camel-5B, GPT-J-6B, Dolly-V1-6B, LLaMA-7B, Vicuna-7B (Table 1), including 4 "base + instruction-tuned" pairs.
    • Datasets: 160K documents sampled from WebText for training; Xsum (500 items), SQuAD (312 items), WritingPrompts (500 items), TOFEL (90 items, non-native English) for evaluation (Appendix A, Table A1).
    • Baselines (6): OpenAI (RoBERTa), log p, rank, log rank, entropy, DetectGPT (using T5-large for mask-filling, perturbing each sentence 10 times).
    • Metric: AUROC (higher is better); values in the main table are averages over the 8 LLMs.
    • Paraphrasing settings: w/o paraphraser (original AI text), RADAR-Seen paraphraser (the Gσ returned by training), RADAR-Unseen paraphraser (GPT-3.5-Turbo API).
    • Number of repetitions: The paper does not report the number of repeated experiments; Figure 2 gives standard deviation error bars of AUROC across the 8 LLMs.

    Main results

    According to Table 2 (AUROC, average over 8 LLMs, Average column):

    Swipe horizontally to read the table

    Methodw/o ParaphraserSeen ParaphraserUnseen Paraphraser
    log p0.8870.1980.422
    rank0.7550.2840.461
    log rank0.9040.2090.426
    entropy0.4720.8200.651
    DetectGPT0.8670.1590.434
    OpenAI (RoBERTa)0.9000.8060.627
    RADAR0.8560.9220.857
    • No paraphrasing: RADAR (0.856) is slightly lower than the best baseline log rank (0.904), which the authors explain as a trade-off for enhanced paraphrase resistance.
    • With paraphrasing: The authors report that the AUROC of existing methods (except entropy) drops by 10.4%–81.7% relative to the no-paraphrasing setting; RADAR is best on every dataset, with an average AUROC of 0.857 against the unseen paraphraser, which the authors say is a 31.64% improvement over the best baseline entropy (0.651) (Figure 2).
    • Seen vs unseen: RADAR is more robust to the seen paraphraser (0.922) than to the unseen paraphraser (0.857); the authors say the reason is that the seen paraphraser is exactly the paraphraser used to train the detector.

    Detection transferability

    • Better transfer for instruction-tuned models: Figure 3 gives pairwise transfer ratios F(A,B)=AUROC(A,B)/AUROC(B,B) for the 8 LLMs; without paraphrasing, F(Vicuna-7B, LLaMA-7B) reaches 95.0%, while the reverse F(LLaMA-7B, Vicuna-7B) is 68.2%; ranked by overall transferability, the top 3 detectors are all trained from instruction-tuned models; the authors say there is no clear trend between model scale and detection performance.
    • Transferability improves under paraphrasing: The authors report that from Figure 3a to 3b, average overall transferability improves by 11.6%; except for LLaMA-7B (down 3.8%) and GPT-J-6B (down 1.4%), the rest improve by 2.4% (Palmyra-base) to 47.6% (Camel-5B).
    • GPT-4 transfer: Of the 8 RADAR detectors, 5 exceed OpenAI (RoBERTa) on GPT-4-generated text, and 3 have AUROC above 0.8; the detector trained on Camel-5B reaches 0.915 (Section 4.3, details in Appendix K).

    Multi-round paraphrasing and paraphraser quality

    • Multi-round paraphrasing: On Xsum, using the detector trained on Camel-5B and GPT-3.5-Turbo paraphrasing; the authors say RADAR is the only detector robust to multi-round paraphrasing, RADAR along with OpenAI (RoBERTa) and entropy remain effective when paraphrasing human text, and multi-round paraphrasing overall did not increase detection difficulty (Figure 4; the specific values in the figure are unreadable in the text conversion).
    • Paraphraser quality: 100 documents were selected from WebText, and GPT-3.5-Turbo scored the paraphrases of 4 RADAR paraphrasers and the initial T5-large on a 1–10 scale; the authors say RADAR improved paraphrase quality, and paraphrasers trained with larger instruction-tuned target models scored higher (Figure 5a, 5b); measured by iBLEU (α=0.8) on QQP, all RADAR paraphrasers are higher than T5-large (Figure 5c).

    Other ablations and analyses

    • λ trade-off (Section 4.6, Appendix J): 10 detectors were trained on Vicuna-7B with λ from 0.1 to 1.0; when λ was adjusted from 0.5 to 0.6, no-paraphrasing AUROC rose from 0.906 to 0.937, and unseen-paraphrasing AUROC rose from 0.892 to 0.920.
    • Text length (Appendix H): {log p, rank, log rank, DetectGPT} are insensitive to length without paraphrasing and get better as length increases under paraphrasing; {entropy, OpenAI (RoBERTa), RADAR} are better on long text without paraphrasing and get worse as length increases under paraphrasing; the authors say RADAR's advantage is greater on short text.
    • Dipper paraphrasing (Appendix I): Using Dipper (L60-O60) as the paraphraser, RADAR's AUROC reaches 0.9; the authors say Dipper is less damaging to most detectors than GPT-3.5-Turbo.
    • Detector ensemble (Appendix G, Table A6): Two detectors are weighted and combined according to E(A,B,β,x); the authors say a well-tuned ensemble can improve performance, e.g., combining Camel-5B with Vicuna-7B at β=0.5 raises AUROC from 0.920 to 0.929.
    • Case study (Appendix F, Table A5): One easy-to-detect sample (AI probability 0.9999) and one hard-to-detect sample (0.0031); the authors say the latter was missed because the AI text is almost identical to the original text, with only a few extra words.
  5. What are some points that can be further explored?

    The authors acknowledge that without paraphrasing, performance is sometimes below the best baseline and that the detector can make errors; the experiments cover 8 open-source LLMs and 4 English datasets.

    Limitations and future directions noted by the authors

    • Trade-off under the no-paraphrasing setting (Section 6 Limitations): The authors acknowledge that when RADAR faces unparaphrased native LLM text, its detection performance is sometimes worse than the best existing method.
    • The detector is imperfect (Section 6): The authors acknowledge that the detector is not perfect and in some cases gives incorrect predictions; if detection results are to be used as evidence, further verification steps are needed.
    • The paper does not propose other clear future research directions.

    Scope of experiments

    • Models tested: 8 open-source LLMs (Pythia-2.8B, Dolly-V2-3B, Palmyra-base, Camel-5B, GPT-J-6B, Dolly-V1-6B, LLaMA-7B, Vicuna-7B) as target models, plus GPT-4 used only for transfer detection (Appendix K).
    • Evaluation data: Xsum 500 items, SQuAD 312 items, WritingPrompts 500 items, TOFEL 90 items (Appendix A, Table A1); the training corpus is 160K WebText documents.
    • Paraphrasers: the seen paraphraser is the T5-large paraphraser trained by RADAR, the unseen paraphraser is GPT-3.5-Turbo, and Dipper (L60-O60) was also tested (Appendix I).
    • Baselines: 6 detection methods (OpenAI (RoBERTa), log p, rank, log rank, entropy, DetectGPT).
    • Information not reported: The paper does not report the number of experimental repetitions or statistical significance tests; the paraphraser quality evaluation used GPT-3.5-Turbo to score 100 WebText documents (Appendix L), and agreement with human judgments was not reported.
  6. Summarize the main content of the paper

    RADAR uses paraphraser-detector adversarial training to obtain a paraphrase-resistant detector, with an average AUROC of 0.857 against GPT-3.5-Turbo paraphrasing, outperforming the best baseline.

    RADAR is a framework for training a robust AI text detector with adversarial learning, addressing the problem that existing detectors are easily bypassed by LLM paraphrasing.

    • Method: a frozen target LLM generates the AI corpus; a paraphraser initialized from T5-large is updated with clipped PPO with an entropy penalty using the detector output as reward; a detector initialized from RoBERTa-large is updated with a weighted logistic loss (λ balances human/machine samples); the two are iterated until validation AUROC converges.
    • Main results (average over 8 LLMs and 4 datasets, Table 2): without paraphrasing, RADAR AUROC is 0.856, close to the best baseline log rank's 0.904; against the seen paraphraser it is 0.922; against the unseen paraphraser (GPT-3.5-Turbo) it is 0.857, while the best baseline entropy is 0.651, which the authors state is an improvement of 31.64%.
    • Transferability: the authors report that detectors trained on instruction-tuned models transfer better (e.g., Vicuna-7B→LLaMA-7B reaches 95.0%), and that overall transferability improves by 11.6% on average in the paraphrasing setting; a detector trained on Camel-5B achieves AUROC 0.915 on GPT-4 generated text.
    • By-product: the authors state that adversarial training also improves paraphraser quality, with both GPT-3.5-Turbo scores and iBLEU on QQP better than the initial T5-large.
    • Authors' conclusion: the authors believe the results show that a general robust AI text detector can be trained based on advanced LLMs, and that a detector trained with a smaller, weaker LLM can also detect text generated by models such as GPT-4; they also acknowledge that without paraphrasing performance is sometimes below the best baseline, that the detector makes errors, and that detection results need further verification when used as evidence.

Related papers

Read originalarxiv.org