AuthentiGPT: Detecting Machine-Generated Text via Black-Box Language Models Denoising

Zhen Guo, Shangdi YuarXiv 2023 · DOI

Introduction

As Large Language Models (LLMs) become increasingly sophisticated, the ability to distinguish between human and machine-written text has evolved into a complex "cat-and-mouse" game. Existing detection methods often face significant hurdles: supervised classifiers require massive labeled datasets, log-likelihood methods like DetectGPT require internal model access often hidden by proprietary APIs, and watermarking can be easily stripped away. AuthentiGPT addresses these challenges by introducing a model-agnostic, data-efficient "black-box" detection method that requires only API access and a handful of training examples.

Methodology

The core intuition behind AuthentiGPT is an "Out-of-Distribution" (OOD) assumption: machine-generated text follows the specific statistical patterns of its source model, while human text does not. The algorithm utilizes a four-step "Denoising" loop:

  1. Masking: An input sentence is modified by randomly replacing a percentage of words (the masking ratio $\alpha$) with a <unk> token.
  2. Denoising: This noisy text is sent to a black-box LLM (such as GPT-3.5-turbo) with instructions to fill in the blanks.
  3. Semantic Comparison: The system uses an embedding model (text-embedding-ada-002) to calculate the cosine similarity between the original text and the denoised version.
  4. Statistical Decision: This process is repeated $\beta$ times. If the denoised versions are consistently similar to the original, the text is likely machine-generated (acting as a "fixed point" for the model). Significant divergence suggests human authorship.

To establish a final threshold, the system employs a Gaussian Mixture Model (GMM) and a Box-Cox transformation. Remarkably, the system features only one trainable parameter ($\lambda$), making it exceptionally low-shot.

Experimental Results

Researchers evaluated AuthentiGPT using human-written biomedical QA pairs from PubMedQA and machine-generated pairs from GPT-3.5 and GPT-4. AuthentiGPT achieved a state-of-the-art 0.918 AUROC, outperforming several high-profile baselines including Originality.AI (0.906) and GPTZero (0.797). In contrast, zero-shot prompting of GPT-4 proved ineffective, yielding an AUROC of only 0.577.

Performance of AuthentiGPT across different masking ratios (alpha) and number of samples (beta).

As illustrated in the experimental data, detection performance improves as the number of denoising samples ($\beta$) increases. The method demonstrates extreme data efficiency, maintaining high accuracy even when the training sample size is as low as 5 or 10 examples.

Key Insights and Discussion

  • The Fixed Point Insight: Machine-generated text acts as a fixed point for an LLM's denoising process. Because the text originates from the model's internal logic, the model accurately reconstructs it. Human text, being out-of-distribution, leads the model to "correct" it toward its own preferred patterns, creating a measurable semantic gap.
  • Semantic vs. Syntactic: Unlike older methods like DNA-GPT that rely on word-for-word (N-gram) overlaps, AuthentiGPT uses semantic embeddings. This allows it to recognize when a model has captured the meaning of a sentence even if the exact wording differs.

Limitations and Future Work

While effective, AuthentiGPT's primary testing was conducted on biomedical text, and its generalizability to creative or technical code domains remains to be fully explored. Additionally, the requirement for multiple API calls per detection makes it more computationally expensive than local classifiers. Future research may explore "ensemble denoising"—using multiple LLMs to create a more robust detection fingerprint.

Conclusion

AuthentiGPT provides a robust, efficient solution for the detection of AI-generated content. By leveraging the inherent denoising capabilities of LLMs themselves, it offers a powerful tool for maintaining information integrity in an era of ubiquitous machine-generated text.

Summary updated

BibTeX
@misc{guo2023authentigpt,
  author = {Zhen Guo and Shangdi Yu},
  title = {{AuthentiGPT: Detecting Machine-Generated Text via Black-Box Language Models Denoising}},
  year = {2023},
  eprint = {2311.07700},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.07700},
}
Figure