Elamur Research

Scalable watermarking for identifying large language model outputs

Paper · 2024 · Sumanth Dathathri, Abigail See, Sumedh Ghaisas et al.

Summary

A piece of generated writing can circulate long after it has left the service that produced it. By then, its wording may offer little evidence of where it came from. Dathathri and colleagues study whether a service can add that evidence as it writes, while keeping its answers useful and its generation fast. Their method, SynthID-Text, adds a statistical watermark to text generation. A detector can look for the mark in the resulting text with a watermarking key and without access to the system that wrote it. The generator needs no retraining.

The method intervenes when a large language model selects its next token, a unit of text such as a word or part of a word. It draws candidate tokens from the ordinary next-token distribution and chooses among them through a tournament. Each round assigns scores derived from the recent text and the key. A candidate with a higher score has a better chance of advancing. Over a passage, this preference leaves a pattern the detector can measure. The paper’s quality-preserving configuration is designed to reproduce the ordinary distribution of individual responses when averaged over the watermark randomness. Several responses can still become more alike. A separate configuration applies a stronger mark and allows some loss of quality.

On explanatory answers generated from ELI5 prompts, the quality-preserving configuration was generally easier to detect than a Gumbel-sampling watermark at the same text length and a false-positive rate of 1%. Its advantage was typically greater where the generator had fewer plausible ways to continue. The stronger configuration also gave higher detection rates than the Soft Red List baseline at comparable log perplexity, the paper’s automatic measure of how surprising the generated text was. In a separate human study on 3,000 ELI5 questions, raters showed no statistically significant preference between marked and unmarked Gemma 7B-IT answers. Feedback on approximately 20 million responses in a live Gemini experiment likewise showed no statistically significant difference between the conditions.

In a Gemma 7B-IT timing test, Tournament sampling increased per-token latency by 0.57%. The paper also develops two ways to combine watermarking with speculative sampling, which uses a smaller generator to propose tokens for a larger one to check. The authors report deploying SynthID-Text in Gemini and Gemini Advanced. The evidence supports marking text in a high-volume service, with important limits on what can be recovered later. Short or highly predictable passages carry less evidence, rewriting can weaken the mark, and detection applies to text from services that used the watermark.

Deep dive: Scalable watermarking for identifying large language model outputs

How SynthID-Text marks generated writing during token selection and what its tests show about detection, response quality and speed. · about 37 minutes to read

The problem and its context

What a passage can tell us about its origin

The paper starts from a practical difficulty. Generated text can be coherent enough that a reader has little basis for deciding from the writing alone how it was produced. Meanwhile, people use generation systems for purposes as different as drafting prose, writing code and obtaining explanations. Once an answer has been copied out of its original interface, the fact that it came from a particular service may be difficult to recover. The authors ask whether that service can make its own outputs identifiable by adding evidence to the text itself.

There are two related questions about origin. One asks whether a piece of writing came from any automated generator. The other asks whether it carries a mark associated with a service that deliberately added one. SynthID-Text addresses the latter. The service participates at generation time, and the detector later checks for evidence tied to the watermarking key. This cooperation changes the problem the detector must solve. It can look for a pattern the service intended to create, even if the resulting passage reads like ordinary writing.

The point of making the evidence part of the text is that the passage can be examined on its own. A detector can take the tokens in order, use a short stretch of preceding text to establish what scores to expect, and look for the pattern across the passage. The signal concerns which continuations were selected. The words can remain familiar, the sentence can remain grammatical, and an individual choice can be plausible with or without the watermark. The distinction is apparent in the accumulated choices.

Putting evidence inside the output also places constraints on the way it is made. Users still need accurate and relevant answers, and changes in the variety of answers can matter even when any given answer reads well. A watermark that takes substantial additional time to generate would affect everyone using the service. A detector that had to run the original system would be harder to use, especially if that system were costly or privately held. The paper treats detection, writing quality and computational cost as separate properties to measure.

Earlier ways to identify generated text

One approach described by the authors is to keep a record of what a service produced. When a passage is submitted for inspection, a retrieval system searches that record for a match. The evidence lies in the stored output. A service using this approach has to maintain a growing collection and make it available for checking. The paper also points out the privacy implications of accessing and retaining interactions for this purpose. The match can be informative when the right record exists and is available to the party doing the check.

The second approach leaves the generation process intact and analyzes the finished text. Such a detector may score statistical features or learn to classify examples of human and machine writing. The paper notes that this can give the detector broader coverage because it can inspect text from systems that never agreed to add a mark. It can also be computationally expensive. Its judgments depend on differences that generalize across writing styles, groups of authors and generators. The authors describe inconsistent results outside the conditions on which classifiers were developed and point to higher false-positive rates reported for some writers, including non-native speakers.

Those differences can also change over time. If generated prose changes in style or gets closer to human prose along the dimensions a classifier uses, its original calibration may become less reliable. Refitting or recalibrating becomes part of maintaining the detector. A generative watermark gives the detector a deliberately created feature to measure. Its coverage then depends on where the mark was added, and its reliability depends on conditions such as how much of the marked text remains.

Earlier watermarking approaches occupied several different points in the production process. An edit-based method starts with a completed passage and alters it. The paper gives synonym replacement and insertion of special Unicode characters as examples. A data-driven watermark changes training so that particular prompts trigger marked behavior. The authors describe that use as primarily addressing unauthorized use of a generator. They also note that edits and training-based marking can leave perceptible artifacts.

SynthID-Text follows the generative approach, in which the mark is created as each new token is chosen. Methods in this family already used randomness that a detector could reconstruct from the text and a key. The contribution here is a new way to use that randomness when selecting the token. To understand why this matters, it helps to separate three decisions. One is how to obtain the random seed for the current position. A second is how the seed influences selection. A third is how the detector reads out the influence. The authors keep the seed procedure closely aligned with previous work and focus on the selection rule.

Why there is room to mark some answers

A generator can frequently continue a sentence in several plausible ways. Some alternatives may involve genuinely different explanations. Others may be choices between ordinary ways of phrasing a similar point. These options occur in the probability distribution used for the next token. If multiple options have appreciable probability, a watermark can favor candidates that carry its signal while still drawing on plausible continuations. If the distribution puts almost all its weight on a single choice, there is little room to do this.

This variation matters because a watermark must be produced in different contexts. A narrowly constrained answer can have long stretches where the wording or symbols are effectively fixed. An open-ended explanation can leave many decisions to the generator. Even within an answer, a predictable stretch can be followed by one with many reasonable continuations. The paper uses entropy to describe this room for variation. High entropy means that probability is spread across alternatives. Low entropy means that relatively few outcomes account for most of it.

The problem therefore has two scales. At each position, the sampler has to make a choice consistent with the generator’s probability distribution and the desired quality guarantee. Across a passage, the detector needs enough informative choices to separate marked text from text that happens to match the key’s preferences. For a service, there is also a time budget for making these choices. The method is designed around the relationship between those requirements.

The method, step by step

From the prompt to a candidate token

SynthID-Text begins with ordinary left-to-right generation. Given a prompt and any continuation already written, the generator assigns probabilities to the tokens that might come next. It samples a token, appends it to the sequence and uses the enlarged sequence as context for the next step. Generation stops at an end token or the length limit. A token is defined by the system’s tokenization, so the units the watermark uses can include pieces of a word as well as complete words.

The paper describes the prefix at any step as follows.

x_<t = (x₁, …, xₜ₋₁)

Here t is the current position, x denotes a token sequence, and x_<t contains its tokens before t. The entries run from the first token x₁ through the immediately preceding token xₜ₋₁. The ellipsis stands for the intervening entries. The prompt forms part of the context the generator gets at the beginning of a response.

xₜ ∼ p_LM(· | x_<t)

Here xₜ is the next token and ∼ means that it is drawn according to the distribution on the right. p_LM is the next-token distribution used for decoding. The dot is a placeholder for any token in the vocabulary. The vertical bar means that the probabilities are conditional on the prefix x_<t. The vocabulary, written V in the paper, is the set of possible token identities.

The authors define p_LM at the point where a token would actually be sampled. It includes any changes already made by the decoder. For example, top-k sampling keeps the k most probable tokens, where k in this expression is the cutoff on the number of candidates. Top-p sampling retains tokens that cover a specified amount of probability mass. Temperature changes how concentrated the distribution is. A lower temperature tends to make high-probability choices more dominant. The watermark works with the distribution left by these settings, so its opportunity to leave evidence depends in part on how generation is configured.

The Methods section describes compatibility with sampling that retains some randomness. For top-k the stated range is k ≥ 2. The stated top-p range is p ∈ (0, 1], where p is the probability mass cutoff and the interval excludes its lower endpoint. The temperature condition is τ > 0, where τ is the temperature. These settings specify the kinds of decoding inputs the sampler can work with. A configuration that leaves effectively a single continuation offers little useful entropy even if the sampler can be applied.

How SynthID-Text embeds and detects a watermark

The steps in order.

How SynthID-Text embeds and detects a watermarkStep 1: Compute the next-token probabilities1. Compute the next-token probabilitiesStep 2: Check whether the recent context has been used2. Check whether the recent context has been usedStep 3: Hash fresh contexts with the watermarking key3. Hash fresh contexts with the watermarking keyStep 4: Draw candidates from the decoding distribution4. Draw candidates from the decoding distributionStep 5: Select a token through successive tournament rounds5. Select a token through successive tournament roundsStep 6: Reconstruct key-based scores from the resulting text6. Reconstruct key-based scores from the resulting textStep 7: Compare the aggregated evidence with a threshold7. Compare the aggregated evidence with a threshold

Giving the same context the same scores

For a detector to check a mark, it needs to reconstruct what the generator favored. SynthID-Text uses a sliding window of recent tokens for this purpose. At a fresh position, the system combines that window with a watermarking key and passes the result through a hash function. The output is the seed that will determine the tournament scores at that position. The window size used in the experiments is H = 4.

rₜ = fᵣ(x_<t, k) = h(xₜ₋ᴴ, …, xₜ₋₁, k)

Here rₜ is the random seed at position t. The function fᵣ generates the seed from the prefix x_<t and the watermarking key k. This k denotes the key, independently of the cutoff parameter in top-k sampling. The hash function is h. Its text input at this step begins at xₜ₋ᴴ, the token H positions before t, and ends at xₜ₋₁, the preceding token. The ellipsis denotes the tokens between them. The key is included as an additional input.

A hash is deterministic for fixed inputs. The same key and the same window reproduce the same seed. The paper’s probabilistic reasoning considers the behavior of seeds across random keys. Its hash assumption says, in effect, that the keyed functions are computationally hard to distinguish from a randomly chosen function of the context. That is the sense in which a seed produced reproducibly from text can be treated as pseudorandom for analyzing the watermark.

R = {0, 1}^(n_sec)

In this expression R is the seed space, {0, 1} is the set of possible bit values, and n_sec is the number of bits in a seed. The power notation denotes all strings of that length over the bit values. The authors treat these strings as integers, use the same space for keys and seeds, and write Unif(R) for the distribution that gives equal probability to each member of R.

The seed provides a way to coordinate generation and detection. The detector reconstructs the seed from the observed prefix and the key, computes the scores at that position and checks the score of the token that appeared. It can do this for a passage even though it has no record of the tournament draws. A local context window also means that the rule for an interior position depends on recent observed tokens. The connection between a token and its context is therefore part of the evidence. A word considered apart from its neighbors has no fixed watermark value.

Assigning scores and running the tournament

The next step is to turn the seed into a score for every candidate token in every round where that candidate appears. The authors call these scores g-values. A g-value is a reproducible pseudorandom number determined by the token, the seed and the layer of the tournament. The default distribution is Bernoulli(0.5). In this setting a score is 0 or 1, and the scoring rule assigns equal probability to the two values under the random construction. The paper also considers continuous scores from Uniform[0, 1].

gℓ(x, r) = F_g⁻¹(h(x, ℓ, r) / 2^(n_sec))

Here gℓ(x, r) is the score of token x in layer ℓ for seed r. The hash h in this formula takes that token, layer index and seed as inputs and returns an integer from R. Dividing by 2 raised to n_sec, the seed’s bit length, scales the integer to a fraction close to a uniform draw on the unit interval when the bit length is large. F_g is the cumulative distribution function of the chosen scores. It gives the probability of a score being at or below a value. F_g⁻¹ is its generalized inverse, which turns the scaled hash into a value with the desired score distribution. The superscript ⁻¹ denotes that inverse operation.

Two occurrences of the same candidate token have the same g-value within a match because their token, layer and seed agree. Moving to a new layer changes the score function. Advancing through one round gives a token a chance to compete under a different assignment in the next round. Advancing also requires a token to have been drawn in the first place. A high score given to a rare token does not guarantee its appearance in the candidate pool.

In a tournament with a single layer, the sampler makes N independent draws from the next-token distribution, where N is the number of competitors in the match. The draws are kept as a list and may contain duplicates. All entries whose scores agree with the highest score are eligible to win. The sampler draws uniformly from those entries. Thus several copies of a tied token can affect the outcome because each copy occupies a place in the list of eligible entries.

Y* = [y ∈ Y : gℓ(y, rₜ) = max_{y′ ∈ Y} gℓ(y′, rₜ)]

Here Y is the list of entries in the current match and Y* is the list of finalists within that match. The square brackets denote a list, ∈ means membership and the colon means “such that.” The candidate under consideration is y. The variable y′ runs over the entries of Y so that max can find their highest score. Both scores use layer ℓ and the current position’s seed rₜ. The single-layer case uses the first layer’s scores. For any layer, the rule retains every entry with that maximum score.

The full method repeats this operation in layers. The first layer begins from independent draws. Separate groups of candidates play matches, and the winners become the candidates for the next layer. With a fixed number of competitors per match, the starting list is large enough that repeated grouping leaves exactly one winner. The paper uses the following count in its formal algorithm.

M = N^m

Here M is the number of starting candidate entries, N is the number of entries per match, and m is the number of tournament layers. The power N^m describes the conceptual tournament. The authors also describe a vectorized implementation for cases where it is more efficient. The number of leaves in the conceptual bracket and the time taken by the implementation are different properties.

In the paper’s worked illustration, N = 2, m = 3 and the bracket begins with 8 draws. The prefix sets up a choice of tropical fruit. The example uses mango, lychee, papaya and durian as candidate identities, with probabilities 0.50, 0.30, 0.15 and 0.05, respectively. Those probabilities determine how the candidate list is drawn. The layer-specific g-values determine how each match in that list turns out.

Mango appears multiple times in the example bracket. It can compete against another mango, in which case both entries have the same score and either choice advances the same token identity. Mango can also face a different candidate and advance with a higher score or through a tie. After the later rounds it wins the illustrated tournament. This is a single draw from the procedure, and the outcome depends on the initial candidates, the score assignments and the choices made in ties. The practical settings usually use m = 30, much deeper than the illustration.

Preserving a distribution and masking repeated contexts

For matches with two competitors, the paper proves a property called single-token non-distortion. Fix the prefix and its next-token distribution, and average the watermarked selection over the seed. The probability of each token is then the same as it was under ordinary sampling. Under a particular seed, the tournament still prefers candidates with high g-values. Averaging over seeds removes that preference for any particular token identity. A detector with the key can recover the assignments the generator actually used, so the preference remains measurable in the scored text.

The distinction between averaging across seeds and reusing a fixed key matters. At a given prefix a particular key creates particular preferences, and the same key and window recreate them later. The single-token property alone is silent about what happens if the same scores influence several choices in one response. The paper gives repeating loops as one possible consequence of using the same bias repeatedly. A guarantee for a whole response has to account for how the sampler behaves when such contexts recur.

Repeated context masking is the authors’ way to do that. The generator keeps a record of windows that have already been used to watermark text. Before sampling at a position, it checks the current window against the history. When the window is fresh, the generator uses Tournament sampling and records it. When it has already been used, the generator samples from the ordinary decoding distribution. The same check is shared by the baselines in the principal watermark comparisons.

(xⁱₜ₋ᴴ, …, xⁱₜ₋₁) ∈ Cᵢ ∪ Cᵢ₋₁ ∪ … ∪ Cᵢ₋ₖ₊₁

Here xⁱ is the sequence that begins with prompt i and grows as response i is generated. The superscript i labels the sequence. The tokens on the left are its most recent H entries before position t. The symbol ∈ asks whether that window is present in any of the sets combined by ∪. Cᵢ contains the windows used for marking the current response, and the preceding C terms represent histories for earlier responses. The ₖ in the final subscript denotes the history parameter K, which counts how many response histories are considered, including the current one. The ellipses stand for the intervening tokens and histories, respectively.

When K = 1, the check uses only the history of the response currently being generated. A fresh response starts with an empty history. When K > 1, earlier responses contribute histories. The paper also considers K = ∞, where used contexts can be remembered indefinitely. These choices determine when the system stops reusing scores. Most of the reported experiments use K = 1. For the two-competitor tournament, the paper connects this case to single-sequence non-distortion and the more general history to the corresponding guarantee for K sequences.

Single-sequence non-distortion refers to the probability of a whole response after averaging over watermark randomness. It allows a fixed-key effect across responses. If two answers share contexts, the fresh history for each answer lets the same keyed preferences be used again. The responses can consequently become more alike. That is the reason the paper measures diversity across responses separately from the quality of an individual answer. A stronger multi-response guarantee can use a longer history, with implications for both detection and computation because the system stores more windows and skips marking at more positions.

The paper’s distortionary configuration changes the number of competitors. Each match has more than two. The authors show that the result then changes the distribution even at the single-token level when averaged over seeds. This configuration is offered for cases where a stronger mark is worth a change in text quality. The two configurations use the same basic idea of drawing candidates and choosing a high scorer. Their distributional guarantees and empirical comparisons differ because the rules of the matches differ.

Turning accumulated scores into a decision

At detection time, the inputs are the tokenized passage, the watermarking key and the rule for reconstructing seeds. The detector can compute the g-values for the observed tokens without recomputing their original next-token probabilities. It does not need to know which alternatives were drawn for a match or how the winner advanced. The central question is whether the tokens that did appear score unusually highly under the assignments associated with their contexts.

The simplest statistic described in the paper is the mean g-value. It gives every scored position and layer the same weight.

Score(x) = (1 / (mT)) ∑_{t=1}^T ∑_{ℓ=1}^m gℓ(xₜ, rₜ)

Here Score(x) is the average for the passage x, whose length is T tokens. The outer sum, denoted ∑, runs over positions t from the first position through T. The inner sum runs over layers ℓ from the first through m, the layer count. Each term is the g-value of token xₜ with the reconstructed seed rₜ for its position. The factor 1 / (mT) divides by the product of the layer count and text length, giving the mean across the position and layer pairs in the displayed score.

A passage can have high g-values by chance. Watermarked passages are expected to score more highly as a group because high-scoring candidates gained a selection advantage. Long passages offer more opportunities to observe that preference. Short passages leave more room for chance alignment to obscure the distinction. The generator’s entropy affects how much information each position provides. When nearly every draw yields the same token, that token emerges whichever score it receives. When the draws include different plausible tokens, the high-score rule has a chance to influence the result.

The mean score illustrates the mechanism. The paper also describes a weighted mean, which lets different tournament layers contribute differently. This is relevant because each layer acts on the winners of earlier rounds. Once those rounds have narrowed the variety of surviving candidates, a later round may have fewer useful choices. The paper provides frequentist versions that turn evidence into a P value by asking how unusual a score would be under a hypothesis of no watermark. It also proposes a Bayesian scorer that learns from examples of marked and unmarked text and estimates the posterior probability that a passage is marked.

The default reported SynthID-Text setup uses the Bayesian scorer. Its learning belongs to detection. The generator’s existing training stays in place, and the token sampler itself uses the hash and tournament procedure. The data used to teach a scorer what marked and unmarked passage scores look like serve a different purpose from any data used to train the text generator. The paper makes available code for marking and detecting SynthID-Text passages and the response pairs and annotations from the controlled human study.

Combining the watermark with draft-and-check generation

In ordinary speculative sampling, a smaller draft system proposes several upcoming tokens. A larger target system checks them and accepts or rejects proposals. The potential speed gain comes from using the smaller system to do part of the proposing and from the target system being able to check more than one candidate position in a pass. A proposal that fails the check limits how far that speculative step can advance.

A generative watermark has to be integrated with this draft-and-check procedure. The next-token choice is no longer a simple call to a sampler operating on its own. A batch of proposed tokens may already exist when the target evaluates their probabilities. The watermark can change which choices would carry evidence and how conveniently those choices can be realized using the proposals. Consequently the authors devise a version that prioritizes detectability and another that prioritizes speed.

The high-detectability variant is designed to preserve watermark strength. It can reduce the efficiency of speculative sampling. The fast variant is designed to preserve the acceptance behavior of speculative sampling when the mark has the single-token non-distortion property. Watermark detectability can decrease in this variant, and the authors propose a learned Bayesian scoring function to improve its detection performance. This gives the service two ways to choose where to spend its computational budget. The paper evaluates the fast variant with a quality-preserving SynthID-Text configuration.

Experiments and results

Data, comparison systems and detection metrics

The principal offline detection experiments use ELI5 questions. These are English prompts that ask for explanatory answers spanning multiple sentences. The authors use instruction-tuned Gemma 2B and Gemma 7B, along with v0.2 Mistral 7B-IT. Their decoding setup uses top-k with k = 100 for these instruction-tuned systems. The experiments vary temperature across 0.5, 0.7 and 1.0 to examine how the mark behaves under different amounts of sampling entropy.

For the non-distortionary experiments, the ELI5 development set and test set each contain 10,000 prompts, and the sets are disjoint. They are used to generate watermarked responses. In the distortionary experiments, the ELI5 test set consists of 1,500 prompts for generating marked responses. For the unwatermarked negatives, the authors use disjoint collections of human answers to 10,000 ELI5 questions per development or test set. Here a negative is an example on which the mark was never applied. Those human responses are a different comparison population from the generated unwatermarked responses used to assess quality.

Some experiments control how much text the detector sees. For instance, to test passages of exactly 200 tokens, the authors take responses longer than 200 tokens and truncate them at that length. This gives the detector the intended amount of text on each example under that condition. It also defines the sample being measured. Performance on a prefix of a response that was originally longer can be different from performance on a response that ended naturally at that length.

The non-distortionary baseline is Gumbel sampling, and the distortionary baseline is Soft Red List. The authors use the same sliding-window seed construction and repeated context masking across the watermarks. Gumbel sampling with this masking also has the single-sequence non-distortion property. Aligning the seed and masking lets the comparison focus on how the methods select tokens and what signal the resulting text exposes. The experiments do not constitute a survey of every published combination of seed rule, sampler and scoring procedure.

The main metric is true-positive rate at a specified false-positive rate. The true-positive rate is the fraction of marked passages the detector identifies as marked. The false-positive rate is the fraction of unmarked passages it incorrectly labels as marked. The paper’s usual comparison uses a false-positive rate of 1%. It obtains a score cutoff from the top-1% tail of the unwatermarked scores and then measures how many marked examples score above that cutoff. This empirical calibration makes it possible to compare recall at the same tolerance for false alarms on the chosen negative examples.

The plots use estimates derived from 500 bootstrap resamples, with shaded 90% confidence intervals for the means shown. Bootstrap resampling uses repeated samples from the observed data to assess the variability of an estimate. These intervals describe uncertainty in the plotted comparisons. The cutoff selection and resampling both depend on the experimental population, so the reported true-positive rate and false-positive rate have to be read together with the text source, temperature and length.

Detecting the quality-preserving watermark

The main length comparison uses Gemma 7B-IT answers to ELI5 questions at temperature 0.7. At a false-positive rate of 1%, the SynthID-Text curve indicates higher detection than Gumbel sampling for the same amount of text. The comparison allows either scheme the same opportunity to accumulate evidence from a passage of a given length. The difference shows up in how much signal the methods produce and how readily their detectors can use it.

Across the additional Gemma and Mistral conditions, the authors generally find better detection for SynthID-Text. The improvement is greatest in the relatively low-entropy conditions they study. The curves become more comparable when generation has more entropy. This comparison concerns the advantage of SynthID-Text over Gumbel sampling. The absolute difficulty of watermarking can still increase as entropy falls, since both schemes then have fewer useful choices at each position.

A separate evaluation lets a detector abstain on uncertain passages. For passages that receive a prediction, the aim is to achieve a 95% true-positive rate and a 1% false-positive rate. The fraction withheld is part of the outcome. The authors plot abstention separately for marked and unmarked passages, since a detector can be more uncertain for one group than the other. The additional Gemma 7B-IT conditions show fewer abstentions for longer passages and at higher temperatures. The operating point illustrates how a service can reserve its strongest claims for cases with enough evidence, while leaving some passages undecided.

Detecting the stronger watermark

The distortionary comparison asks how much detection each scheme can gain when the system permits changes to the decoding distribution. Both distortionary SynthID-Text and Soft Red List have a strength setting. Varying it yields a series of points pairing detectability with an automatic quality measure. The main figure reports on Gemma 7B-IT ELI5 passages of 200 tokens at temperature 0.7, with detection measured at a false-positive rate of 1%.

The quality measure on the horizontal axis is log perplexity. Perplexity summarizes how surprising a sequence’s successive token choices are under a probability distribution. Taking the logarithm gives the scale used to compare distortionary settings in the paper. The figure also shows the unwatermarked reference with respect to that measure. SynthID-Text obtains higher detection than Soft Red List at comparable log perplexity in the main comparison. Additional plots give results for other temperatures and lengths using Gemma 7B-IT.

Reading the curves at comparable log perplexity is important because a strength setting is specific to a method. The numerical value of a strength setting for one sampler does not directly say how much it changes the text relative to a setting for another. The plotted comparison puts the methods on common axes and shows how much detection each gets at a given degree of measured surprise. Human preference is a different quality measure. The side-by-side human study concerns the quality-preserving configuration.

Human judgments and automatic quality checks

The live study uses Gemini traffic. The authors routed a randomly selected fraction of queries to a watermarked condition and an equivalent number to its unwatermarked counterpart. Users could respond to an answer with a thumbs-up or thumbs-down. The authors analyzed roughly 20 million responses across the conditions. They report the rates using received positive and negative feedback as the denominator, so the response count describes the scale of the experiment and the rate calculation describes the distribution of expressed judgments.

The reported difference in thumbs-up rate was 0.01%, with the marked condition higher. The difference in thumbs-down rate was 0.02%, with the marked condition lower. The authors report both differences as statistically insignificant and within the 95% confidence intervals. The experiment provides a test of the mark in the actual service across varied queries. Its measurements concern the feedback users chose to submit. They support the authors’ conclusion that the quality-preserving watermark had a negligible effect on response quality as assessed through that feedback.

The controlled preference study uses Gemma 7B-IT responses to 3,000 ELI5 questions. Raters look at marked and unmarked answers side by side. They judge grammaticality and coherence, relevance, correctness, helpfulness and overall quality. This comparison puts two answers to the same question in front of a rater and gives the rater more specific criteria than a service feedback button. It also controls the kind of prompt much more narrowly than the live experiment.

The authors analyze the preference judgments with ties included as an outcome and with ties excluded. In the analysis that includes ties, a trinomial test assesses the symmetry of preferences between the marked and unmarked conditions while allowing the tie category. In the other analysis, bootstrap resampling estimates uncertainty in the ratio of preferences among judgments with a winner. The extended data describe a 95% interval for that ratio. Neither analysis finds a statistically significant preference for either condition on the assessed dimensions.

The paper also compares the quality-preserving system with ordinary generation using perplexity and standard capability benchmarks. It reports no significant differences in those additional tests. Each type of evaluation observes a different consequence of watermarking. Perplexity sees a shift in the probabilities assigned to the resulting text. A benchmark sees a change in task performance under the conditions of that benchmark. Side-by-side raters can judge two concrete answers along separate dimensions, and production feedback captures responses from ordinary use.

Cost at generation time

The main timing measurement serves Gemma 7B-IT on 4 v5e tensor processing units. Without a watermark, generation takes 15.527 ms per token. With 30 tournament layers, it takes 15.615 ms per token. The reported increase is 0.57%. In the paper’s comparison, Gumbel sampling adds 0.26% and Soft Red List adds 0.28%. SynthID-Text therefore incurs the larger sampling overhead in this comparison, while the result in absolute time remains close to the ordinary generation path.

Per-token latency for Gemma 7B-IT on v5e tensor processing units

Tournament watermarking leaves generation time close to the unwatermarked measurement.

Per-token latency for Gemma 7B-IT on v5e tensor processing unitsUnwatermarked generation: 15.527Unwatermarked generation15.527SynthID-Text (this paper): 15.615SynthID-Text (this paper)15.615
The numbers
System or settingms per token
Unwatermarked generation15.527
SynthID-Text (this paper)15.615

The latency test helps separate the size of the conceptual tournament from the cost of the system that implements it. The paper notes that Tournament sampling can have greater computational complexity than the alternative watermark samplers. The measured overhead is small relative to the cost of producing the next-token distribution in this setup. The authors argue that the watermark computation itself does not grow with the size of the underlying generator, making its share of total work smaller as the cost of the generator increases.

In the speculative-sampling experiment, Gemma 7B-IT is the target and Gemma 2B-IT is the draft. The draft proposes three lookahead tokens at a time. For speed, the relevant measure is how many lookahead tokens the target accepts on average. For a suitable non-distortionary watermark, the theory predicts that fast watermarked speculative sampling will preserve the acceptance rate. The authors report very similar acceptance with and without the mark in this experiment. That is the measured basis for their conclusion about preserving the efficiency of the draft-and-check path.

What the ablations show

Text length and temperature probe different parts of the signal

The length comparisons vary how many observed choices the detector can score. A detector given a longer passage can look for the same preference recurring across more positions. The primary ELI5 comparison holds the generator and temperature fixed while varying passage length. This makes length an informative axis for reading the result. SynthID-Text’s advantage over Gumbel sampling at the same length indicates that the extra detection performance comes from the signal recovered in passages of comparable size.

Temperature varies the spread of probabilities available to the sampler. At lower temperatures a larger share of probability is concentrated among the generator’s preferred continuations. Both watermarks have to work with those choices, and the experiments show SynthID-Text typically has a greater relative advantage in those conditions. In higher-entropy conditions, Gumbel sampling becomes more comparable. The comparisons across generators support the same broad pattern, although changing generators can also change properties besides entropy. Varying temperature within a generator gives a more direct way to examine the role of the decoding distribution.

Larger advantages in low-entropy conditions can coexist with fewer abstentions in high-entropy conditions. The first statement compares two sampling algorithms at the same operating point. The second asks how many passages a selective detector can classify while keeping its stated error rates. A watermark may have an edge under tighter constraints, yet its detector can still benefit from the additional evidence in text produced from a wider range of choices.

Later tournament layers supply diminishing evidence

The authors analyze why more layers can help. Each layer supplies another g-value for each position, and the paper relates additional layers to reduced variance in the overall score. An early layer has access to candidates drawn from the ordinary decoding distribution. A later one sees only winners. The earlier selection changes the distribution of token identities reaching the later layers. Often the later matches contain candidates that increasingly resemble one another, reducing the opportunities to select a different token on the basis of its score.

That analysis gives a reason to consider both the number of layers and how their evidence is combined. Adding a layer can provide another measurement, but the contribution of the measurement can diminish as the tournament progresses. The weighted score can give layers unequal influence, and a learned scorer can use distinctions learned from marked and unmarked examples. The default use of 30 layers is an experimental setting. The analysis connects the return from additional layers to the available entropy, which varies from prompt to prompt and across decoding settings.

The theory about single-token non-distortion also identifies a specific control in the tournament design. With two competitors per match, the paper proves the average single-token guarantee under its random scoring construction. With more competitors, the corresponding match design provides a stronger watermark and changes the distribution. This contrast in the experiments is built into the algorithm rather than inferred solely from quality ratings. The distortionary strength comparisons then measure what can be gained in detection for a given change in log perplexity.

Diversity reveals a cost that answer ratings cannot measure

The extended data compare SynthID-Text and Gumbel sampling on Gemma 7B-IT responses of 400 tokens across the studied temperatures. The outcome combines detectability at a false-positive rate of 1% with Self-BLEU. This diversity measure uses overlap among responses, drawing on the BLEU score. A lower Self-BLEU value in the comparison indicates less overlap and thus greater diversity across responses.

Both quality-preserving watermarks reduce diversity across responses in the paper’s tests. SynthID-Text offers a more favorable relationship between diversity and detection than Gumbel sampling across the temperatures in the comparison. The result addresses a feature an ordinary preference study would miss. A rater can find a particular response grammatical, relevant and helpful without knowing how similar it is to other responses from the same system. The repeated-context analysis supplies a mechanism for that loss of variety because a shared context can be treated as fresh in separate responses, allowing the same keyed bias to recur.

This also clarifies what the matched baseline design controls. By giving Tournament and Gumbel sampling the same sliding-window seed procedure and the same masking rule, the authors make the comparison less sensitive to differences in how frequently a context receives a repeated bias. The observed diversity and detection relationship concerns the sampling schemes with those shared choices. It leaves room for other relationships under different seed or masking policies.

Abstention changes which cases receive a decision

A detector using a single score threshold returns a classification even for a passage near that threshold. The selective analysis permits an undecided outcome. Its controlled comparison varies the passage length and temperature while maintaining the targets for errors among passages receiving a decision. The falling abstention rate with length and higher temperature indicates that more passages supply enough signal for the chosen operating point.

The abstention analysis also exposes a property of the metric itself. A classifier can improve the error rates on its answered cases by answering fewer difficult cases. Reporting only the achieved rates would obscure how often that happens. By showing the fraction withheld, separately for marked and unmarked text, the authors make the coverage cost visible. This evidence is especially relevant for short passages, for which a forced yes-or-no result can conceal the underlying uncertainty.

Limitations

Limits identified by the authors

A generative watermark covers text from services that have implemented it. The authors point out that broader identification would require coordination among operators, and decentralized deployment of openly available generators makes such coordination difficult. A detector for SynthID-Text can look for evidence associated with its watermark. An unmarked passage may still have been generated by another service or by a system that never applied a mark.

The authors discuss stealing, spoofing and scrubbing as open problems for generative watermarking. At a high level, these threaten different parts of the provenance claim. Stealing aims to learn a service’s marking behavior. Spoofing aims to make unrelated text give the appearance of carrying its mark. Scrubbing aims to weaken or remove the evidence. The paper specifically notes that paraphrasing can reduce the detectability of a marked passage and reports evaluations under editing and paraphrasing in its supplementary analyses.

A short sliding-window seed depends on the actual tokens and their order. When wording changes, the detector may encounter different token identities and contexts from those used at generation. This helps explain why preserving the subject or overall meaning of a passage can still weaken the measured signal. The watermark carries evidence in token choices. A passage that has been substantially rewritten can retain much of its meaning while carrying fewer of those choices.

The paper also makes entropy and length explicit limits. Relatively fixed answers offer little scope for a sampler to favor one plausible candidate over another. Longer text supplies more evidence only to the extent that the choices in it carry some signal. These constraints affect the threshold that can be used, the recall available at that threshold and the fraction of examples on which a selective detector can confidently decide.

The authors report consistent detection behavior across the languages in their supplementary evaluation and distinguish this from classifiers limited by the languages they were trained on. The scope of the comparison still depends on the tested languages and generation conditions. The paper also sets aside detailed comparisons of alternative hashing and scoring schemes, including approaches that use edit distance. Its principal results show what the tested sampler can achieve with the chosen shared components.

Limits visible in the evaluation setup

The reported false-positive rate is calibrated empirically using the experiment’s unmarked examples. The human ELI5 answers form a relevant comparison group for the ELI5 generation task. The cutoff’s behavior on another population depends on how that population scores. A population with different lengths or styles could require different calibration. The experiments establish performance at the stated operating points for the populations measured, and the availability of theoretical tests for other scorers is a separate result.

A false-positive rate also differs from the probability that a particular flagged passage really is marked. That probability depends on how common marked text is in the collection being inspected. A collection dominated by unrelated passages can contain a meaningful number of false alerts even at a low false-positive rate. The paper’s offline comparison reports the fraction flagged within marked and unmarked groups, which is sufficient for comparing those detector operating points. Interpreting a flag in a new setting requires knowing more about the population.

Truncation makes controlled comparisons of length possible, while limiting what can be concluded about naturally short answers. The test passages of exactly 200 tokens are drawn from answers long enough to be truncated to that length. A generator may use different wording, structure or levels of certainty when it gives a brief answer by design. Such a passage can also concentrate more of its tokens in a constrained expression or formula. The fixed-length figures therefore measure a controlled amount of text under their sampling procedure.

The human evaluations have distinct bounds. The Gemini study measures voluntary reactions in ordinary use, and its scale covers many responses. Its percentages are properties of the reported feedback measure. The controlled Gemma study sees explicit rater preferences on several dimensions, but it uses explanatory questions from ELI5. A null result on these measures supports quality preservation under those conditions. It leaves open how particular narrow tasks, rare errors or long sequences of related answers might respond to the same watermark.

The distortionary result depends on the chosen proxy for quality. Comparable log perplexity means the two settings are comparable along the paper’s measured axis of token surprise. Users can care about consequences that need different measurements, such as whether an explanation omitted an important qualification. Likewise, the timing result belongs to the tested hardware, serving setup and generator. The draft experiment measures acceptance in the stated Gemma pairing. Deployments with different hardware or workloads would need their own latency and acceptance evidence.

Finally, the single-sequence guarantee concerns the distribution averaged over watermark randomness. Users interacting with a given service encounter an implementation with a key in use. The paper’s observation about reduced inter-response diversity shows a consequence of this distinction even in the quality-preserving configuration. The guarantee, the diversity experiment and the human evaluations answer separate questions about the same system. Taken together, they explain why an answer can remain useful on its own while a collection of answers exhibits a measurable change.

What came after

Adapting the watermark to the choices available

Later papers citing SynthID-Text take up the question of how watermarking should respond to variation in generated text. MorphMark frames that question around flexible, adaptive marking. SynthID-Text’s entropy analysis gives the motivation for such a direction. The amount of freedom to choose among candidates changes within and across passages, so a fixed marking rule encounters different opportunities as it runs. The later paper’s stated focus is adaptation of the mark to this variation.

EntroBench puts entropy at the center of evaluation. Its scope includes scenarios with different entropy and practical things users do to text. SynthID-Text varies temperature and text length to study where the detector has more evidence. EntroBench takes up the broader evaluation question of how watermarking behaves across different entropy conditions and user operations. The connection concerns the conditions of measurement, including what happens between generation and inspection.

A Linguistics-Aware LLM Watermarking via Syntactic Predictability approaches predictability through syntax. SynthID-Text describes the available choices in the next-token distribution. A study organized around syntactic predictability asks how much that opportunity is related to the grammatical structure of the continuation. Topic-Based Watermarks for Large Language Models takes up topic as the basis for marking, moving the question to a property of what the text discusses. The two directions explore different features of text on which a watermark can depend.

SWAN takes a semantic direction, using Abstract Meaning Representation. The relationship to SynthID-Text is clearest in the problem posed by rewriting. Token-level evidence is tied to specific wording and local context. A watermark organized around meaning representation examines evidence at a level at which alternative wordings can express related content. This describes the later paper’s stated approach. The titles of these papers identify the properties they use or evaluate, with no numerical comparison against SynthID-Text implied.

Extending what a detector can report

SynthID-Text’s basic detection decision is whether a passage contains sufficient evidence for a particular mark. XMark and QuantileMark take up multi-bit watermarking, where the mark carries a message. The detection task then includes recovering which message was embedded. XMark places emphasis on reliable multi-bit marking in generated text. QuantileMark frames its contribution around symmetry between messages. The additional question for that design is how the marking scheme treats different possible payloads.

Rethinking LLM Watermark Detection in Black-Box Settings addresses non-intrusive detection by a third party. SynthID-Text separates detection from access to the generator’s next-token probabilities, while still giving the detector the relevant key and seed rule. A black-box third-party setting makes the access assumptions themselves a subject of study. Its connection to the earlier paper is the division of responsibilities between a service that produces text and an outside party that wants to inspect the output.

Position: LLM Watermarking Should Align Stakeholders’ Incentives for Practical Adoption addresses the organizational side of that division. SynthID-Text establishes that a provider can deploy watermarking and measure its effect on a large service. The position paper focuses on how the incentives of parties involved in deploying and using watermarks affect practical adoption. This picks up a limit the original paper names. Coverage depends on decisions made across providers and other participants, even when adding a watermark is technically feasible for an individual service.

Testing provenance under reuse and rewriting

Can LLM Watermarks Robustly Prevent Unauthorized Knowledge Distillation? asks whether output watermarking can serve a role when another system learns from the marked generator’s responses. This gives provenance a different unit of analysis. SynthID-Text measures evidence in a passage associated with the generator’s own sampling process. Distillation raises the question of what evidence can remain observable after those outputs have been used to teach another system. The later article’s title poses that as a robustness question.

ReasMark applies the distillation question to attribution of generated reasoning. Its stated focus brings together the type of text being attributed and the transformation that can intervene before attribution. That is a more specific target than general detection of marked responses from a live service. It extends the provenance problem to evidence associated with reasoning under knowledge distillation.

Two other citing works take up threats the authors identify directly. Beyond A Fixed Seal studies adaptive watermark stealing. The Mark Fades studies adaptive paraphrasing as a threat to detectability. The first concerns whether another party can learn the marking behavior. The second concerns whether a transformation of the marked text can reduce the evidence available to the detector. These questions go beyond whether the mark can be recovered from an original answer. They concern what a provenance claim can establish after the answer, or the behavior that produced it, has become available to someone else.

Cite

Cite as Sumanth Dathathri, Abigail See, Sumedh Ghaisas, Po-Sen Huang, Rob McAdam, Johannes Welbl, Vandana Bachani, Alex Kaskasoli, Robert Stanforth, Tatiana Matejovicova, Jamie Hayes, Nidhi Vyas, Majd Al Merey, Jonah Brown-Cohen, Rudy Bunel, Borja Balle, Ali Taylan Cemgil, Zahra Ahmed, Kitty Stacpoole, Ilia Shumailov, Ciprian Băetu, Sven Gowal, Demis Hassabis and Pushmeet Kohli. 2024. Scalable watermarking for identifying large language model outputs. Nature.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1038/s41586-024-08025-4

@inproceedings{dathathri2024scalable,
  title = {{Scalable watermarking for identifying large language model outputs}},
  author = {Sumanth Dathathri, Abigail See, Sumedh Ghaisas, Po-Sen Huang, Rob McAdam, Johannes Welbl, Vandana Bachani, Alex Kaskasoli, Robert Stanforth, Tatiana Matejovicova, Jamie Hayes, Nidhi Vyas, Majd {Al Merey}, Jonah Brown-Cohen, Rudy Bunel, Borja Balle, Ali Taylan Cemgil, Zahra Ahmed, Kitty Stacpoole, Ilia Shumailov, Ciprian Băetu, Sven Gowal, Demis Hassabis and Pushmeet Kohli},
  booktitle = {Nature},
  year = {2024},
  doi = {10.1038/s41586-024-08025-4},
  url = {https://doi.org/10.1038/s41586-024-08025-4}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/dathathri-2024-scalable-watermarking-identifying-large-language/