Manuscript Offprint

arXiv:2610.27653

A Unified Attack Framework against Statistical Generative Watermarks for Large Language Models

Romina Omidi, Nima Naderloui, Yuan Hong, Binghui Wang

Abstract

Watermarking has emerged as a key tool for identifying text generated by large language models (LLMs), with current schemes embedding statistical signals into the generation process to enable later detection. In this work, we identify a shared weakness across a broad class of popular LLM watermarking methods, including KGW (and its variants), GumbelSoft, DipMark, ITS, and SynthID 1^{1}. We show that these schemes exhibit a fundamental link between their detection scores and the token probability shifts they introduce during generation. This link, which we call score-ratio alignment, allows an attacker with only black-box query access to the model—and no knowledge of secret keys or model weights—to produce text that evades detection while remaining fluent and natural. We prove that the resulting attack is optimal across all covered watermark families, and show that the weakness is intrinsic: any watermark designed to maximize statistical detection power necessarily induces the very structure that attackers can exploit. We evaluate our attack on seven popular generative LLM watermarking schemes, three LLMs, and tasks, which reduce detection rates to at most 0.05 across all settings while preserving text quality. Our findings show that current watermarking methods can be reliably defeated under realistic attack conditions, highlighting the need for fundamentally different watermarking designs that decouple detection scores from token probability shifts.

1 Introduction

The widespread deployment of large language models (LLMs) capable of generating fluent, human-like text at scale has created a pressing need for reliable provenance attribution [5, 30, 39, 3]. Generative watermarking has emerged as the most practical solution: a statistical signal is embedded into the LLM's token generation process, enabling a verifier to classify text as machine-generated without access to the original prompt or model weights [1, 20, 6, 22, 7]. Deployed and proposed schemes—including KGW [20], GumbelSoft [10, 1], DipMark [41], ITS [22], and SynthID [7]—share a common architecture: a pseudorandom function (PRF) keyed by a secret key biases token selection at each decoding step, and a detector aggregates per-token scores into a test statistic compared against a calibrated threshold.

1^{1}It is originally used as SynthID-Text; here we use SynthID for simplicity.

Despite significant advances in watermark design, a central security question remains unresolved: can an adversary with only black-box access to the watermarked LLM—and no knowledge of the PRF key or model weights—reliably evade detection while generating fluent, semantically coherent text? Prior attacks have addressed a weaker version of this question by applying post-hoc paraphrasing: a secondary model rewrites the watermarked output to disrupt the embedded signal [21, 31, 34]. Paraphrasing-based attacks impose a fundamental quality–evasion tradeoff—aggressive rewriting degrades fluency and semantic fidelity in proportion to the evasion gain [21]—and require inference through a capable auxiliary model. Crucially, reported robustness improvements against Paraphrasing does not characterise security against generation-time adversaries.

Our approach. We identify a structural property shared by major watermarking schemes, which we term score-ratio alignment: the per-token watermark score is a monotone function of the probability ratio between the watermarked and base distributions. Formally, for each token jj from a vocabulary V\mathcal{V} we have: arg⁡min⁡j∈Vp^jpj⊆arg⁡min⁡j∈VE[sj]\arg\min_{j\in\mathcal{V}}\frac{\hat{p}_j}{p_j} \subseteq \arg\min_{j\in\mathcal{V}}\mathbb{E}[s_j], where p^j\hat{p}_j is the watermarked token probability, pjp_j the base model probability, and E[sj]\mathbb{E}[s_j] the expected per-token detection score. We prove that the equation holds as a formal theorem—not merely as an empirical observation—for KGW (and its two variants), GumbelSoft, DipMark, ITS, and SynthID (see Theorems in §4).

Score-ratio alignment admits a direct and efficient attack. An adversary who estimates the probability ratio p^j/pj\hat{p}_{j}/p_{j} from repeated black-box queries can greedily select the score-minimizing token at each decoding step, systematically suppressing the cumulative detection statistic. Because the selected tokens are drawn from the low-distortion region of the base model distribution, text quality is preserved. The attack requires neither the secret key nor model weights, relying only on sampling access to the watermarked model and an offline surrogate model.

Key insight. Score-ratio alignment is not an artifact of any particular design; it is a structural consequence of optimization for detection power. By the Neyman–Pearson lemma [27], any statistically optimal detector must be based on the likelihood ratio p^(x)/p(x)\hat{p}(\mathbf{x})/p(\mathbf{x})—exactly the quantity that score-ratio alignment ties to the watermark score. We prove (Theorem 5.1, §5) that no watermarking scheme within the current generator–detector paradigm can simultaneously achieve Neyman–Pearson-optimal detection power and robustness against a score-ratio-minimizing adversary. This result is not a limitation of specific parameter setting or scheme; it is an information-theoretic impossibility that holds for any scheme whose score function is optimized for distinguishability.

Contributions. This paper makes below contributions.

(1) Score-ratio alignment and a unified attack. We identify score-ratio alignment as a shared property of all major LLM watermarking schemes and formulate score-ratio minimization as a principled black-box attack requiring only output tokens from the watermarked model ( §3§3).

(2) Formal optimality. We prove that score-ratio minimization achieves the minimum attainable expected detection score for a wide range of LLM watermarking schemes: no black-box adversary can achieve a lower expected score within each scheme’s construction ( §4§4).

(3) Detectability–robustness tradeoff. We prove that optimizing the LLM watermark detection power establishes an inherent tension between detectability and robustness ( §5§5).

(4) Theoretical attack effectiveness. We theoretically characterize the effectiveness of our practical attack by showing its true positive rate admits a small upper bound ( §6§6).

(5) Empirical evaluation. We evaluate the attack on seven watermarking schemes, three LLMs, and three text corpora (C4, FakeNews, and Eli5 [33]). The attack reduces the true positive rate to at most 0.05 across all settings while preserving text quality ( §7§7).

Table 1: Summary of the seven watermarking schemes covered by our framework. “Distortional” (D) schemes modify the sampling distribution; “distortion-free” (DF) schemes preserve it in expectation. γ\gamma denotes the green-list fraction, δ\delta the logit boost, ξt\xi_t the pseudorandom vector, and γEM\gamma_{\mathrm{EM}} the Euler–Mascheroni constant.

SchemeTypePRF output E\mathcal{E}Decoder Γ\GammaToken score ϕ(ξt,xt)\phi(\xi_t, x_t)Detection statistic Φ\Phi
KGW [20]D{0,1}∣V∣\{0,1\}^{|\mathcal{V}|}softmax(1t+δξt;τ)\mathrm{softmax}(\mathbf{1}_t+\delta \xi_t;\tau)ξt[xt]∈{0,1}\xi_t[x_t]\in\{0,1\}Z-score (1)
Token-Specific KGW [17]D{0,1}∣V∣\{0,1\}^{|\mathcal{V}|} (token-dep.)softmax((1t+δt⊙ξt);τ)\mathrm{softmax}((\mathbf{1}_t+\delta_t\odot\xi_t);\tau)δt[xt]ξt[xt]\delta_t[x_t]\xi_t[x_t]Normalized sum (2)
Adaptive KGW [24]D{0,1}∣V∣\{0,1\}^{|\mathcal{V}|} (adaptive γt\gamma_t)softmax((1t+δtξt);τ)\mathrm{softmax}((\mathbf{1}_t+\delta_t\xi_t);\tau)δtξt[xt]\delta_t\xi_t[x_t]Normalized sum (2)
GumbelSoft [10]DFR∣V∣\mathbb{R}^{|\mathcal{V}|} (Gumbel)softmax((1t+ξt);τ)\mathrm{softmax}((\mathbf{1}_t+\xi_t);\tau)ξt[xt]\xi_t[x_t]Scaled mean (3)
DipMark [41]DFPermutation ιt\iota_tRank-reweighted (4)1[xt∈green region]\mathbf{1}[x_t\in \mathrm{green\ region}]Z-score (5)
ITS [22]DF(μt,πt)(\mu_t,\pi_t)Inverse CDF (6)∣μt−η(πt(xt))∣|\mu_t-\eta(\pi_t(x_t))|Negative mean (8)
SynthID [7]DFR∣V∣\mathbb{R}^{|\mathcal{V}|} (proprietary)Tournament Sampling (11)ξt[xt]\xi_t[x_t]Mean (12) or Bayesian (16)

References (39)