Skip to main content
QUICK REVIEW

[Paper Review] Efficient Detection of LLM-generated Texts with a Bayesian Surrogate Model

Yibo Miao, Hongcheng Gao|arXiv (Cornell University)|May 26, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes a Bayesian surrogate model using Gaussian processes to efficiently detect LLM-generated text by selecting informative perturbations based on uncertainty, reducing query costs. It achieves up to 2× fewer queries than DetectGPT and 3.7% higher AUROC at 5 queries, significantly improving efficiency without sacrificing performance.

ABSTRACT

The detection of machine-generated text, especially from large language models (LLMs), is crucial in preventing serious social problems resulting from their misuse. Some methods train dedicated detectors on specific datasets but fall short in generalizing to unseen test data, while other zero-shot ones often yield suboptimal performance. Although the recent DetectGPT has shown promising detection performance, it suffers from significant inefficiency issues, as detecting a single candidate requires querying the source LLM with hundreds of its perturbations. This paper aims to bridge this gap. Concretely, we propose to incorporate a Bayesian surrogate model, which allows us to select typical samples based on Bayesian uncertainty and interpolate scores from typical samples to other samples, to improve query efficiency. Empirical results demonstrate that our method significantly outperforms existing approaches under a low query budget. Notably, when detecting the text generated by LLaMA family models, our method with just 2 or 3 queries can outperform DetectGPT with 200 queries.

Motivation & Objective

  • To address the high computational cost of probability curvature-based detectors like DetectGPT, which require hundreds of queries per candidate.
  • To improve query efficiency in zero-shot LLM-generated text detection by intelligently selecting representative perturbations instead of random ones.
  • To leverage Bayesian uncertainty in a Gaussian process surrogate model to identify typical samples and interpolate scores, reducing reliance on direct LLM queries.
  • To maintain high detection performance under low query budgets, especially for commercial LLMs with limited access.
  • To provide a generalizable, efficient detection framework compatible with diverse source and scoring LLMs.

Proposed method

  • The method uses a Gaussian process (GP) regressor as a Bayesian surrogate model to predict log probabilities of text perturbations.
  • It performs sequential, uncertainty-based sample selection: at each step, the GP selects the sample with highest predictive variance (uncertainty) for querying the source LLM.
  • After collecting scores on these typical samples, the GP interpolates to estimate scores for other perturbations, avoiding direct LLM inference on all samples.
  • The process supports adaptive early stopping based on uncertainty reduction, improving efficiency.
  • Detection statistics are computed using interpolated scores, enabling zero-shot detection without retraining.
  • The approach is evaluated with T5-large for perturbation generation and various source LLMs including GPT-2 and LLaMA-65B.

Experimental results

Research questions

  • RQ1Can a Bayesian surrogate model reduce the number of LLM queries required for effective detection of LLM-generated text?
  • RQ2How does uncertainty-based sample selection compare to random perturbation sampling in capturing local probability curvature?
  • RQ3To what extent can interpolated scores from a few typical samples maintain detection performance compared to full-score evaluation?
  • RQ4How does the method generalize across different source and scoring LLMs?
  • RQ5What is the trade-off between query efficiency and detection robustness in complex or ill-posed curvature regions?

Key findings

  • The proposed method achieves similar detection performance to DetectGPT with up to 2 times fewer queries, significantly improving query efficiency.
  • At a query budget of 5, the method achieves 3.7% higher AUROC than DetectGPT, demonstrating superior performance under low-resource conditions.
  • The method maintains strong generalization across diverse source and scoring LLMs, including GPT-2, LLaMA-65B, and GPT-Neo-2.7, with consistent improvements over baselines.
  • Visualizations confirm that selected typical samples become increasingly similar over time, validating the method’s ability to identify representative, low-uncertainty perturbations.
  • The Bayesian uncertainty measure effectively identifies informative samples, and the GP interpolation yields reliable detection statistics with minimal direct LLM access.
  • The method shows up to 3% AUROC improvement over DetectGPT when using different source and scoring models, indicating strong robustness and generalization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.