Black-box Detection of LLM-generated Text Using Generalized Jensen-Shannon Divergence
Shuangyi Chen, Ashish Khisti
TL;DR
This work addresses black-box detection of LLM-generated text by leveraging token surprisal dynamics without per-instance regeneration. SurpMark discretizes surprisal into a finite state space and models state transitions as a Markov chain, scoring test texts against fixed human and machine references via a generalized Jensen-Shannon divergence. The authors provide a principled discretization criterion, prove the decision statistic is a normalized log-likelihood ratio with asymptotic normality, and demonstrate strong empirical performance across multiple datasets, models, and languages. The approach offers scalable, low-latency detection suitable for real-world deployment, with robust performance under domain and proxy-model shifts. The framework also highlights a favorable trade-off between reference cost and detection accuracy, achieving competitive results while reducing per-input computational burden.
Abstract
We study black-box detection of machine-generated text under practical constraints: the scoring model (proxy LM) may mismatch the unknown source model, and per-input contrastive generation is costly. We propose SurpMark, a reference-based detector that summarizes a passage by the dynamics of its token surprisals. SurpMark quantizes surprisals into interpretable states, estimates a state-transition matrix for the test text, and scores it via a generalized Jensen-Shannon (GJS) gap between the test transitions and two fixed references (human vs. machine) built once from historical corpora. We prove a principled discretization criterion and establish the asymptotic normality of the decision statistic. Empirically, across multiple datasets, source models, and scenarios, SurpMark consistently matches or surpasses baselines; our experiments corroborate the statistic's asymptotic normality, and ablations validate the effectiveness of the proposed discretization.
