DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature

E. Mitchell, Yoonho Lee, Alexander Khazatsky, Christopher D. Manning, Chelsea Finn
2/12/2026

No official code found. Best implementation: eric-mitchell/detect-gpt (479 stars, MIT, last commit 2023-03-04). 3 more below.

Abstract

The increasing fluency and widespread usage of large language models (LLMs) highlight the desirability of corresponding tools aiding detection of LLM-generated text. In this paper, we identify a property of the structure of an LLM's probability function that is useful for such detection. Specifically, we demonstrate that text sampled from an LLM tends to occupy negative curvature regions of the model's log probability function. Leveraging this observation, we then define a new curvature-based criterion for judging if a passage is generated from a given LLM. This approach, which we call DetectGPT, does not require training a separate classifier, collecting a dataset of real or generated passages, or explicitly watermarking generated text. It uses only log probabilities computed by the model of interest and random perturbations of the passage from another generic pre-trained language model (e.g., T5). We find DetectGPT is more discriminative than existing zero-shot methods for model sample detection, notably improving detection of fake news articles generated by 20B parameter GPT-NeoX from 0.81 AUROC for the strongest zero-shot baseline to 0.95 AUROC for DetectGPT. See https://ericmitchell.ai/detectgpt for code, data, and other project information.

View on arXivView PDF

Code Implementations(4)

MIT

DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature

47972Shell, PythonFeb 3, 20233 years agoMIT
MIT

Pytorch implementation of DetectGPT (https://arxiv.org/pdf/2301.11305v1.pdf)

22948Python, DockerfileFeb 3, 20232 years agoMIT
MIT

Code base for ICLR 2024 "Fast-DetectGPT: Efficient Zero-Shot Detection of Machine-Generated Text via Conditional Probability Curvature".

43485Shell, PythonJul 7, 20238 months agoMIT

DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature

90Shell, PythonMay 31, 20233 years ago

Similar Papers

Cite this paper

@article{mitchell2026detectgpt,
  title  = {DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature},
  author = {E. Mitchell and Yoonho Lee and Alexander Khazatsky and Christopher D. Manning and Chelsea Finn},
  year   = {2026},
  eprint = {2301.11305},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2301.11305},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2301.11305.svg)](https://codeofpaper.com/paper/2301.11305)

Discussion