Research
Keyrings and TextOrca: a diversity-preserving, distortion-free watermark and a stronger detector, served under speculative decodingDecember 2, 2026
By Mistral
Back to Blog
31 min read
Share this post Copy url to clipboardCopiedThinking
Summary
Keyrings introduces a distortion-free LLM watermarking method using Gumbel-max sampling with secret PRF keys, ensuring undistorted token distributions while maintaining diversity through multiple hidden keyrings and optional Gaussian-copula mixing. Its detector, TextOrca, provides exact conservative p-values via probability-binned weighting, outperforming existing detectors (including TextSeal’s) in detection power without calibration. The system supports speculative decoding, preserves output quality, and is validated with machine-checked proofs, achieving 91–95% detection rates at 0.1% FPR while maintaining near-native diversity and serving efficiency.
Keyrings is a sampling-time watermark for LLM text, and TextOrca is its detector. Each token is drawn with the Gumbel-max trick, using Gumbel noise from a secret PRF keyed on the previous tokens, so every individual step is exactly distributed as the model's next-token law. There is no logit bias and no reweighting.
Keyrings holds L keyrings of m keys and samples one hidden keyring per request, which restores diversity across repeated prompts. As an option, Keyrings can also mix the keyed Gaussian with private noise at correlation ρ (the Gaussian copula of AutoMark, Gloaguen, Staab and Vechev, 2026), which trades a little detection power for more diversity.
TextOrca returns a grounded conservative p-value: a weighted sum of exponentials with a closed-form tail. Nothing in it depends on our sampler, so it also scores TextSeal's per-token scores: on the same TextSeal outputs it detects more watermarked responses than TextSeal's official entropy-weighted detector.
At matched diversity cost on 256-token ML4 outputs and 0.1% FPR target, Keyrings and Keyrings + Copula detect 91–95% of watermarked responses, ahead of comparable SynthID-Text, textGrain, and TextSeal-2 (both official and with TextOrca), and keep that lead on Qwen3.6-27B and Qwen3.5-9B. On served quality and agentic benchmarks we find no significant difference.
The method's guarantees are machine-checked in Lean 4 + Mathlib.

Detection vs. diversity cost (difference of Self-BLEU score compared to non watermarked generation) on ML4 at 256 tokens and FPR 0.1%: Autoregressive (left) and speculative decoding (right). Blue line: Keyrings at m = 8 with dedup on, as L goes 1 → 4 → 16 → 64. Red line: the same sweep with Keyrings + Copula (ρ0.95). Large markers: the three finalists, which sit on these two lines. Grey dots: the other Keyrings / Keyrings + Copula cells (m = 1 or 4, or dedup off). Solid green and olive lines: TextSeal scored with TextOrca; dashed lines with hollow markers: the same TextSeal text scored with TextSeal's official entropy-weighted detector; arrows: what TextOrca adds on the same text. Dotted line: the matched-distortion cut of §7 (+3.3). The x axis is linear up to +3 and logarithmic beyond. Up and to the left is better.
1. What we wanted from a watermark
How could you tell whether a text document is AI-generated, and by which model? Each model can have its own idiosyncratic writing style, but detecting it reliably is challenging. Instead, watermarking subtly embeds statistical signals in a text that are imperceptible to human readers yet detectable with a secret key. Early red-list/green-list watermarks (Kirchenbauer et al., 2023) partition the vocabulary at each step and steer the "green" tokens' logits upward. Watermarked text would then have higher proportions of "green" tokens, but would also bias the generations. A distortion-free watermark takes a different route: it leaves the probabilities pvp_vpv undistorted and instead replaces the sampler's uncontrolled randomness with pseudorandom numbers derived from a secret key and the preceding words. To anyone without the key, those pseudorandom numbers look like ordinary random draws.
Coin-toss intuition. Imagine generating a sequence of fair coin flips, but instead of tossing a physical coin you use a pseudorandom function (PRF) seeded with a secret number kkk that you chose to generate random integers {x1,x2,…}\{x_1, x_2, …\}{x1,x2,…}. We'll set head when xi≡0(mod2)x_i \equiv 0 \pmod{2}xi≡0(mod2) and tail when xi≡1(mod2)x_i \equiv 1 \pmod{2}xi≡1(mod2). The resulting stream of Heads and Tails is statistically indistinguishable from real coin tosses: every flip is still an exact 50/50 draw on average. Yet because you know the seed, you can replay your PRF's stream and recall the sequence of generated flips. You can also compute the exact probability that an ordinary fair coin would produce that match by chance: for example, matching a 12-flip subsequence happens under a fair coin with probability 2−12≈2.4×10−42^{-12} \approx 2.4 \times 10^{-4}2−12≈2.4×10−4 (whereas an unwatermarked coin matches only about half the flips at random).

Seeded coin-toss intuition. Without secret seed kkk, Observed A and Observed B are both indistinguishable 50/50 sequences (8 H, 8 T). With kkk, the 12-flip seeded subsequence stands out with exact null probability 2−12≈2.4×10−42^{-12} \approx 2.4 \times 10^{-4}2−12≈2.4×10−4, whereas an ordinary fair coin matches only half the flips by chance (p=0.60p = 0.60p=0.60).
A production watermark has to satisfy three practical constraints at once:
Preserve quality and diversity. We enforce distortion-free sampling, where every sampled token follows the model's trained distribution rather than a perturbed one to not risk degrading model’s performance. At the same time, repeated responses to the same prompt should stay diverse rather than collapsing to a single completion.
Conservative false-positive control. The detector's p-value must be valid by construction, guaranteeing that non watermarked text is falsely flagged at most at the chosen target rate.
Compatibility with speculative decoding. Modern serving stacks speed up generation by drafting candidate tokens with a smaller/faster model and verifying them in parallel against the target model. A watermark scheme should adapt to speculative decoding without degrading the acceptance rate or the inference speed.
Existing distortion-free watermarks struggle to satisfy all three at once: single-key Gumbel-max watermarks (Aaronson, 2023) collapse diversity across repeated prompts, entropy-weighted detectors (Lee et al., 2024; Lu et al., 2024; Sander et al., 2026) often rely on calibrated thresholds or approximations, and naive integration breaks speculative decoding (Hu and Huang, 2024). In the rest of this post we describe Keyrings, which restores diversity via banks of hidden keys (and optionally Gaussian-copula mixing); TextOrca, an exact closed-form probability-binned detector that avoids calibration and also boosts existing TextSeal outputs; and a shared-noise speculative decoding relay backed by machine-checked Lean 4 proofs.
2. Sampling with the Gumbel-max trick
One clean way to sample from a token prediction distribution ppp (categorical over the token vocabulary set V\mathcal{V}V) using per-token noise is the Gumbel-max trick (Maddison, Tarlow and Minka, 2014): draw an independent uniform variable Uv∼Uniform(0,1)U_v \sim \mathrm{Uniform}(0, 1)Uv∼Uniform(0,1) for every candidate token v∈Vv \in \mathcal{V}v∈V, transform it into standard Gumbel noise Gv=−log−logUvG_v = -\log-\log U_vGv=−log−logUv and pick
v⋆=argmaxv (logpv+Gv).v^\star = \arg\max_v \; \bigl(\log p_v + G_v\bigr) .v⋆=argvmax(logpv+Gv).By the Gumbel-max identity, Pr[v⋆=v]=pv\Pr[v^\star = v] = p_vPr[v⋆=v]=pv exactly.
Keyed Gumbel-max watermarking (Aaronson, 2023; Kuditipudi et al., 2024) generalizes the coin-toss intuition to an LLM's next-token distribution ppp. Instead of one random bit per flip, the uniform values Uv∈(0,1)U_v \in (0, 1)Uv∈(0,1) (and therefore the Gumbel noises Gv=−log−logUvG_v = -\log -\log U_vGv=−log−logUv) come from a pseudorandom function PRFk(c,v)\mathrm{PRF}{k}(c, v)PRFk(c,v) seeded with a secret key kkk and evaluated on a context window ccc of the preceding few tokens and each candidate token vvv. Because the pseudorandom draws follow the same marginal distribution as fresh noise, each step still samples from ppp without distortion (Aaronson, 2023; Kuditipudi et al., 2024), while a key holder can recompute Uv⋆U{v^\star}Uv⋆ for the chosen tokens and observe that they tend to be unusually large. Over many tokens, those small hints add up into a decisive, closed-form p-value (§5).

One keyed Gumbel-max step after "the cat sat". Each candidate token vvv receives a keyed uniform draw UvU_vUv and Gumbel noise Gv=−log(−logUv)G_v = -\log(-\log U_v)Gv=−log(−logUv); adding GvG_vGv to logpv\log p_vlogpv lets "by" (U=0.89U = 0.89U=0.89, G=+2.15G = +2.15G=+2.15) overtake "on" while preserving the exact probabilities pvp_vpv across fresh keys.
3. Keyrings
We introduce Keyrings, Mistral's watermarking sampler. It builds on the keyed Gumbel-max sampler of §2 with the following design:
LLL keyrings of mmm content keys
We store a hidden table of LLL banks (keyrings) of mmm keys. Each request draws one keyring index ℓ∈[L]\ell \in [L]ℓ∈[L] uniformly at random. For keyring (k(ℓ)1,…,k(ℓ)m)(k^{(\ell)}{1}, \dots, k^{(\ell)}{m})(k(ℓ)1,…,k(ℓ)m), at step ttt with a watermarking context window ctc_tct, a routing key kRk_RkR picks one of the mmm content keys:
Jt=PRF(1)kR(ct)∈[m],Ut(v)=PRF(2)kJt(ℓ)(ct,v)∈(0,1).J_t = \mathrm{PRF}^{(1)}{k_R}(c_t) \in [m], \qquad U_t(v) = \mathrm{PRF}^{(2)}{k_{J_t}^{(\ell)}}(c_t, v) \in (0, 1).Jt=PRF(1)kR(ct)∈[m],Ut(v)=PRF(2)kJt(ℓ)(ct,v)∈(0,1).The LLL keyrings are what buy diversity: two requests for the same prompt usually draw different keyrings, hence different Gumbel noise and different continuations. The number of content keys mmm barely changes diversity or detection (figure below), and opens an optional public/private detection split discussed in Appendix A.1.
Two practical safeguards complete the sampler (see Appendix A.1). First, a short bootstrap buffer samples the first few (here 3) response tokens without watermarking so repeated requests can diverge from the start. Second, standard context deduplication skips watermarking whenever a context window ccc repeats within the same response, preventing repetition loops and ensuring that the whole sequence (not just each individual step) follows the model's exact law (machine-checked in Lean 4).

One keyed sampling step with Keyrings. The hidden keyring ℓ\ellℓ and the route JtJ_tJt select a content key; the PRF of that key and the 3-token context window produces Gumbel noise GvG_vGv for every candidate token, which combines with logpv\log p_vlogpv to draw an exact sample from ppp. (See Appendix A.1 for the token-level timeline of the bootstrap buffer and context deduplication.)
To measure how much a watermark reduces response diversity across repeated draws of the same prompt, we report Self-BLEU (Zhu et al., 2018): the average pairwise n-gram overlap among independent generations for the same prompt (100 prompts × 10 draws × 3 key banks, scored on the first 256 tokens; higher means more repetitive). We subtract the unwatermarked model's own Self-BLEU to get ΔSelf-BLEU (written ΔSB@256 in §7): 0 means identical diversity to the unwatermarked model, and positive values measure the diversity cost.

Diversity and detection vs. the number of keyrings L (Keyrings, ML4, AR, 256 tokens, FPR 0.1%). Left: ΔSelf-BLEU (watermarked minus unwatermarked Self-BLEU; lower is more diverse); the dotted line is the matched-distortion cut of §7. Right: TPR. L drives diversity and m barely matters. A larger L costs some detection power, partly through the Bonferroni correction of §5. Dedup OFF detects slightly more but is less diverse and loses the whole-sequence guarantee.
4. Option: Keyrings + Copula for more diversity
Keyrings is deterministic given (keyring, context window). Whenever two requests for the same prompt happen to draw the same keyring (probability 1/L1/L1/L) and hit the same watermarking context window, they receive identical Gumbel noise and produce the same next token. This still creates residual repetition unless LLL is raised, at a cost for the detection (§5). As an option, written Keyrings + Copula, following AutoMark (Gloaguen, Staab and Vechev, 2026), we weaken the keyed noise by mixing it with independent private noise so that even colliding requests can diverge without increasing LLL. Specifically, with Φ\PhiΦ the standard normal cumulative distribution function (CDF) and Φ−1\Phi^{-1}Φ−1 its inverse, we represent the keyed PRF output as a standard normal zzz (mapping each keyed 24-bit coordinate xxx via z=Φ−1((x+0.5)/224)z = \Phi^{-1}((x + 0.5)/2^{24})z=Φ−1((x+0.5)/224)) and mix it with an independent private standard normal ε\varepsilonε at correlation ρ∈(0,1]\rho \in (0, 1]ρ∈(0,1]:
n=ρ z+1−ρ2 ε,G=−log(−logΦ(n)).n = \rho\, z + \sqrt{1-\rho^2}\, \varepsilon, \qquad G = -\log\bigl(-\log \Phi(n)\bigr).n=ρz+1−ρ2ε,G=−log(−logΦ(n)).The mix of independent Gaussians is again N(0,1)\mathcal N(0,1)N(0,1), so Φ(n)\Phi(n)Φ(n) is uniform, GGG is still a standard Gumbel, and every step is still exactly distributed. At ρ=1ρ = 1ρ=1 we recover plain Keyrings. With ρ < 1, two runs of the same prompt no longer share their noise, so diversity goes up. Detection still works because nnn stays strongly correlated with the keyed zzz. Two of our three finalists use this option at ρ=0.95ρ = 0.95ρ=0.95, with m=8m = 8m=8 and L∈{4,16}L \in \{4, 16\}L∈{4,16}; §7 calls them "Keyrings + Copula m8/L4" and "Keyrings + Copula m8/L16".
5. TextOrca: detection with a conservative, closed-form p-value
Per-token Aaronson scores (standard). Following Aaronson (2023), given a candidate text and a keyring (k(ℓ)1,…,k(ℓ)m)(k^{(\ell)}{1}, \dots, k^{(\ell)}{m})(k(ℓ)1,…,k(ℓ)m), the detector recomputes the routed content-key index Jt∈[m]J_t \in [m]Jt∈[m] and keyed uniform Ut∈[0,1]U_t \in [0,1]Ut∈[0,1] for each observed token vtv_tvt from its preceding 3-token context window ctc_tct, and maps UtU_tUt to the per-token Aaronson score:
st=−log(1−Ut),s_t = -\log(1 - U_t) ,st=−log(1−Ut),and forms a weighted sum Rℓ=∑twtst,ℓR_\ell = \sum_t w_t s_{t,\ell}Rℓ=∑twtst,ℓ across the deduplicated tokens after the bootstrap buffer.
Why this score. Gumbel-max favours tokens with large noise, so the chosen token's UUU is pushed towards 1. If the model gave the chosen token probability ppp, its UUU follows a Beta(1/p,1)\mathrm{Beta}(1/p, 1)Beta(1/p,1) distribution, i.e. Pr[U≤u]=u1/p\Pr[U \le u] = u^{1/p}Pr[U≤u]=u1/p. Mapping UUU to the per-token score s=−log(1−U)s = -\log(1-U)s=−log(1−U) turns "UUU close to 1" into a large positive number, and gives sss a simple distribution under each hypothesis:
No watermark (null). If the text was not generated with this key, the observed token does not depend on the key's noise, so its UUU is uniform on (0,1)(0,1)(0,1) and its score s=−log(1−U)∼Exp(1)s = -\log(1-U) \sim \mathrm{Exp}(1)s=−log(1−U)∼Exp(1), with mean 1. This holds whoever or whatever wrote the text, which is why the p-value below needs no calibration.
Watermarked. E[s]=H1/p=ψ(1/p+1)+γ\mathbb E[s] = H_{1/p} = \psi(1/p+1) + \gammaE[s]=H1/p=ψ(1/p+1)+γ, the harmonic number at 1/p1/p1/p, where ψ(x)=Γ′(x)/Γ(x)\psi(x) = \Gamma'(x)/\Gamma(x)ψ(x)=Γ′(x)/Γ(x) is the digamma function and γ≈0.5772\gamma \approx 0.5772γ≈0.5772 is the Euler–Mascheroni constant. Each token adds H1/p−1H_{1/p} - 1H1/p−1 of expected evidence over the null: a lot when the model was uncertain (ppp small), and nothing as p→1p \to 1p→1. Near-forced tokens carry no evidence and only add noise to the sum.

Illustrative, analytic (not measured). (a) Density of the chosen token's score s for several p, against the Exp(1) null. (b) Expected evidence per token, H(1/p) − 1, which vanishes as p → 1. (c) The five fixed detector weights, which follow (b): full weight on uncertain tokens, zero on near-forced ones.
TextOrca is our response-only detector built on top of those standard per-token scores: it turns them into a conservative and grounded p-value for a candidate text and each keyring ℓ\ellℓ without fitting any empirical threshold. It needs only the response text, a generator-compatible tokenizer, the verification keys, and a response-only proxy model computing p^t=Pproxy(vt∣v<t)\widehat p_t = P_{\mathrm{proxy}}(v_t \mid v_{<t})pt=Pproxy(vt∣v<t). It never needs the original prompt, the generator's true probabilities ptp_tpt, the hidden keyring index, Keyrings + Copula's private noise ε\varepsilonε, or any speculative-decoding trace: on Keyrings + Copula outputs, TextOrca simply scores the original keyed coordinate UtU_tUt. The private noise changes detection power, not the detector's formula or null law.
Probability-stratified weighting in five discrete bins. As panel (b) shows, a token's expected watermark evidence H1/p−1H_{1/p} - 1H1/p−1 depends directly on the observed token's probability ppp: a surprising token (ppp small) carries strong signal even inside a moderately peaked distribution, whereas a near-forced token (p→1p \to 1p→1) contributes almost no signal while still adding full Exp(1)\mathrm{Exp}(1)Exp(1) variance to the sum. TextOrca uses only p^t\widehat p_tpt to partition retained tokens into five preset bins Ib:[0,0.5), [0.5,0.7), [0.7,0.9), [0.9,0.99), [0.99,1)I_b:[0,0.5),\; [0.5,0.7),\; [0.7,0.9),\; [0.9,0.99),\; [0.99,1)Ib:[0,0.5),[0.5,0.7),[0.7,0.9),[0.9,0.99),[0.99,1); and fixed empirical weights w=(1, 0.4, 0.2, 0.03, 0)w = (1,\; 0.4,\; 0.2,\; 0.03,\; 0)w=(1,0.4,0.2,0.03,0) (panel (c)). If no proxy model is available, a model-free fallback (routed-aaronson) uses unit weights on all retained tokens.
Computing the score and p-value. After skipping the bootstrap buffer (§3), TextOrca retains only the first occurrence of each visible (window, token) pair (the same window followed by a different token is a distinct query) and maps each 24-bit integer output c∈{0,…,224−1}c \in \{0, \dots, 2^{24}-1\}c∈{0,…,224−1} of the PRF to the bottom of its bin on [0,1)[0, 1)[0,1), U=c/224U = c / 2^{24}U=c/224 (rather than the midpoint (c+0.5)/224(c + 0.5)/2^{24}(c+0.5)/224 used during sampling), so the resulting score st=−log(1−Ut)s_t = -\log(1 - U_t)st=−log(1−Ut) is strictly bounded above by a continuous Exp(1)\mathrm{Exp}(1)Exp(1) draw and the p-value never underestimates the false-positive rate due to discretization. Grouping tokens by their weight bin reduces the weighted statistic to at most four active subtotals (empty and zero-weight bins drop out). For candidate keyring ℓ\ellℓ, let nb=∣Ib∣n_b = |I_b|nb=∣Ib∣ be the retained token count in bin bbb and Sb,ℓ=∑t∈Ibst,ℓS_{b,\ell} = \sum_{t \in I_b} s_{t,\ell}Sb,ℓ=∑t∈Ibst,ℓ its evidence sum, the sum of nbn_bnb per-token scores. The TextOrca–Raw-five statistic RℓR_\ellRℓ and its per-keyring reference p-value qℓq_\ellqℓ are:
With at most four active positive weights, ∑bwbGb\sum_b w_b G_b∑bwbGb is a sum of independent scaled-Erlang variables whose exact survival function has a closed-form expression. Finally, because the detector does not know which of the LLL hidden keyrings generated the text, it evaluates all LLL keyrings and applies a Bonferroni correction (Bonferroni, 1936; Dunn, 1961):
pOrca=min (1, Lminℓ∈{1,…,L}qℓ).p_{\mathrm{Orca}} = \min\!\left(1,\; L \min_{\ell \in \{1,\dots,L\}} q_\ell\right).pOrca=min(1,Lℓ∈{1,…,L}minqℓ).For single-field baselines such as TextSeal, L=1L = 1L=1 so no keyring factor applies; any additional search across detectors, text windows, or protocol versions must enter the correction too.
Where the exact null distribution comes from. To see why pOrcap_{\mathrm{Orca}}pOrca is valid under the null, hold an unwatermarked response and its proxy probabilities p^t\widehat p_tpt fixed: neither depends on the secret keys. Under the ideal random-function model, the keyed PRF acts like a random lookup table where every distinct query (window, token) receives an independent uniform draw and repeating the exact same query returns the same number. Deduplicating visible (window, token) pairs ensures the same lookup entry is never counted twice, so the retained scores are independent Exp(1)\mathrm{Exp}(1)Exp(1) draws (and rounding each 24-bit integer down to U=c/224U = c/2^{24}U=c/224 makes st=−log(1−Ut)s_t = -\log(1-U_t)st=−log(1−Ut) slightly smaller than a continuous Exp(1)\mathrm{Exp}(1)Exp(1) variable, so discretization can only make the p-value more conservative). Because the sum of nbn_bnb independent Exp(1)\mathrm{Exp}(1)Exp(1) draws is Gamma(nb,1)\mathrm{Gamma}(n_b, 1)Gamma(nb,1), qℓq_\ellqℓ is exact for each keyring ℓ\ellℓ, and the union bound Prnull(pOrca≤α)≤∑ℓ=1LPrnull(qℓ≤α/L)≤α\Pr_{\mathrm{null}}(p_{\mathrm{Orca}} \le \alpha) \le \sum_{\ell=1}^{L} \Pr_{\mathrm{null}}(q_\ell \le \alpha / L) \le \alphaPrnull(pOrca≤α)≤∑ℓ=1LPrnull(qℓ≤α/L)≤α requires no independence assumption across keyrings — while explaining the detection price of raising LLL.
TextOrca on TextSeal. The weights and the exact tail do not depend on our sampler, so TextOrca also applies to TextSeal's own per-token scores. On the same TextSeal outputs it detects more than TextSeal's official entropy-weighted detector in 17 of 18 ML4 settings (the sole exception is AR TextSeal-1 α0.1: 89.6% vs 89.9%) and more than its unweighted detector in 18 of 18 (35 of 36 total). The figure below and the frontier figure at the top of the post score the same TextSeal outputs both ways.

Same TextSeal-1 and TextSeal-2 outputs on ML4 (256 tokens, FPR 0.1%), scored by TextOrca (y axis) vs. TextSeal's own official entropy-weighted detector (left panel) and TextSeal's unweighted detector (right panel). Green: AR; purple: speculative decoding. Above the dotted diagonal, TextOrca detects more on the exact same text (17/18 vs. entropy-weighted; 18/18 vs. unweighted).
6. Speculative decoding
Speculative decoding (Leviathan, Kalman and Matias, 2023) accelerates LLM serving by proposing a block of candidate tokens with a fast draft model qqq and verifying them in parallel against the target model ppp, accepting tokens whose draft and target distributions align so that the emitted stream still follows ppp exactly. Integrating a distortion-free watermark into this loop is non-trivial: if the drafter and target use independent randomness (or only the target is watermarked), the two models disagree far more often, either collapsing speculative acceptance or distorting the verified target distribution (Hu and Huang, 2024).
Following TextSeal-2 (Sander, Fernandez et al., 2026), we resolve this with a shared-noise Gumbel-max relay. Both the drafter and the target draw from the same keyed Gumbel noise field GvG_vGv: wherever qqq and ppp assign similar probabilities, sharing GvG_vGv aligns their Gumbel-max winners, keeping draft acceptance at the unwatermarked level while naturally carrying the watermark signal into accepted tokens. Whenever the target rejects a draft step, our relay resolves the residual choice with block verification (Sun et al., 2024) in a single Gumbel-max draw over the leftover keyed noise, so every emitted token still follows the target model's exact law and retains the watermark.

Watermarked speculative decoding (shared-noise Gumbel-max relay, following TextSeal-2). Step 1: the draft model qqq proposes tokens using the keyed Gumbel noise GvG_vGv. Step 2: the target model ppp scores the draft in parallel and computes lossless verification probabilities over where to stop and which residual token to emit. Step 3: a single residual Gumbel-max draw on the leftover keyed noise picks the accepted prefix and bonus token, preserving both the exact target-model law and the watermark signal.
7. Results
We evaluate on three models: ML4 (FP8) under plain autoregressive decoding (AR) and DSpark speculative decoding, Qwen3.6-27B and Qwen3.5-9B (AR and speculative decoding with their native MTP draft heads). TPR is the share of watermarked responses detected (%), and diversity cost is measured by ΔSB@256 (watermarked Self-BLEU@256 − control Self-BLEU@256 across 10 independent draws per prompt; 000 is zero diversity loss).
Where the data come from. All detection, diversity, robustness, and reasoning-placement experiments generate responses to English prompts from the ELI5 question-answering corpus (sentence-transformers/eli5 pairs for ML4; a fresh draw from the same source for Qwen3.6-27B and Qwen3.5-9B). Detection is measured on 1,000 prompts × 3 independent key banks per setting against 1,000 shared unwatermarked control responses; repeated-prompt diversity (ΔSB@256) uses a separate cohort of 100 prompts × 10 independent draws × 3 key banks; and null false-positive audits score 100 independent unscreened key banks against 11,000 unwatermarked controls per bank. Served quality is evaluated on standard public benchmarks (GPQA, MMLU-Pro, HealthBench Professional, IFEval) and agentic suites (Terminal-Bench 4, DeepSWE v1.1, BrowseComp), and serving throughput is measured on 512 fixed prompts streamed to 512 and 2,048 output tokens.
Because TextOrca improves detection on TextSeal text too (35 of 36 ML4 settings vs. TextSeal's official detectors), we report TextSeal scored with TextOrca ("TextSeal-2 + TextOrca") alongside the published system ("TextSeal-2 (official)").
7.1 Detection vs. diversity across models and speculative decoding
The six-panel frontier below plots 256-token TPR (FPR 0.1%) vs. ΔSB@256 across all three models in both autoregressive (left) and speculative decoding (right). Raising LLL lowers ΔSB@256 at a small TPR cost, and adding the Copula option pushes the frontier outward at every diversity budget; detailed numerical tables for Qwen3.6-27B and Qwen3.5-9B (including 128- and 400-token rows) appear in Appendix A.5.

Detection (TPR at 256 tokens, nominal FPR 0.1%) vs. diversity cost (ΔSB@256) across all six model × decoding cohorts: ML4 (top), Qwen3.6-27B (middle), and Qwen3.5-9B (bottom), under autoregressive decoding (left) and speculative decoding (right). Blue line: Keyrings (m=8m = 8m=8, dedup ON, L=1→4→16→64L = 1 \to 4 \to 16 \to 64L=1→4→16→64); red line: Keyrings + Copula (ρ=0.95\rho = 0.95ρ=0.95, m=8m = 8m=8, dedup ON); large markers: the three ML4-frozen finalists with 95% CIs; solid vs. dashed green/olive lines: TextSeal + TextOrca vs. TextSeal's official detector. Dotted line: each cohort's matched-distortion cut. Up and to the left is better.
ML4 (AR and DSpark). On AR (control Self-BLEU@256 = 20.0), the finalists reach 94.2% (+1.9, Keyrings m8/L16), 95.1% (+1.9, Keyrings + Copula m8/L4), and 91.3% (+0.3, Keyrings + Copula m8/L16). At matched distortion (ΔSB ≤ +3.3), they beat TextSeal-2 + TextOrca ρ0.6 (62.3% at +1.2; 43.3% official) by 29–33 points, SynthID-Text d5 (55.9% at +3.3) by 36–39, and textGrain β0.25 (51.0% at +1.8) by 40–44 (all paired bootstrap 95% CIs exclude 0). Against TextSeal-2 + TextOrca ρ0.8 (89.5% at +3.1; 74.2% official), Keyrings m8/L16 (+4.7 [+0.6, +9.7]) and Keyrings + Copula m8/L4 (+5.6 [+2.2, +9.6]) lead significantly, while Keyrings + Copula m8/L16 (+1.8 [−1.9, +6.0]) ties at one-tenth the distortion (+0.3 vs. +3.1). TextSeal-2 + TextOrca matches the finalists only at ρ0.9 (95.8% at ΔSB +5.6) and exceeds them only at ρ0.95 (by 2.5–6.3 points at ΔSB +8.8). Under DSpark speculative decoding, the finalists keep their ordering (88.4% / 90.3% / 83.8%); SynthID-Text drops to ≤ 19.5% with its binomial detector (≤ 27.0% with weighted-mean or trained Bayesian detectors — we have not diagnosed why).
Out-of-sample transfer (Qwen3.6-27B and Qwen3.5-9B). The finalists were frozen on ML4 on 2026-11-24 and run unchanged on both Qwen models, while competitor strengths were tuned per model (conservative in competitors' favor). Qwen3.6-27B has lower entropy (control Self-BLEU 42.3), so every scheme needs longer text; at 256 / 400 tokens on AR the finalists reach 24.4–33.2% / 63.0–72.2% (20.6–28.7% at 256 on MTP), detecting 2.2–3.8× as much as TextSeal-2 + TextOrca ρ0.6, SynthID-Text d5, and textGrain β0.25 at 256 tokens (1.9–2.6× at 400). On the higher-entropy Qwen3.5-9B, the finalists reach 92.2–95.8% on AR and 88.8–93.9% on MTP (costing only 1.6–3.4 points for speculation, vs. SynthID's drop from 87.9% to 41.8% at its strongest setting), leading matched TextSeal-2 + TextOrca ρ0.6 by 24–31 points (28–35 over official) and textGrain β0.1 / SynthID d5 MTP by 75–82 points. In Holm-corrected paired bootstraps across both Qwen models, no finalist trails any matched competitor at any length, and every finalist beats every matched competitor at 256 and 400 tokens except one cell (Keyrings + Copula m8/L16 vs. TextSeal-2 + TextOrca ρ0.6 on 27B MTP: +10.6 [+3.5, +16.6], which does not survive Holm).

TPR at FPR 0.1% vs. the number of tokens scored (100 to 400), ML4, AR (left) and speculative decoding (right), with 95% CIs. The legend gives each setting's ΔSB@256 (AR / speculative).
7.2 False-positive control across 100 unscreened key banks
We audited 100 independent null key banks per setting on ML4 (11,000 control responses per bank at 256 tokens) and Qwen3.5-9B, with no key screening:
Nominal mean FPR. No finalist shows a significant mean-FPR excess at any length on ML4 or Qwen3.5-9B. On ML4 AR at 256 tokens (0.1% target), Keyrings / Keyrings + Copula m8/L16 averages 0.098% (median 0.091%, p95 0.164%, max 0.200%; DSpark max 0.236%) and Keyrings + Copula m8/L4 averages 0.104% (median 0.086%, p95 0.209%, max 0.300%; DSpark max 0.336%). At 200–400 tokens, 4–7% of keys show a significant per-key excess, matching the binomial null rate.
Per-bank spread vs. heavy tails. TextSeal-2's official entropy-weighted detector has a heavy right tail: mean 0.163%, median 0.082%, p95 0.273%, and worst bank 5.34% on AR (5.28% on DSpark) at a 0.1% target. Scoring the exact same TextSeal-2 banks with TextOrca trims the worst bank to 1.50% (mean 0.114%). On a single fixed corpus of 10,000 controls, 26–29% of 100 unscreened Keyrings banks (m∈{1,4,8}m \in \{1,4,8\}m∈{1,4,8}, L4, 256 tokens) measure above 0.1%, 10–12% above 0.2%, and 1–3% above 0.5% — finite-corpus variance around a nominal bank-averaged mean, not a population of bad keys. On Qwen3.5-9B, finalist means are 0.095–0.151% (no significant excess), whereas one audit key inflates native SynthID's MTP null rate (0.19% at 100 tokens).

Distribution of false-positive rates across 100 independent key banks at a 0.1% nominal target (ML4, AR, 256 tokens, 11,000 control responses per bank). Each dot is one bank; diamonds show the mean. Keyrings and Keyrings + Copula with the same m and L share a detector and cluster tightly around the 0.1% target (dashed line), whereas TextSeal-2's official entropy detector exhibits a heavy right tail reaching 5.34%.
7.3 Quality and serving cost (ML4, T=1.0T = 1.0T=1.0)
Served benchmarks. On standard reasoning, knowledge, instruction-following, and domain benchmarks, every 95% paired bootstrap CI includes 0 and every Holm-adjusted ppp is 1.01.01.0 (9 comparisons across GPQA, MMLU-Pro, HealthBench; 6 across IFEval) as expected for a sampler with the exact model law per step:
Task (n) | Control | Keyrings m8/L16 | Keyrings + Copula m8/L4 | Keyrings + Copula m8/L16 |
|---|---|---|---|---|
GPQA (198) | 83.3 | −0.5 [−3.5, +2.5] | −1.5 [−5.1, +1.5] | −2.0 [−5.1, +1.0] |
MMLU-Pro (1196) | 86.0 | −0.3 [−1.4, +0.9] | −0.4 [−1.6, +0.8] | +0.0 [−1.2, +1.1] |
HealthBench Professional (525) | 52.9 | +0.5 [−2.8, +3.8] | −1.5 [−5.2, +2.2] | +0.1 [−3.0, +3.4] |
IFEval loose (541) | 91.4 | −0.7 [−2.2, +0.8] | −0.1 [−1.4, +1.1] | −0.8 [−2.3, +0.7] |
IFEval strict (541) | 88.0 | −0.4 [−2.2, +1.5] | +0.4 [−1.3, +2.0] | −0.4 [−2.2, +1.5] |
Agentic benchmarks. On the same engine at 131k context, we evaluated a pre-registered 24-task non-GPU subset of Terminal-Bench 4 (3 samples each), full DeepSWE v1.1 (113 tasks × 3), and BrowseComp rows 0–199 (context overflows scored 0; Holm over 9 comparisons):
Task (n) | Control | Keyrings m8/L16 | Keyrings + Copula m8/L4 | Keyrings + Copula m8/L16 |
|---|---|---|---|---|
TB4 pass@1 (24 × 3) | 23.6 | +2.8 [−4.2, +9.7] | −6.9 [−15.3, +1.4] | −8.3 [−18.1, 0.0] |
DeepSWE pass@1 (113 × 3) | 61.7 | −0.6 [−5.6, +4.4] | −3.8 [−9.1, +1.2] | −2.7 [−7.7, +2.7] |
BrowseComp (200) | 80.0 | +0.5 [−5.0, +6.0] | +2.0 [−2.5, +7.0] | −1.5 [−7.0, +4.0] |
Every Holm-adjusted ppp is 1.01.01.0, so there is no significant difference at this power. That is weaker than ruling out degradation: CI half-widths are 5–9 points. Keyrings stays within ±3\pm 3±3 points, whereas both Keyrings + Copula arms sit below control on TB4 (−6.9, −8.3; the m8/L16 CI ends at 0.0, permutation p=0.16p = 0.16p=0.16) and DeepSWE (−3.8, −2.7); these runs cannot separate a 3–8 point Keyrings + Copula cost from noise. Pass@3 and dropping unscored BrowseComp rows do not change this conclusion. Disclosures: the serving proxy disconnected 22 times and the harness retried those TB4/DeepSWE attempts (0 control vs. 3–8 of 339 per watermark arm on DeepSWE, passing at roughly the arm rate); context overflows left 6 / 1 / 4 / 4 BrowseComp rows unscored (control / Keyrings / Keyrings + Copula m8/L4 / m8/L16), which counts against control.
Serving and detection cost. On production served engines (ML4 on 8×B200, TP8, FP8 KV cache, 512 fixed prompts, 512 and 2048 streamed output tokens, 4–5 randomized blocks per cell, measured against stock vLLM; competitors at strong settings TextSeal-2 ρ0.95, SynthID d30, textGrain β0.9/β1):
Output tok/s per GPU vs. stock vLLM | concurrency 1 | engine maximum |
|---|---|---|
Keyrings / Keyrings + Copula, AR | 0.90× | 0.82× (256 concurrent) |
TextSeal-2 ρ0.95, AR | 0.89× | 0.16× |
SynthID d30, AR | 0.66× | 0.40× (16 concurrent) |
textGrain β0.9 / β1, AR | 0.52× / 0.31× | 0.21× / 0.17× (16 concurrent) |
Keyrings / Keyrings + Copula, relay (DSpark) | 0.74–0.76× | 0.33× (160 concurrent) |
TextSeal-2 ρ0.95, DSpark | 0.56× | 0.10× |

Output throughput per GPU relative to stock vLLM vs. concurrency, ML4 on 8×B200: AR (left) and speculative decoding (right). On the right, the watermark arms sit on the relay engine without watermark: the gap to stock speculative decoding is the relay engine, not the watermark.
Keyrings and Keyrings + Copula deliver substantially higher serving throughput than every competing watermark on both AR and speculative decoding. On AR at engine maximum concurrency, they sustain 0.82× stock vLLM throughput (0.90× at concurrency 1) — more than 5× faster than TextSeal-2 (0.16×), 2× faster than SynthID-Text (0.40×), and 4× faster than textGrain (0.17–0.21×); relative to their own unwatermarked engine, watermarking itself costs only 3.5–4.9% at concurrency 1–16 and 13–17% at max concurrency, with all three finalists indistinguishable. On DSpark speculative decoding, Keyrings and Keyrings + Copula sustain 0.74–0.76× stock throughput at concurrency 1 and 0.33× at concurrency 160 — over 3× faster than TextSeal-2 at max concurrency (0.10×) and already faster than AR Keyrings up to concurrency 8. Crucially, inside our relay engine the watermark itself adds zero overhead (1.00× vs. the unwatermarked relay control) and leaves the speculative draft-token acceptance rate unchanged: 0.449 for Keyrings and 0.448–0.453 for Keyrings + Copula, vs. 0.452 for the unwatermarked relay control and 0.444 for stock vLLM DSpark speculative decoding. The remaining gap to stock speculative decoding is an engineering limitation of the relay engine itself (including a 30% smaller KV cache pool), not a cost of watermarking. Detection at 400 tokens takes 6–12 ms of CPU per response plus 0.23 GPU-seconds for the batched proxy pass (upper bound), versus 1.4–4.6 ms model-free for SynthID/textGrain and 90 ms plus proxy pass for TextSeal-2's official detector; the model-free routed detector requires no GPU.
8. Conclusion
Keyrings and TextOrca show that distortion-free watermarking can preserve output diversity, deliver strong nominal-FPR detection across autoregressive and speculative decoding, and run at practical serving cost without tuning per model. By splitting randomness across LLL per-response keyrings of mmm context-routed keys with an optional Gaussian copula mix, Keyrings avoids the diversity collapse of single-key Gumbel-max sampling while keeping exact per-step distribution preservation. Pairing it with TextOrca's probability-binned weights and exact null tail lifts detection across both Keyrings and TextSeal while eliminating the heavy false-positive tails seen in entropy-weighted detectors. Taken together, these pieces give a concrete, verifiable path to deploying distortion-free watermarking on modern reasoning and speculatively served models.
Related work
Keyrings builds on distortion-free Gumbel-max watermarking introduced by Aaronson (2023) and Kuditipudi et al. (2024), who mitigate repetition via random shifts over a key sequence, as well as GumbelSoft (Fu et al., 2024), which relaxes Gumbel-max determinism to restore diversity. To preserve exact single-step distributions while fostering diversity, TextSeal (Sander et al., 2026) introduces dual-key Gumbel-max generation and TextSeal-2 (Sander, Fernandez et al., 2026) merges multiple keys together while mixing keyed scores with fresh noise via a Gaussian copula (also used by AutoMark; Gloaguen, Staab, and Vechev, 2026). Keyrings complements these designs by routing tokens across mmm keys inside LLL hidden per-response keyrings with an exact Bonferroni-corrected test, and optionnally supports Gaussian copula mixing. Alternative distortion-free families include tournament sampling in SynthID-Text (Dathathri et al., 2024) and entropy-calibrated watermarking in textGrain (Li et al., 2026).
On the detection and serving sides, TextOrca relates to entropy-aware detectors such as SWEET (Lee et al., 2024), EWD (Lu et al., 2024), and TextSeal's entropy-weighted test, but replaces heuristic or Gamma-approximated tails with probability-binned weights and exact null p-values. For speculative decoding (Leviathan, Kalman, and Matias, 2023), Hu and Huang (2024) analyze the fundamental trade-off between watermark strength and speculative acceptance, He et al. (2026) study pseudorandom draft acceptance, SynthID-Text provides fast speculative tournament sampling, and TextSeal-2 introduces the shared-noise construction paired with block verification (Sun et al., 2024) that our speculative relay implements.
References
Aaronson, S. (2023). Watermarking of Large Language Models. Talk, Simons Institute Workshop on Large Language Models and Transformers, UC Berkeley, August 2023.
Bonferroni, C. E. (1936). Teoria statistica delle classi e calcolo delle probabilità. Pubblicazioni del R. Istituto Superiore di Scienze Economiche e Commerciali di Firenze, 8:3–62.
Dathathri, S. et al. (2024). Scalable Watermarking for Identifying Large Language Model Outputs (SynthID-Text). Nature, 634:818.
Dunn, O. J. (1961). Multiple comparisons among means. Journal of the American Statistical Association, 56(293):52–64.
Fu, J., Zhao, X., Yang, R., Zhang, Y., Chen, J., and Xiao, Y. (2024). GumbelSoft: Diversified Language Model Watermarking via the GumbelMax-trick. Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL 2024), Vol. 1, pp. 5791–5808. arXiv:2402.12948.
Gloaguen, T., Staab, R., and Vechev, M. (2026). AutoMark: Enabling Autoresearch to Discover Better LLM Watermarks. arXiv:2609.37310.
He, W., Li, X., Shen, L., Su, W., and Long, Q. (2026). Improving the Trade-off Between Watermark Strength and Speculative Sampling Efficiency for Language Models. International Conference on Learning Representations (ICLR 2026). arXiv:2602.01428.
Hu, Z. and Huang, H. (2024). Inevitable Trade-off between Watermark Strength and Speculative Sampling Efficiency for Language Models. Advances in Neural Information Processing Systems (NeurIPS 2024). arXiv:2410.20418.
Kirchenbauer, J., Geiping, J., Wen, Y., Katz, J., Miers, I., and Goldstein, T. (2023). A Watermark for Large Language Models. International Conference on Machine Learning (ICML 2023). arXiv:2301.10226.
Kirchenbauer, J., Geiping, J., Wen, Y., Shu, M., Saifullah, K., Kong, K., Fernando, K., Saha, A., Goldblum, M., and Goldstein, T. (2024). On the Reliability of Watermarks for Large Language Models. International Conference on Learning Representations (ICLR 2024). arXiv:2306.04634.
Kuditipudi, R., Thickstun, J., Hashimoto, T., and Liang, P. (2024). Robust Distortion-free Watermarks for Language Models. Transactions on Machine Learning Research (TMLR). arXiv:2307.15593.
Lee, T., Hong, S., Ahn, J., Hong, I., Lee, H., Yun, S., Shin, J., and Kim, G. (2024). Who Wrote this Code? Watermarking for Code Generation (SWEET). Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL 2024). arXiv:2305.15060.
Leviathan, Y., Kalman, M., and Matias, Y. (2023). Fast Inference from Transformers via Speculative Decoding. International Conference on Machine Learning (ICML 2023). arXiv:2211.17192.
Li, X., Wen, G., Chen, X., Long, Q., Jain, A., Joly, F., Lam, M., Song, Q., and Su, W. (2026). textGrain: Entropy-Calibrated Watermarking for Language Model Text. OpenAI Technical Report, October 2026.
Lu, Y., Liu, A., Yu, D., Li, J., and King, I. (2024). An Entropy-based Text Watermarking Detection Method (EWD). Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL 2024). arXiv:2403.13485.
Maddison, C. J., Tarlow, D., and Minka, T. (2014). A* Sampling. Advances in Neural Information Processing Systems (NeurIPS 2014). arXiv:1411.0030.
Piet, J., Sitawarin, C., Fang, V., Mu, N., and Wagner, D. (2023). Mark My Words: Analyzing and Evaluating Language Model Watermarks. arXiv:2312.00273.
Qwen Team (2026a). Qwen3.5: Towards Native Multimodal Agents. February 2026.
Qwen Team (2026b). Qwen3.6-27B: Flagship-Level Coding in a 27B Dense Model. April 2026.
Sander, T., Chang, H., Souček, T., Tran, T., Lacatusu, V., Rebuffi, S.-A., Mourachko, A., Parimi, S., Ropers, C., Moritz, R., Stark, V., Elsahar, H., and Fernandez, P. (2026). TextSeal: A Localized LLM Watermark for Provenance & Distillation Protection. arXiv:2605.12456.
Sander, T., Fernandez, P., Gat, I., Bao, H., Shi, J., Park, J., Lacatusu, V., Rebuffi, S.-A., Chang, H., Elsahar, H., Souček, T., Tran, T., Parimi, S., and Mourachko, A. (2026). TextSeal2: Distortion-Free LLM Watermarking with Copula Mixing and Memoryless Races. arXiv:2610.40613.
Sun, Z., Mendlovic, U., Leviathan, Y., Aharoni, A., Ro, J. H., Beirami, A., and Suresh, A. T. (2024). Block Verification Accelerates Speculative Decoding. arXiv:2403.10444.
Zhu, Y., Lu, S., Zheng, L., Guo, J., Zhang, W., Wang, J., and Yu, Y. (2018). Texygen: A Benchmarking Platform for Text Generation Models. Proceedings of the 41st International ACM SIGIR Conference on Research & Development in Information Retrieval (SIGIR 2018), pp. 1097–1100. arXiv:1802.01886.
0%
AI 热点