Manuscript Offprint
arXiv:2610.23601Token-Level Attribution of Multi-Mode LLM Watermarks: Optimal Rule and Belief Weighting
Rui Zhou, Licheng Zhao, Chao Shen, and Wenqiang Pu
Abstract—A watermark verifier may hold many modes, i.e., secret keys, and a document may mix spans of different modes with unwatermarked text. Directly reporting the mode with the largest pivotal statistic (pivot) inflates the Type I error, and restoring the nominal level reduces power as candidate modes are added. We formulate token-level multi-mode attribution for the Gumbel-max watermark as maximizing correct-label power under a Type I error constraint given a mode prior. We show that the optimal rule reports the mode with the largest prior-weighted alternative density and rejects when this density exceeds one common threshold. Based on this rule, we propose the Belief-weighted Likelihood Attribution with Density Estimation (BLADE) detector. It estimates the mode prior from neighboring pivots and the alternative density from reference token probabilities. Under a conditional product model of the pivots, it keeps the exact Type I error. We further show that BLADE approaches the optimal rule as its prior and density estimates improve, with a sharp coefficient on the density error. On OPT-1.3B and other open-weight large language models, BLADE attains higher correct-label power than the compared detectors across candidate counts, token-substitution rates, generation temperatures and generator models.
Index Terms—Large language models, watermarking, multi-mode attribution, optimal detector, neighboring evidence.
I. INTRODUCTION
WATERMARKING embeds a key-dependent statistical signal into the text generated by a large language model (LLM). A verifier holding the secret key can then test whether a given text was generated by the model [2]–[4]. Existing schemes either bias the next-token prediction (NTP) distribution toward a key-dependent subset of the vocabulary, e.g., the green-list watermark [2], [5], or preserve it in expectation over the pseudorandomness [3], [4], [6]–[8]. The latter class includes the Gumbel-max watermark [3], [9], [10]. For the Gumbel-max watermark, the detector computes at each token a pivotal statistic (pivot), namely the keyed pseudorandom value of the observed token. It then tests whether the pivot follows the uniform distribution of unwatermarked text or the stochastically larger distribution of watermarked text [9]. These schemes and their detectors, however, mostly consider a single key and make a binary decision about a whole text.
Many practical applications require a finer answer. A model provider may assign different keys to different users or, for a single user, to different products or usage states, e.g., polishing a human draft versus authoring a manuscript from scratch. We refer to each key, together with the user, product or state that it identifies, as a watermark mode. The text submitted to a verifier may then mix unwatermarked spans, as in [11], [12], with spans generated under different modes. The unwatermarked spans may be written by a human, generated by the model without a watermark, or generated with a watermark that is no longer retained after later editing. We call such a text a mixed document. The verifier must decide, at each token, whether a watermark is retained and, if so, under which of K candidate modes it was generated. We refer to this problem as multimode attribution. Since a detection with a wrong mode label is an attribution error, the relevant performance measure is the correct-label power, i.e., the probability of detecting a retained watermark and assigning it to the correct mode.
A direct approach computes one pivot per candidate mode and reports the mode with the largest pivot whenever that pivot exceeds a threshold. We call this rule Max-Pivot. However, testing several candidates at once inflates the overall Type I error above the nominal level of each individual test, since each candidate pivot may exceed the threshold under the null hypothesis. Restoring the overall nominal level requires a stricter threshold for each candidate, i.e., a multiplicity correction, and we call the resulting rule calibrated Max-Pivot. This threshold increases as candidates are added, lowering the probability that the pivot of the true mode exceeds it. In addition, a correct detection requires the pivot of the true mode to exceed the pivots of all other modes, which also becomes less likely as candidates are added. Both effects grow with the number of candidates, because the candidate modes share one null hypothesis and one Type I error budget at every token. We refer to these effects as the competition among modes. This competition characterizes multi-mode attribution and is absent from single-mode detection.
Several methods use multiple keys or identify the source of a text, but they are not designed for the multi-mode attribution problem considered here. Multi-user watermarks embed a user-specific signal to trace a text to an individual user or to members of a colluding group [13]. Watermark-based attribution assigns each user a distinct watermark selected to improve the accuracy of identifying the user [14]. Randomized key selection uses several keys and accepts a text when exactly one of them is detected [15]. Multi-bit watermarks embed a message, e.g., a user identifier, and recover it by aggregating evidence across many tokens [16]. Methods that
A preliminary version of this work was submitted to the 2027 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) [1].
Rui Zhou is with the City University of Hong Kong (Dongguan), Dongguan, China, and also with the City University of Hong Kong, Hong Kong (email: rui.zhou@cityu-dg.edu.cn).
Licheng Zhao, Chao Shen, and Wenqiang Pu are with the Shenzhen Research Institute of Big Data, The Chinese University of Hong Kong (Shenzhen), Shenzhen, China (e-mail: zhaolicheng@sribd.cn; chaoshen@sribd.cn; wpu@sribd.cn).
localize watermarked segments in mixed-source text [17]–[21] label positions within mixed documents but consider a single key. Most of the multi-key methods above assume that the whole text carries only one watermark, and even the collusion-resistant scheme [13] identifies users rather than labeling tokens. The multi-key methods therefore determine which user or key produced a whole text, whereas multi-mode attribution must determine which mode, if any, generated each token.
Within a source span, neighboring tokens usually share a mode, so the neighbors of a token provide evidence for identifying its mode more accurately. In our preliminary work [1], we proposed a Belief-weighted (BW) detector for the Gumbel-max watermark. It allocates the Type I error budget across the candidates with weights given by mode probabilities from a hidden Markov model of local persistence [22]. On mixed documents, it improved the correct-label power over calibrated Max-Pivot. However, the BW detector and its weights were designed heuristically rather than derived from an optimality criterion.
In this paper, we cast multi-mode attribution as a constrained optimization problem over the decision rule, in which the neighboring evidence enters through the mode prior, i.e., the prior probability of each mode at the target token. Under a conditional product model of the pivots, the optimal rule has an explicit form. The main contributions are as follows:
• We formulate token-level multi-mode attribution for the Gumbel-max watermark as maximizing the prior-weighted correct-label power under a Type I error constraint given the mode prior. We show that the optimal rule reports the mode with the largest prior-weighted alternative density and rejects when this density exceeds one common threshold. Under the uniform product null of the pivots, this threshold splits the Type I error budget among the modes and also bounds the misattribution rate.
• Based on the optimal rule, we propose the Belief-weighted Likelihood Attribution with Density Estimation (BLADE) detector. It estimates the required alternative density from reference token probabilities and the mode prior with a working Markov chain that includes a null state. Under the conditional product model, it keeps the exact Type I error for any such estimates formed from the other positions and independent reference data.
• We bound the loss of BLADE relative to the optimum in terms of the prior and density estimation errors, and show that the coefficient of the density error is sharp.
• We evaluate the detectors on OPT-1.3B and other open-weight LLMs. BLADE attains higher correct-label power than calibrated Max-Pivot, the Local-Count weighting of [1] and BW across candidate counts, token-substitution rates, generation temperatures and generator models. It also keeps the Type I error near the nominal level on human-written and edited text.
This paper is organized as follows. Section II reviews single-mode Gumbel-max watermarking and its pivot distribution. Section III formulates multi-mode attribution, and Section IV derives the optimal rule. Section V constructs BW and BLADE from the optimal rule and bounds BLADE's loss from estimated inputs. Section VI presents numerical experiments, and Section VII concludes the paper.
Notation: Boldface lowercase and uppercase letters denote vectors and matrices, respectively. and denote probability and expectation, is the uniform distribution on , and is the indicator function. and are the -dimensional all-ones vector and identity matrix, denotes transposition, is the elementwise product, and for a nonnegative vector with a positive sum. For , , and for an integrable function on , .
A. Gumbel-Max Watermarking and the Single-Token Test
The Gumbel-max watermark [3], [9] is specified by a secret key shared by the model provider and the verifier [4], [11]. At position , the LLM computes an NTP distribution over a vocabulary , after any temperature scaling or truncation. A keyed hash of the context window , e.g., the preceding tokens with in Section VI, defines a mapping . This mapping assigns each token a pseudorandom value , and the next token is
The statistical properties of the watermark depend on the distribution of the pseudorandom values . We adopt the following assumption, which extends the standard one [3], [9] to multiple keys.
Assumption 1. The pseudorandom values are independent Unif(0,1) variables across vocabulary entries, keys and distinct context windows.
At positions with a previously unseen context window [23], Assumption 1 makes (1) an exact sample from , so the watermark preserves the NTP distribution [3], [9]. To detect the presence of the watermark, the verifier evaluates the keyed mapping at the selected token to obtain the pivot [9]
If the token is chosen independently of the pseudorandom values, e.g., in human-written text, then with cumulative distribution function (CDF) . If the token is generated by (1), follows a stochastically larger distribution with a nondecreasing density. Each position thus poses the one-sided test
Under , is an exact p-value. Since the likelihood ratio of to is nondecreasing, the most powerful level- test [24] is the single-mode rule
(4) with power .
B. Alternative Distribution of the Pivot
Under , the pivot depends on the generator only through the NTP probability of the selected token, . Let . The following lemma restates a result of [9], and the subsequent corollary builds on the mixture distribution of [9], [10].
Lemma 1 ([9]). Under Assumption 1, if the watermark generated at a position with a previously unseen context window, then the conditional distribution of the pivot given is
Corollary 1. Under the conditions of Lemma 1, the CDF and density of a watermarked pivot, averaged over the distribution of , are
Moreover, is nondecreasing and continuous, , and is strictly increasing whenever .
The bound on holds because is the support size of , and continuity follows by dominated convergence. Since depends on the generator only through the distribution of , the verifier can learn it offline (Section V-C). The model of [1] is the special case , which Section III-B uses to quantify the competition cost.
By (5), a token with close to 1 has a nearly uniform pivot and is hard to detect, whereas a token with a low has a pivot concentrated near 1. The single-token power thus grows as the text becomes less predictable. Fig. 1 shows empirical pivot CDFs on OPT-1.3B text for unwatermarked tokens and for watermarked tokens generated at three temperatures. At temperature 1.0 and , rule (4) detects only 42.0% of the watermarked tokens. Higher temperatures typically lower , which explains the order of the three watermarked curves.
III. PROBLEM FORMULATION
A. Token-Level Hypothesis Test
In multi-mode watermarking, the provider holds K watermark modes, e.g., one per user, and mode j generates text by (1) with its own key . At most one mode acts at each position. A document may concatenate spans generated under different modes with unwatermarked spans. The active mode is latent but locally persistent, i.e., adjacent tokens usually share it. The watermark also need not be retained at every token of a watermarked span, e.g., after later editing. Because modes can change within a document and the watermark may be lost at some tokens, we formulate attribution at the token level.
The verifier does not know which mode acted, so it computes a pivot for every candidate mode

Fig. 1. Empirical pivot CDFs on OPT-1.3B text.
and forms the vector . At position , the attribution problem is the multiple hypothesis test [1]
(8)
where states that no watermark is retained at position , because either no mode acted or the coupling between the token and its pseudorandom values was lost. For , states that mode acted and its watermark is retained. Thus a token whose watermark is not retained is a null even inside a watermarked span, and its pivots are uniform. We denote by the true state, so that under .
By Assumption 1, the K pivots in (8) are independent at a position whose context window has not occurred earlier. Repeated context windows [23] are identified from the observed text, and the verifier masks such positions and reports them as unassessed. Throughout, t denotes an unmasked position. We write for the density of . It is nondecreasing as in Section II-B and may differ across modes.
Unlike the single-mode test (3), the modes compete with each other in the multi-mode test (8). A decision rule maps the pivots to the null decision or a mode label. Its correct-label power for mode , , counts a successful detection only if it reports the true mode, and its Type I error is . Since the pivots are independent, these quantities are
(9)
B. Competition Cost of Max-Pivot
A direct approach applies the single-mode rule (4) to the largest of the K pivots and reports its mode, which we call
Max-Pivot:
Equivalently, it runs K separate single-mode tests, declares a watermark retained if any of them rejects the null, and reports the mode with the largest pivot. This rule is simple, but it incurs a competition cost: its Type I error grows with K, and its correct-label power falls. The following two facts quantify this cost under a simple alternative distribution.
Fact 1. Under Assumption 1, let for all and some , i.e., . When is large, the Type I error of Max-Pivot approaches 1, and its correct-label power is .
Proof: See Appendix A.
Fact 2. Under the conditions of Fact 1, calibrated Max-Pivot, which replaces the threshold by , has Type I error . When K is large, its correct-label power is .
Proof: See Appendix A.
Because the true pivot must exceed the other pivots, the correct-label power decays as with or without calibration, and restoring the level costs a further factor . For example, at , the Type I error of Max-Pivot grows from 9.8% at to 80.6% at . With , calibrated Max-Pivot retains 26% of the power of a single-mode test that knows the generating mode at and only 3.4% at , in line with . The loss stems from missing mode information rather than from the pivot itself, since the single-mode test with the known mode does not incur it.
C. Prior-Weighted Attribution Problem
Max-Pivot treats all modes alike, although the modes need not be equally likely at position t. We assume and define the mode prior
as the probability that a watermark retained at position t comes from mode j. A rule that uses can direct its Type I error budget toward the likely modes. We therefore seek the rule that maximizes the prior-weighted correct-label power under a token-level Type I error constraint:
By (11), the objective equals , and the constraint bounds the Type I error at position .
IV. OPTIMAL ATTRIBUTION RULE
A. Structure of the Optimal Rule
Problem (12) weighs the correct-label powers of the K modes against a single Type I error budget. Let denote the largest prior-weighted alternative density at position . The following theorem shows that the optimal rule thresholds this score.
Theorem 1. Under Assumption 1, let and suppose every is continuous and strictly increasing. An optimal decision rule for problem (12) is
where is the unique constant such that .
Proof: See Appendix B.
By Corollary 1, the conditions of Theorem 1 hold for the Gumbel-max watermark: each is continuous, and it is strictly increasing whenever with positive probability under mode .
Theorem 1 keeps the simple threshold form of Max-Pivot and draws its gain from the score alone. Max-Pivot (10) thresholds the largest pivot , whereas rule (13) thresholds the largest prior-weighted alternative density and reports the mode that attains it. This structure agrees with the optimal joint detection and estimation test under a Type I error constraint [25], in which the mode label plays the role of the estimated parameter [26]. The watermark model adds the uniform product null in (8). This null gives the null CDF of the score in the product form (14), which yields the budget split and the misattribution bound of Sections IV-B and IV-C. The following corollary shows that rule (13) recovers two familiar rules as special cases of the prior.
Corollary 2. Under the conditions of Theorem 1:
(i) if and for all , rule (13) is calibrated Max-Pivot of Fact 2;
(ii) if for the known generating mode j, rule (13) reduces to applying the single-mode test (4) to , which we call the Oracle.
Proof: The proof follows by substituting the two priors into (13) and is omitted.
The two cases are the extremes of mode information. Without information that distinguishes the modes, no mode can be favored, and the prior is uniform. A common alternative density then makes the modes interchangeable. With full information, the generating mode is known, and the prior is a point mass. Thus the power gap between calibrated Max-Pivot and the Oracle measures the potential gain from mode information.
B. Calibration and Budget Allocation
For a continuous, strictly increasing , we extend its inverse to by clipping, i.e., for and for . Let denote the null CDF of . By (8), the independence of the uniform null pivots gives
(14)

Fig. 2. Optimal rejection region for , and , with the density estimate in (25) for both modes.
where modes with have zero score and are omitted from the product.
At , the complement of each factor is the per-mode level of the corresponding single-mode test:
with when . By the monotonicity of , rule (13) rejects on the union of per-mode upper tails . Its Type I error is therefore , and calibration gives
We refer to (16) as the calibration equation. It splits the Type I error budget among the modes: mode receives the per-mode level , and the levels are linked through the common threshold by (15). For a common density, a mode with a lower prior receives a smaller level, so the optimal rule shifts the budget toward the more likely modes. In particular, the optimal rule withdraws the budget from unlikely modes: mode receives no budget if and only if . Fig. 2 illustrates the resulting rejection region for two modes with a common density.
The decision does not require solving the calibration equation for . Let denote the observed score.
Lemma 2. If is strictly increasing wherever , then for , if and only if .
Proof: By (16), , so the claim follows from the monotonicity of and its strict increase where .
By Lemma 2, rule (13) rejects the null hypothesis if and only if , since the in Theorem 1 make strictly increasing where (Appendix B). The verifier therefore evaluates the null CDF at the observed score and compares it with , without computing .
C. Control of Misattribution
The per-mode levels also control the misattribution rate , i.e., the probability of reporting a wrong mode for a retained watermark.
Lemma 3. Under the conditions of Theorem 1, rule (13) satisfies, for ,
Proof: Under , each pivot with is uniform by (8), and rule (13) reports mode only if , i.e., . The union bound gives the first inequality, and with (16) gives the second.
The Type I error budget thus limits wrong-mode reports without a separate constraint in (12). At , for example, the misattribution rate is at most 5.13%.
V. FROM THE OPTIMAL RULE TO PRACTICAL DETECTORS
The optimal rule (13) requires the prior and the alternative densities , which are unknown to the verifier. We first show that replacing them by estimates keeps the exact Type I error, since the neighboring pivots inform the prior without altering the null distribution of the target pivots. We then construct two practical detectors. The Belief-weighted (BW) detector extracts a prior estimate from the neighboring pivots through a working Markov chain [22] and replaces the alternative densities by a simple heuristic score. The Belief-weighted Likelihood Attribution with Density Estimation (BLADE) detector refines both components. It extracts the prior estimate through a working chain with a richer state space and estimates the alternative densities from a reference sample of token probabilities. Finally, we bound BLADE's power loss from estimation errors and analyze the complexity of both detectors.
A. Neighboring Evidence and Calibration
Text generated by one mode tends to be contiguous, e.g., a sentence or a paragraph, so the neighboring pivots carry information about the mode at position . Let comprise the pivot vectors at the unmasked positions , together with their positions. Conditioning on replaces (11) by the conditional prior
An estimate of from makes the threshold depend on the neighbors. The Type I guarantee of Section IV extends to these neighbor-dependent thresholds when the neighbors carry no information about the null target pivots, as the following assumption states.
Assumption 2. Under each hypothesis , given the NTP distribution and the token , is independent of the pseudorandom values , at position .
The following corollary follows directly from Lemma 1.
Corollary 3. Under Assumptions 1 and 2, conditionally on , (a) under , the pivots are independent Unif(0,1) variables; and (b) under , , the pivots , , are independent Unif(0,1) variables, independent of , and has the nondecreasing density .
By Assumption 2, conditioning on changes the distribution of and but not that of the pseudorandom values given them. Under , the neighbors thus affect the target pivot only through . We refer to (8) under Assumption 2 as the conditional product model.
A practical detector replaces the unknown prior by an estimate , called its belief, formed from , and the unknown densities by working scores . The following lemma shows that these replacements preserve the exact Type I error.
Lemma 4. Let , and let the prior estimates and the continuous, strictly increasing working scores be functions of and of reference data independent of the scored document. Under Assumptions 1 and 2, rule (13) with in place of , calibrated by (16), satisfies .
Proof: The proof follows the derivation of (16), given Corollary 3(a) and the monotonicity of the scores, and is omitted.
Calibration therefore holds however inaccurate the prior estimates and working scores are. Their errors affect only the power.
From here on, , , , and are conditional on , and a decision rule may also depend on , e.g., through . In the following, we construct two practical detectors that implement rule (13) with estimated priors and working scores.
B. The BW Detector
BW implements the decision structure of (13) in a simple, heuristic manner. It estimates from the neighboring pivots with a working Markov model of local persistence and replaces the unknown alternative density by the fixed inverse-p-value score .
- Prior Estimate: To approximate from neighboring pivots, BW models the mode of the span containing position by a working Markov chain with no null state and transition matrix
where is the persistence probability. The observation evidence at position is with , where the fixed cap prevents a single extreme pivot from dominating the recursions. At masked positions, , so state transitions through them are preserved.
The forward–backward recursions [22]
are initialized with for a document of tokens. Since uses the evidence before and the evidence after , their product excludes and is a function of , as Lemma 4 requires. Mixing the normalized product with the uniform distribution gives
Here keeps every component of positive.
-
Working Score: Under the null, is an exact p-value (Section II-A), and h is its reciprocal. Like , h increases with the pivot, so BW uses it in place of in (13). Since h is not integrable on , it is a working score rather than a density estimate.
-
Decision Rule: With the prior estimate (21) and the working score h, BW replaces in (13) by . The condition is equivalent to , so (16) calibrates the threshold for this score through
The solution is unique, since the product increases continuously from 0 to 1 on this interval. The per-mode levels are
which are proportional to the belief. The resulting BW decision rule has the form of (13):
For the observed score , the null CDF is strictly increasing above , and is continuous and strictly increasing on . By Lemmas 2 and 4, rule (24) is conditionally calibrated and rejects when , without computing (Algorithm 1).
The choice of h thus gives BW closed-form per-mode levels (23) and a closed-form null CDF. The BLADE detector below refines both the prior estimate and the working score to improve the power.
C. The BLADE Detector
BLADE replaces the heuristic score h by an estimate of the alternative density from a reference sample. It estimates with a working chain that adds a null state for unwatermarked spans and uses the density estimate as its evidence. We therefore estimate the density first.
- Density Estimate: Let be a reference sample of selected-token probabilities under the generator's sampling distribution, supplied offline by the model provider independently of the scored document. Replacing the expectation in (6) by its empirical average gives
Algorithm 1 BW Attribution Detector of One Document
Input: pivots for candidate modes, repeated-context mask, fixed parameters , and .
1: Form by (19) and initialize .
2: Compute with ; set at masked positions.
3: Run the forward–backward recursions (20).
4: for each unmasked do
5: Compute by (21).
6: Compute .
7: Compute .
8: If , set ; otherwise set .
9: end for
By (6), the alternative density depends on the generator only through the distribution of , which is set by the model but not by the key. A reference sample from the same generator thus serves all modes, and we use as a common working approximation to the conditional densities . It is computed once offline and does not depend on or the scored document.
- Prior Estimate: Let denote the mode of the span containing position , with for an unwatermarked span. Unlike the BW state , includes a null state. A token in a mode- span has if it retains the watermark and otherwise, and we model retention as independent across positions with probability .
To accommodate unwatermarked spans, BLADE models by a -state working Markov chain with transition matrix
(26)
where Q is the mode-to-mode block. Here and are the persistence probabilities of unwatermarked and watermarked spans, and is the probability that leaving a mode span leads directly to another mode rather than to the null state.
Under this chain, all pivots at position are uniform given . Given , the mode- pivot has the density , and the other pivots are uniform. The likelihood ratios relative to the null span state, , form the evidence vector , which replaces in the message recursions.
We obtain the -dimensional messages and by using and in (20), with and at masked positions. As in BW, their normalized product excludes the target evidence. Under the working chain, for .
Since retention has the common probability given , the working chain gives for , where because the likelihoods are positive and
Algorithm 2 BLADE Attribution Detector of One Document
Input: pivots for candidate modes, repeated-context mask, offline density estimate in (25), fixed parameters , and .
1: Form by (26) and initialize .
2: Compute with ; set at masked positions.
3: Run recursions (20) with and .
4: for each unmasked do
5: Compute and by (27).
6: Compute .
7: Compute with the clipped inverse.
8: If , set ; otherwise set .
9: end for
. Conditioning on cancels , and the uniform mixing of (21) yields the estimate of (18)
- Decision Rule: With the prior estimate (27) and the density estimate (25), BLADE replaces in (13) by , which gives the rule
where is determined by (15)–(16) using and . The observed maximum score and its conditional null CDF are
where is the clipped inverse of Section IV-B. Since the prior estimates are positive and is continuous and strictly increasing whenever some , Lemmas 2 and 4 apply: the calibrated rule (28) rejects when and reports the maximizing mode (Algorithm 2). Appendix D gives an optional explicit computation of and the per-mode levels.
D. Effect of Estimation Errors on BLADE
By Lemma 4, the estimation errors of BLADE affect only its power. By Corollary 3, Theorem 1 holds conditionally on , so we bound this power loss relative to the optimal rule, conditionally on and the reference data.
Proposition 1. Under the conditions of Theorem 1 and Assumption 2, if some , the BLADE rule in (28), with solving (16) exactly, satisfies
(30)

Fig. 3. Exact power loss of rule (28) relative to rule (13) and the density-error bound in (30) versus , for , and .
Here OPT denotes the optimal value of (12).
Proof: See Appendix C.
The bound separates the two estimated inputs of BLADE: the prior error and the density error weighted by the prior. The prior in (30) is the final estimate (27).
To distinguish reference-sample error from mismatch in the alternative distribution, let the reference mixture density be the population counterpart of (25). The triangle inequality gives
(31)
For an i.i.d. reference sample, the first term, the reference-sample error, tends to zero almost surely as (Appendix C). The second term measures the mismatch between the reference mixture density, which averages over positions, and the conditional densities , which condition on the neighbors. If both terms in (30) tend to zero, BLADE's correct-label power tends to OPT.
We validate the density term of Proposition 1 using a toy example. We set , and , so the prior error is zero. The NTP distributions under modes 1 and 2 are uniform on and two tokens, respectively, where is an integer with , so (6) gives and . The reference sample is drawn under mode 2, so (25) gives exactly for any , and only the mode-1 density error remains. For each , the exact power loss of rule (28) relative to rule (13) is compared to the density-error bound in (30). As shown in Fig. 3, the exact loss stays below the bound for every displayed , as Proposition 1 guarantees. The bound is also tight, since the two approach each other as grows and both tend to 0.4 (Appendix C).
E. Computational Complexity
We analyze Algorithms 1 and 2 for a document of n tokens. The structure of (19) and (26) reduces each matrix-vector product in (20), including multiplication by the transpose, to one sum over the mode components and componentwise updates, i.e., operations. With operations per position for the evidence, scores and null-CDF product, BW has time and memory complexity per document.
BLADE also queries and its inverse, 2K times per position. Since does not depend on the document, we tabulate it once at G ordered points, in operations reusable across documents. Each query then takes by binary search and linear interpolation, instead of by (25). Any continuous, strictly increasing interpolant evaluated exactly, e.g., piecewise-linear interpolation of an increasing table, satisfies Lemmas 2 and 4, so calibration remains exact. Appendix D details the log-scale tabulation and the bisection used in the experiments. Algorithm 2 thus costs time and working memory, so for fixed G, both detectors scale linearly in n and K.
VI. NUMERICAL EXPERIMENTS
We evaluate the detectors on mixed text with real pivots for all candidate modes. The experiments examine three claims. First, the detectors keep the Type I error near the nominal level on human-written and edited text. Second, BLADE attains the highest correct-label power among the practical detectors as the candidate count, substitution rate, generation temperature and generator model vary. Third, a mode-weight illustration on one document shows how the detectors use the neighboring evidence.
A. Experimental Protocol
Following [1], [2], [11], we generate continuations of 50-token C4 realnewslike prompts [27] with OPT-1.3B [28] at temperature 1. The continuations are watermarked by (1) under four generating modes with a five-token hash context, and is recorded under the sampling distribution. The 224 sources are split into 32 development, 24 calibration and 168 test sources, each with a watermarked continuation under one mode and an unwatermarked continuation. A layout draws four test sources, one per mode, and no two layouts share a source. Its mixed document of about 400 tokens interleaves their four 50-token watermarked spans with five 40-token spans from their unwatermarked continuations. A fraction of the watermarked tokens is then replaced by tokens drawn uniformly from the vocabulary, as in [11], and a position retains the watermark if the six-token sequence ending at it occurs in the original continuation. Repeated contexts are masked as in Section V. Type I error is measured on human-written C4 continuations, where holds, and on unretained positions of the edited documents, an operational null.
On 42 layouts, we vary at 20% substitution and the substitution rate in at . On eight paired layouts with and 20% substitution, we vary the temperature in and the generator among OPT-1.3B, Qwen2.5-1.5B [29], Llama-3.2-1B [30] and Sheared-LLaMA-2.7B [31].
We compare calibrated Max-Pivot, the Local-Count weighting and BW of [1], and BLADE. Throughout, Max-Pivot

Fig. 4. Token-level Type I error versus K: (a) human-written text; (b) unretained positions.
denotes the calibrated version. The first three use (24) with uniform, two-level local and chain-based weights, respectively. For each mode, Local-Count counts the unmasked pivots above 0.95 within five positions of , excluding . It assigns the weight to the mode with the largest count and to the others, breaking ties by the lowest index. BW uses and as in [1]. BLADE estimates (25) from the tokens of 56 development and calibration sources. For each temperature and model, it re-estimates (25) from 12 matched sources. Its parameters , and are selected on development documents and fixed before evaluation. BW and BLADE use , and we set . The Oracle of Corollary 2(ii), given , reports if and 0 otherwise.
Correct-label power and the misattribution rate are the fractions of retained, unmasked positions assigned to the correct and to a wrong mode, and Type I error is the fraction of null positions detected. For edited text, rates are pooled over layouts within each substitution realization and averaged over the eight realizations. Shaded regions and error bars are 95% percentile intervals from 2,000 bootstrap resamples of layouts. Each resample keeps all eight realizations of a drawn layout and is shared by all detectors, which gives paired intervals for the gains.
B. Type I Error
Fig. 4 tests calibration as the candidate set expands. Panel (a) uses human-written text, and panel (b) uses unretained positions in the edited documents, a harder null population because their neighbors still carry watermark evidence.
All four detectors stay near the nominal level in both populations. On human-written text, their rates lie between 4.88% and 5.19% over the tested candidate counts. On edited text, the mean rates range from 4.80% to 5.06%, and BLADE's

Fig. 5. Correct-label power versus K at 20% substitution. Shaded regions are 95% bootstrap intervals (Section VI-A).
means lie between 4.92% and 5.04%. Increasing the candidate count produces no systematic inflation in either population.
C. Correct-Label Power
- Candidate Count: Fig. 5 tests robustness to irrelevant candidates: the 20% substitution documents and their four generating modes remain unchanged as K increases, so every added key is a competitor without signal.
BLADE has the highest mean correct-label power among the practical detectors throughout the sweep, and the paired 95% interval of its gain over BW excludes zero at every K. At K = 32, Max-Pivot, Local-Count, BW and BLADE attain 14.7%, 25.0%, 31.5% and 37.6%, respectively, and the misattribution rate is 1.89% for BW and 1.18% for BLADE, well below the bound of 5.13% in Lemma 3.
BLADE is also the least sensitive to added candidates. From to , its power changes by 4.7 percentage points, compared with 8.1 for BW, so its gain over BW grows from 2.7 to 6.1 points. Max-Pivot's declining power follows the competition mechanism of Section III-B. The weighted detectors reduce the loss by directing more budget toward modes supported by neighboring evidence.
The Oracle stays at 44.6%, since its pivot and threshold do not depend on K. Measured against the potential gain from mode information (Section IV-A), BLADE recovers 85% of the gap between Max-Pivot and the Oracle at K = 4 and 77% at K = 32, compared with 68% and 56% for BW.
- Substitution Rate: Fig. 6 varies the substitution rate at with all detector parameters unchanged. The rate controls how much neighboring evidence survives the edits.
BLADE has the highest mean correct-label power among the practical detectors at all nine rates, and the paired 95% interval of its gain over BW excludes zero at each rate. Without substitution, BLADE nearly matches the Oracle (44.3% versus 44.4%). As substitution removes neighboring evidence, its gain over BW grows from 0.7 points to 6.3 points at 24% substitution and remains 4.9 points at 32%.
Max-Pivot and the Oracle decide from the target pivots alone, which a retained six-token sequence leaves unchanged,

Fig. 6. Correct-label power versus substitution rate with K = 32. Shaded regions are 95% bootstrap intervals (Section VI-A).

Fig. 7. Correct-label power versus generation temperature with K = 32 and 20% substitution. Shaded regions are 95% bootstrap intervals (Section VI-A).

Fig. 8. Correct-label power across four generator models with K = 32 and 20% substitution. Error bars are 95% bootstrap intervals (Section VI-A).
so their correct-label powers are nearly flat. The weighted detectors draw their gain from neighboring support for the true mode, so their power tracks the amount of this support that survives the edits.
- Generation Temperature: Fig. 7 varies the signal strength through the generation temperature. The five conditions share the paired prompts, eight layouts and matched 12-source references of Section VI-A.
BLADE has the highest mean correct-label power among the practical detectors at every temperature, rising from 19.1% to 59.8%, with gains over BW between 1.6 and 7.4 points. Mean power increases for all five methods across the sweep. The Oracle rises from 31.9% to 63.8%, and BLADE closes in on it, with the gap narrowing from 12.7 to 3.9 points.
The common increase follows the signal mechanism of Section II-B: on the same source spans, raising the temperature lowers the median selected-token probability from 0.343 to 0.0254 and raises the single-token power from 32.5% to 64.1% (Fig. 1), within one percentage point of Corollary 1 evaluated at the recorded . Since the watermark preserves the NTP distribution, this gain comes from less predictable text.
- Generator Model: Fig. 8 tests whether the gain transfers across the four generator models of Section VI-A at temperature 1. Each model uses the eight paired layouts and a model-matched 12-source reference, and the OPT bar is computed on the same sample.
BLADE has the highest mean correct-label power among the practical detectors for every tested model, gaining 3.7–6.1 percentage points over BW without retuning its hyperparameters. Only the density estimate is re-estimated for each model.
D. Mode-Weight Illustration
Fig. 9 compares the mode weights of the four detectors, i.e., their weights on the K modes at each position, on one document with 20% substitution and K = 4. Panel (a) separates the source-span labels from retained-token states , since substitution can give within a span with . Max-Pivot has uniform weights, while Local-Count changes its preferred mode through local counts. BW often concentrates on one mode but exhibits sharp local changes. BLADE gives more sustained support within the watermarked spans, particularly Mode 2, with more gradual transitions near their boundaries.
BW and BLADE plot from (21) and (27). All four weight vectors sum to one even at null positions, so detection still depends on the target pivots. On the 42 retained, unmasked tokens, the mean true-mode weight is 79.8% for BW and 90.1% for BLADE.
VII. Conclusion
In this paper, we have considered token-level attribution of LLM watermarks among K candidate modes, formulated as maximizing the prior-weighted correct-label power under a Type I error constraint. We have shown that the optimal rule thresholds the largest prior-weighted alternative density at one common threshold, which splits the Type I error budget among the modes and also bounds the misattribution rate. Based on this structure, we have proposed BLADE. It estimates the mode prior from the neighboring pivots with a working Markov chain that includes a null state, and the

Fig. 9. Mode weights on a selected document with K = 4 and 20% substitution: (a) span labels and retained-token states ; (b)–(e) stacked mode weights of the four detectors.
alternative density from a reference sample of token probabilities. We have also shown that its correct-label power approaches the optimum as the prior and density errors vanish. Numerical experiments on mixed documents have shown that BLADE attains the highest mean correct-label power among the practical detectors across candidate counts, substitution rates, generation temperatures and four generator models. Its Type I error stays near the nominal level.
APPENDIX A PROOFS OF FACTS 1 AND 2
Let for all , and let be the threshold of Max-Pivot. Under , the pivots are independent Unif(0,1) variables by Assumption 1, so the rule accepts the null with probability . Under , it reports mode if and only if exceeds both and the other pivots. Given , the latter event has probability , so
The factor is the probability that the true pivot exceeds the other K - 1 pivots.
Fact 1. With , the Type I error is , and (32) gives
The bracket is , so .
Fact 2. With , the Type I error is , and (32) gives
The bracket is , so .
APPENDIX B PROOF OF THEOREM 1
In Appendices B–D, the position and the side information are fixed as in Section V-A, and denotes a point of , as in (9). We write for the Lebesgue measure of a set . By (9), a rule with rejection region has .
Proof of Theorem 1: Labeling. For any rule with rejection region , (9) gives
(35)
since at most one indicator is nonzero. Equality holds if and only if reports almost everywhere on .
Rejection region. The null CDF of in (14) is continuous and satisfies . It is strictly increasing wherever , because there every factor is positive and at least one lies in , where it is strictly increasing. Hence, for , a unique satisfies , and the region has . For any with ,
(36) because on , outside it, and . This is the bathtub principle [32], i.e., the Neyman–Pearson lemma with in place of an alternative density. By (35) and (36), attains the maximum of (12).
Union of tails. By (15) and the monotonicity of , . Thus , whose complement is the box . This gives (16).
APPENDIX C
PROOF OF PROPOSITION 1 AND PROPERTIES OF THE DENSITY TERM
Proof of Proposition 1: Let be the optimal rule (13) and the BLADE rule (28) with solving (16) exactly. Both rules are feasible for (12), since both are calibrated under the same conditional uniform null distribution (Lemma 4). Hence the loss in (30) is nonnegative.
For , let be the probability that reports mode when and the other pivots are independent Unif(0,1) variables,
where denotes the point with . By Corollary 3(b), . Both rules report the largest of coordinatewise nondecreasing scores above a fixed threshold, so increasing preserves a report of mode . Since ties are null, each is nondecreasing with values in . For , the increments of both rules lie in , so satisfies
Since and is continuous and strictly increasing, Theorem 1 applied to the estimated inputs shows that maximizes the weighted correct-label power computed with and . Hence , and subtracting this quantity gives
(39)
Let be the midpoint of and , so that by (38). Since and both integrate to one,
(40)
Moreover, , since and integrates to one. Applying these bounds to the two sums in (39) gives (30).
Consistency of the density estimate. Let the reference sample be drawn i.i.d. from the distribution underlying in (31). Since , the strong law of large numbers gives almost surely for each . By Fubini's theorem, with probability one the convergence holds for almost every , and Scheffé's lemma gives , since both functions are probability densities.
Sharpness of the density coefficient. Consider the example of Section V-D with a vocabulary of size for each . Let denote its optimum, and let be the power of the mode-2 tail at level . Any feasible rule reports mode 2 on a set of null volume at most . Since is increasing, the bathtub principle in (36) gives , and . Hence
Conversely, for large , let and . The rule that reports mode 1 if , and otherwise mode 2 if , has null rejection probability and weighted correct-label power
since and . Thus , whereas rule (28) has power 0.0585, so its loss tends to 0.4. For , and cross at , and
The density term in (30) therefore also tends to 0.4.
APPENDIX D EXPLICIT THRESHOLD COMPUTATION
Algorithm 2 evaluates the calibrated BLADE decision directly by Lemma 2. When the threshold or the per-mode levels are needed explicitly, they follow from the calibration equation (16) with and in place of and . By (27), for every , and is continuous and strictly increasing whenever some . With the clipped inverse of Section IV-B, a candidate threshold gives
(44)
As in Appendix B, is continuous, nondecreasing and strictly increasing wherever . The endpoints
(45)
satisfy and , so has a unique solution in for . Bisection keeps , replacing the lower endpoint when the midpoint value is below and the upper endpoint otherwise, and stops when
By Corollary 3(a), the rule with threshold has conditional Type I error when is evaluated exactly. This guarantee requires the exclusion of the target pivots from , but not accurate estimates of or .
Implementation in the experiments. The experiments floor reference probabilities at and tabulate on a fixed grid in , with a density floor of . Density queries interpolate this table, and inverse queries interpolate the same table with its coordinates exchanged. Forward queries cap at , and inverse queries use . Bisection runs for 60 steps in on the interval , where and are the extreme tabulated log-densities and . This interval replaces because can be zero. The table has nodes, and the decision uses the upper endpoint of the final interval. The reported BLADE results use this implementation. The decision rejects when for some , with the levels read from the table. The bisection keeps . The interpolation and the caps therefore change only the levels, and the conditional Type I error stays at most .
REFERENCES
[1] R. Zhou, L. Zhao, W. Pu, and C. Shen, “Incorporating local evidence into multi-mode LLM watermark attribution,” submitted to Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. (ICASSP), 2027.
[2] J. Kirchenbauer, J. Geiping, Y. Wen, J. Katz, I. Miers, and T. Goldstein, "A watermark for large language models," in Proc. 40th Int. Conf. Mach. Learn. (ICML), ser. PMLR, vol. 202, 2023, pp. 17 061–17 084.
[3] S. Aaronson, “Watermarking of large language models,” Talk at the Simons Institute for the Theory of Computing, Aug. 2023. [Online]. Available: https://simons.berkeley.edu/talks/scott-aaronson-ut-austin-openai-2023-08-17
[4] R. Kuditipudi, J. Thickstun, T. Hashimoto, and P. Liang, “Robust distortion-free watermarks for language models,” Trans. Mach. Learn. Res., 2024.
[5] X. Zhao, P. Ananth, L. Li, and Y.-X. Wang, “Provable robust watermarking for AI-generated text,” in Proc. Int. Conf. Learn. Represent. (ICLR), 2024.
[6] Z. Hu, L. Chen, X. Wu, Y. Wu, H. Zhang, and H. Huang, “Unbiased watermark for large language models,” in Proc. Int. Conf. Learn. Represent. (ICLR), 2024.
[7] Y. Wu, Z. Hu, J. Guo, H. Zhang, and H. Huang, “A resilient and accessible distribution-preserving watermark for large language models,” in Proc. 41st Int. Conf. Mach. Learn. (ICML), ser. PMLR, vol. 235, 2024, pp. 53443–53470.
[8] S. Dathathri et al., “Scalable watermarking for identifying large language model outputs,” Nature, vol. 634, no. 8035, pp. 818–823, 2024.
[9] X. Li, F. Ruan, H. Wang, Q. Long, and W. J. Su, “A statistical framework of watermarks for large language models: Pivot, detection efficiency and optimal rules,” Ann. Statist., vol. 53, no. 1, pp. 322–351, 2025.
[10] P. Fernandez, A. Chaffin, K. Tit, V. Chappelier, and T. Furon, “Three bricks to consolidate watermarks for large language models,” in Proc. IEEE Int. Workshop Inf. Forensics Secur. (WIFS), 2023, pp. 1–6.
[11] X. Li, F. Ruan, H. Wang, Q. Long, and W. J. Su, “Robust detection of watermarks for large language models under human edits,” J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 88, no. 2, pp. 491–515, 2026.
[12] X. Li, G. Wen, W. He, J. Wu, Q. Long, and W. J. Su, “Optimal estimation of watermark proportions in hybrid AI-human texts,” arXiv:2506.22343, 2025.
[13] A. Cohen, A. Hoover, and G. Schoenbach, “Watermarking language models for many adaptive users,” in Proc. IEEE Symp. Secur. Privacy (SP), 2025, pp. 2583–2601.
[14] Z. Jiang, M. Guo, Y. Hu, Y. Wang, and N. Z. Gong, “Watermark-based attribution of AI-generated content,” in Proc. Int. Conf. Learn. Represent. (ICLR), 2026.
[15] T. Aremu et al., “Mitigating watermark forgery in generative models via randomized key selection,” in Proc. ICML Workshop Trustworthy AI for Good, 2026.
[16] K. Yoo, W. Ahn, and N. Kwak, “Advancing beyond identification: Multi-bit watermark for large language models,” in Proc. Conf. North Amer. Chapter Assoc. Comput. Linguistics (NAACL), 2024, pp. 4031–4055.
[17] X. Li, G. Li, and X. Zhang, “Segmenting watermarked texts from language models,” in Adv. Neural Inf. Process. Syst. (NeurIPS), vol. 37, 2024, pp. 14634–14665.
[18] X. Zhao, C. Liao, Y.-X. Wang, and L. Li, “Efficiently identifying watermarked segments in mixed-source texts,” in Proc. 63rd Annu. Meeting Assoc. Comput. Linguistics (ACL), 2025, pp. 6304–6316.
[19] L. Pan et al., “WaterSeeker: Pioneering efficient detection of watermarked segments in large documents,” in Findings Assoc. Comput. Linguistics: NAACL, 2025, pp. 2866–2882.
[20] S. Bonnerjee, S. Roy, and S. Karmakar, “Fast segmentation of watermarked texts from large language models through an epidemic change-point framework,” arXiv:2509.21160, 2025.
[21] J. H. Blanchet, T. T. Cai, X. Li, H. Liu, Q. Long, and W. J. Su, “Optimal watermark localization in mixed-source large language model texts,” arXiv:2608.14906, 2026.
[22] L. R. Rabiner, “A tutorial on hidden Markov models and selected applications in speech recognition,” Proc. IEEE, vol. 77, no. 2, pp. 257–286, 1989.
[23] T. T. Cai, X. Li, Q. Long, W. J. Su, and G. Wen, “Optimal detection for language watermarks with pseudorandom collision,” arXiv:2510.22007, 2025.
[24] E. L. Lehmann and J. P. Romano, Testing Statistical Hypotheses, 3rd ed. New York, NY, USA: Springer, 2005.
[25] G. V. Moustakides, “Optimum joint detection and estimation,” in Proc. IEEE Int. Symp. Inf. Theory (ISIT), 2011, pp. 2984–2988.
[26] D. Middleton and R. Esposito, “Simultaneous optimum detection and estimation of signals in noise,” IEEE Trans. Inf. Theory, vol. 14, no. 3, pp. 434–444, May 1968.
[27] C. Raffel et al., “Exploring the limits of transfer learning with a unified text-to-text transformer,” J. Mach. Learn. Res., vol. 21, no. 140, pp. 1–67, 2020.
[28] S. Zhang et al., “OPT: Open pre-trained transformer language models,” arXiv:2205.01068, 2022.
[29] A. Yang et al., “Qwen2.5 technical report,” arXiv:2412.15115, 2024.
[30] A. Grattafiori et al., “The Llama 3 herd of models,” arXiv:2407.21783, 2024.
[31] M. Xia, T. Gao, Z. Zeng, and D. Chen, “Sheared LLaMA: Accelerating language model pre-training via structured pruning,” in Proc. Int. Conf. Learn. Represent. (ICLR), 2024.
[32] E. H. Lieb and M. Loss, Analysis, 2nd ed. Providence, RI, USA: Amer. Math. Soc., 2001.