DetectRL: Benchmarking LLM-Generated Text Detection in Real-World Scenarios

Junchao Wu, Runzhe Zhan, Derek F. Wong, Shu Yang, Xinyi Yang, Yulin Yuan, Lidia S. Chao

TL;DR

DetectRL is a new benchmark designed to stress-test LLM-generated text detectors using "messy" real-world scenarios like adversarial prompts, human-in-the-loop editing, and common writing errors. The study reveals that while state-of-the-art detectors perform well on "clean" data, their reliability plummets when faced with the nuances of practical application, particularly against specific models like Claude.

What Problem Does This Paper Address?

As Large Language Models (LLMs) become ubiquitous, the need to distinguish between human and machine-written text has moved from a theoretical curiosity to a critical necessity for academic integrity, journalism, and cybersecurity. However, most existing detection benchmarks (like TuringBench or MGTBench) evaluate detectors in "ideal" conditions: clean, long-form text generated by a single prompt.

Comparison of DetectRL with existing benchmarks

In the real world, text is rarely that tidy. Humans use LLMs to "polish" their own drafts, mix AI-generated sentences with their own, and introduce "noise" like typos or informal slang. The authors of DetectRL argue that current detectors are over-optimized for lab settings and lack the robustness needed for real-world deployment.

Methods

To bridge this gap, the researchers developed a comprehensive framework that subjects detectors to four distinct assessment tasks:

The DetectRL evaluation framework and benchmark results radar chart
  1. In-domain Robustness: Evaluating performance across different domains (e.g., news vs. social media) and different LLM generators.
  2. Generalization Assessment: Testing if a detector trained on one domain or model can still identify text from another.
  3. Varying Text Length: Analyzing how the amount of available text (from 20 to 360 words) affects accuracy.
  4. Real-World Human Writing Assessment: Simulating how human-driven factors—like word substitutions and spelling mistakes—impact detection.

To make the benchmark challenging, they employed several attack methods:

  • Prompt Attacks: Using few-shot examples or optimized prompts to make LLM output mimic human style.
  • Paraphrase Attacks: Running AI output through tools like DIPPER or back-translation.
  • Perturbation Attacks: Introducing character-level (typos), word-level, or sentence-level noise.
  • Data Mixing: Combining human and AI sentences in a single document.

Datasets

DetectRL is a massive collection comprising 100,800 human-written samples and 134,400 LLM-generated samples.

  • Human Sources: Academic abstracts (arXiv), news articles (XSum), creative stories (Writing Prompts), and social reviews (Yelp).
  • Generative Models: GPT-3.5-turbo, PaLM-2-bison, Claude-instant, and Llama-2-70b.
  • Novelty: Unlike previous benchmarks, DetectRL includes subsets specifically modified by the attack methods mentioned above, providing a true "stress test" environment.

Key Insights and Results

The benchmark ranks detectors on a comprehensive leaderboard, revealing several critical vulnerabilities in current detection systems:

  • Supervised vs. Zero-Shot: Supervised classifiers (based on RoBERTa and XLM-RoBERTa) are the clear winners, maintaining high accuracy (90%+ AUROC) even under most attacks.
  • The Fragility of Zero-Shot: Popular zero-shot methods (like DetectGPT) are highly vulnerable to adversarial noise. A simple perturbation attack can reduce their performance (AUROC) by nearly 40%. Among zero-shot methods, Binoculars emerged as the most robust, though it still only achieved an average score of ~79.6%, highlighting a significant gap compared to supervised models.
  • The "Claude" Challenge: Detectors consistently struggled more with text generated by Claude than by GPT-3.5 or Llama-2. This suggests that Claude’s statistical patterns are closer to human writing or simply distinct enough to evade current detection logic.
  • The "Golden Length" for Training: Surprisingly, the authors found that training supervised detectors on shorter text intervals (60-80 words) actually makes them more robust than training on longer texts. However, for testing, longer samples always lead to better detection accuracy.
  • The Impact of Mixing: LLM-Centered Mixing (replacing 25% of AI text with human text) caused a 13.19% drop in detection performance, proving to be one of the most effective ways to "fool" a detector.
  • Typos as a "Human" Signal: Interestingly, when human-written text contains errors or perturbations, some detectors actually perform better. The "noise" in human writing is statistically different from the "noise" an LLM might make, creating a clearer signal for the detector.

Limitations and Future Work

The authors acknowledge that the field of LLMs moves at breakneck speed. Their benchmark, while comprehensive today, faces the challenge of temporal relevance—as newer models emerge, detection patterns may shift again. Additionally, the current study focuses primarily on English. Future work is needed to expand DetectRL into multilingual scenarios and to develop more advanced "cat-and-mouse" strategies where detectors and attack methods evolve together in a continuous loop.

Summary updated

BibTeX
@inproceedings{wu2024detectrl,
  author = {Junchao Wu and Runzhe Zhan and Derek F. Wong and Shu Yang and Xinyi Yang and Yulin Yuan and Lidia S. Chao},
  title = {{DetectRL: Benchmarking LLM-Generated Text Detection in Real-World Scenarios}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=T9wlkxiD0A},
}
Figure