Detecting LLM-Generated Text with Performance Guarantees

Hongyi Zhou, Jin Zhu, Ying Yang, Chengchun ShiarXiv 2026

TL;DR

The authors introduce a novel, target-LLM-agnostic text detector that distinguishes between human- and machine-authored text with near-perfect accuracy (average AUC > 0.99) without requiring watermarks or internal model access. Crucially, it is the first framework to provide rigorous statistical inference guarantees, allowing users to control false positive rates via reliable $p$-value calibration.

What Problem Does This Paper Address?

As large language models (LLMs) become deeply integrated into daily life, their ability to generate highly coherent, human-like text has driven a surge in fake news, academic misconduct, and misleading reports. Current detection strategies generally fall into three flawed categories:

  1. Watermarking-based approaches: These provide statistical guarantees but require proprietary access to the target LLM's hash functions or random number generators.
  2. Statistics-based approaches (e.g., DetectGPT): These extract features like next-token logits but are highly model-specific and fail to provide statistical inference frameworks.
  3. Machine Learning (ML)-based approaches: These train classifiers on human vs. AI corpora but generalize poorly to unseen models and lack uncertainty quantification.

The authors address this gap by developing a detector that does not rely on auxiliary information, generalizes across diverse LLMs, and introduces formal statistical hypothesis testing to control Type-I errors (wrongly accusing a human author of using AI).

Figure 1: Visualizations of three types of existing detectors (statistics-based, ML-based,

Methods

The proposed detector builds upon the foundations of token-curvatures methods like Fast-DetectGPT but introduces two major innovations:

  • Expressive Witness Functions: Instead of relying on raw log-probabilities or simple one-dimensional witness functions (like AdaDetectGPT), the authors parameterize a sequence of time-varying witness functions using a base language model (google/gemma-3-1b-pt) fine-tuned via Low-Rank Adaptation (LoRA). This drastically increases the model's capacity to capture subtle stylistic differences between humans and machines.
  • $\alpha$-Uniform Optimization: The classifier is trained using a novel two-sample $t$-test-type objective function. This objective maximizes a lower bound on the True Negative Rate (TNR) uniformly across all significance levels ($\alpha$), creating a robust, threshold-independent detector.
  • Empirical Null Calibration: To perform hypothesis testing, the detector evaluates an input text against an empirical null distribution derived from a pre-collected corpus of human-written text. This allows the system to output an exact $p$-value for uncertainty quantification.

Datasets

To train and evaluate the detector across diverse linguistic styles, the authors constructed a massive dataset consisting of:

  • Human-Written Text: Over 370,000 texts spanning eight distinct domains (Academia, Finance, Government, Knowledge, Legislation, Medicine, News, and User Reviews). Crucially, all texts were sourced from datasets published prior to November 2022 to eliminate any risk of LLM contamination.
  • LLM-Generated Text: Parallel texts generated by prompting modern LLMs—including GPT-4o, Claude, Gemini, and Grok—using over 20 diverse candidate prompts (rewriting, polishing, expanding, and summarizing).
  • Out-of-Distribution Benchmark: The external RAID dataset was utilized to test robustness against 11 adversarial attack settings and 4 distinct LLM decoding strategies.

Key Insights and Ideas

  • The Power of Contextual Features: Moving from a one-dimensional witness function to an LLM-parameterized function allows the detector to evaluate a token conditioned on its full history, capturing structural patterns that simpler statistical metrics miss.
  • The Non-Normality of Human Text: The authors discovered that empirical null distributions of text statistics significantly deviate from standard normal distributions across different domains. This empirical finding highlights why traditional asymptotic closed-form proofs fail in practice and justifies their choice of empirical $p$-value calibration.
  • Domain Heterogeneity Matters: The statistical signature of human text varies wildly between a casual Yelp review and a formal legal document. Calibrating the null distribution per domain is essential to preventing false positives.

Key Results

  • In-Distribution Superiority: The proposed detector achieved an average Area Under the Curve (AUC) of 0.99 across all eight internal domains, consistently outperforming state-of-the-art baselines like Binoculars, Fast-DetectGPT, and ImBD.
  • Robustness to Distribution Shift: When evaluated on the adversarial RAID benchmark, the detector maintained an AUC of 0.954. In comparison, the best baseline reached only 0.867, and the highly competitive ImBD detector collapsed to 0.771.
  • Rigorous Error Control: Empirical testing confirmed that Type-I errors were tightly controlled at nominal significance levels ($\alpha = 0.01, 0.05, 0.10$), providing the promised performance guarantees.
  • Computational Efficiency: The system runs comfortably on standard GPU hardware, completing inference within a few seconds and maintaining a memory footprint under 8 GB for documents up to 4,096 tokens.

The authors have deployed their detector as a public web tool on Hugging Face Spaces.

Figure 2: Website interface for our detector: users can enter text in the shaded area labeled

Limitations and Future Work

While the framework provides a conservative "General" fallback strategy that takes the maximum $p$-value across all categories, the detector performs optimally when the user manually specifies the text's domain. Additionally, because the ecosystem of generative AI evolves rapidly, the online detector will require continuous retraining to keep pace with future iterations of frontier LLMs. The authors note that extending this statistical verification framework to multimodal outputs (such as AI-generated images and videos) represents a vital next step for the field.

Summary updated

BibTeX
@misc{zhou2026detecting,
  author = {Hongyi Zhou and Jin Zhu and Ying Yang and Chengchun Shi},
  title = {{Detecting LLM-Generated Text with Performance Guarantees}},
  year = {2026},
  eprint = {2601.06586},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.06586},
}
Figure