Deepfake Text Detection in the Wild

Yafu Li, Qintong Li, Leyang Cui, Wei Bi, Longyue Wang, Linyi Yang, Shuming Shi, Yue Zhang · DOI

TL;DR

This paper introduces MAGE, a comprehensive benchmark for detecting machine-generated text in real-world, "wild" scenarios where the source of the text (domain or language model) is unknown. They found that even human annotators struggle to distinguish AI-generated text from human text, and existing detection methods face significant challenges, especially when encountering out-of-distribution data.

What Problem Does This Paper Address?

Large Language Models (LLMs) are now capable of generating text that is remarkably fluent and indistinguishable from human writing across various tasks like news, stories, and scientific articles. This advancement, while beneficial, also poses risks such as the spread of misinformation, fake news, and academic plagiarism. Existing research on detecting AI-generated text has largely been confined to controlled environments, evaluating methods on specific domains or texts from known LLMs. However, in real-world applications, detectors must contend with texts from diverse sources and unknown LLMs, making the task significantly more challenging. This paper aims to bridge this gap by creating a realistic testbed and evaluating detection methods under these "wild" conditions.

Methods

The authors developed a comprehensive testbed called MAGE, which includes human-written texts from seven distinct writing tasks and machine-generated texts from 27 different LLMs, using three types of prompts. They then evaluated four commonly used detection methods:

  • Human detection: Relying on human annotators.
  • Ask ChatGPT: Using ChatGPT to identify text sources.
  • PLM-based classifiers: Utilizing pre-trained language models (like Longformer) as classifiers.
  • Model-based features: Employing methods like GLTR that leverage model predictions.
  • Linguistic statistics: Using features like n-grams and perplexity (FastText).
  • Unsupervised detectors: Such as DetectGPT, which require access to the generation LLM.

They also explored the impact of boundary adjustment and analyzed linguistic differences between human and machine-generated texts.

Datasets

The paper introduces the MAGE (MAchine-GEnerated text detection) testbed.

  • Human-written texts: Collected from existing datasets covering opinion statements (CMV), news articles (XSum, TLDR_news), question answering (ELI5), story generation (Reddit WritingPrompts, ROCStories), commonsense reasoning (HellaSwag), knowledge illustration (SQUAD), and scientific writing (SciXGen).
  • Machine-generated texts: Created using 27 LLMs (including ChatGPT, LLaMA, OPT, GLM, FLAN-T5, etc.) across three prompt types (continuation, topical, specified) for each human-written instance.

They also used four new datasets (CNN/DailyMail, DialogSum, PubMedQA, IMDb) for the "Unseen Domains & Unseen Model" testbed, generating texts with GPT-4.

Key Insights and Ideas

  • Human annotators are not much better than random guessing: This highlights how sophisticated LLM-generated text has become.
  • "Wild" detection is significantly harder: Performance drops dramatically when detectors encounter texts from unseen domains or LLMs, especially in out-of-distribution settings.
  • PLM-based detectors (like Longformer) show the most promise: While all methods struggle, Longformer, which can handle longer texts, generally outperforms others, especially in more challenging scenarios.
  • Perplexity is a key differentiator, but also a bias: Lower perplexity is often associated with machine-generated text, but this can also lead to misclassifications, particularly for human texts that are naturally less complex.
  • Boundary adjustment is crucial for out-of-distribution detection: Even a small amount of in-domain data can significantly improve the performance of detectors on unseen data.
  • Linguistic differences converge with diversity: As more diverse domains and LLMs are included, the linguistic distinctions between human and machine text diminish, making detection harder.

Key Results

  • Human annotators and ChatGPT achieved an AvgRec of only around 54.5%, indicating poor performance.
  • In in-distribution settings (Testbeds 1-4), detection methods like Longformer achieved high AvgRec (e.g., 96.10% for Testbed 1).
  • However, in out-of-distribution settings:
  • For Unseen Models (Testbed 5), Longformer achieved an AvgRec of 86.61% (AUROC 0.95).
  • For Unseen Domains (Testbed 6), Longformer's AvgRec dropped to 68.40% (AUROC 0.93).
  • For Unseen Domains & Unseen Model (Testbed 7), Longformer achieved an AvgRec of 86.54% after boundary adjustment.
  • Paraphrasing attacks significantly degrade performance, with Longformer's AUROC dropping from 0.94 to 0.75.
  • Grammar formality is higher in machine-generated texts for informal domains but human texts are more formal in scientific/news domains.

Limitations and Future Work

  • LLM evolution: The dataset, while comprehensive, may not include the very latest LLMs that emerge rapidly. The authors aim for the dataset to be a benchmark for selecting robust detectors that can handle diverse and new LLMs.
  • Benchmark datasets as sources: Using existing benchmark datasets for human text might mean these texts were part of LLM pretraining data, potentially influencing detection. Future work could involve gathering entirely new online texts.
  • Paraphrasing vulnerability: Despite strong performance, detectors remain vulnerable to paraphrasing attacks, suggesting a need for more robust methods.
  • Further analysis: The authors suggest exploring more nuanced linguistic features and improving detection for texts with low perplexity.

Summary updated

BibTeX
@inproceedings{li2024deepfake,
  author = {Yafu Li and Qintong Li and Leyang Cui and Wei Bi and Longyue Wang and Linyi Yang and Shuming Shi and Yue Zhang},
  title = {{Deepfake Text Detection in the Wild}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.3},
}
Figure