Manuscript Offprint
arXiv:2610.27653A Unified Attack Framework against Statistical Generative Watermarks for Large Language Models
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 . 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.
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 from a vocabulary we have: , where is the watermarked token probability, the base model probability, and 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 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 —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 ( ).
(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 ( ).
(3) Detectability–robustness tradeoff. We prove that optimizing the LLM watermark detection power establishes an inherent tension between detectability and robustness ( ).
(4) Theoretical attack effectiveness. We theoretically characterize the effectiveness of our practical attack by showing its true positive rate admits a small upper bound ( ).
(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 ( ).
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. denotes the green-list fraction, the logit boost, the pseudorandom vector, and the Euler–Mascheroni constant.
| Scheme | Type | PRF output | Decoder | Token score | Detection statistic |
|---|---|---|---|---|---|
| KGW [20] | D | Z-score (1) | |||
| Token-Specific KGW [17] | D | (token-dep.) | Normalized sum (2) | ||
| Adaptive KGW [24] | D | (adaptive ) | Normalized sum (2) | ||
| GumbelSoft [10] | DF | (Gumbel) | Scaled mean (3) | ||
| DipMark [41] | DF | Permutation | Rank-reweighted (4) | Z-score (5) | |
| ITS [22] | DF | Inverse CDF (6) | Negative mean (8) | ||
| SynthID [7] | DF | (proprietary) | Tournament Sampling (11) | Mean (12) or Bayesian (16) |
2.1 Language Model Generation
An autoregressive language model generates a token sequence over a vocabulary one token at a time. At decoding step , the model maps the preceding context to a logit vector , where is the unnormalized score of token . The next-token distribution is
where is the temperature. The next token is then sampled as . We write as the simplex of next-token probabilities at step , and drop the conditioning notation and decoding step when the context is clear.
2.2 The Generative Watermarking Paradigm
Generative LLM watermarking [20, 6, 22] embeds a hidden statistical signal into text during token generation, making the signal imperceptible to human but reliably detectable by an algorithm. All schemes evaluated here instantiate the following two-component framework.
Watermark generator. At each decoding step , the generator receives the preceding context and the model's logit vector , and produces the next token via:
(i) PRF evaluation. A pseudorandom function (PRF) keyed by a secret key is applied to a context window (e.g., the last tokens) to produce a pseudorandom vector , where the range is scheme-specific.
(ii) Watermarked sampling. A decoder selects the next token using both and , inducing a watermarked distribution that may or may not differ from the base distribution .
Watermark detector. Given a candidate text , the detector consists of below steps:
(i) recomputes for each step using the same secret key ;
(ii) evaluates a token score function that measures the per-token watermark evidence; and
(iii) aggregates scores into a detection statistic , which is compared against a pre-calibrated threshold to render a binary decision.
The threshold is set to control the false positive rate (FPR) under the null hypothesis that the text was sampled from the unwatermarked base model. The test statistic is designed to be large in expectation under (watermarked text) and small under , so that watermarked text is detected with high true positive rate (TPR) at a fixed FPR.
Categorization. Watermarking schemes are broadly classified as distortional if with positive probability (so that the output distribution differs from the base model), and distortion-free if in expectation over the randomness of [6]. KGW and its variants, i.e., Adaptive KGW [24] and Token-Specific KGW [17] are distortional, while GumbelSoft, DipMark, ITS and SynthID are distortion-free.
2.3 LLM Watermarking Schemes
2.3.1 KGW
KGW [20] partitions the vocabulary into green and red tokens randomly, then applies a logit boost to all green tokens.
-
Context. The current token itself (self-hash variant; the partition is seeded by the token being generated rather than the preceding context, so the partition is fixed for each vocabulary token across all positions).
-
PRF. maps to a seed, which is used to sample a binary vector with exactly ones (the green list, ) and zeros (the red list). Here is the green-list fraction.
• Decoder. samples from softmax( ), where is the logit boost.
• Token score. , i.e., 1 if is green and 0 otherwise.
• Detection statistic. KGW uses the Z-score defined below:
Under , ; under , the elevated green-token rate shifts positively.
2.3.2 KGW Variants
Several extensions of KGW replace its fixed green-list fraction and logit boost with context-dependent parameters. Two representative variants are Token-Specific KGW [17], which assigns different parameters to individual vocabulary tokens, and Adaptive KGW [24], which dynamically adjusts shared parameters at each decoding step. We can unify both schemes using the following generalized KGW formulation.
-
Context. The previous tokens , optionally together with semantic-coherence, complexity, or token-importance signals derived from current decoding context.
-
PRF and green-list construction. The pseudorandom function seeds a context-dependent binary vector , where , ,
and is the probability that token is assigned to the green list at step and each token has a boost .
-
Token-Specific KGW: Both and the boost may vary across tokens according to semantic similarity or context-aware importance. I.e.,
-
Adaptive KGW: All tokens at a given step typically share the same parameters, i.e., ; but
and vary across decoding steps according to semantic coherence, sentence complexity, topic sensitivity, or token importance. Thus, Adaptive KGW is a step-dependent special case of the generalized token-dependent formulation.
• Decoder. Let denote the boost vector.
For Token-Specific KGW, the watermarked token is sampled via , where is element-wise product.
For Adaptive KGW, this becomes .
• Token score. In Token-Specific KGW, the score contributed by the selected token is ; while under Adaptive KGW, the score becomes .
• Detection statistic. Both variants aggregate the token-level scores using the normalized sum statistic as below
where the null-hypothesis mean and variance are computed using the corresponding token-specific or step-adaptive green-list parameters. A sufficiently large value of indicates the presence of the watermark.
2.3.3 GumbelSoft
GumbelSoft [10] injects Gumbel-distributed pseudorandom noise [12] into the logits before sampling. Because the Gumbel-Max trick is equivalent to sampling from the softmax distribution, the scheme is distortional-free.
• Context. The previous h tokens .
• PRF. hashes the context to a seed and draws , .
• Decoder. .
• Token score. , i.e., the Gumbel noise value at the sampled position.
• Detection statistic. It uses scaled mean defined as:
where is the Euler–Mascheroni constant, i.e., the mean of a Gumbel(0,1) random variable.
2.3.4 DipMark
DipMark [41] is a distortion-free scheme that reweights the token distribution via a pseudorandom permutation, assigning binary colour scores to tokens by their permuted rank.
• Context. The previous h tokens .
• PRF. seeds a uniform random permutation .
• Decoder. Token is sampled with probability , where is defined as
and is a scheme parameter. Tokens ranked in the upper -fraction of the permuted vocabulary (the “green” region) are upweighted, while tokens in the lower -fraction (the “red” region) are downweighted.
• Token score. , i.e., 1 if the sampled token falls in the green (high-rank) portion of the permuted vocabulary, 0 otherwise.
• Detection statistic. It uses the Z-score defined as:
2.3.5 ITS
The Inverse Transform Sampling (ITS) scheme [22] is distortion-free by construction: it uses a pre-committed global key sequence to deterministically select tokens via inverse CDF sampling, producing an output distribution equal in expectation to the base model.
• Context. A global watermark key -list and position index . Each entry -list consists of a random threshold and a permutation of .
• PRF. The PRF simply reads off the pre-committed key: .
• Decoder. For a fixed key , the decoder selects
which selects the smallest -ranked token whose cumulative probability under the permuted ordering meets or exceeds . This is equivalent to inverse-CDF sampling over the permuted token distribution.
• Token score.
which measures how closely the sampled token’s normalized rank matches the random threshold. Under , scores are concentrated near zero; under , they are approximately uniform on .
• Detection statistic. It uses a negative mean:
Note that larger negative values of indicate stronger watermark evidence.
2.3.6 SynthID
SynthID [7] is the first production-ready generative LLM watermarking system developed by Google and achieves the state-of-the-art detection performance. Its core contribution is a novel Tournament Sampling mechanism that samples several candidate tokens from base distribution and repeatedly selects candidates having larger pseudorandom g-values.
• Context. The previous h tokens .
• PRF and g-value function. The random seed at position t is computed from the preceding context and the secret watermark key .
For a tournament with m layers, the seed determines m independent pseudorandom functions (also called g-value functions):
Each function assigns every token an ordered g-value in a set Z. The standard construction uses binary values, but it naturally extends to arbitrary discrete ordered g-values.
• Decoder: Tournament Sampling. Assume the tournament match contains competitors. The decoder initially samples candidate tokens independently from base distribution . At layer , the remaining candidates are divided into groups of , and the candidate having the largest -value in each group is retained. Ties are broken uniformly. After layers, the only remaining token becomes .
Equivalently, let and denote the winner distribution after layer . For a score level , define the cumulative masses under the distribution by
The layerwise Tournament-sampling update is
The final watermarked distribution is .
• Detection statistics. SynthID supports both the mean score and Bayesian score, and larger values provide stronger watermark evidence.
– Mean Score. The scalar contribution of token is .
Let I be the set of positions retained after context-repetition and other validity masking. The document-level mean statistic is
Detection is performed by comparing with a threshold calibrated under the unwater-marked null distribution.
– Bayesian Score. Let denote the number of distinct competitors associated with the observed token at layer . For a fixed value , the likelihood ratio associated with observing g-value z is
Given prior layer values , the conditional Bayes factor for layer is
The log-Bayesian contribution of token is
The document-level log-Bayes statistic is therefore
3 Attack Framework
We consider a watermark applied at generation time of an LLM by modifying its token selection distribution. The watermark is considered secure if it is simultaneously: (i) statistically detectable with high confidence, and (ii) minimally distortive with respect to the raw model distribution. Our attack challenges property (i) while preserving property (ii) .
3.1 Threat Model
Adversary capabilities: We assume a distribution-level black-box adversary with below capabilities:
• Sampling and detector access: The adversary knows the watermark detection rule (e.g., score aggregation and threshold), since it knows which watermark to attack; the attacker and can query the watermarked LLM to observe generated text samples.
• No seed or key access: The adversary has no access to the permutation, random seed, or secret partition used to construct the watermark.
• No model access: The adversary does not modify the model weights or have access to the watermark algorithm.
Adversary objective: The adversary objective is to produce an attacked distribution such that:
-
Watermark evasion: Generated text x sampled from is classified as non-watermarked by the detector with high probability.
-
Low distortion: The modified distribution remains close to the original model distribution p. In other words, the adversary aims to erase the watermark signal while preserving language quality.
3.2 Attack Principle
The central quantity we study is the expected per-token score as a function of the token index . In §4 we show that for every watermarking scheme in Table 1, this function is monotone in the probability ratio , a property we call score-ratio alignment and forms the theoretical foundation of our attack.
For brevity, in the rest of the paper, we omit the decoding step index t and write instead of to denote the j-th token at decoding step t
Algorithm 1 Black-Box Attack on LLM Watermarking
Require: Prompt , surrogate model , watermarked oracle , candidate size , query budget , and generation length
Ensure: Attacked continuation
1: Initialize
2: for do
3: Set the current context
4: Query the watermarked oracle times:
5: Select the top-K candidate tokens using the surrogate model:
6: Estimate the watermarked probability for each :
7: Select the next token:
8: Append to the continuation:
9: if then
10: break
11: end if
12: end for
13: return
Specifically, the attack exploits the fact that the schemes (both distortional and distortion-free) induce a structured change in token probabilities that correlates with the watermark score , i.e., tokens with the smallest expected scores experience the largest score-ratio degradation:
The adversary leverages this alignment to estimate which tokens contribute most to the detection statistic and counteracts the watermark by applying a compensating reweighting or noise injection that neutralizes the expected score bias.
3.3 Attack Algorithm
Algorithm 1 presents our detailed attack procedure. Here, we choose an arbitrary surrogate model and use its tokenizer consistently throughout the attack. We make the following remarks regarding Algorithm 1.
- Computational consideration. Unlike our theoretical analysis that considers the entire vocabulary , in practice, we estimate the watermarked probabilities only for the top- candidate tokens.
in C selected by the surrogate model to reduce computational cost. Most tokens outside C have very small probabilities and are thus unlikely to be selected. This provides an efficiency-search-space tradeoff by substantially reducing the number of candidate tokens while retaining the most likely ones.
-
Per-token queries. Our attack operates at the token level. When querying the watermarked oracle, we set max_new_tokens=1 to obtain a single next-token sample. If generation-length control is unavailable and the oracle returns a sequence, we use only its first generated token as the next-token observation.
-
Numerical stability. We use a small constant in the denominator to avoid numerical instability. Since is sufficiently small, it has a negligible effect on the probability ratios and does not affect the attack results in practice.
4 Optimality: Score-Ratio Minimization
We now formally establish that the score-ratio minimization strategy in Equation (17) is optimal for the studied watermark schemes. Specifically, we prove that in every scheme, the token achieving the minimum probability ratio also achieves the minimum expected detection score —the score-ratio alignment condition of Equation (17). This alignment confirms that an adversary executing Algorithm 1 could minimize the detection statistic in expectation, without requiring knowledge of the secret key or the watermark seed.
Next, we describe the setup and present the theorems. Since both KGW and GumbelSoft belong to the class of logit-addition watermarking schemes, the theorem applies directly to both methods. Furthermore, the two KGW variants can be analyzed under the same unified framework. All proofs are deferred to Appendix A.
4.1 Logit-Addition Watermark: KGW and GumbelSoft
Setup. Let denote the original logit vector produced by the base LLM at a given decoding step, and define the base-model next-token distribution as . A logit-addition watermark injects a per-token signal into the logits before sampling:
where is the watermark strength and is drawn from a distribution determined by the PRF and the current context. For KGW, ; for GumbelSoft, . In both cases the detector score for the sampled token is .
Theorem 1 (Score-Ratio Alignment: Logit-Addition). For any logit-addition watermark with , we have:
Remark 1. Equation (31) shows that the probability ratio is a monotone function of alone: the original logit cancels exactly. Consequently, any token selection strategy that minimizes —equivalently, minimizes the detection score—also minimizes the probability ratio, and vice versa. This symmetry is the algebraic source of score-ratio alignment in all logit-addition schemes.
4.2 KGW Variants
Setup. In KGW variants [17, 24], each token receives an independent binary color Bernoulli , and a boost magnitude . Watermarked logit and probability are
The probability ratio simplifies to
where C is a constant, so .
Theorem 2 (Score-Ratio Alignment: KGW Variants). For every realization of the token-specific green list, we have:
Theorem 3 (Feasibility of Red-Token Minimizers: Token-Specific KGW). In the Token-Specific KGW watermark, every red token is a feasible minimizer of the probability ratio. In particular, if at least one token has , then
If no red token exists, every token is a feasible minimizer.
4.3 DipMark
Setup. In DipMark, a step samples a uniformly random permutation , which induces a shuffled ordering of the vocabulary . The binary watermark color (score) assigned to token is
which means the first tokens in the permuted order form the red prefix.
We use as the degradation factor of token j.
Theorem 4 (Score-Ratio Alignment: DipMark). In DipMark watermarking, the following inclusion holds:
Equivalently, every token achieving the smallest probability-ratio also achieves the smallest expected watermark score.
Theorem 5 (Feasibility of Index 0: DipMark). In DipMark watermarking, is always a feasible minimizer of in the index space induced by the permutation. In particular,
4.4 ITS
Setup. Recall from §2.3.5 that the key at position is , where and is a random permutation of . These keys are obtained from the pre-committed sequence -list by applying a random document-level shift. The following result uses only the single-position marginal distribution of ; and independence between different positions is not required. Fix a decoding step and its preceding context. Let be the corresponding base-model distribution, define , and let denote the token generated by the ITS decoder in Equation (6). For a permutation , token occupies the permuted-CDF interval
Consequently, .
Theorem 6 (ITS detection-statistic reduction). If ,
Thus, empirical probability-ratio minimization reduces the expected detection statistic to its key-independent null baseline.
Remark 2. The strict inequality follows from the independence of the attacked token and the detector key. In fact, every token selection rule based only on auxiliary keys has the same expected null score (see more details in Appendix A.6). Empirical probability-ratio minimization determines which underrepresented token is selected, while key independence is what reduces the expected ITS detection statistic.
4.5 SynthID
Setup. Consider SynthID Tournament sampling with competitors per match and tournament layers. Fix a decoding step, its preceding context, and the corresponding pseudorandom seed . Let be the base-model next-token distribution and let denote its support. We restrict all probability ratios to , since is undefined when . At layer , token is assigned the possibly real-valued watermark score . Let denote the winner distribution after layer . The final watermarked distribution is therefore .
Theorem 7 (Score-Ratio Alignment: SynthID, Mean Score). Consider Tournament sampling with arbitrary and arbitrary discrete, ordered g-values. For every layer and every , . Consequently,
Theorem 8 (Score-Ratio Alignment: SynthID, Bayesian Score). At any layer and condition on preceding g-values, .
Remark 3. For fixed preceding g-values, the layerwise probability ratio, the mean-score contribution , and the conditional Bayes factor are nondecreasing in . Thus, minimum-ratio selection minimizes both the mean and Bayesian evidence contributed by that layer.
5 Detectability–Robustness Tradeoff
§4 establishes that score-ratio alignment holds across all watermarks considered in this work. A natural question arises: Is this alignment an artifact of particular design choices, or reflecting a deeper structural constraint inherent to the generator–detector paradigm? In this section, we show that score-ratio alignment is the inevitable consequence of designing a statistically optimal detector. This yields a fundamental impossibility: no watermarking scheme within the current paradigm can simultaneously maximize detection power and resist score-ratio minimization adversaries. Proofs of the theorems are in Appendix B.
5.1 The Fundamental Tradeoff
We first formalize the notion of a watermark that can be evaded by our attack framework.
Definition 1 (Defeatable Watermark). A watermarking scheme with per-token score function is called defeatable if the token minimizing the probability ratio coincides with the token minimizing the expected detection score: .
Theorem 9 (Defeatable Implies Not Robust). If a watermarking scheme is defeatable, then it is not robust against a score-ratio-minimizing adversary.
Theorem 10 (Detectability–Robustness Tradeoff). Among all hypothesis tests for versus , the statistically optimal detector is the likelihood-ratio test: . Detectability is maximized when the detection score is aligned with the log-likelihood ratio: . However, if the score ordering coincides with the likelihood-ratio ordering, i.e., , then an adversary selecting tokens to minimize simultaneously minimizes the detection score , driving TPR to baseline. Hence, maximizing statistical detectability necessarily introduces the score-ratio alignment that adversaries can exploit.
5.2 Implications for Watermark Design
Theorem 10 establishes that the detectability-robustness tradeoff is not merely an engineering challenge that can be addressed, but rather an information-theoretic impossibility inherent to the current paradigm. This fundamental limitation has several practical implications.
Robustness claims must specify the threat model. Prior works reporting robustness improvements (e.g., against paraphrasing or bounded token editing [22, 44]) do so against threat models that do not include score-ratio-minimizing adversaries. Our results show that schemes robust against post-hoc attacks remain defeatable under generation-time evasion. Any robustness claim must therefore explicitly state the adversary's access model and attack phase.
Improving detectability worsens robustness. Schemes that increase the logit boost or green-list fraction to improve detection power simultaneously sharpen the probability-ratio gap between green and red tokens, making the score-ratio ordering more informative to the adversary. Adaptive and token-specific variants that locally maximize or are therefore more exploitable at each step, not less.
Breaking score-ratio alignment requires paradigm change. Theorem 10 implies that robustness against our attack requires breaking the alignment between the detection score ordering and the likelihood-ratio ordering. Two directions are promising: (i) secret score randomization, in which the score assigned to each token is perturbed by a secret-key-dependent offset unknown to the adversary, decoupling the observable probability ratio from the true detection contribution; and (ii) multi-key ensemble watermarking, in which detection aggregates scores across multiple independent watermark keys, so that minimizing any single key's score ordering does not minimize the ensemble statistic. We leave the formal analysis of these directions to future work.
6 Theoretical Effectiveness of the Attack
We establish that score-ratio minimization reduces the watermark statistic relative to the un-watermarked null distribution. We first prove an expectation-level guarantee in §6.1 that exact minimum-ratio selection reduces the expected detector statistic. We then strengthen this conclusion to first-order stochastic dominance, which yields a TPR bound at every detection threshold in §6.2. We finally extend this exact result to our practical finite-sample attack (Algorithm 1) in §6.3. All proofs are deferred to Appendix C.
6.1 Expected-Score Reduction
At decoding step , let denote the current prefix; and be the context until step . Define as the support of the base next-token distribution. Let denote the oriented detection score of token under key realization .
We first make the following standard fresh-key assumption.
Assumption 1 (Fresh-key null invariance). For every admissible prefix , let be a fresh pseudorandom key and let independently of . The null score has a distribution that does not depend on . Further, the key values are independent across distinct contexts.
Theorem 11 (Effectiveness of minimum-ratio selection). If the score-ratio alignment holds pointwise at every step t, i.e.,
Let the exact minimum-ratio adversary select . Then, conditional on the attacked prefix and the current key,
where is a counterfactual unwatermarked token sampled under the same prefix.
Consequently, for any nonnegative weights , the additive attacked score satisfies
under the fresh-key null-invariance assumption 1.
Remark 4. The inequality is strict whenever, with positive probability, the base distribution assigns nonzero mass to a token whose score is strictly larger than the minimum. Therefore, except for the degenerate case in which the base model is supported entirely on score-minimizing tokens, the attack strictly reduces the expected watermark score.
6.2 Stochastic Dominance and TPR Reduction
We now strengthen the expectation-level result of Theorem 11 to a distributional guarantee. Throughout this section, token scores are oriented so that larger values indicate stronger watermark evidence. Thus, for a scheme whose original score has the opposite orientation, we negate the score. For example, the oriented ITS score is .
Let denote the detector statistic, where is coordinatewise nondecreasing. This includes sums, means, and positively standardized sums. For two real-valued random variables and , we write if is first-order stochastically dominated by , i.e., .
At decoding step , let be the current prefix, let and be the base and watermarked next-token distributions, and define for every in the support of .
Theorem 12 (Stochastic dominance under score-ratio minimization). Suppose that score-ratio alignment holds pointwise: for every step t, prefix h, and key realization ,
Let the adversary select at every step . Then , where denotes the detector statistic under the unwatermarked null distribution.
Further, if is calibrated so that , then the true positive rate on attacked watermarked text satisfies
Remark 5 (Expectation minimization is insufficient). The conclusion of Theorem 12 cannot be obtained only from . Ordering the means generally does not order the upper-tail probabilities. The pointwise alignment condition is essential: it produces an almost-sure coupling, which implies stochastic dominance and therefore orders the TPR at every threshold.
6.3 Practical Top-K and Finite-Sample Attack
Algorithm 1 operates on a top-K candidate set and estimates the watermarked probabilities using finitely many queries. Let be the retained candidate set and define its excluded base-model mass as . Let upper-bound the conditional probability that finite-sample estimation, or filtering causes the algorithm to select a token that is not a score-minimizer within .
Theorem 13 (Approximate TPR guarantee). If and are valid conditional upper bounds at every decoding step , then
Remark 6. Theorem 13 explicitly isolates the two sources of approximation in Algorithm 1: candidate truncation captured by , and ratio-estimation or filtering error, captured by . When both quantities are small, the practical attack approaches the exact stochastic-dominance guarantee.
7 Experimental Evaluation
Our evaluations mainly address the below research questions:
• RQ1. Does the score-ratio minimization attack reduce watermark detection to baseline levels?
• RQ2. Does the attack preserve text quality relative to unwatermarked generation?
• RQ3. Are results consistent across model scales?
• RQ4. How does the hyperparameters affect our attack?
7.1 Experimental Setup
Watermarking schemes. We evaluate seven watermarking methods spanning both distortional and distortion-free families shown in Table 1 .
Base and surrogate LLMs. We use OPT-1.3B [43] as the target base model on which the watermarking schemes are applied. As the surrogate model used in our attack (see Algorithm 1), we three LLMs spanning a range of scales:
• OPT-1.3B [43]: a 1.3-billion-parameter model used to evaluate our attack to a small model and as as reference.
• LLaMA-7B [38]: a 7-billion-parameter decoder-only transformer used as the primary evaluation model.
• LLaMA-13B [39]: a 13-billion-parameter variant used to assess scale sensitivity.
Datasets. Text generation is conditioned on prompts drawn from three corpora:
• C4 [33]: a large-scale general web text corpus used as the primary benchmark, consistent with prior watermarking evaluations [20, 17].
• FakeNews: a collection of news-style long-form narratives, used to evaluate performance on factual, structured prose.
• Eli-5 [8]: a community QA corpus, used to assess performance on open-ended, explanatory generation.
Attack configuration. We evaluate our attack against 100 watermarked texts under the considered threat model in §3. By default, we use N = 256 queries per generation step, K = 40 in top-K candidate set, and generation length T = 256. We also study the impact of these hyperparameters.
Evaluation metrics. We report the following metrics:
• TPR @ FPR=1%: the fraction of adversarially generated texts correctly classified as watermarked by the detector at a fixed false positive rate of 1%. Lower TPR indicates more effective watermark evasion.
- p-value: the detector’s hypothesis test applied to adversarially generated text. Values above 0.05 indicate failure to reject the null hypothesis (non-watermarked), confirming evasion.
• Z-score: the normalized detection statistic. Negative or near-zero Z-scores indicate that the watermark signal has been suppressed to below the detection threshold.
• Perplexity (PPL): text fluency measured by GPT-2 [32]. We report PPL to verify that evasion does not degrade output quality. Lower perplexity indicates more fluent and natural text.
SynthID requires intensive offline training on a private dataset to learn its Bayesian detector. Since this detector is unavailable in our threat model, we evaluate our attack against SynthID using its mean-score detector.
Table 2: Attack results on three datasets using OPT-1.3B (base model) as the surrogate model. TPR is reported at a 1% false positive rate. Larger -values and lower TPRs indicate stronger evasion. A -value above 0.05 indicates unsuccessful watermark detection. PPL denotes the perplexity of adversarially generated text; lower values correspond to more fluent outputs.
| Scheme | C4 | FakeNews | Eli-5 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TPR↓ | -value↑ | Z-score↓ | PPL↓ | TPR↓ | -value↑ | Z-score↓ | PPL↓ | TPR↓ | -value↑ | Z-score↓ | PPL↓ | |
| KGW | 0.01 | 0.98 | -4.61 | 14.72 | 0.01 | 0.98 | -4.23 | 15.71 | 0.02 | 0.98 | -4.39 | 15.16 |
| Token-Specific KGW | 0.01 | 0.97 | -4.18 | 5.91 | 0.01 | 0.97 | -3.47 | 6.35 | 0.01 | 0.96 | -2.13 | 6.48 |
| Adaptive KGW | 0.03 | 0.24 | 0.73 | 3.86 | 0.02 | 0.34 | 0.29 | 4.54 | 0.03 | 0.31 | 0.46 | 4.13 |
| GumbelSoft | 0.02 | 0.49 | -0.06 | 4.51 | 0.01 | 0.63 | -0.36 | 4.92 | 0.01 | 0.61 | -0.38 | 4.94 |
| DipMark | 0.01 | 0.74 | -0.63 | 5.04 | 0.02 | 0.66 | -0.41 | 5.27 | 0.01 | 0.64 | -0.24 | 5.61 |
| ITS | 0.02 | 0.27 | 0.69 | 5.21 | 0.01 | 0.21 | 0.81 | 4.96 | 0.03 | 0.43 | 0.12 | 3.91 |
| SynthID | 0.01 | 0.93 | -2.41 | 5.78 | 0.01 | 0.98 | -3.61 | 4.24 | 0.01 | 0.98 | -2.87 | 5.19 |
Table 3: Attack results on three datasets using LLaMA-7B as the surrogate model.
| Scheme | C4 | FakeNews | Eli-5 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TPR↓ | -value↑ | Z-score↓ | PPL↓ | TPR↓ | -value↑ | Z-score↓ | PPL↓ | TPR↓ | -value↑ | Z-score↓ | PPL↓ | |
| KGW | 0.00 | 1.00 | -4.94 | 13.18 | 0.00 | 0.99 | -4.67 | 13.99 | 0.03 | 0.99 | -4.67 | 13.86 |
| Token-Specific KGW | 0.00 | 1.00 | -5.37 | 6.23 | 0.00 | 0.99 | -3.96 | 6.23 | 0.00 | 0.98 | -2.27 | 6.56 |
| Adaptive KGW | 0.01 | 0.07 | 1.47 | 3.19 | 0.00 | 0.058 | 1.57 | 4.42 | 0.01 | 0.28 | 0.58 | 4.06 |
| GumbelSoft | 0.00 | 0.46 | 0.10 | 4.39 | 0.00 | 0.65 | -0.40 | 4.98 | 0.00 | 0.66 | -0.42 | 4.89 |
| DipMark | 0.00 | 0.68 | -0.48 | 4.95 | 0.00 | 0.59 | -0.25 | 5.15 | 0.00 | 0.61 | -0.29 | 5.27 |
| ITS | 0.00 | 0.32 | 0.48 | 5.66 | 0.00 | 0.16 | 0.99 | 4.81 | 0.02 | 0.25 | 0.65 | 3.28 |
| SynthID | 0.00 | 0.99 | -3.56 | 5.49 | 0.00 | 0.99 | -3.38 | 4.16 | 0.00 | 0.97 | -1.94 | 5.12 |
Table 4: Attack results on three datasets using LLaMA-13B as the surrogate model.
| Scheme | C4 | FakeNews | Eli-5 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TPR↓ | -value↑ | Z-score↓ | PPL↓ | TPR↓ | -value↑ | Z-score↓ | PPL↓ | TPR↓ | -value↑ | Z-score↓ | PPL↓ | |
| KGW | 0.00 | 0.99 | -4.34 | 15.94 | 0.00 | 0.99 | -3.98 | 16.43 | 0.00 | 0.99 | -4.12 | 16.37 |
| Token-Specific KGW | 0.00 | 0.99 | -3.89 | 5.63 | 0.00 | 0.99 | -3.14 | 6.47 | 0.00 | 0.97 | -1.98 | 6.56 |
| Adaptive KGW | 0.02 | 0.28 | 0.57 | 4.23 | 0.00 | 0.56 | -0.17 | 4.65 | 0.02 | 0.28 | 0.58 | 4.06 |
| GumbelSoft | 0.01 | 0.43 | 0.17 | 4.62 | 0.00 | 0.69 | -0.50 | 4.86 | 0.00 | 0.66 | -0.42 | 4.89 |
| DipMark | 0.00 | 0.80 | -0.86 | 5.12 | 0.00 | 0.62 | -0.31 | 5.36 | 0.00 | 0.57 | -0.18 | 5.93 |
| ITS | 0.00 | 0.19 | 0.86 | 4.83 | 0.00 | 0.16 | 0.98 | 5.11 | 0.01 | 0.77 | -0.76 | 4.13 |
| SynthID | 0.00 | 0.87 | -1.17 | 6.12 | 0.00 | 0.99 | -3.84 | 4.32 | 0.00 | 0.99 | -3.94 | 5.12 |
7.2 Results
Table 2–Table 4 report TPR@FPR=1%, -value, Z-score, and PPL. We summarize the following key findings.
Finding 1: Near-universal watermark evasion. Across all seven watermarking schemes and all model–dataset combinations, the score-ratio minimization attack achieves a TPR of 0.00–0.05, reducing detection to or below the false positive rate baseline. This confirms RQ1: the attack generalizes across diverse scheme designs, including both distortional (KGW, Token-Specific, Adaptive) and distortion-free (GumbelSoft, DipMark, ITS, SynthID) families. The result is consistent with the score-ratio alignment theorems of §4: since alignment holds for every scheme, the attack is provably optimal in each case, and the empirical TPR results follow from the theory.

(a) C4
(b) Fake-News
(c) Eli-5
Figure 1: Perplexity (left axis) and watermark Z-score (right axis) as a function of #queries N.

(a) C4
(b) Fake-News
(c) Eli-5
Figure 2: Effect of generated text length T (tokens) on attack effectiveness and text quality.
Finding 2: Text quality is preserved. Perplexity remains low and competitive with unwatermarked generation across all conditions (e.g., PPL < 7 in all cases except on KGW). This confirms RQ2: the attack is genuinely non-distortionary in practice, not only in theory. The preservation of fluency validates that the score-ratio minimization strategy selects tokens that are both low-scoring and semantically coherent, consistent with the distributional proximity argument of §3.
Finding 3: Results are consistent across model scales. Comparing results on LLaMA-7B and LLaMA-13B, we observe no meaningful difference in attack effectiveness since TPR is very small (most are 0.00) for both model scales across all schemes. This confirms RQ3 and suggests that vulnerability is not a function of model capacity but of the structural alignment property.
Finding 4: Statistically significant evasion. The p-values for all schemes substantially exceed the standard 0.05 significance threshold, confirming that the detector cannot reject the null hypothesis (non-watermarked) for adversarially generated text. Z-scores are negative or near-zero in almost all cases, indicating that the cumulative detection statistic has been driven below the detection threshold. These results are consistent with Theorem 9: minimizing at each step drives below the threshold , causing the TPR to collapse.
7.3 Ablation Study
In this section, we investigate the impact of key parameters on attack performance (RQ4): query budget N, generated text length T, and K in Top-K candidate tokens. For brevity, we report results using the medium LLaMA-7B model on DipMark.

(a) C4
(b) Fake-News
(c) Eli-5
Figure 3: Effect of K in Top-K candidate set on attack effectiveness and text quality.
Impact of N. Figure 1 studies the effect of the query budget N on attack effectiveness and text quality. Across all datasets, increasing N consistently decreases the watermark Z-score, indicating stronger watermark evasion. For example, on C4, the Z-score decreases from 0.15 to -0.48 as N increases, while the perplexity increases only slightly, from 4.20 to 5.09, suggesting that the attack preserves text quality well even with a larger query budget.
Impact of T. Figure 2 shows the impact of the generated text length T. As T increases, the watermark Z-score becomes increasingly negative, indicating stronger watermark evasion. This trend is expected, as longer generations provide more evidence for the attack to identify and suppress the watermark signal. Meanwhile, perplexity increases marginally with T, suggesting a modest trade-off in text quality as the attack operates over longer generations.
Impact of K. Figure 3 shows the results with varying K candidate tokens in Algorithm 1. We observe that increasing K decreases the watermark Z-score, indicating stronger attack performance; and the perplexity increases since there is a trade-off between detectability and quality.
8 Related Work
8.1 AI-Generated Text Detection
8.1.1 Non-watermark based Detection
A large body of work develops detectors that do not require a watermark signal to be embedded at generation time.
Statistical zero-shot detectors. Mitchell et al. [26] propose DetectGPT, which exploits the observation that AI-generated text tends to lie in regions of the probability surface with negative curvature; detection is performed by checking whether small random perturbations of a candidate text consistently reduces its log-probability under the model. Su et al. [36] extend the work by using the log rank of sampled tokens—rather than log-probability curvature—as a detection signal, improving efficiency and accuracy. Bao et al. [4] introduce Fast-DetectGPT, which replaces perturbation-based curvature estimate with a conditional probability curvature measure, achieving accuracy comparable to DetectGPT but with less costs. Hans et al. [14] propose Binoculars, a zero-shot detector that compares the perplexity of a text under two closely related models, without requiring access to the original generator.
Learning-based detectors. Guo et al. [13] train supervised classifiers to distinguish GPT-generated text from human text, finding that finetuned detectors can achieve high accuracy on in-distribution data but degrade under distribution shift. He et al. [15] introduce MGTBench, a benchmark for evaluating machine-generated text detectors across diverse generation models, domains, and adversarial conditions. Ghosal et al. [11] provide a survey of possibilities and impossibilities of AI-generated text detection, including both theoretical limits and practical evaluations.
8.1.2 Watermark based Detection
Distortional watermarking. Distortional schemes [20, 17, 24, 9, 16] explicitly modify the token distribution, accepting a measurable divergence from the base model in exchange for a stronger detection signal. The foundational work [20] introduces the KGW green/red list watermark, which pseudorandomly partitions the vocabulary into green- and red-listed tokens at each decoding step and applies a fixed logit boost to all green tokens; detection is performed via a Z-score on the fraction of green tokens observed in a candidate text. Huo et al. [17] introduce token-specific watermarking, which assigns context-dependent boost magnitudes to individual tokens, improving fluency while preserving detectability. Liu and Bu [24] propose an adaptive watermark that dynamically adjusts both the green-list fraction and the boost magnitude based on real-time semantic coherence signals, reducing perceptual artifacts in sensitive decoding contexts. While these refinements improve the detectability-quality tradeoff, we show in §4 that all KGW-style schemes share a structural vulnerability: their detection score functions are aligned with the token probability-ratio ordering, making them susceptible to our unified attack framework.
Distortion-free watermarking. Distortion-free schemes [6, 10, 1, 22, 41, 23, 44, 37] aim to preserve the original output distribution in expectation for all tokens, while still embedding a detectable signal [6]. GumbelSoft [10] achieves distortion-free watermarking by injecting Gumbel-distributed pseudorandom noise into logits before softmax sampling; the detector recovers the Gumbel noise component at the sampled token and aggregates these values into a Z-score. Kuditipudi et al. [22] propose a distortion-free scheme ITS with formal robustness guarantees against bounded text editing, though their analysis does not address adaptive adversaries that exploit score structure. Wu et al. [41] introduce DiPMark, which reweights the token distribution via a random permutation, assigning binary colour scores to tokens according to their permuted rank. SynthID [7] is the first production-ready generative LLM watermarking system, designed to be efficient, non-invasive, and detectable at scale. Its core contribution is a novel Tournament Sampling mechanism for next-token generation, which achieves state-of-the-art watermark detectability.
8.2 Attacks on AI-Generated Text Detectors
Post-hoc attacks. Most existing attacks operate after text generation by modifying the generated content to disrupt the detector. The most widely studied approach is paraphrasing, where an auxiliary model rewrites the generated text while attempting to preserve its semantic meaning [21]. Other post-hoc attacks include token-level editing [31], detector red-teaming using adversarially finetuned language models [35], watermark-evasion generation strategies [18, 25], and universal adversarial triggers that manipulate model outputs through specially crafted prompts [40]. Beyond empirical attacks, Sadasivan et al. [34] establish information-theoretic limitations of watermark detection under sufficiently powerful paraphrasing adversaries. Although these approaches can substantially reduce detection rates, they typically exhibit an inherent quality–evasion trade-off: weakening the watermark often requires modifying the generated text, which may introduce semantic drift, stylistic changes, or additional computational overhead.
Generation-time evasion. These works consider attacks that intervene at generation time rather than after the fact. Zhao et al. [44] study an adversary that selects among multiple watermarked continuations, but assume access to the detector score during generation. Zhang et al. [42] show that no scheme can simultaneously guarantee detectability and security against a computationally bounded forger with access to the generator. Abdelnabi and Fritz [2] study adversarial attacks on text watermarks in an earlier generation of transformer-based systems, providing an empirical baseline for generation-time adversaries. Jovanovic et al. [19] propose a watermark stealing attack against KGW [20], where an attacker queries the watermarked model to approximately reverse-engineer its secret watermarking rules and then exploits the learned watermark to facilitate watermark removal. Omidi et al. [28, 29] propose the first layer inflation attack against SynthID, which exploits its tournament-based sampling mechanism by externally adding additional tournament layers through black-box queries. Our attack is the first to formulate generation-time evasion as a principled optimization problem, establish its optimality across multiple watermark families, and empirically achieve near-zero true positive rates without sacrificing text quality. Importantly, it requires only black-box sampling access, making the attack practical for API-level adversaries.
8.3 Detectability–Robustness Tradeoffs
The tension between watermark detectability and adversarial robustness has been recognized informally in prior work but not formally characterized for the LLM setting. Christ et al. [6] show that distortion-free watermarks are necessary for computational undetectability, implying a tradeoff between quality preservation and statistical detectability. Zhang et al. [42] prove that no watermark can be simultaneously unremovable and undetectable under a computationally bounded model, establishing a cryptographic impossibility analogous to our information-theoretic result. Takezawa et al. [37] characterize necessary and sufficient conditions on score functions for a watermark to achieve detectability and a form of robustness.
Our work proves that maximizing detection power under the Neyman–Pearson lemma [27] necessarily aligns the score function with the likelihood-ratio ordering—the exact structure our adversary exploits. This result is stronger than prior informal observations: it establishes that the tradeoff is not merely empirical but information-theoretically fundamental within the current generator–detector paradigm, and that no in-paradigm fix can simultaneously achieve optimal detectability and resistance to score-ratio-minimizing adversaries.
9 Conclusion
We develop a unified attack framework on watermarked LLMs based on score-ratio alignment, a structural property shared by most generative watermarks. By selecting score-minimizing tokens at each decoding step, our attack achieves a near-zero true positive rate with minimal degradation in text quality. We show that statistically optimal watermark detectors inherently align their detection scores with score-ratio ordering, making such watermarks fundamentally vulnerable to our attack. Our results reveal an inherent limitation of statistical generative watermarks and establish score-ratio minimization as an important benchmark for evaluating watermark robustness.
References
[1] Scott Aaronson. My AI safety lecture for UT effective altruism. Blog post, Shtetl-Optimized, 2022.
[2] Sahar Abdelnabi and Mario Fritz. Adversarial watermarking transformer: Towards tracing text provenance with data hiding. In IEEE Symposium on Security and Privacy (SP), 2021.
[3] Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, et al. Qwen technical report. arXiv preprint arXiv:2309.16609, 2023.
[4] Guangsheng Bao, Yanbin Zhao, Zhiyang Teng, Linyi Yang, and Yue Zhang. Fast-DetectGPT: Efficient zero-shot detection of machine-generated text via conditional probability curvature. In The Twelfth International Conference on Learning Representations, 2024.
[5] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D. Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. In Advances in Neural Information Processing Systems, 2020.
[6] Miranda Christ, Sam Gunn, and Or Zamir. Undetectable watermarks for language models. In Conference on Learning Theory, 2024.
[7] Sumanth Dathathri, Abigail See, Sumedh Ghaisas, Po-Sen Huang, Rob McAdam, Johannes Welbl, Vandana Bachani, Alex Kaskasoli, Robert Stanforth, Tatiana Matejovicova, et al. Scalable watermarking for identifying large language model outputs. Nature, 2024.
[8] Angela Fan, Yacine Jernite, Ethan Perez, David Grangier, Jason Weston, and Michael Auli. Eli5: Long form question answering. In Annual Meeting of the Association for Computational Linguistics (ACL), 2019.
[9] Pierre Fernandez, Antoine Chaffin, Karim Tit, Vivien Chappelier, and Teddy Furon. Three bricks to consolidate watermarks for large language models. In 2023 IEEE Security and Privacy Workshops (SPW), 2023.
[10] Jiayi Fu, Xuandong Zhao, Ruihan Yang, Yuansen Zhang, Jiangjie Chen, and Yanghua Xiao. GumbelSoft: Diversified language model watermarking via the Gumbel-Max trick. In Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2024.
[11] Soumya Suvra Ghosal, Souradip Chakraborty, Jonas Geiping, Furong Huang, Dinesh Manocha, and Amrit Singh Bedi. Towards possibilities & impossibilities of AI-generated text detection: A survey. Transactions on Machine Learning Research, 2023. URL: https://arxiv.org/abs/2310.15264.
[12] Emil Julius Gumbel. Statistics of Extremes. Columbia University Press, New York, 1958.
[13] Biyang Guo, Xin Zhang, Ziyuan Wang, Minqi Jiang, Jinran Nie, Yuxuan Ding, Jianwei Yue, and Yupeng Wu. How close is ChatGPT to human experts? Comparison corpus, evaluation, and detection, 2023. arXiv:2301.07597.
[14] Abhimanyu Hans, Avi Schwarzschild, Valeriia Cherepanova, Hamid Kazemi, Aniruddha Saha, Micah Goldblum, Jonas Geiping, and Tom Goldstein. Spotting LLMs with binoculars: Zero-shot detection of machine-generated text. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 17519–17537. PMLR, 2024.
[15] Xinlei He, Xinyue Shen, Zeyuan Chen, Michael Backes, and Yang Zhang. MGTBench: Benchmarking machine-generated text detection. In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security, CCS '24, pages 2251–2265. ACM, 2024.
[16] Zhengmian Hu, Lichang Chen, Xidong Wu, Yihan Wu, Hongyang Zhang, and Heng Huang. Unbiased watermark for large language models. In The Twelfth International Conference on Learning Representations, 2024.
[17] Mingjia Huo, Sai Ashish Somayajula, Youwei Liang, Ruisi Zhang, Farinaz Koushanfar, and Pengtao Xie. Token-specific watermarking with enhanced detectability and semantic coherence for large language models. In International Conference on Machine Learning, 2024.
[18] Zhengyuan Jiang, Jinghuai Zhang, and Neil Zhenqiang Gong. Evading watermark based detection of AI-generated content. In ACM SIGSAC Conference on Computer and Communications Security, 2023.
[19] Nikola Jovanović, Robin Staab, and Martin Vechev. Watermark stealing in large language models. In International Conference on Machine Learning, 2024.
[20] John Kitchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz, Ian Miers, and Tom Goldstein. A watermark for large language models. In International Conference on Machine Learning, 2023.
[21] Kalpesh Krishna, Yixiao Song, Marzena Karpinska, John Wieting, and Mohit Iyyer. Paraphrasing evades detectors of AI-generated text, but retrieval is an effective defense. In Advances in Neural Information Processing Systems, 2023.
[22] Rohith Kuditipudi, John Thickstun, Tatsunori Hashimoto, and Percy Liang. Robust distortion-free watermarks for language models. Transactions on Machine Learning Research, 2024.
[23] Aiwei Liu, Leyi Pan, Xuming Hu, Shiao Meng, and Lijie Wen. A semantic invariant robust watermark for large language models. In The Twelfth International Conference on Learning Representations, 2024.
[24] Yepeng Liu and Yuheng Bu. Adaptive text watermark for large language models. In International Conference on Machine Learning, 2024.
[25] Wenlong Meng, Shuguo Fan, Chengkun Wei, Min Chen, Yuwei Li, Yuanchao Zhang, Zhikun Zhang, and Wenzhi Chen. {GradEscape}: A {Gradient-Based} evader against {AI-Generated} text detectors. In USENIX Security Symposium, 2025.
[26] Eric Mitchell, Yoonho Lee, Alexander Khazatsky, Christopher D. Manning, and Chelsea Finn. DetectGPT: Zero-shot machine-generated text detection using probability curvature. In International Conference on Machine Learning, 2023.
[27] Jerzy Neyman and Egon S. Pearson. On the problem of the most efficient tests of statistical hypotheses. Philosophical Transactions of the Royal Society of London. Series A, 231:289–337, 1933.
[28] Romina Omidi, Yun Dong, and Binghui Wang. Google’s llm watermarking system is intrinsically vulnerable to layer inflation attack. In ICLR 2026 Workshop on Principled Design for Trustworthy AI, 2026.
[29] Romina Omidi, Yun Dong, and Binghui Wang. On google’s synthid-text llm watermarking system: Theoretical analysis and empirical validation. arXiv preprint arXiv:2603.03410, 2026.
[30] OpenAI. GPT-4 technical report, 2024. arXiv:2303.08774.
[31] Julien Piet, Chawin Sitawarin, Vivian Fang, Norman Mu, and David A. Wagner. MARKmy-WORDS: Analyzing and evaluating language model watermarks. In 2025 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML), pages 68–91, 2025.
[32] Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. Technical report, OpenAI, 2019. URL: https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf.
[33] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1–67, 2020.
[34] Vinu Sankar Sadasivan, Aounon Kumar, Sriram Balasubramanian, Wenxiao Wang, and Soheil Feizi. Can AI-generated text be reliably detected? arXiv preprint arXiv:2303.11156, 2023.
[35] Zhouxing Shi, Yihan Wang, Fan Yin, Xiangning Chen, Kai-Wei Chang, and Cho-Jui Hsieh. Red teaming language model detectors with language models. Transactions of the Association for Computational Linguistics, 12:174–189, 2024.
[36] Jinyan Su, Terry Zhuo, Di Wang, and Preslav Nakov. DetectLLM: Leveraging log rank information for zero-shot detection of machine-generated text. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 12395–12412. Association for Computational Linguistics, 2023.
[37] Yuki Takezawa, Ryoma Sato, Han Bao, Kenta Niwa, and Makoto Yamada. Necessary and sufficient watermark for large language models. Transactions on Machine Learning Research, 2023.
[38] Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. LLaMA: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023.
[39] Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, et al. Llama 2: Open foundation and fine-tuned chat models, 2023.
[40] Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. Universal adversarial triggers for attacking and analyzing NLP. In Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 2019.
[41] Yihan Wu, Zhengmian Hu, Junfeng Guo, Hongyang Zhang, and Heng Huang. A resilient and accessible distribution-preserving watermark for large language models. In Proceedings of the 41st International Conference on Machine Learning, 2024.
[42] Hanlin Zhang, Benjamin L. Edelman, Danilo Francati, Daniele Venturi, Giuseppe Ateniese, and Boaz Barak. Watermarks in the sand: Impossibility of strong watermarking for language models. In Proceedings of the 41st International Conference on Machine Learning, Proceedings of Machine Learning Research, 2024.
[43] Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona T. Diab, Xian Li, Xi Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit Singh Koura, Anjali Sridhar, Tianlu Wang, and Luke Zettlemoyer. OPT: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068, 2022.
[44] Xuandong Zhao, Prabhanjan Ananth, Lei Li, and Yu-Xiang Wang. Provable robust watermarking for AI-generated text. In The Twelfth International Conference on Learning Representations, 2024.
A Proof of Optimality
A.1 Proof of Theorem 1
Compute the probability ratio directly:
where
is a normalizing constant that does not depend on . Hence, . Since and is strictly increasing,
where the final equality holds because and the expectation is taken over the PRF randomness conditioned on the context. This establishes the stated inclusion.
A.2 Proof of Theorem 2
We split into two cases based on whether any red token exists.
First of all, we know that based on the design of KGW variant watermarks, we have . Case 1: At least one red token exists. Suppose for some . For any red token, ; for any green token, since . Therefore, the probability ratio is minimized exactly by the red tokens:
Case 2: All tokens are green. If for all , then for all , so . Moreover, every token satisfies , giving ,
which is not necessarily equal across tokens (since may vary). Nevertheless, the minimizer of belongs to , so the inclusion holds.
A.3 Proof of Theorem 3
If at least one red token exists, then for every red token , is the minimum achievable score, and for any , confirming that red tokens attain the smallest probability ratio. If no red token exists, all tokens have identical score and the minimizer condition holds vacuously over .
A.4 Proof of Theorem 4
We consider two exhaustive cases.
Case 1: All tokens are green. If for all , then for all , so . Any minimizer of therefore belongs to , and the inclusion holds trivially.
Case 2: At least one token is red. Since the red prefix is non-empty, and . By the DipMark construction, the token —the first in the shuffled order—has the highest probability (over the random permutation) of landing in the red prefix, and therefore attains the smallest expected score:
In DipMark’s reweighting procedure, probability mass is redistributed from tokens at the start of the permuted list toward those at the end: the earliest tokens are the first to have their probabilities reduced (and potentially zero), while later tokens remain invariant or receive increased mass. Consequently, the maximum degradation is achieved by the token appearing earliest in the permuted order:
Combining both inclusions:
which proves the theorem in Case 2.
A.5 Proof of Theorem 5
We consider two exhaustive cases.
Case 1: All tokens are green. If for all , then for all , so . Any minimizer of therefore belongs to , and the inclusion holds trivially.
Case 2: At least one token is red. Since the red prefix is non-empty, and . By the DipMark construction, the token —the first in the shuffled order—has the highest probability (over the random permutation) of landing in the red prefix, and therefore attains the smallest expected score: .
In DipMark’s reweighting procedure, probability mass is redistributed from tokens at the start of the permuted list toward those at the end: the earliest tokens are the first to have their probabilities reduced (and potentially zero), while later tokens remain invariant or receive increased mass. Consequently, the maximum degradation is achieved by the token appearing earliest in the permuted order:
Combining both inclusions:
which proves the theorem in Case 2.
A.6 Proof of Theorem 6
Let be auxiliary keys independent of the detector key . Define
The attack selects
For any candidate token j, write
Thus the detector contribution of token j is .
Theorem 14 (ITS detection-statistic reduction). Let . Suppose that is selected according to Equation (34) using auxiliary keys independent of the detector key . Then
The legitimate ITS token satisfies
with strict inequality whenever . Consequently,
Thus empirical probability-ratio minimization reduces the expected ITS detection statistic to its key-independent null baseline.
Proof. Because is a measurable function only of the auxiliary keys , it is independent of the detector key . Condition on . Since is a uniformly random permutation, is uniform on and is independent of . Therefore,
(39)
For ,
Substituting these identities into Equation (39) gives
This value does not depend on j. Hence the law of total expectation proves Equation (36).
We next analyze the legitimate ITS token. Define its permuted rank and normalized rank by
For each , define the cumulative mass of the first tokens in the permuted ordering:
By the inverse-CDF decoder,
We first establish the marginal distribution of . Conditioned on , the probability that the output has rank r equals the probability mass of the token occupying that rank. Thus,
(44)
Therefore, is uniform on and is uniform on
Although has the same marginal distribution as the rank of a key-independent token, it is positively dependent on . Indeed, every token belongs to the first positions of a uniform permutation with probability . Consequently,
(45)
For every , Equation (43) gives
(46)
The inequality uses
Since and , Equation (46) proves that and , and hence and , are positively quadrant dependent.
Let be independent of and have the same marginal distribution as . Positive quadrant dependence implies
for every . Using the layer-cake representation,
(48)
Both and have mean 1/2. Therefore, using ,
(49)
Because , this proves Equation (37).
It remains to establish strictness. If , every token in has probability strictly between zero and one. Hence
For every and every ,
Thus Equation (46) is strict for and . In particular, for
the event is equivalent to , and Equation (47) is strict on an interval of positive measure. It follows that
and therefore
Multiplying by -1 gives
which proves Equation (38).
A.7 Proof of Theorem 7
Fix a tournament layer and let be its incoming token distribution. For an ordered score value , define
For every supported token i, we have .
Consider a match containing N independent candidates drawn from . The probability that the largest g-value among these candidates is exactly a is
Conditioned on the largest value being a, uniform tie-breaking and exchangeability imply that the winning token is distributed proportionally to among the tokens whose g-value equals a. Consequently,
Therefore, the layerwise probability ratio is
where the last equality follows from
Now consider satisfying . Because both score levels have positive incoming probability mass,
Every term in Equation (54) is nondecreasing in both cumulative masses. Moreover, because ,
Thus at least the term is strictly larger for token , while none of the other terms is smaller. It follows that
Hence is strictly increasing in the ordered g-value. All tokens attaining the smallest g-value attain the smallest probability ratio, and every token with a larger g-value has a strictly larger ratio. Therefore,
Since is the contribution of token i to the mean detector at layer , minimum-ratio selection also minimizes that layer's mean-score contribution.
A.8 Proof of Theorem 8
We first prove that the conditional Bayesian factor is nondecreasing in the current g-value.
Let . Conditioned on , the winning g-value is the maximum of i.i.d. null g-values. Therefore, . Consequently,
where the second equality follows from
If , then , .
Every term in Equation (56) is nondecreasing in both arguments. Hence
Because and , it follows that
Thus is nondecreasing in .
For completeness, when the g-value distribution is continuous,
and therefore
which is again nondecreasing in z.
We next consider the Tournament-sampling probability ratio. For a score level z, define
and
The Tournament-sampling update gives
Using the difference-of-powers identity,
Both and are nondecreasing in z. Since every coefficient in Equation (57) is nonnegative,
For distinct supported score levels and , the inequality is strict. Therefore,
We have shown that both the layerwise probability multiplier and the conditional Bayesian factor are minimized at the smallest current-layer g-value. Hence,
Finally, if for at least one , then , and consequently , is strictly increasing over the supported score levels. In that case,
B Proof of Robustness-Detectability Tradeoff
B.1 Proof of Theorem 9
Consider an adversary that, at each decoding step , selects the token minimizing the probability ratio: . By the defeatability condition (Definition 1), this selection is equivalent to . The Cumulative detection score over a sequence of length is .
Since the adversary selects the score-minimizing token at every step, is minimized in expectation over all possible generation paths. The detector declares watermark presence by thresholding against a fixed value ; the true positive rate is . Minimizing at each step reduces , which directly reduces TPR. Therefore, the adversary can drive the detection rate to baseline levels, and the watermark is not robust.
B.2 Proof of Theorem 10
By the Neyman–Pearson lemma [27], the most powerful test at significance level for the simple hypothesis pair versus is the likelihood-ratio test, which rejects when exceeds a threshold calibrated to achieve false positive rate . No other test achieves a higher true positive rate at the same false positive rate.
Detection power is therefore maximized when the score function used to compute the detection statistic preserves the ordering of —that is, when . Under this assignment, tokens with larger likelihood ratios receive higher scores.
However, aligning s with implies that
This is precisely the defeatability condition of Definition 1. By Theorem 9, the scheme is therefore not robust. Since both conclusions follow from the same alignment requirement, improving detectability necessarily strengthens the structure that the adversary exploits.
C Proof of Theoretical Attack Effectiveness
Lemma 1 (Minimum versus convex combination). For arbitrary real numbers and weights satisfying and , we have . Equality holds if and only if every index assigned positive weight is a minimizer of .
Proof: Let . Since for every , multiplying each inequality by the nonnegative weight and summing gives
Because , the left-hand side equals , proving (1). The inequality is strict exactly when for at least one index satisfying .
C.1 Proof of Theorem 11
Fix a decoding step and condition on and . By Equation (25), minimum-ratio selection also minimizes the token score:
The conditional expected score of an unwatermarked token is
Because the values are nonnegative and sum to one, Lemma 1 gives
This proves (26).
Multiplying by , summing over , and applying the law of total expectation gives Under fresh-key null invariance, the counterfactual null scores have the same joint distribution as the scores generated under . Hence the right-hand side equals , proving Equation (27).
C.2 Proof of Theorem 12
We construct the attacked and null score sequences on a common probability space.
Suppose the attacked prefix has already been generated. Conditional on this prefix and the current key realization , the adversary selects by minimizing the probability ratio. By the pointwise alignment condition in (28),
Define the attacked score as
On the same probability space, independently sample the counterfactual null token
and define
Because belongs to the support of the base distribution, the score-minimizing property gives
Although is evaluated at the attacked prefix, fresh-key null invariance implies
Therefore, its conditional distribution is exactly the same as that of a null score used to calibrate the detector and does not depend on the attacked history. Repeating the construction for yields
At the same time, Equation (C.2) holds simultaneously at every step:
Since is coordinatewise nondecreasing,
Moreover, . Hence, for every threshold ,
Thus . Setting gives
which proves (29).
C.3 Proof of Theorem 13
Let be the event that the estimator selects a score-minimizing token within . If and occurs, then
Therefore, the coordinatewise coupling used in Theorem 12 fails only if or occurs. Hence,
Taking probabilities and applying the union bound gives
which proves (30).