AdaDetectGPT: Adaptive Detection of LLM-Generated Text with Statistical Guarantees
Original authors: Hongyi Zhou, Jin Zhu, Pingfan Su, Kai Ye, Ying Yang, Shakeel A O B Gavioli-Akilagun, Chengchun Shi
Original authors: Hongyi Zhou, Jin Zhu, Pingfan Su, Kai Ye, Ying Yang, Shakeel A O B Gavioli-Akilagun, Chengchun Shi
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Technical Summary: AdaDetectGPT
Problem Statement
The paper addresses the critical challenge of distinguishing between text authored by humans and text generated by Large Language Models (LLMs). While existing state-of-the-art detectors rely on statistics derived from the log-probabilities (logits) of observed text evaluated against a source LLM's distribution, the authors argue that relying solely on raw log-probabilities is sub-optimal. Current methods often fail to fully exploit the statistical differences between human and machine-generated distributions, particularly in complex scenarios involving different datasets and model architectures.
Methodology: AdaDetectGPT
The proposed method, AdaDetectGPT, is an adaptive classifier designed to enhance existing logits-based detectors (specifically Fast-DetectGPT) by learning a "witness function" from training data.
1. Statistical Framework
The method operates under two settings:
- White-box: The source LLM used to compute logits is identical to the target LLM generating the text.
- Black-box: The source LLM is an open-source approximation of the target closed-source model.
The core statistic Tw(X) is constructed as a normalized sum of transformed log-probabilities:
Tw(X):=∑tVarX~t∼qt(w(logqt(X~t∣X<t)))∑t[w(logqt(Xt∣X<t))−EX~t∼qtw(logqt(X~t∣X<t))]
Here, w:R→R is a one-dimensional witness function applied to the log-probabilities. Unlike Fast-DetectGPT, which uses the identity function (raw logits), AdaDetectGPT learns w to maximize detection power.
2. Threshold Selection via Martingale Theory
A key theoretical contribution is the derivation of the classification threshold. By modeling the token generation process as a time series and applying the Martingale Central Limit Theorem (MCLT), the authors establish that under the null hypothesis (text generated by the LLM), the statistic Tw(X) converges to a standard normal distribution as the sequence length L→∞.
- This allows for the selection of a threshold c=zα (the α-quantile of the standard normal distribution) to strictly control the False Negative Rate (FNR) at a desired level α.
3. Learning the Witness Function
The primary challenge is that maximizing the True Negative Rate (TNR) for a fixed FNR typically yields a witness function dependent on the specific FNR level α. To overcome this, the authors:
- Derive a lower bound on the TNR that separates the effects of α and the witness function w.
- Show that maximizing this lower bound is equivalent to maximizing a population-level quantity Tw(2)∗, which is independent of α.
- Implement this optimization using a linear function class over B-spline basis functions. The optimization reduces to solving a system of linear equations (Σβ=ψ), making the training process computationally efficient.
Key Contributions
- Adaptive Detection: The introduction of a learnable witness function that transforms raw logits, empirically shown to better distinguish human and machine text than raw logits alone.
- Statistical Guarantees: The paper provides finite-sample error bounds for the True Positive Rate (TPR), False Positive Rate (FPR), True Negative Rate (TNR), and FNR. Specifically, it proves that as the training sample size n and sequence length L increase, the classifier's performance converges to that of an oracle classifier with access to the optimal population witness function.
- Theoretical Foundation for Thresholding: The application of MCLT to justify the use of normal approximation for FNR control, a feature often lacking in previous statistical detectors.
- Efficient Optimization: The reduction of the witness function learning problem to a simple linear system, avoiding complex non-convex optimization.
Experimental Results
The authors conducted extensive numerical studies across five datasets (SQuAD, WritingPrompts, XSum, Yelp, Essay) and various LLMs (GPT-2, OPT, GPT-Neo, GPT-J, GPT-NeoX, Qwen2.5, Mistral, LLaMA3).
- White-box Performance: AdaDetectGPT consistently outperformed eight state-of-the-art baselines (including DetectGPT, Fast-DetectGPT, and DNAGPT). It achieved Area Under the Curve (AUC) improvements ranging from 12.5% to 37% over the best baseline (Fast-DetectGPT).
- Black-box Performance: When detecting text from advanced closed-source models (GPT-4o, Claude-3.5, Gemini-2.5-Flash) using an open-source proxy, AdaDetectGPT maintained superior performance, with improvements up to 20% over Fast-DetectGPT.
- Robustness: The method demonstrated resilience against adversarial attacks, specifically paraphrasing and decoherence, outperforming baselines by up to 10% and 85% respectively in specific black-box scenarios.
- Efficiency: Training the witness function required less than one minute and under 0.5 GB of memory.
Significance and Claims
The paper claims to fill a gap in the literature regarding the systematic statistical analysis of logits-based detectors. While previous works focused on empirical performance, this work provides rigorous statistical guarantees on error rates.
The authors position AdaDetectGPT at the intersection of statistics-based and machine learning-based methods. It retains the interpretability and data-efficiency of statistical methods (relying on log-probabilities) while leveraging the adaptability of machine learning (learning a witness function) to achieve superior detection power. The method is presented as a robust, theoretically grounded solution for the growing need to detect LLM-generated content without relying on model-specific watermarks or black-box training data.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.
Get the best NLP papers every week.
Trusted by researchers at Stanford, Cambridge, and the French Academy of Sciences.
Check your inbox to confirm your subscription.
Something went wrong. Try again?
No spam, unsubscribe anytime.