PreprintCited by 291Authorship Attribution and ProfilingDigital Media Forensic DetectionTopic Modeling

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

Open access
Mitchell, Eric, Lee, Yoonho, Khazatsky, Alexander, Manning, Christopher D., Finn, Chelsea·2023·arXiv

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.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.2301.11305

Cites

0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • After paraphrasing, the AUROC of zero-shot detectors drops from 96.5% to 25.2%.

    “After paraphrasing, the area under the receiver operating characteristic (AUROC) curves of zero-shot detectors (Mitchell et al., 2023) drops from 96 . 5% to 25 . 2%.”

    From Can AI-Generated Text be Reliably Detected? (2023) · cites this paper as Mitchell et al., 2023

    Section 5.2 reports that detection performance generally declines as machine-generated text is more heavily revised, supporting the direction of the claim. It does not report a drop from 96.5% to 25.2%; instead, it says DetectGPT's AUROC remains above 0.8 when nearly a quarter of the text is replaced. (LLM, conf=0.88)

    Experimental — accuracy not yet measured
  • In many detection methods, perplexity is a crucial component.

    “In particular, the detector LLM is not given explicit access to information such as perplexity, which in many detection methods is a crucial component (Mitchell et al., 2023;Hans et al., 2024).”

    From LLM Evaluators Recognize and Favor Their Own Generations (2024) · cites this paper as Mitchell et al., 2023

    The Experiments section (page unavailable in our copy) describes several detection methods that use token-wise probabilities, including one based on average token-wise log probability; DetectGPT also uses log probabilities. This supports the broader point that probability information is important to these methods, but the paper does not identify perplexity itself as a crucial component of many methods. (LLM, conf=0.78)

    Experimental — accuracy not yet measured
  • The AUROC scores of DetectGPT drop from 96.5% before the attack to 59.8% after the attack.

    “The AUROC scores of DetectGPT (Mitchell et al., 2023) drop from 96 . 5 % (before the attack) to 59 . 8 % (after the attack).”

    From Can AI-Generated Text be Reliably Detected? (2023) · cites this paper as Mitchell et al., 2023

    Figure 5 in Section 5.1 reports that DetectGPT’s AUROC generally declines as simulated human edits become heavier. It does not report a before-and-after attack comparison of 96.5% and 59.8%, so the specific figures and attack result are unsupported by our copy. (LLM, conf=0.79)

    Experimental — accuracy not yet measured
  • Mireshghallah et al. found that smaller language models like OPT-125M are better AIGC detectors than large language models like GPTJ-6B.

    “Mireshghallah et al. [110] experimented to test whether other language models can be used to detect machine-generated text from one language model and found out that smaller language models like OPT-125M are better AIGC detectors than large language models like GPTJ-6B.”

    From Survey on Plagiarism Detection in Large Language Models: The Impact of ChatGPT and Gemini on Academic Integrity (2024) · cites this paper as [110]

    In §2 (Related Work; page unavailable), DetectGPT reports that Mireshghallah et al. found smaller models to be better proxy scoring models for perturbation-based detection when the generating model is unknown. It does not give the claimed OPT-125M versus GPTJ-6B comparison, so that specific example is not verified by our copy. (LLM, conf=0.86)

    Experimental — accuracy not yet measured
  • After altering the content using an Automated Paraphrasing tool (APT), the detection rate decreased to 4.6%.

    “However, after altering the content using an Automated Paraphrasing tool (APT), the detection rate decreased to 4.6%.”

    From Simple techniques to bypass GenAI text detectors: implications for inclusive education (2024) · cites this paper as Mitchell et al. (2023)

    Section 5.2 reports that detection performance generally declines as machine-generated text is increasingly revised. It simulates revisions by replacing text spans with T5-3B output and reports AUROC, not a detection rate of 4.6% after use of an Automated Paraphrasing Tool. No page number is provided in our copy. (LLM, conf=0.86)

    Experimental — accuracy not yet measured

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

The publisher hasn’t deposited this paper’s reference list.

Research works printed but not linked: 22

  1. Bakhtin, A., Gross, S., Ott, M., Deng, Y., Ranzato, M., and Szlam, A. Real or fake? Learning to discriminate machine from human generated text. arXiv, 2019. URL http://arxiv.org/abs/1906.03351. · arXiv
  2. Black, S., Biderman, S., Hallahan, E., Anthony, Q., Gao, L., Golding, L., He, H., Leahy, C., McDonell, K., Phang, J., Pieler, M., Prashanth, U. S., Purohit, S., Reynolds, L., Tow, J., Wang, B., and Weinbach, S. GPT-NeoX-20B: An open-source autoregressive language model. In Pro- ceedings of the ACL Workshop on Challenges & Perspec- tives in Creating Large Language Models, 2022. URL https://arxiv.org/abs/2204.06745. · arXiv
  3. Bojar, O. r., Chatterjee, R., Federmann, C., Graham, Y., Haddow, B., Huck, M., Jimeno Yepes, A., Koehn, P., Logacheva, V., Monz, C., Negri, M., Neveol, A., Neves, M., Popel, M., Post, M., Rubino, R., Scarton, C., Specia, L., Turchi, M., Verspoor, K., and Zampieri, M. Findings of the 2016 conference on machine translation. In Pro- ceedings of the First Conference on Machine Translation, pp. 131-198, Berlin, Germany, August 2016. Associa- tion for Computational Linguistics. URL http://www. aclweb.org/anthology/W/W16/W16-2301.
  4. Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D. Language models are few-shot learners. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 1877-1901.
  5. Curran Asso- ciates, Inc., 2020. URL https://proceedings. neurips.cc/paper/2020/file/ 1457c0d6bfcb4967418bfb8ac142f64a-Paper. pdf.
  6. Chowdhery, A., Narang, S., Devlin, J., Bosma, M., Mishra, G., Roberts, A., Barham, P., Chung, H. W., Sutton, C., Gehrmann, S., Schuh, P., Shi, K., Tsvyashchenko, S., Maynez, J., Rao, A., Barnes, P., Tay, Y., Shazeer, N., Prabhakaran, V., Reif, E., Du, N., Hutchinson, B., Pope, R., Bradbury, J., Austin, J., Isard, M., Gur-Ari, G., Yin, P., Duke, T., Levskaya, A., Ghemawat, S., Dev, S., Michalewski, H., Garcia, X., Misra, V., Robinson, K., Fedus, L., Zhou, D., Ippolito, D., Luan, D., Lim, H., Zoph, B., Spiridonov, A., Sepassi, R., Dohan, D., Agrawal, S., Omernick, M., Dai, A. M., Pillai, T. S., Pellat, M., Lewkowycz, A., Moreira, E., Child, R., Polo- zov, O., Lee, K., Zhou, Z., Wang, X., Saeta, B., Diaz, M., Firat, O., Catasta, M., Wei, J., Meier-Hellstern, K., Eck, D., Dean, J., Petrov, S., and Fiedel, N. PaLM: Scaling language modeling with pathways, 2022. URL https://arxiv.org/abs/2204.02311. · arXiv
  7. Christiano, P. F., Leike, J., Brown, T., Martic, M., Legg, S., and Amodei, D. Deep reinforcement learning from human preferences. In Guyon, I., Luxburg, U. V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (eds.), Advances in Neural Information Processing Systems, volume 30.
  8. Curran Associates, Inc., 2017. URL https://proceedings.neurips. cc/paper_files/paper/2017/file/ d5e2c0adad503c91f91df240d0cd4e49-Paper. pdf.
  9. Guarnera, L., Giudice, O., and Battiato, S. Deepfake detec- tion by analyzing convolutional traces. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, June 2020.
  10. Jawahar, G., Abdul-Mageed, M., and Lakshmanan, L. V. S. Automatic detection of machine generated text: A critical survey. In International Conference on Computational Linguistics, 2020.
  11. Kirchenbauer, J., Geiping, J., Wen, Y., Katz, J., Miers, I., and Goldstein, T. A watermark for large language mod- els, 2023. URL https://arxiv.org/abs/2301. 10226.
  12. Liang, W., Yuksekgonul, M., Mao, Y., Wu, E., and Zou, J. Gpt detectors are biased against non-native english writers. arXiv preprint arXiv:2304.02819, 2023. · arXiv
  13. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019. · arXiv
  14. Mireshghallah, F., Mattern, J., Gao, S., Shokri, R., and Berg- Kirkpatrick, T. Smaller language models are better black- box machine-generated text detectors. arXiv preprint arXiv:2305.09859, 2023. · arXiv
  15. Narayan, S., Cohen, S. B., and Lapata, M. Don't give me the details, just the summary! Topic-aware convolutional neural networks for extreme summarization. In Proceed- ings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, 2018.
  16. Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. Ex- ploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67, 2020. URL http://jmlr. org/papers/v21/20-074.html.
  17. Sadasivan, V. S., Kumar, A., Balasubramanian, S., Wang, W., and Feizi, S. Can ai-generated text be reliably de- tected? arXiv preprint arXiv:2303.11156, 2023. · arXiv
  18. Solaiman, I., Brundage, M., Clark, J., Askell, A., Herbert- Voss, A., Wu, J., Radford, A., and Wang, J. Release strategies and the social impacts of language models, 2019. URL https://arxiv.org/ftp/arxiv/ papers/1908/1908.09203.pdf.
  19. Zellers, R., Holtzman, A., Rashkin, H., Bisk, Y., Farhadi, A., Roesner, F., and Choi, Y. Defending against neural fake news. In Neural Information Processing Systems, 2019.
  20. Zhang, S., Roller, S., Goyal, N., Artetxe, M., Chen, M., Chen, S., Dewan, C., Diab, M., Li, X., Lin, X. V., Mi- haylov, T., Ott, M., Shleifer, S., Shuster, K., Simig, D., Koura, P. S., Sridhar, A., Wang, T., and Zettlemoyer, L. Opt: Open pre-trained transformer language mod- els, 2022. URL https://arxiv.org/abs/2205. 01068.
  21. Zhao, H., Zhou, W., Chen, D., Wei, T., Zhang, W., and Yu, N. Multi-attentional deepfake detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 2185-2194, 2021.
  22. Zi, B., Chang, M., Chen, J., Ma, X., and Jiang, Y.-G. Wild- deepfake: A challenging real-world dataset for deepfake detection. In Proceedings of the 28th ACM international conference on multimedia, pp. 2382-2390, 2020.

Cited by

Sorted by citations

Authors
Mitchell, E., Lee, Y., Khazatsky, A., Manning, C. D., & Finn, C.
Venue
arXiv
Publisher
arXiv
Published
2023
ISSN
2331-8422 (ISSN-L)
OpenAlex
W4318351452
Cited by
151
References
0
Citations by year
2026: 7 · 2025: 32 · 2024: 51 · 2023: 60 · 2021: 1
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion, cc-by)
  • arXiv (Cornell University) (cc-by)
Funders
Canadian Institute for Advanced Research
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Authorship Attribution and Profiling
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Digital Media Forensic Detection
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
Keywords
AI-generated text detection, large language models, zero-shot detection, fake news detection

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review