Watermarking LLMs
TL;DR: In this post I talk about the mathematics of LLM watermarking: how it works, why it works, effects on quality, and the possibility of watermarking with user ids.
In this post I want to talk about how LLM output can be watermarked from a mathematical perspective. The occasion is Article 50(2) of the EU AI Act [EU24], which requires providers to mark covered AI-generated output in a machine-readable way; it does not prescribe a particular watermark. We will look at two methods for text: Google DeepMind’s SynthID-Text [DSG+24], a version of which Anthropic uses for Claude [An26], and OpenAI’s textGrain [LWC+26]. I will leave images, audio, and most of the policy questions aside, with one exception at the end: what if we wanted to mark not just the provider’s output, but the account that requested it?
A little bit of history
In late 2022, while on leave at OpenAI, Scott Aaronson described a prototype for watermarking GPT output, built by Hendrik Kirchner [A22]. The idea was to leave the model alone and change how we sample from it. A secret key and the preceding tokens give us pseudorandom numbers that guide the next choice. If we know the key, we can go back over the text and check whether the choices score unusually well under it. One token tells us very little; the point is to look at what happens over a whole passage.
In 2023, Kirchenbauer et al. [KGW+23] gave a particularly simple way to see how this might work. At each step, split the vocabulary into two lists, green and red, based on the preceding text. Give the green tokens a boost before sampling, and then ask whether the resulting passage contains more green tokens than we would expect by chance. Note that changing the green list from one step to the next does not by itself make the boost average out. Can we keep a signal for somebody who knows the key and still recover the model’s original probabilities on average?
Google DeepMind’s SynthID-Text [DSG+24] gives one answer. It shares Aaronson’s idea of guiding the sampler with a key, but it uses a different sampler: draw candidates from the model’s own distribution and let them play a tournament. Google deployed SynthID-Text in Gemini, and Anthropic later adopted a version for Claude [An26]. OpenAI’s textGrain [LWC+26] takes a different approach to the same question. We will come back to it once we have seen what a single match does to the probabilities.
The algorithm
In the following we give a slightly simplified explanation of the algorithm, which captures the major steps; certainly in actual implementations things are optimized further and I will indicate some obvious optimizations below.
The very basic idea is that rather than fully randomly sampling the next token we replace parts of that sampling with a pseudorandom sampler that we have keyed. We use it then to bias the sampling so that we can statistically verify if tokens came from our sampling process while not changing the sampling distribution on average.
Watermarking
Watermarking happens on a token-by-token basis. The watermarking algorithm depends on a secret key $k$, the current position in the token stream $t$, and the context length $H$ of preceding tokens. Moreover, we need a “good” hash function $\mathcal H$, which we use as a pseudorandom number generator. Note that $k$, $H$, and $\mathcal H$ are chosen parameters. The pseudorandom sampling will use a tournament in which each match contains $N$ token slots and there are $m$ tournament layers. If this is not yet clear, the widget below will make it concrete.
A) Deriving a seed from the context. At position $t$ with context length $H$, derive the seed $r_t$ as
\[r_t \doteq \mathcal H(k, y_{t-H}, \dots, y_{t-1}),\]where $y_{t-H}, \dots, y_{t-1}$ are the $H$ preceding tokens. We compute the seed at each position, but if the same context comes up twice, so does the same seed. We will come back to why this matters.
If $\mathcal V$ is our vocabulary, i.e., the set of all possible tokens we have available, we can now define a function
\[g(x) = (\mathcal H(r_t,\ell,x) \mod 2)_{\ell \in [m]},\]which effectively assigns each token $x$ a string of $m$ pseudo-random coins.
Note. This is a deterministic assignment of length-$m$ pseudorandom 0/1 strings to tokens in our vocabulary. The assignment also depends on the seed $r_t$. If the context changes, the same token can get a different string.
B) Running the tournament. Now sample $N^m$ tokens with replacement from the original distribution $p$ at position $t$. Each sampled slot gets the length-$m$ pseudorandom 0/1 string of that token assigned to it. The same token can be sampled multiple times, in which case that token appears in several distinct slots with the same bit string.
We now run a tournament as follows: In a given round $\ell \in [m]$ we group the surviving slots into matches of size $N$. In each match, inspect the $\ell$’th bit of each candidate. If at least one slot has a $1$, choose the winner uniformly among the $1$-slots. If all slots have a $0$, choose the winner uniformly among all $N$ slots. Clearly, each round shrinks the number of left slots by a factor of $N$. After $m$ rounds, one slot remains and its token is emitted.
In the following widget, we consider the toy example case using $N=2$. Green slots have bit $1$ in the current layer, gray slots have bit $0$, and a thick blue outline marks the slot that advances. The table compares the model distribution $p$ before the tournament with the exact winner distribution $q_C(x)$ after all displayed layers for this given configuration.
In a given realized bracket, the winner must be one of the $N^m$ sampled slots. If $C$ denotes that fixed candidate draw, the widget’s middle column is $q_C(x)=\Pr(W=x\mid C,G)$: it holds those candidates and the keyed partitions fixed while averaging over all possible tie-breaking paths. A token absent from $C$ therefore has $q_C(x)=0$. The final column also averages over fresh candidate draws but keeping the key fixed,
\[p^{(m)}(x)=\mathbb E_C\!\left[q_C(x)\mid G\right].\]In particular, a token with $p(x)=0$ can never appear (and hence not win) because it is not sampled in the first place. This is a statement about the support of the distribution. Now, suppose we fix the key, context, and therefore the token coins in a given layer $\ell$. Now suppose we repeatedly drew $N$ candidates from $p$ and ran that one match only. The resulting distribution
\[p'(x) = \Pr(\text{winner}=x \mid \text{fixed key, context, and layer})\]is the probability that $x$ wins after averaging over all possible $N$-slot candidate samples and the random tie-breaking. It is important to keep in mind that we are not averaging over keys; just over the samples drawn from $p$. However, the assigned key and hence its head/tail partition induced by the derived seeds remain fixed and deterministic. This distinction is central: one of the sampled brackets in the widget above has one winner, whereas $p’$ describes the probability distribution of winning over an unlimited number of freshly sampled brackets generated under the same fixed partition.
Let us first look at a single slot. With the key, the context, and the layer $\ell$ fixed, each token is already labeled heads or tails. What is the probability that a fresh draw from $p$ comes up heads? We simply add up the probabilities of the tokens labeled heads:
\[m_1 = \sum_{x \in \mathcal V:\, g(x)_\ell = 1} p(x).\]Suppose, for example, that only overcast and gray are labeled heads. With the probabilities from the widget, a slot then comes up heads with probability $m_1=0.26+0.22=0.48$, regardless of how many heads we saw in the bracket above. Now draw $N$ slots independently with replacement. The probability that none comes up heads is $(1-m_1)^N$, and only in that case can a tails-token win. The exact one-layer winner distribution is
\[p'(x) = p(x) \cdot \begin{cases} \dfrac{1-(1-m_1)^N}{m_1}, & \text{if } g(x)_\ell=1, \\ (1-m_1)^{N-1}, & \text{if } g(x)_\ell=0. \end{cases}\]For $N=2$, this simplifies to
\[p'(x) = p(x) \cdot \begin{cases} 2-m_1, & \text{if } g(x)_\ell=1, \\ 1-m_1, & \text{if } g(x)_\ell=0. \end{cases}\]Thus, one binary tournament layer boosts every heads-token by the same factor $2-m_1$ and scales every tails-token by $1-m_1$. We can now compose the $m$ exact one-layer maps,
\[p \longrightarrow p^{(1)} \longrightarrow p^{(2)} \longrightarrow \cdots \longrightarrow p^{(m)},\]using a new keyed partition in each layer, and sample the next emitted token once from $p^{(m)}$.
The computational cost is relatively mild at \(O(m\lvert\mathcal V\rvert)\). To put numbers to it, suppose the tokenizer has approximately \(\lvert\mathcal V\rvert=260{,}000\) tokens and we use $m=30$ layers. This requires about $7.8$ million token-layer hash evaluations. As a rough operation-count illustration, treating each hash as eight primitive operations gives approximately $62.4$ million operations. A dense $27$-billion-parameter model needs roughly $54$ billion floating-point operations for one token-level forward pass under the usual two-operations-per-parameter estimate, making the additional count about $0.116\%$. This comparison is only approximate because integer hashing operations and floating-point model operations are not identical, but it gives the right scale.
Derivation of the closed form. The formulas are short, but three distinctions are easy to miss: what $p’$ averages over, why the slot-level head/tail events are independent, and why tokens absent from one candidate sample still receive a value in $p’$.
1. What exactly does $p'$ average over?
Let $G_\ell$ denote the fixed head/tail partition produced by the key, context, and layer. Draw
\[X_1,\ldots,X_N \overset{\mathrm{iid}}{\sim} p,\]and let $W$ be the winner after applying the tournament rule and its uniform tie-breaking. Then
\[\begin{aligned} p'(x) &= \Pr(W=x\mid G_\ell) \\ &= \sum_{(z_1,\ldots,z_N)\in\mathcal V^N} \left(\prod_{i=1}^N p(z_i)\right) \Pr\!\left(W=x\mid X_1=z_1,\ldots,X_N=z_N,G_\ell\right). \end{aligned}\]This sum is the precise meaning of “averaging over all candidate samples.” It includes every ordered $N$-tuple, including tuples with repeated words, weighted by the probability with which that tuple is drawn. The final conditional probability also averages over uniform tie-breaking when several slots are eligible.
This is an exact marginalization, not a Monte Carlo approximation and not an average over keys. For one realized candidate list, a token absent from the list has conditional winning probability zero. Across all possible fresh lists, however, every token with $p(x)>0$ has a chance to appear. The closed-form $p’(x)$ records that overall chance. Thus the transformation reweights every positive-probability token; it does not update only the words that happened to occur in one imagined bracket. Tokens with $p(x)=0$ remain at zero.
For the full $m$-layer tournament, $p^{(m)}(x)$ similarly averages over all possible candidate draws and tie-breaking outcomes in the explicit $N^m$-slot bracket construction, while keeping the key and all layer partitions fixed.
2. Why are the slots' head/tail events independent?
The important order of operations is: first fix $G_\ell$, then draw the candidate slots. Once $G_\ell$ is fixed, $g_\ell(x)$ is just a deterministic label attached to each token. Define
\[Z_i = g_\ell(X_i), \qquad m_1 = \Pr(Z_i=1\mid G_\ell), \qquad 1-m_1 = \Pr(Z_i=0\mid G_\ell).\]The slots $X_1,\ldots,X_N$ are sampled independently with replacement. Applying the fixed function $g_\ell$ to independent slots preserves their independence. Therefore $Z_1,\ldots,Z_N$ are iid Bernoulli variables with heads probability $m_1$, conditional on $G_\ell$. In particular,
\[\Pr(Z_1=0,\ldots,Z_N=0\mid G_\ell)=(1-m_1)^N.\]Sampling with replacement matters. If slot 1 contains a heads-word $w_1$, slot 2 is still a fresh draw from $p$ and may contain $w_1$ again. Therefore
\[\Pr(Z_2=1\mid X_1=w_1,G_\ell)=m_1.\]The expression $m_1-p(w_1)$ would answer a different question: the probability that slot 2 is heads and is not another copy of $w_1$. The tournament has no distinct-word constraint, so subtracting $p(w_1)$ would incorrectly remove the repeated-word outcome.
A small example makes this visible. Suppose $p(A)=0.4$, $p(B)=0.1$, and $p(C)=0.5$, with $A$ and $B$ labeled heads and $C$ labeled tails. Then $m_1=0.5$. For two slots, the head-head outcomes are
\[\Pr(AA)+\Pr(AB)+\Pr(BA)+\Pr(BB) =0.16+0.04+0.04+0.01=0.25=m_1^2.\]The diagonal outcomes $AA$ and $BB$ must be included because repeated tokens occupy separate candidate slots. Conditional on the additional event $X_1=X_2$, the two labels are of course equal. That does not contradict their unconditional independence over the iid slot draws.
There is one further qualification. If we average over random keys before conditioning on $G_\ell$, repeated copies of the same token share the same random hash bit and the indicators need not be independent. The one-layer closed form does not do that. It is derived for a fixed key partition, exactly as used during generation.
3. Derive the heads and tails factors
For readability, write
\[a=m_1, \qquad b=1-a.\]Here $a$ is the total probability mass of heads-tokens and $b$ is the total mass of tails-tokens.
A tails-token. A tails-token $x$ can win only if all $N$ slots are tails. That event has probability $b^N$. Once we are told that a particular slot is tails, but not which tails-token it contains, its conditional distribution is $p$ restricted to the tails subset:
\[\Pr(X_i=x\mid Z_i=0,G_\ell)=\frac{p(x)}{b}.\]When all slots are tails, the rule selects one slot uniformly. Every selected slot has this same conditional distribution, so
\[p'(x)=b^N\frac{p(x)}{b} =p(x)b^{N-1} =p(x)(1-a)^{N-1}.\]A heads-token. At least one heads-slot occurs with probability $1-b^N$. Suppose we reveal only the realized head/tail pattern and learn that it contains $k\ge 1$ heads-slots. We do not reveal the token identities. Each slot labeled heads contains a particular heads-token $x$ with conditional probability
\[\Pr(X_i=x\mid Z_i=1,G_\ell)=\frac{p(x)}{a}.\]Choosing uniformly among the $k$ heads-slots leaves that distribution unchanged:
\[\Pr(W=x\mid Z_1,\ldots,Z_N,G_\ell) =\frac{1}{k}\sum_{i:Z_i=1}\frac{p(x)}{a} =\frac{p(x)}{a}.\]This is true for every nonempty head/tail pattern. Multiplying by the probability that such a pattern occurs gives
\[p'(x)=(1-b^N)\frac{p(x)}{a} =p(x)\frac{1-(1-a)^N}{a}.\]Normalization. The total transformed heads mass is $1-b^N$, while the transformed tails mass is $b^N$:
\[\sum_{x:g_\ell(x)=1}p'(x)=1-b^N, \qquad \sum_{x:g_\ell(x)=0}p'(x)=b^N.\]They sum to one, so no additional normalization is needed. If $a=0$ or $a=1$, all positive probability mass has the same bit and the tournament leaves the distribution unchanged; the formulas extend through the corresponding limiting cases.
Finally, matches within one layer consume disjoint groups of iid input slots and use independent tie-breaking. Their winners are therefore iid draws from $p’$. The next layer is the same calculation with $p’$ as its incoming distribution. Repeating the map $m$ times gives the exact law $p^{(m)}$ of the final survivor. This is why $m$ vocabulary passes can replace explicitly constructing a bracket with $N^m$ sampled candidate slots.
The implementation-level takeaway. The provider does not draw one huge candidate list and then “update the tokens it happened to see.” It computes the exact winner law $p^{(m)}$ over the entire vocabulary and takes one ordinary sample from that law. A token absent from the widget’s current bracket can still have positive probability in the next fresh bracket, and that possibility is already included in $p^{(m)}$.
The mathematics
Nudging the probability distribution
Let us go back to the example above and suppose again that only overcast and gray are labeled heads. In a match with two slots, the probability of emitting overcast goes from $26\%$ to $0.26\,(2-0.48)=0.3952$, i.e., $39.52\%$. Now let us flip every label but leave the model probabilities alone. The heads mass is then $0.52$, and since overcast is now a tails-token, its winning probability drops to $0.26\,(1-0.52)=0.1248$, i.e., $12.48\%$. These two labelings are equally likely in our idealized fair-coin model, and if we average the two winning probabilities we get back exactly $26\%$. Note what we are averaging over here: two different labelings, not more candidate draws under the same labeling. We already averaged over those draws when we computed each winning probability.
In fact, the numbers are not special. For a two-slot match, we can write the two cases of the formula above as one:
\[p'(x)=p(x)(1+g(x)_\ell-m_1).\]When we swap heads and tails, \(g(x)_\ell\) becomes \(1-g(x)_\ell\) and \(m_1\) becomes \(1-m_1\). So whatever we added to the factor $1$ in the first labeling, we subtract in the second. Every labeling has an equally likely complement under the ideal fair-coin construction, so averaging over the labelings recovers $p(x)$ for every token. Note that the winner formula for general $N$ still holds, but this averaging argument is for $N=2$.
For comparison, suppose we run the same bracket but ignore the labels and pick the winning slot in each match by an ordinary fair coin flip. Then the final slot depends only on these flips, not on its token or the key. Every initial slot was drawn from $p$, so the output follows $p$ even if we fix the key. In that case there is nothing for the detector to pick up. In the keyed tournament the odds move for a fixed labeling; it is only after averaging over the labelings that we get back $p$.
Using more layers does not change this conclusion at a fixed prefix. Let $q_\ell$ be the winner distribution after $\ell$ layers, with $q_0=p$. Once we fix the first $\ell-1$ layers, the input to layer $\ell$ is $q_{\ell-1}$. The new labels are independent of the earlier ones in our idealized model, so the average over just that layer gives back $q_{\ell-1}$. Repeating the argument takes us all the way back to $p$.
NB. A fixed prefix and a prefix we have just generated are not quite the same thing. In the latter case, the tokens already generated may tell us something about the key. If the current context window is new, its labels are still fresh in the idealized model. If the window has appeared before, we are looking at the same labels again, and the averaging argument need not work conditional on the text so far. One solution is to sample from the original $p$ on repeated contexts. This is how the binary SynthID-Text construction can preserve the law of a whole response, averaged over keys [DSG+24].
Where does the randomness go?
Let $X$ be the emitted token at our fixed prefix, and let $G$ denote the full table of keyed labels across the tournament layers. We measure uncertainty in bits using Shannon entropy, i.e., $\mathrm H(p)=-\sum_{x:p(x)>0}p(x)\log_2 p(x)$. Without seeing $G$, the token follows $p$, so its entropy is $\mathrm H(p)$. If we know $G$, we are sampling from the particular tilted distribution $q_G$ instead. On average, the amount of uncertainty that remains is $\mathrm H(X\mid G)=\mathbb E_G[\mathrm H(q_G)]$. The difference is exactly the mutual information:
\[\mathrm H(p)=\mathrm H(X\mid G)+I(X;G).\]Put differently, the watermark does not add randomness to the output. It makes some of the uncertainty about the next token explainable by the keyed labels. The effect of an additional layer now follows from the averaging argument: its output distributions average back to the incoming distribution. Since entropy is concave, their average entropy can only go down. Thus, on average, more binary layers leave less uncertainty to the ordinary sampler. This need not hold for each fixed labeling. For example, in a small test I ran with 20,000 tokens whose probabilities were proportional to inverse rank, 30 layers left about $5.05$ of the original $10.13$ bits of sampling entropy. Note that the $5.05$ bits tell us how much choice the sampler still has once the labels are fixed, not whether a reader likes the answer. That is a separate question. The SynthID-Text authors compared user ratings across nearly 20 million watermarked and unwatermarked Gemini responses and did not find a statistically significant difference [DSG+24] though.
OpenAI’s approach: textGrain
So far we have controlled the watermark rather indirectly, by deciding how many rounds of the tournament to run. Now let us ask a slightly different question: if we want to leave, say, $90\%$ of the model’s sampling entropy intact on average, can we design the watermark around that requirement? This is the idea behind textGrain, the method OpenAI describes in [LWC+26]. This is not the prototype Scott Aaronson described in 2022 [A22]. In October 2026, OpenAI announced a rollout for eligible ChatGPT and Codex text in the EU, opt-in for select API models globally, and restricted access to the text detector [OAI26].
A small transport problem
Let us use the same vocabulary as in the tournament widget and group the tokens into two blocks. Put overcast, gray, and windy in block A, with total probability $0.26+0.22+0.12=0.60$. Put the rest in block B, with probability $0.40$. Now add two columns, each chosen with probability $1/2$. If the column tells us nothing about the block, each column gets half of each block’s mass, i.e., $0.30$ from A and $0.20$ from B.
Now move $0.12$ into each diagonal cell and take $0.12$ out of each off-diagonal cell. The row sums are still $0.60$ and $0.40$, and the column sums are still $0.50$ and $0.50$. But if we are told to use the first column, the probability of A is now $0.42/0.50=0.84$. For the second it is $0.18/0.50=0.36$. Averaging over the two columns gives us back $0.60$. We can move the probabilities quite a bit without changing their average, just as in the tournament, but here we can decide how far to move them.
To get back to tokens, we sample within the chosen block in the same proportions as before. For example, overcast accounts for $0.26/0.60$ of block A, whichever column we used. Its probability is therefore $0.84\,(0.26/0.60)=0.364$ in the first column and $0.36\,(0.26/0.60)=0.156$ in the second. Their average is $0.26$. This is why it is enough to preserve the block totals: within a block we are not changing the odds of one token relative to another.
How textGrain chooses the table
In textGrain, the key and the preceding context assign tokens to blocks and give each block-column pair a pseudorandom cost (the negative of a standardized Gumbel draw in the report). We want to put more probability on low-cost pairs, but the row sums must still equal the original block probabilities and the columns must still be equally likely. Choosing a table subject to those two sets of totals is an optimal transport problem. The report denotes the table by $\pi$ and calls it a coupling. The key and context also select a column, which is uniform given the block partition and cost table in the idealized construction. The entries in that column, divided by the column total, are the probabilities with which we sample a block. As before, to apply this averaging argument one step at a time, the column must still be uniform given the text we have already generated. One way to arrange this in the idealized model is to skip watermarking at repeated contexts.
The remaining question is how much mass we are willing to move. Write $B$ for the block of the emitted token and $J$ for the selected column, with distributions $\rho$ and $u$, respectively. The independent table is $\rho\otimes u$. Once we know $B$, knowing $J$ tells us nothing further about which token was chosen within that block. Hence, for a fixed partition and table, the average entropy lost across columns is
\[\mathrm H(p)-\mathrm H(X\mid J)=I(X;J)=I(B;J)=D_{\mathrm{KL}}(\pi\parallel\rho\otimes u).\]The last term is the Kullback–Leibler (KL) divergence. Here it compares each cell’s probability $\pi_{bj}$ to what that same cell would get under independence, $\rho_b u_j$. We take the log of that ratio and average it over the cells of $\pi$. In particular, if all the cells are already at their independent values, this term is zero.
So we minimize the average cost $\sum_{b,j}c_{bj}\pi_{bj}$ over tables with the prescribed row and column sums and with KL divergence at most $\beta\mathrm H(p)$. For example, $\beta=0.10$ allows us to give up at most $10\%$ of the entropy averaged across columns, not necessarily $10\%$ or less in each column. A budget of zero gives the independent table and no signal. At the other extreme, we cannot spend more entropy than there is in the block or column choice. The numerical procedure in [LWC+26] uses Sinkhorn matrix scaling and adjusts the strength of the KL penalty toward the target; having the correct row and column totals does not mean the numerical solver hits the entropy budget exactly.
Probabilistic guarantees
Testing one key
Suppose we are given a passage and the key we want to check. We do not need to ask the original model what it would have said. For the simple SynthID-Text detector, we reconstruct the label of each observed token in each layer and count the heads. Why should that work? In one binary match with heads mass $a$, the winner is heads with probability $1-(1-a)^2=a+a(1-a)$. Ordinary sampling would give us heads with probability $a$. If $a$ is $0$ or $1$, there is no gain. In particular, if only one token is possible, the key cannot change the answer and that position supplies no systematic signal.
Now suppose the passage was produced independently of the key being tested. This is our null hypothesis (to be clear: it does not imply that a human wrote it). In the idealized model, for a fixed passage the observed token in each eligible context has a fair bit in each layer. We score only the first occurrence of each distinct context window, so we do not count the same keyed randomness again. If $T$ is the number of scored positions and $m$ is the number of layers, the head count $S$ under the null is
\[S\sim\operatorname{Binomial}(n,1/2),\qquad n=Tm.\]Thus, if we see $s$ heads, the $p$-value is the chance of getting $s$ or more heads under this null. We can choose a threshold such that this chance is at most $\alpha$. This is the simple unweighted test; the SynthID-Text paper also studies other scoring rules, including weighted and learned scores [DSG+24].
With textGrain, we look up the cost of the observed token’s block in the selected column. This requires the key and tokenized text, but not the model, the transport solution, or the entropy budget. Under the ideal null, the corresponding unstandardized value $Z$ is a standard Gumbel draw. If $F_G$ is its cumulative distribution function, then $1-F_G(Z)$ is uniform on $(0,1)$ and $-\log(1-F_G(Z))$ (with the natural log) is exponential with mean one. So instead of adding fair bits, we add these exponential scores. With $T$ distinct scored contexts, their sum has a Gamma distribution with shape $T$ and scale $1$ under the ideal null [LWC+26]. The direction of the test is the same: a large sum is evidence against the null.
The false-positive rate answers how often unmarked text crosses the threshold. To say how often we miss a watermark, we need to know something about the scores of marked text as well. In the widget below, for the sake of illustration, we pretend that the marked text gives independent bits with a $60\%$ chance of heads, compared with $50\%$ under the null. Move the threshold to the right and fewer unmarked passages get flagged, but more marked passages get missed. The table gives probabilities conditional on the two cases, not the probability that a given flagged passage is marked.
For actual text, the detection rate depends, among other things, on how much choice the model had and how much of the original passage remains. For example, at a target false-positive rate of $1\%$, OpenAI reports detection rates of about $80\%$ for passages of 200 tokens and about $95\%$ at 400 tokens for material such as psychology. The rates were substantially lower for mathematics [OAI26].
What if every account had its own key?
My last point is more of a thought experiment, which might come with certain privacy considerations/concerns. So far we have asked whether a text matches one (provider) key. Now suppose, hypothetically, that every account has its own private key, and we do not know which one to test. If we score all $K$ keys and just return the highest score, we will always name an account, even for text that has no watermark. The first thing we need, then, is permission to say none of the above.
To see how to set a threshold, go back to the binomial example. Write $u(c)=\Pr(S_0\ge c)$, where $S_0\sim\operatorname{Binomial}(n,1/2)$, for the chance that one unrelated key reaches a score of $c$. If the keys are independent and the text is independent of all of them, the probability that none reaches $c$ is $(1-u(c))^K$. So the probability that at least one does is
\[1-(1-u(c))^K.\]For a desired false-positive budget $\alpha$ across all the keys, this gives a per-key tail budget of $1-(1-\alpha)^{1/K}$, which is approximately $\alpha/K$ for small $\alpha$. This is the Šidák correction under independence. We then choose the smallest integer score whose tail fits that budget. Without independence, we can use the union bound (the Bonferroni correction) and require $u(c)\le\alpha/K$, as long as the individual null tails are valid.
Now take $T=300$ distinct scored contexts, $m=30$ layers, and $K=1{,}000{,}000$ keys. There are $n=9{,}000$ bits to score per key. We might think a one-in-a-million cutoff per key is already quite strict. But we are giving a million keys a chance to cross it, so the back-of-the-envelope calculation is $1-e^{-1}\approx63\%$. Using the exact binomial tail gives $62.94\%$. To bring the overall risk below $10^{-10}$, with these same assumptions, we need at least $4{,}891$ heads out of $9{,}000$ for any key we flag; the actual false-positive rate at that integer threshold is about $8.79\times10^{-11}$.
There is a different question when the passage does carry one account’s mark. Suppose we observe that the true key scores $s=5{,}130$ heads, i.e., $57\%$. We now have $K-1$ unrelated scores, and a wrong key strictly beats the true one only if it reaches $s+1$. The probability is therefore $1-(1-u(s+1))^{K-1}$, about $9.61\times10^{-35}$ in this example. If a tie also counts, use $u(s)$ instead; the probability is about $1.28\times10^{-34}$. These numbers are conditional on the true score being that high. They tell us neither how often a marked passage gets to $5{,}130$ in the first place nor how likely it is that a particular account produced a passage given its score.
An account-level watermark would thus ask a materially different question from a provider-level one. Still technically it seems to be in the realm of what could be realistically implemented given the probabilities above. This would then be akin to persistent fingerprinting of an account, potentially creating a digital trace of a user account (with the necessary qualifications) and raising privacy concerns. To be clear, neither Anthropic nor OpenAI describes its current text watermark as identifying individual users [An26] [OAI26]. Nontheless, concerns along these lines are being raised. In 2024, a Brookings report raised the question of whether a watermark also carries information about the user who generated the content, and noted that the voluntary commitments did not rule it out [S24]. The concrete case so far is in images rather than text: in August 2026, a researcher reported that Microsoft Paint embeds a server-issued identifier in the pixels of locally generated images, which Microsoft could join with account records; he did not show that Microsoft uses it for tracking [CN26]. For text, the research has moved in two directions: multi-user watermarks that aim to trace text to individual users or colluding groups [CHS25], and locally differentially private watermarks that bound how much evidence any single text can contribute [HH26]. Note also that a provider does not need the calculation above, because it already holds the key and the account record; but it might enable third-parties.
References
[A22] Aaronson, S. (2022). My AI Safety Lecture for UT Effective Altruism. Shtetl-Optimized. web
[An26] Anthropic. (2026). How Claude’s text watermark works. August 14, 2026. web
[CHS25] Cohen, A., Hoover, A., & Schoenbach, G. (2025). Watermarking Language Models for Many Adaptive Users. IEEE S&P 2025, 2583–2601. doi arxiv
[CN26] Corvin, A.-M. (2026). Microsoft secretly stamps images you generated locally on Copilot+ Windows PC. Cybernews, August 26, 2026. web
[DSG+24] Dathathri, S., See, A., Ghaisas, S., et al. (2024). Scalable watermarking for identifying large language model outputs. Nature, 634, 818–823. doi
[EU24] European Parliament and Council of the European Union. (2024). Regulation (EU) 2024/1689 (Artificial Intelligence Act), Article 50. Official Journal of the European Union. EUR-Lex
[HH26] Han, E. L., & Hashimoto, T. (2026). Reconciling Privacy with Provenance for Language Model Watermarks. arXiv preprint. arxiv
[KGW+23] Kirchenbauer, J., Geiping, J., Wen, Y., Katz, J., Miers, I., & Goldstein, T. (2023). A Watermark for Large Language Models. ICML 2023, PMLR 202, 17061–17084. paper
[LWC+26] Li, X., Wen, G., Chen, X., Long, Q., Jain, A., Joly, F., Lam, M., Song, Q., & Su, W. (2026). textGrain: Entropy-Calibrated Watermarking for Language Model Text. Technical report, October 5, 2026. pdf
[OAI26] OpenAI. (2026). Our approach to EU text provenance rules. October 5, 2026. web
[S24] Srinivasan, S. (2024). Detecting AI fingerprints: A guide to watermarking and beyond. Brookings Institution. web
Comments