Pref-DetectGPT: Unveiling Machine-Generated Text via Preference-Aware Curvature Measurement

Jiahao Wang, Feifei Kou, Zhongbao Zhang, Jiwei Zhang, Lei Shi, Pengfei Zhang, Suguo Zhu, Mingying XuNeurIPS 2026

TL;DR

Spotting AI-generated text is getting harder because modern LLMs mimic human fluency too well for standard probability-based detectors to catch. Pref-DetectGPT solves this without any model training by shifting the detection lens from raw token probabilities to human preference alignment—measuring how much an aligned model "prefers" a candidate text over slightly perturbed versions of it. If a text sits suspiciously high on a sharp peak of implicit reward, an AI almost certainly wrote it.

What Problem Does This Paper Address?

To catch machine-generated text without relying on brittle, supervised classifiers (which famously fail on out-of-distribution domains), researchers often turn to curvature-based training-free detectors like DetectGPT and Fast-DetectGPT. The intuition is elegant: LLMs sample from high-probability regions, so if you slightly perturb AI-written text (swap a few words), its log-probability according to a surrogate LLM drops sharply. Human writing, being quirkier, sits in flatter probability regions.

Here is the catch: raw log-probabilities mostly reflect surface-level fluency and coherence learned during Supervised Fine-Tuning (SFT). Because today’s LLMs mimic human fluency remarkably well, the probability curvature distributions of human and AI text overlap heavily—even when using modern instruction-tuned surrogates. Meanwhile, modern LLMs undergo extensive post-training alignment (like RLHF and Direct Preference Optimization, or DPO) to learn deeper human preferences, a rich signal that log-probability detectors completely ignore.

Figure 1: Distribution comparison of Fast-DetectGPT score and Pref-DetectGPT (ours) score for human-written and LLM-generated texts from the level 1 sub-task of the HART benchmark.

Methods

Pref-DetectGPT bridges curvature-based detection with DPO theory, moving the math from probability space into implicit reward space.

A key insight from DPO is that you don't need a separate reward model to score how "preferred" a text is; the log-probability ratio between an aligned policy model (e.g., Llama-3.2-1B-Instruct) and its base reference model (Llama-3.2-1B) is an Implicit Reward Model (IRM).

Figure 2: Overview of the Pref-DetectGPT framework. (Left) IRM of Original Text: We compute the implicit reward r(y) using the log-probability ratio between the policy model θ and the reference model ref. (Right) IRM of Perturbed Text: We estimate the expected reward ˜r(y) by aggregating token probabilities over the vocabulary V, weighted by the sampling distribution from ϕ. (Middle) Preference-Aware Curvature Measurement: The final score quantifies the normalized deviation between the original and perturbed rewards. Machine-generated text exhibits strong preference discrepancy where r(y) significantly exceeds ˜r(y), while human-written text shows weak preference discrepancy with r(y) closer to ˜r(y).

Pref-DetectGPT works in three steps:

  1. Original Text Reward: Pass the candidate text (without any prompt) through both the aligned policy model and the reference model to calculate its token-level implicit reward. (Conveniently, DPO's intractable partition function and scaling constants algebraically cancel out when comparing differences!).
  2. Perturbed Text Reward (Single-Pass): Instead of generating dozens of rewritten paragraphs, it borrows Fast-DetectGPT’s conditional probability sampling trick. Using the base model as a sampler, it calculates the expected implicit reward across all possible alternative token choices in the vocabulary at each position—all in a single forward pass of the policy and reference models.
  3. Preference-Aware Curvature: It computes the normalized deviation (essentially a z-score) between the original reward and the expected perturbed reward.

Datasets

Because Pref-DetectGPT is training-free, it uses no training data (supervised baselines were standardized on the IMBD training set). The authors evaluated balanced subsets (2,000 human and 2,000 AI texts each) across three established benchmarks—no new datasets were introduced:

  • DetectRL: Evaluates cross-domain generalization (Multi-Domain, 4 domains, 4 LLMs) and adversarial resilience (Multi-Attack, featuring prompt, paraphrase, perturbation, and mixing attacks).
  • HART (Level 1): Tests AI-involvement detection across 4 domains and 6 recent LLMs.
  • MIRAGE: Covers 5 domains and 17 LLMs across two setups: Disjoint-Input Generation (DIG) and Shared-Input Generation (SIG).

Key Insights and Ideas

  • Exploiting the DPO Margin Directly: During DPO alignment, models are explicitly trained to maximize the reward margin between "preferred" ($y_w$) and "dispreferred" ($y_l$) responses. By treating the candidate text as $y_w$ and random perturbations as $y_l$, Pref-DetectGPT measures the exact signal modern LLMs were optimized to amplify. AI text sits on sharp reward maxima; human text does not.
  • Resilience to Surface Edits: Adversarial attacks (like word perturbations or paraphrasing) easily fool log-probability detectors because they alter surface fluency. Because implicit rewards capture deeper structural preferences, Pref-DetectGPT barely flinches when tokens are swapped.
  • High Signal-Per-Token: While several curvature baselines peak around 140–200 tokens and then strangely degrade on longer texts, preference-aware curvature scales monotonically and needs very little text to lock onto a signal.

Key Results

Using Llama-3.2-1B-Instruct and Llama-3.2-1B as the standard model pair, Pref-DetectGPT achieved state-of-the-art results across every benchmark:

  • Overall Accuracy: Outperformed the strongest training-free baseline (IRM) by relative averages of 2.69% in AUROC, 2.14% in AUPR, and 9.04% in TPR@5%FPR (true positive rate when false accusations are capped at 5%), staying above 95.95% AUROC across all four main datasets.
  • Short-Text Power: Crossed 95% AUROC with just 80 tokens on HART, whereas DetectAnyLLM needed 140 tokens and IRM needed 200.
  • Adversarial Robustness: Achieved 97.67% average AUROC across four attack types (hitting 98.26% under perturbation attacks), beating IRM by 3.49% and DNA-DetectLLM by 6.73%.
  • Speed: Runs at 0.307 seconds per 1,000 tokens—comparable to Fast-DetectGPT (0.218 s) and 2.2–3.8× faster than multi-model peers like Binoculars (0.687 s) and DNA-DetectLLM (1.161 s).

Limitations and Future Work

While the PDF snippet cuts off right before any dedicated appendix or limitations section, the experiments reveal an important practical constraint: dependence on backbone model quality. In the ablation study, swapping the Llama-3.2-1B pair (98.11% average AUROC) for Gemma-2-2B dropped AUROC to 91.06%, and Qwen2.5-1.5B dropped it further to 82.65% (though Pref-DetectGPT still beat baselines on all three). As the authors note, this leaves clear room for future work exploring larger, more capable LLM pairings and deeper ways to mine alignment signals for text forensics.

Summary updated

Abstract

The widespread deployment of large language models (LLMs) has made reliable detection of machine-generated text increasingly critical. Recent curvature-based detectors introduce perturbations to candidate text and compute curvature as the log probability difference between original and perturbed variants using advanced surrogate models. However, such curvature measurements only capture weak discrepancies between machine-generated and human-written text. We propose $\textbf{Pref-DetectGPT}$, a training-free method that introduces preference-aware curvature measurement by leveraging the implicit preference capabilities of preference-optimized surrogate models. Specifically, we construct an implicit reward model from the preference-optimized policy to score both original and perturbed text, and redefine curvature as their normalized deviation, which serves as a significantly stronger signal for distinguishing machine-generated text from human-written text. Empirical evaluations across multiple public benchmark datasets demonstrate that Pref-DetectGPT achieves state-of-the-art detection performance with relative improvements of 2.69\%, 2.14\%, and 9.04\% in AUROC, AUPR, and TPR5\%, while exhibiting strong robustness against various adversarial attacks and input lengths. Our code is available at https://github.com/BUPT-SN/Pref-DetectGPT.
BibTeX
@inproceedings{wang2026pref,
  author = {Jiahao Wang and Feifei Kou and Zhongbao Zhang and Jiwei Zhang and Lei Shi and Pengfei Zhang and Suguo Zhu and Mingying Xu},
  title = {{Pref-DetectGPT: Unveiling Machine-Generated Text via Preference-Aware Curvature Measurement}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=UZvejTwos0},
}
Figure