Elamur Research

A Watermark for Large Language Models

Paper · 2023 · John Kirchenbauer, Jonas Geiping, Yuxin Wen et al.

Summary

If generated writing passes for ordinary prose, how can someone establish where it came from? The question matters when automated accounts try to influence public discussion, when students submit writing or code for assessment, and when people assemble training collections from a web that contains synthetic material. The authors propose giving a large language model a way to leave statistical evidence in its output. A verifier looks for a pattern that the generator deliberately introduced. This makes the test less dependent on judgments about how human writing normally sounds, which the authors argue can put non-native writers and people using writing aids at risk of false accusations.

Before each new piece of text is chosen, a reproducible random procedure divides the vocabulary into green and red entries. The preceding token, which may be a word or part of one, determines the division in the main implementation. The soft watermark raises the scores of green candidates by a fixed amount. If several continuations are plausible, this preference can steer the choice towards green. If a continuation is overwhelmingly likely, it can still be selected even when it is red. The procedure works at generation time with existing weights. A verifier reconstructs the colors from the passage, counts the green observations, and tests how surprising an excess of green would be under chance. The verifier can run independently of the generator or use a separate service when the coloring rule is keyed and private.

The paper demonstrates the signal with OPT-6.7B. In one sampled continuation with green fraction 0.25 and score boost 2, the authors find 28 green tokens, compared with 9 expected by chance. They give an approximate chance probability of 6×10⁻¹⁴. They describe favorable detection cases with as few as 25 tokens. On news-like C4 prompts, OPT-1.3B continuations of 200 tokens yield 98.4% sensitivity with multinomial sampling at a z-score threshold of 4. The reported sensitivity rises to 99.6% with 4-way beam search. The paper associates this threshold with a nominal one-sided false-positive rate of 3×10⁻⁵. These figures concern different things: the chance calculation for an individual example, the share of marked passages found in an experiment, and the false-alarm rate implied by the statistical test.

A stricter version illustrates both the strength and the cost of enforcing the color rule. If every token must be green, a passage of 16 scored tokens reaches a z-score of 4. In the authors’ example with 1000 scored tokens, even 200 substitutions chosen to damage this hard watermark as much as possible leave a z-score of roughly 6.3. The estimate that removing it would take changes to approximately a quarter of a long passage belongs to that hard-rule analysis. The soft version gives up the all-green guarantee to preserve strongly preferred wording. Its weakest cases include memorized text and fixed formats, and the measured effects of automated rewriting depend on how extensively the text is changed. The detector can still use the same rule when the generator changes the size of its score boost. A positive test gives evidence about how a token sequence was produced, while an inconclusive test leaves its origin open.

Deep dive: A Watermark for Large Language Models

A Watermark for Large Language Models explains how favoring randomized token choices makes generated text detectable and where the signal weakens. · about 45 minutes to read

The problem and its context

Provenance when the writing itself looks ordinary

The paper starts with situations in which knowing the source of a passage would change what someone does with it. A platform might want to investigate whether a group of accounts is being operated automatically. A teacher might need to evaluate work students were expected to produce themselves. Someone collecting data for future training may want to identify synthetic material before it enters the collection. Each situation has a different standard of evidence, but all share a practical difficulty. A passage may circulate independently of the service that generated it, so its recipient may have only the text to examine.

The authors’ objective is for the generator to make some evidence available at that point. Ordinary text generation already involves choices about which token to emit next. The proposal changes a portion of those choices and makes the change statistically recognizable. The pattern can travel with a contiguous fragment of the output, an important property when someone copies part of a completion into another document. A verifier needs enough of the fragment to recover the pattern from local token context.

Proprietary generation is part of the design problem. A provider may offer a service whose parameters and internal scores are unavailable to anyone checking its output. A detector that needs those scores would depend on the provider running the generator again or granting additional access. The authors want verification to be possible even when that access is unavailable. They also want a provider to be able to add watermarking to a system it has already trained. These goals place embedding at the point of token selection and make verification a separate computation.

The paper connects this separation to a concern about fairness. A detector built around the statistical habits of familiar kinds of writing could assign significance to prose that departs from those habits. The authors mention non-native writers and users of computer assistance as groups that could bear the consequences. Their proposed test asks whether tokens line up unexpectedly well with a particular random coloring rule. Its reference point comes from the construction of that rule. Whether the resulting test achieves its intended false-alarm behavior depends on how faithfully the detector’s counting assumptions describe the text being examined. /free/en/topics/bias-fairness-safety/

Putting hidden information into language

The paper places the problem within steganography, the practice of conveying hidden information through an otherwise ordinary artifact. A watermark uses that capacity to signal a source or association. The present paper requires very little hidden information in this sense. The detector is looking for the presence of a signature that belongs to a particular generation procedure. It has no need to read a separate message encoded within the passage.

The authors describe why text historically posed a difficult medium for watermarking. Continuous signals admit small adjustments that can leave the artifact perceptually similar. Text offers discrete choices. A replacement can change the interpretation of a clause, introduce a grammatical error, or simply make a sentence harder to read. How much hiding capacity a passage has depends on whether it offers alternative forms appropriate to the same context.

Early natural-language schemes discussed in the paper used formal representations of the text. One line of work modified the structure of parsed sentences to carry identifying information. A receiver could parse the marked version and recover the pattern without obtaining the unmarked original. Other schemes drew on synonym inventories to encode information through lexical choices. These methods faced a shared constraint. A transformation recognized by the rule system may still be a poor fit for the sentence where it is applied. The authors link the strength of earlier marks to losses in fluency when the rules had too little flexibility.

Neural generation shifted the point where that flexibility could be found. A generator already evaluates many continuations when it prepares to emit a token. The authors describe an earlier scheme that divided the vocabulary into sets corresponding to blocks of a hidden message. To send a block, the generator chose its token from the associated set. The mapping directly encoded the desired information, while the restriction could rule out otherwise appropriate wording. Other work used masked-text prediction to insert information during editing, or trained text-to-text systems to carry out embedding and recovery jointly.

The paper also discusses Meteor, a cryptographic steganography scheme for natural communication. In the account given here, its sender and receiver share the generative system used for encoding and decoding. That is a different access arrangement from the one the present authors seek for verifying proprietary output. They mention a preliminary public description of another proposed watermark based on biased generation and apparent sequence hashing. The details available at the time left the authors without enough information for a direct technical comparison.

A further strand of related work applies a watermark to the parameters of a trained system. The paper discusses methods that make certain trigger inputs elicit recognizable behavior, which may help investigate unauthorized copying of the system. Verification in that setting involves a system under suspicion and a way to query it. Here the object under examination is a passage that may be far removed from its place of production. The mark is intended to survive in that artifact.

What passive detectors have to infer

A passive detector examines text after it has been written and looks for properties associated with automated generation. The paper describes approaches that use features derived from language prediction or train a separate classifier for the task. Such methods can make use of incidental regularities, including artifacts of a particular sampling strategy. The related work also discusses recovering details of generation configurations from their output. These examples establish why ordinary generated text can carry evidence even without a watermark.

The difficulty is keeping that evidence useful when generation changes. The authors cite prior work in which detection methods that had worked on GPT-2 struggled with GPT-3. They also discuss proposed detectors that use the variation in predictability across sentences and earlier work on attacks against detectors. All such features depend on some measurable relationship between writing behavior and source. As the authors see it, a shrinking gap between human and synthetic prose makes decisions near that gap more consequential, especially for writers who are poorly represented by the detector’s idea of typical text.

Watermarking gives the generator and verifier a shared convention. The generator encourages choices according to that convention, and the verifier asks whether the text displays its influence. Establishing the convention requires cooperation from the party controlling generation. This makes the watermark most directly relevant to providers that can change how their services emit text and want others to be able to check the resulting signature.

Where language gives the generator little choice

The authors illustrate a basic obstacle with a familiar English saying and a short program fragment. In the saying, the beginning strongly cues the ending. In the program, the preceding logic and syntax constrain what can sensibly follow. A person and a generator can independently arrive at the same wording or code because the context leaves them few acceptable options. The final sequence then provides very little evidence for distinguishing their origins.

The same constraint limits the amount of information a generator can embed. Suppose a name has a nearly certain continuation. Requiring a different next token to make that position carry the watermark could produce a conspicuous error. The value of that position for provenance is small precisely because its value to the surrounding sentence is so tightly determined. In open-ended prose, in contrast, several transitions, descriptions, or phrasings may each fit. A small preference can influence which appears without badly disrupting the continuation.

The paper uses entropy to talk about how concentrated a set of next-token possibilities is. Low entropy means that probability is concentrated on relatively few entries. Higher entropy means that it is spread more broadly. This is a property of a prediction in context. A long passage can contain highly predictable names or fixed expressions amid stretches that leave substantial choice. The authors’ design allows evidence to accumulate where that choice exists, so a predictable phrase can sit inside a detectable passage without having to carry much of the watermark itself.

The method, step by step

From a prompt to a favored set of tokens

A generator processes a prompt as a sequence of tokens and extends that sequence. A token can be a word or a fragment, and the vocabulary determines which units the generator can emit. The paper describes vocabularies of 50,000 entries or more as typical. Tokenization matters at both ends of this method. Identical visible wording must be interpreted as compatible token sequences for the generator and verifier to agree about which observations contribute to the mark.

At each position the generator reads the prompt and the continuation so far. It assigns a score, called a logit, to each vocabulary entry. The ordinary probability distribution comes from applying softmax to the score vector. Softmax exponentiates the scores and divides each resulting weight by the total weight. Each entry then has a probability relative to all the available entries.

pₖ⁽ᵗ⁾ = exp(lₖ⁽ᵗ⁾) / ∑ᵢ exp(lᵢ⁽ᵗ⁾)

The superscript t refers to the position being generated. The subscript k identifies the entry whose probability pₖ⁽ᵗ⁾ is being calculated, and lₖ⁽ᵗ⁾ is that entry’s logit. The function exp is the exponential function. The index i runs through the vocabulary in the denominator so that the division gives a normalized probability.

A multinomial draw uses the distribution directly, so several continuations can have a chance to appear. Greedy decoding chooses the leading candidate. Beam search retains several possible partial continuations and extends them before deciding which sequence to keep. This distinction matters because a score change can affect the probability of a draw, the ordering of candidates for a single decision, or the ordering of whole continuations.

The main watermark determines which logits to raise by using the most recent token. A hash of that token supplies a reproducible seed to a pseudorandom procedure. The procedure assigns a fraction of the vocabulary to the green list, with the rest on the red list. A token’s color is relative to its context. When the preceding token changes, the vocabulary partition can change with it. The verifier can therefore determine the color of a token from its predecessor without seeing the preceding prompt or any of the scores that went into the selection, provided the relevant preceding token is in the material being checked.

How the soft watermark passes from generation to verification

The steps in order.

How the soft watermark passes from generation to verificationStep 1: Score vocabulary entries for the next position1. Score vocabulary entries for the next positionStep 2: Derive a seed from the preceding token2. Derive a seed from the preceding tokenStep 3: Split candidates into green and red sets3. Split candidates into green and red setsStep 4: Raise green logits before selecting a token4. Raise green logits before selecting a tokenStep 5: Extend the passage and repeat5. Extend the passage and repeatStep 6: Recreate each partition from the observed tokens6. Recreate each partition from the observed tokensStep 7: Test the count of green selections7. Test the count of green selections

The method uses compatible tokenization, the vocabulary, and agreement on how to reconstruct the random lists. The parameter γ is the fraction classified as green. The generator can choose how forcefully to favor that set. The verifier needs to know its expected size and reproduce the assignments. A fragment can contain enough context for most of its positions even when the original beginning is unavailable. At a fragment boundary, a position needs the context called for by the coloring rule before its color can be recovered.

What the hard rule establishes

The first version imposes a simple rule on generation. It rules out all red candidates on each step. With an even split, a token selected without regard to the random coloring has a chance of falling on either side. A generator that obeys the hard restriction always selects a green candidate. Under the idealized null in which the eligible selections are independent fair trials, the probability of an entirely green scored passage decreases as follows.

Pr(all scored tokens are green | H₀) = 1 / 2ᵀ

Pr denotes probability, and the vertical bar means that the probability is evaluated assuming H₀. The symbol H₀ denotes the null hypothesis that the text source has no knowledge of the coloring rule. T is the number of scored tokens. The denominator represents the repeated effect of having two equally likely color outcomes under the hard-rule null.

This all-green calculation makes the source of the evidence easy to see. It would also be a brittle decision rule. Losing a single green observation after an edit would make a passage fail a requirement of perfect compliance, even if its remaining collection of green selections were highly unusual. For that reason, the authors use a test based on the size of the excess. It permits violations and asks whether the passage still contains more favored tokens than chance can readily explain.

The hard restriction produces the largest compliance signal possible for its coloring, while showing exactly where generation can go wrong. When the best continuation lies in the red set, its score cannot help it. The authors use a predictable surname after a given name to make the point. A scheme that disallows the expected surname can disrupt the meaning of the sentence in order to satisfy a rule that has nothing to do with meaning. That failure motivates the change from excluding one set to increasing the relative attractiveness of the other.

What changes under soft enforcement

The modified generator adds the constant δ to green logits and leaves red logits at their original values. After exponentiation, the extra weight due to the bias can be written as a multiplier.

α = exp(δ)

Here δ is the amount added to a green candidate’s logit. The symbol α denotes the factor by which that addition multiplies the candidate’s unnormalized weight. The exponential function exp is the same operation that appears in the ordinary softmax.

The reweighted probability of a green candidate takes the following form.

pₖʷ = αpₖ / (∑ᵢ∈R pᵢ + α∑ᵢ∈G pᵢ)

The index k identifies a green candidate. Its original probability is pₖ, and pₖʷ is its probability with the watermark applied. G is the green set and R the red set. The notation i∈R and i∈G restricts each sum to the specified entries. The denominator adds the original red probability mass to the boosted green mass. A red candidate uses its original weight in the numerator with that same normalization. Probabilities inside either color group preserve their original relative proportions.

The size of the effect depends on where the original mass lies. If several entries compete for the next position, raising the entire green group can make a meaningful difference to the draw. In a greedy decision, it can move a green candidate ahead of a red candidate when their logits are close enough. If a red candidate already dominates the distribution by a wide margin, a finite boost can leave it with most of the probability or still at the top of the ranking. A strongly preferred green candidate generally needed little encouragement in the first place.

This behavior comes from the score transformation itself. The implementation does not need an entropy classifier to decide whether to suspend watermarking for a fixed expression. The same addition acts on each prediction, with different consequences according to the shape of the score distribution. If a name, a date format, or a fragment of code leaves few good alternatives, the soft rule can yield a red selection and proceed. A freer part of the continuation can supply more green selections later.

The generator’s parameters are held fixed. The authors implement their score intervention using the generation interface in Hugging Face with the PyTorch backend. The torch random-number generator constructs the experimental lists from the preceding token. The software component belongs to decoding, where candidate scores are already available. This is distinct from the authors’ separate discussion of possible instruction training against requests that deliberately induce unusual output formats.

Test the excess in the observed passage

The verifier takes the observed passage and reconstructs the list associated with each eligible prediction position. It counts how frequently the visible token lies in its green set. The chance model gives a green probability of γ under H₀. The authors turn the difference between the count and its reference expectation into a one-proportion z-statistic.

z = (|s|ᴳ − γT) / √(Tγ(1−γ))

The sequence being scored is s, and |s|ᴳ denotes its count of green observations. T is the number of observations admitted to the test. The quantity γT is the mean count under the null model. The square root in the denominator is the standard deviation implied by independent green-or-red trials with green probability γ. The statistic z expresses the signed distance from the expected count in those standard-deviation units. Evidence in favor of the watermark comes from the upper tail, where a large green excess lies.

For the even split used in the hard demonstration, the expression takes a simpler form.

z = 2(|s|ᴳ − T/2) / √T

The symbols identify the same sequence, green count, passage length, and statistic. T/2 is the expected count for a split into equal halves. The factor of 2 and square root of T express the normalization for that case. With the hard rule every eligible selection goes into the observed green count, which connects sequence length directly to the test result.

The authors use the upper tail of the standard normal reference distribution to associate a p-value with z. The p-value describes how surprising a count that large or larger would be according to the null. The test thus provides a scale for the evidence beyond a yes-or-no label. The p-value relies on the trial model and gives no prior probability that the text came from a particular service. In the hard example, a fully green passage of 16 tokens yields z=4. The paper also writes the rejection condition as z>4. Equality is the boundary of that strict version of the rule, a distinction worth preserving when reporting the minimum length.

The score boost δ is absent from the detector equation. The verifier can use the same scoring convention if a provider adjusts the bias for different settings or changes the decoding procedure while retaining the same coloring. Such changes can alter the probability that a marked passage passes the test. They leave the reference expectation used by that test tied to γ and the list-generation rule.

Relating prediction uncertainty to the green count

The authors introduce spike entropy to quantify how much the unmodified probability distribution concentrates on its leading possibilities. The name reflects the way a sharply peaked distribution limits the contribution that green promotion can make. Their definition discounts a probability more heavily when it is large.

S(p, z) = ∑ₖ pₖ / (1 + zpₖ)

The vector p contains the original probabilities for a single prediction, with pₖ the probability at vocabulary index k. The sum is over all entries. The second argument z is a modulus that controls the discount and is separate from the detection statistic with the same letter. The function S gives the resulting spike entropy.

For the modulus considered in the analysis, concentration on a single token brings the measure to its minimum. Uniform probabilities give its maximum. Those endpoints can be stated explicitly.

S(concentrated p, z) = 1 / (1 + z)

The left side means that p puts all its mass on one entry. S and z retain their meanings from the definition. Only the entry carrying all the mass contributes to the sum.

S(uniform p, z) = N / (N + z)

Here p has equal probabilities across N vocabulary entries. The symbol N is the number of entries. The result describes a spread-out prediction in which every term contributes equally to S. The paper interprets the measure at large modulus as a softened count of entries above a probability scale. Its role in the watermark theorem is to summarize usable choice from the entire vector, with the scale set by the watermark parameters.

The theorem analyzes a random partition and multinomial sampling. It first relates the color probability at a position to spike entropy, then states a condition on average entropy over a whole sequence.

(1/T) ∑ₜ S(p⁽ᵗ⁾, (1−γ)(α−1)/(1+(α−1)γ)) ≥ S★

The index t runs through the T generated positions. The vector p⁽ᵗ⁾ is the next-token distribution before the boost at that position. The second argument of S is the modulus appropriate to the green fraction γ and the weight multiplier α. The symbol S★ represents the lower bound on the sequence’s average spike entropy. Averages allow a few strongly constrained predictions to coexist with many positions that have substantial flexibility.

The first main conclusion concerns how many green selections the procedure should produce on average.

E[|s|ᴳ] ≥ γαTS★ / (1+(α−1)γ)

The operator E denotes expectation under the generation and partition assumptions. The count |s|ᴳ is the number of green outcomes in sequence s. The numerator combines the green fraction γ, the multiplier α, the length T, and the entropy bound S★. The denominator depends on the fraction of the vocabulary receiving the weight increase. The expression is a lower bound under the stated conditions, so a real count or an empirical mean can be higher.

The proof starts by fixing a candidate and considering the random partitions in which that candidate is green. When the other entries are permuted, the distribution of hypothetical lists remains symmetric, but the mass assigned to those lists can vary. The proof uses convexity of the inverse normalization term to bound the contribution using a configuration in which the other probabilities are averaged. The green candidate’s own probability remains fixed in this argument. Summing the corresponding contributions over candidates produces the spike-entropy expression. Adding the position-level bounds then gives the stated lower bound for the passage.

The second conclusion in the theorem concerns the spread of the green count, which matters because a high mean alone cannot say how often the test misses.

Var(|s|ᴳ) ≤ T[γαS★/(1+(α−1)γ)][1−γαS★/(1+(α−1)γ)]

Var denotes variance, the spread of the count about its mean in squared count units. The first square bracket is the mean lower bound per position. The second bracket subtracts that quantity from one, giving the Bernoulli variance form used in the paper. The proof treats the green indicators as independent, potentially with different success probabilities. In that calculation their variances add, and the concavity of the Bernoulli variance function lets the authors express a bound through an average. The independence assumption is consequential when interpreting the claim for an autoregressive procedure.

The paper gives a simpler bound for a green fraction of at least .5.

Var(|s|ᴳ) ≤ Tγ(1−γ)

The count and parameters here have the same meanings as in the preceding equation. The argument is that the probability of a green choice is at least γ, and the variance of a Bernoulli trial decreases as its success probability rises above half. This supplies a common upper bound per position in the independent-trial calculation.

The authors also give simplifications to illustrate how the terms behave. At γ equal to 1/2 with δ equal to ln(2), roughly 0.7, their expected count bound is given by the following expression.

E[|s|ᴳ] ≥ (2/3)TS★

The expectation and count refer to the same generated sequence. T is its length, and S★ now bounds the average spike entropy with modulus 1/3. The fraction 2/3 comes from the prefactor at the specified γ and δ. The notation ln denotes the natural logarithm.

Var(|s|ᴳ) ≤ (2/3)TS★(1−(2/3)S★)

This is the paper’s corresponding variance expression. Var applies to the same count, and T and S★ refer to the same setting as in the preceding equation. The last factor is the complement of the per-position term.

In the limit of an indefinitely large boost and with half the vocabulary green, the authors give an entropy-bound illustration of hard enforcement.

E[|s|ᴳ] ≥ TS★

Here the entropy modulus is 1, and the lower bound S★ refers to that scale. T and |s|ᴳ still denote the passage length and green count under the theorem’s sampling analysis.

Var(|s|ᴳ) ≤ TS★(1−S★)

The last expression is the variance bound in the same limiting example. It illustrates the theorem’s form as the bias grows. The direct hard restriction also has the simpler accounting property that a generated token admitted by its rule is green.

Repeated phrases and repeated evidence

A deterministic seed lets the detector reconstruct the partition. It also means that a recurrence of the same two-token sequence receives the same classification. If that classification happens to be green, repeated occurrences generate a string of green observations that all originate in the same assignment. A passage may then look unusual under an independent-trials calculation even though each recurrence merely copies an earlier color outcome.

The authors propose counting a repeated sequence once. With the preceding-token rule, the relevant unit is the pair made by the current token and its predecessor. Later occurrences of that pair add to neither the green count nor the number of trials. This can reduce false positives from human repetition. It can also improve sensitivity in passages where repeated, highly predictable material would otherwise supply little additional excess while increasing the length used in the denominator.

A longer seed context is another option discussed in the paper. It changes the relevant unit from pairs to longer n-grams, sequences of adjacent tokens. Longer exact repetitions can be less common. The choice also gives each token a possible role in classifying more downstream positions. This is why the paper treats the context length as both a statistical and a robustness decision.

Quality and the limits of the analytical expression

The authors distinguish quality effects at the extremes of the prediction distribution. When a single token has all the probability mass, a finite bonus cannot give mass to any other entry. When all candidates have equal probabilities, the green preference acts within each sampled partition, but averaging over uniformly random partitions treats the candidates symmetrically. Their original probabilities are also the same at that position, so substituting one candidate for another does not change its original-model log score. Intermediate cases give the watermark room to favor a candidate that the original distribution ranked lower.

The paper states a quality bound using a signed log-probability expression. Its reference term is defined as follows.

P★ = ∑ₖ pₖ⁽ᵀ⁾ ln(pₖ⁽ᵀ⁾)

The index k ranges over vocabulary entries. The unmodified probability of entry k at the position under study is pₖ⁽ᵀ⁾. The superscript T refers to the final position considered in this analysis. The function ln is the natural logarithm. The symbol P★ here follows the paper’s notation for the resulting reference quantity.

Eᴳ,ᴿ[∑ₖ p̂ₖ⁽ᵀ⁾ ln(pₖ⁽ᵀ⁾)] ≤ (1+(α−1)γ)P★

The expectation Eᴳ,ᴿ averages over the green and red partitions. The symbol p̂ₖ⁽ᵀ⁾ is the modified probability at entry k and position T. The logarithm inside the sum still uses the original probability. The factors α and γ respectively describe the multiplier and the proportion of the vocabulary boosted. This reproduces the direction of the displayed inequality in the paper. Its signed logarithms pose a problem for the proof as written. Multiplying a probability upper bound by a negative logarithm reverses the inequality. The expression therefore needs care if it is to serve as a quantitative guarantee about quality. The empirical perplexity measurements use an exponentiated average loss and provide separate evidence.

Public verification and private verification

In the public setup, anyone with the coloring convention can evaluate a passage. The paper also describes a secret-key variant for a provider that wishes to expose the result of verification while keeping the assignment of colors private. The verifier in that case uses the provider’s detection service, which is separate from the service that generates text. The authors envisage rate limits because repeated access to detection can reveal information about how the rule behaves.

For the basic keyed proposal, the paper applies a pseudorandom function to a window of preceding tokens.

Fκ(s⁽ᵗ⁻ʰ⁾, …, s⁽ᵗ⁻¹⁾)

The symbol F denotes the pseudorandom function and κ its secret key. The sequence entries s⁽ᵗ⁻ʰ⁾ through s⁽ᵗ⁻¹⁾ are the h tokens immediately before the current position t. The ellipsis stands for the intervening entries in order. This function supplies reproducible randomness for generating a private partition. The paper gives AES and SHA3 as examples of primitives that can be used in this role.

The authors describe a tension between hiding the assignments and retaining local tolerance to changes. More tokens in the seed mean that there are more possible contexts to observe. They express the scale of exhaustive observation of a basic scheme in vocabulary terms.

|V|¹⁺ʰ

The symbol |V| is the number of entries in the vocabulary, and h remains the preceding context length. The exponent accounts for the ordered preceding context and its possible next token. The expression is the authors’ description of exhaustive coverage, with partial information potentially easier to obtain. They also point out that an ordinary longer window lets a change affect the colors recovered at several later positions. They suggest h=2 or 3 for the simple window rule as a way to limit this effect.

In their more elaborate private variant, a candidate helps determine which preceding token participates in its color assignment. The generator considers candidates from higher to lower scores, seeking one that satisfies the green condition within the permitted score gap δ. When the search would have to go farther, it uses the highest-scoring red candidate. This gives the proposal a quality safeguard similar in spirit to soft promotion, even though the greedy search rule is different.

The authors argue that a change to one member of the context affects the selected dependency for a given later position with probability only 1/h, where h is the window length. The intended benefit is to draw on a wider window without making every downstream color depend on every token in it. They also propose sampling one secret key from several for each generation. A verifier checks the possible keys and accounts for the extra chances of a positive result through a multiple-testing correction, such as Bonferroni. These are extensions of the design. The central detection results below concern the simpler previous-token rule.

Experiments and results

How the continuations were collected

The principal experiments use OPT-1.3B. The authors take their prompts from the RealNewsLike subset of C4. They select texts and reserve an ending of fixed token length from each. The earlier portion becomes a prompt, and the held-out ending provides the human continuation for that prompt. This gives the researchers actual news-like continuations against which to evaluate false alarms, alongside continuations sampled with the watermark and ordinary generations used to examine quality.

The multinomial runs collect at least 500 continuations in the length window T=200±5. The tradeoff experiments use 500±10 continuations in that window per parameter choice. For the multinomial analysis in the appendix the authors report a sampling temperature of 0.7, a setting that affects how concentrated the sampling probabilities are. It belongs to the generation configuration, so its effect would enter the test through the tokens that are actually emitted.

The greedy and beam-search runs use a different procedure to obtain comparable lengths. Beam search tended to favor shorter sequences, so the authors disabled the end-of-sequence token during production for these runs. They then truncated the sequences to T=200. This gives them a comparison of decoding methods at a controlled length. It also makes the conditions relevant when interpreting the measured advantage of search, since a service that lets those decoders stop normally can return a different mix of lengths.

For quality evaluation the authors use OPT-2.7B as a separate scoring system. It receives the prompt and evaluates the continuation token by token. The loss measures the surprise assigned to an observed token in its context, using the reference system’s probabilities. The paper computes perplexity by exponentiating the average token loss on the completion positions. Prompt tokens supply conditioning context and are outside that average. The authors use this scoring approach for generated and human continuations.

Perplexity can help identify cases where favoring green entries makes outputs less plausible to the reference system. It is also important to keep it distinct from the detection statistic. Perplexity uses the quality scorer’s predictive probabilities. The watermark score can be computed from the emitted tokens and their reproducible colors. A passage can receive a large z-score and still read plausibly to the scorer, which is exactly the combination the authors seek.

Detection at the chosen cutoff

The paper calls a missed marked generation a type-II error or false negative. Sensitivity is the share of marked examples found by the test. A type-I error is a false positive, as when a human continuation triggers the detector. Both depend on the chosen cutoff. The authors also show receiver operating characteristic curves that trace detection and false alarms across cutoffs. The area under such a curve, AUC, summarizes discrimination across the sweep. AUC and sensitivity at a chosen threshold therefore describe different aspects of the same score.

For the principal sensitivity calculation the authors use soft promotion with γ=.5 and δ=2 on OPT-1.3B continuations from C4 RealNewsLike. The length is 200 tokens in the sensitivity setup, and the reported cutoff is z=4. Multinomial sampling yields empirical sensitivity of 98.4%. Greedy decoding with 4-way beam search yields 99.6%. Comparing these under the same intended watermark and threshold shows that the choice of decoding procedure changes how frequently the completed passage carries enough green evidence.

Detection sensitivity on OPT-1.3B continuations of C4 RealNewsLike prompts at z=4

Watermarked continuations produced with beam search cross the cutoff more often.

Detection sensitivity on OPT-1.3B continuations of C4 RealNewsLike prompts at z=4Soft watermark with multinomial sampling: 98.4Soft watermark with multinomial sampling98.4Soft watermark with greedy decoding and 4-way beam search (this paper): 99.6Soft watermark with greedy decoding and4-way beam search (this paper)99.6
The numbers
System or settingsensitivity %
Soft watermark with multinomial sampling98.4
Soft watermark with greedy decoding and 4-way beam search (this paper)99.6

The authors report that the subset of 375/500 generations above the 25th percentile of spike entropy reaches 100% detection at z=4. The split is by a property of the generated continuations in the sensitivity experiment. The result complements the overall sensitivity by showing where failures are concentrated. Even when all passages have the same nominal length, the subset with more generation flexibility is easier to identify.

The normal-reference test gives a nominal type-I rate of 3×10⁻⁵ at the stated cutoff. The empirical error tables support a more limited statement about observed errors. The authors describe runs in the main error tables with no observed type-I errors, while a table caption gives a maximum of one observed type-I error per run. For the soft variants with δ=2.0 in that caption, the type-II error at z=4 is at most 1.6% (8/500). The strongest configuration singled out in the caption, δ=10.0 and γ=0.25, has no observed type-II errors. These are sample results under the described conditions. The rare nominal type-I probability comes from the test’s reference calculation.

How far the entropy prediction goes

In the multinomial sensitivity analysis, the paper reports a mean spike entropy of S=0.807 over approximately 500 generations. At that entropy the theorem puts the expected green count at no less than 142.2. The observed mean is 159.5 green tokens. The theoretical result describes an amount of green evidence the authors expect under the theorem’s assumptions. The measured count reflects what happened with the preceding-token pseudorandom construction in that experiment.

Taking the entropy to be the reported mean, the authors put the count’s standard deviation at no more than 6.41 tokens. A Gaussian approximation gives sensitivity of 98.6% and a type-II error rate of 1.4% for that entropy level. The conditional calculation and the 98.4% observed across multinomial generations concern different populations of predictions. The calculation holds entropy at the mean, while the measured rate includes easier and harder individual passages.

The paper also repeats the approximation using the observed green-count mean of 159.5. This produces an estimated type-II rate of 5.3×10⁻⁷ for the illustrated calculation. It is an approximation using empirical information about the count, as the authors emphasize. Low-entropy examples can still be missed in the aggregate experiment. The contrast shows why a stronger estimate for a passage at typical entropy is compatible with observable misses in a collection of passages with varying entropy.

Signal strength, generation quality, and passage length

The authors vary the green fraction and the score boost, plotting average z-score against perplexity for the resulting continuations. Under multinomial sampling they identify γ=.1 as Pareto-optimal within the comparison. A point on that tradeoff is favorable because improving one of the measured objectives would require worsening the other relative to the settings shown. The small green fraction gives each green excess a low chance reference, while the accompanying bias still has to make enough green candidates competitive. The authors use the comparison to show that the best balance can occur with a relatively small favored set.

The plots for greedy decoding with beam search show a different relationship. With 8 beams the authors describe strong increases in z-score over a range with little change in oracle perplexity. Search can retain continuations that differ across more than one choice. Some of those paths combine natural wording with more favored tokens. The reported tradeoff shows what happened with the tested decoders and settings, and the ROC comparison likewise attributes a slightly higher AUC to beam search for a given δ.

For the passage-length analysis the authors vary the number of scored tokens from 2 to 200. They report an average z-score above 5 with as few as 35 tokens under 8-way beam search and δ=2. The word “average” matters because a low-entropy continuation can provide much less evidence in the same span. The introductory claim about detection with 25 tokens is also a statement about what is achievable on favorable text. It is useful to distinguish short-span capability from the measured detection rate on the longer C4 continuations.

The OPT-6.7B example illustrates the count that can drive such a result. Under multinomial sampling with γ=0.25 and δ=2, the continuation contains 28 green tokens against a reference expectation of 9. The authors report a chance probability of roughly 6×10⁻¹⁴. The example shows the statistical separation that a count can provide when a particular passage contains a large excess. It is an individual demonstration with a different generator and green fraction from the main C4 sensitivity comparison.

Evidence after automated replacement

The authors test how much marked text survives a particular automated editing procedure. They use T5-Large to replace spans and arrange the experiment so that the editing system has no access to the green assignments. This simulates an attempt to change a passage whose watermark is private. A budget limits changes to a portion of the original, keeping the evaluation connected to the practical goal of retaining useful text. The resulting text is scored again for the watermark and evaluated for perplexity.

The experiment uses 500 continuations in the T=200±5 length window. The initial multinomial watermark uses γ=0.5 and δ=2.0. At a replacement budget of ε=0.1 the paper reports a reduction in detection AUC of 0.01. The budget parameter ε specifies the permitted amount of replacement. At ε=0.3 the edits suppress more of the signal. The figure caption associates the higher budget with about 15 points of additional perplexity compared with the original marked passages. The main discussion describes the attacked passages’ average perplexity as increasing by 3× and notes that the larger budget requires more calls to perform the replacements.

Those measurements jointly characterize the particular test. The change in AUC describes damage to the detector’s ability to discriminate across thresholds. The perplexity change describes how the edited continuations score under the paper’s quality measure. The authors’ threat model gives weight to both because someone who wants to keep using the generated passage usually also wants the result to remain useful. The edit procedure’s measured quality cost belongs to this experiment and its scoring setup.

Factual questions put the quality trade-off under pressure

The appendix asks whether the same score change can disrupt short factual answers. The authors sample 50,000 questions from the validation split of unfiltered TriviaQA. They present the task without demonstrations and use greedy decoding to favor the unmarked baseline’s performance. The evaluation compares responses with the recorded lists of acceptable answer forms. Exact Match gives credit for a matching answer, while whitespace-tokenized F1 provides a measure of partial overlap. /free/en/topics/question-answering/

The comparison involves FLAN-UL2 and BLOOMZ, each evaluated with ordinary decoding and a soft watermark with γ=0.5 and δ=2.0. The paper reports a decline of less than 4 points in Exact Match for both systems when the watermark is applied. The authors expect answers of 5 to 10 tokens to give the detector weak evidence because a factual query usually constrains the available completions. The setup asks whether preserving the ability to answer remains possible when an intervention can move a close second choice past the answer the generator would normally give.

The authors treat the task as a demanding check on the cost of biasing the next token. Greedy decoding makes the consequence of a ranking change direct. A watermark can leave a high-confidence answer alone, or steer generation away from the usual top choice if the gap is small. Exact Match can penalize a change in surface form as well as a change in factual content. Accordingly, the reported decline measures performance on this short-answer task. The paper leaves a broader study of factuality for later work.

What the ablations show

The green fraction and the score boost do different jobs

The parameter sweeps reveal why watermark strength depends on more than the size of the logit addition. Reducing the green fraction changes the benchmark under H₀ as well as the set of choices available to the generator. An observed passage with many green tokens can be more striking when only a small proportion of entries qualify. At the same time, a small green set has fewer chances to contain a candidate the generator already favors. The observed benefit depends on whether the bias and decoding procedure can find suitable green choices often enough.

Increasing δ holds the nominal chance behavior fixed for a given γ while changing the generator’s preferences. The ROC curves described by the paper show stronger detection at higher δ in their sweeps. The perplexity comparison exposes the other side of that change. A large enough boost can reorder candidates with meaningful gaps in original scores. The experiments on joint settings show why a provider can tune the degree of enforcement for a task while still using the same test when the coloring scheme remains fixed.

The hardest empirical setting suppresses observed misses in the reported run. The softer settings supply the more informative evidence about quality because they leave room for red continuations. The paper’s central design question is how much green excess remains when a system is allowed to choose a better red candidate. Setting the parameters then becomes a question about the joint behavior of decoding, text quality, and the test.

Search changes how the bias is expressed

The decoder comparison isolates a mechanism the multinomial theorem does not describe. An individual draw commits immediately to one token and its resulting context. Beam search keeps several plausible histories, each of which can induce a different sequence of future green lists. This gives the search several ways to accumulate favored selections over a passage. A locally costly promotion can be avoided if another continuation offers more opportunities to satisfy the preference without making the text implausible.

The authors’ average-z and perplexity plots show that this extra search can improve the measured balance, particularly in the reported 8-beam setting. The 4-way sensitivity result offers evidence at a specific threshold. Read together, they show improvements both in the typical strength of the mark and in the fraction of examples detected in the comparison that reports sensitivity. The mechanism is a property of the combined decoder and watermark. The probability bound for drawing tokens under random partitions cannot be applied unchanged to predict which beam survives.

Controlling passage length makes these differences easier to attribute to the output selection process. There is still a procedural difference because the greedy and beam-search runs use end-of-sequence suppression and truncation. The cleanest reading is that search improves the measured watermarked continuations under the length-controlled setup. That evidence leaves open how much of the benefit survives when short completions and natural stopping are part of the evaluated task.

Weak detections are concentrated where choices are constrained

The entropy split addresses a central prediction of the design. If the watermark works by exploiting alternatives, misses should collect among passages whose probability distributions concentrate heavily on particular outputs. The fact that all generations in the higher-entropy subset are detected at the reported threshold supports that prediction. Equal nominal length makes this comparison especially informative because the difficult passages cannot be explained simply by having fewer tokens.

The appendix provides selected examples from both ends of the entropy ordering and from both ends of the z-score ordering for a soft watermark with δ=2.0 and γ=0.5. These orderings help distinguish the generator-side measure of usable choice from the detector-side measurement of evidence. The examples that the authors identify as failures include close reproductions of existing human wording and output constrained by a template. A date or time format can fix much of the required form. A memorized continuation can concentrate the generator’s probability on reproducing the source.

The examples support an explanation of how misses arise while leaving their causes incompletely enumerated. A selected near-copy shows what memorization can look like in an unsuccessful detection case. It does not give the prevalence of memorization or a complete account of why every miss occurred. The entropy split supplies broader evidence for uneven available choice. The examples make that property concrete in specific outputs.

Where theory becomes conservative

The appendix compares empirical green fractions against the entropy-based prediction for γ=.5 as δ changes. The authors report that the lower bound stays fairly close at smaller δ and falls farther below observed sensitivity when δ is larger. An observed count above a lower bound is consistent with the intended direction of the theorem. How far above it the count falls matters for predicting performance or choosing settings from theory.

This comparison gives a practical reason for reporting both the bound and the observations. If the theory provides a floor for the mean green count but the true count is usually higher, a calculation based on the floor can understate the empirical operating range. Conversely, using a typical observed mean to explain all failures would overlook the influence of passages well below typical entropy. The authors identify large δ combined with small γ as a regime where sharper sensitivity bounds remain an open question.

The repetition analysis exposes a separate gap between the stylized calculation and the practical detector. More occurrences of the same adjacent pair can make the fraction of green observations appear more stable while adding no fresh color assignment. Excluding those repeats changes the count in a way that directly addresses that source of dependence. This is an analytical observation and a proposed scoring adjustment. The paper does not report a large repetition benchmark measuring the adjustment’s effect on false positives across different forms of writing.

Editing changes the evidence and the passage together

The replacement-budget comparison holds the starting watermark setting fixed. A larger allowed edit can alter more selections and more of the context from which colors are recovered. The larger budget studied in the experiment produces more detection degradation, with a corresponding increase in reference perplexity. At the smaller budget the AUC change is modest. The comparison locates the measured resilience in a specific region of editing strength instead of treating any detectable change to the passage as equivalent.

The chosen evaluator gives a consistent way of scoring the original and altered writing. It measures how expected each is under the quality scorer. The experiment cannot reveal whether every high-perplexity replacement seriously changes the message or whether a different replacement would preserve meaning and fluency at the same detection score. It does show that the particular editing process studied incurred costs while weakening the mark. The setup is most informative when the attacker, objective, and quality measure travel with the result.

Limitations

Limits the authors identify

The authors regard low entropy as a basic restriction on where a token watermark can work. A detector looking only at the token sequence sees the same object when a human and a generator independently produce an identical answer. Soft enforcement is designed to preserve many highly confident predictions, which leaves less signal in exactly those cases. The practical response within the paper is to obtain evidence from broader context when possible. A document made largely of fixed phrases or templated completions may offer relatively few genuinely informative decisions even if it is long.

They also limit their scope to the form of the emitted text. A newly written essay based on an automatically generated outline may preserve the outline’s ideas while sharing too little of its wording to carry the original mark. The same issue arises if a person uses the output as a starting point for thorough redrafting. The paper leaves open the possibility of a watermark on semantic content and does not analyze such a system. The detector’s evidence concerns a recognizable trace in the surface sequence.

The robustness discussion assumes that the person trying to remove the watermark values the capabilities of the protected generator and has access to weaker public alternatives. That premise gives the reported quality tradeoff its purpose. If comparable unmarked text is readily available, an attacker has less reason to depend on the marked output in the first place. The authors treat extensive manual paraphrasing as outside the main threat model because of the human effort it requires, while recognizing that rewriting can alter the signal and that mostly unchanged passages may remain detectable.

The hard-rule calculation illustrates the force of an initially all-green sequence. In the example of 1000 eligible positions, 200 substitutions can create at most 400 violations because a replacement can affect its own green status and the classification of the next token. The paper reports z≈6.3 and p≈10⁻¹⁰ even at this worst-case count. It gives approximately a quarter of the tokens as the scale of changes generally needed to erase a long hard watermark in that analysis. The premise of an entirely green starting sequence and the one-token dependency are central to that result. A soft watermark begins with some red selections, and longer-context schemes have other dependencies, so the example gives no common editing guarantee for all versions.

The authors identify several ways the sequence examined by the detector can diverge from the one produced by the generator. They discuss whitespace, sub-word boundaries, visually similar characters, and invisible Unicode characters. Alterations that look slight to a reader can change the token identities used in the coloring rule. Normalization and canonicalization are their proposed defenses against this class of discrepancy. They also describe a separate threat in which a generator is induced to output text in a systematically transformed form. Sufficiently capable instruction following can make that a significant challenge. The authors raise instruction tuning against such requests as a possible mitigation, citing work on shaping response behavior. Constitutional AI: Harmlessness from AI Feedback

A private watermark additionally depends on how verification is offered. A private key restricts the ability to reconstruct lists directly, while making detection dependent on the party that holds the key. The threat model assumes rate-limited access to the checking interface. The authors discuss why sequences of closely related queries could be informative to an attacker. Their proposed wider-context and multiple-key constructions aim to complicate inference about the private rule. The performance of the basic preceding-token watermark on news-like continuations does not validate every operational assumption of these extensions.

The authors leave several detection settings open. A verifier observing a stream needs a rule for when to make a decision as evidence accumulates. Someone inspecting a mixed document may need to find a short marked span surrounded by ordinary text. A single document-wide count can dilute a local signal, while searching many candidate spans changes the inference problem. The paper calls for further study of these settings and of what robust hashing rules can guarantee.

Limits evident from the setup and analysis

The experimental comparison covers a particular mix of source data, generators, lengths, and decoding settings. C4 RealNewsLike supplies news-like prompts and held-out continuations, which gives the authors a common basis for their tests. It provides no direct measurement of the same operating point on other genres or languages. The factual-answer experiment extends the quality question to another setting, but its short, constrained outputs were deliberately considered poor candidates for dependable detection. The experiments therefore support existence and measured performance under specific conditions more directly than cross-domain calibration.

The quality proxy is also narrow. A continuation can score well under OPT-2.7B while making an inaccurate claim, failing its intended task, or changing the meaning of a source. The comparison using perplexity has the virtue of applying a common probability-based measure to different settings. Illustrative outputs let readers inspect selected examples. The combination leaves room for a separate question about how often the watermark changes something people care about even when the quality score hardly moves. TriviaQA addresses part of that question through exact matches and answer overlap, with the stated constraints of its prompt and decoding procedure.

The chance calculation and the observed frequency of false alarms have different evidential bases. A study of around 500 examples per setting can show that false positives were uncommon in those runs. It is too small to measure the nominal 3×10⁻⁵ rate precisely. That rate is obtained from the normal-reference z-test under its null assumptions. Extreme p-values in particular should be read as outputs of the stated reference calculation. Repeated sequences are a recognizable reason the actual distribution of the count can diverge from that reference. Skipping them addresses one source of dependence, leaving calibration for other document structures and preprocessing choices open.

The variance derivation also deserves care on its own terms. The proof treats green outcomes at different positions as independent and writes a Bernoulli variance calculation using a term that the preceding lemma bounds from below. A lower bound on success probability does not by itself give the success probability exactly. Applying the Bernoulli variance function to a lower bound also requires attention to which side of its maximum the probabilities lie on. In autoregressive generation the probabilities at later positions depend on earlier selections. Fresh list randomness in the theoretical setup and repeated assignments in the implementation are distinct cases. The green-count lower bound provides a direct account of the role of entropy, while the stronger variance and sensitivity conclusions require the additional assumptions in their derivation.

There is a related distinction between nominal false-positive control and guarantees for individual writers. The choice of random coloring avoids training the main detector to identify a particular writing style. This is the paper’s basis for expecting fewer style-related false alarms. The main evaluation does not estimate group-specific rates for non-native writers or people using writing aids. A fairness conclusion for those populations would require evidence about their text and about how a deployed detector processes it. A positive test on someone’s passage also supplies no independent evidence about the person’s intent, factual accuracy, or compliance with a particular institution’s rules.

Finally, the main attack experiment evaluates one replacement system and a bounded editing objective. It can show that this process leaves much of the detection signal intact at its smaller budget and extracts a higher measured cost when it degrades the signal more strongly. This setup does not cover an editor with a different objective, a different quality measure, or the ability to select passages after seeing verification results. The paper’s robustness evidence is strongest when attached to the specific generation rule, initial signal, editing assumptions, and outcome being measured.

What came after

Reliability, distortion, and other generation settings

On the Reliability of Watermarks for Large Language Models carries forward the question of reliability itself. The original paper gives a score, a reference distribution, and tests on passages of controlled length. It also raises the problem of detecting a short marked span inside a larger body of text. Reliability work belongs to the next stage of that inquiry, where success means being able to recover the evidence under the conditions in which a verifier actually receives a passage. The paper’s title identifies reliability as that work’s subject, with no basis here for assigning it a particular experiment or result.

Robust Distortion-free Watermarks takes up two properties that sit in tension in the original experiments. A mark needs to remain recoverable after changes, and its presence should preserve the generation behavior readers and users value. The earlier method displays this tension through the relationship between green promotion and perplexity. The later work makes robustness and distortion-free watermarking its subject. That focus puts it on the generation side of provenance research, where the question is what kind of evidence can be introduced while controlling its effect on output.

Provable Robust Watermarking centers formal guarantees about robustness. The original paper includes a worst-case substitution calculation for its very strong hard watermark and a separate experiment on soft-watermark degradation. Formal robustness research asks what can be established for a specified marking scheme under explicitly described changes. The connection is especially relevant because the amount of information carried by a soft watermark varies across passages. The title establishes a focus on provable robustness without specifying which of the earlier assumptions its guarantees retain.

Who Wrote this Code? brings watermarking to code generation. The original paper uses a tightly constrained program fragment to illustrate how little room some text leaves for alternative tokens and suggests that generation settings can differ between code and prose. The later work makes that application the object of study. In the terms of the original argument, code is a setting where the positions available for embedding evidence and the costs of changing a preferred continuation deserve evaluation in their own right.

Rewriting and alternative sources of evidence

Paraphrasing Evades Detectors addresses the difficulty posed by changes in wording and proposes retrieval as a defense. That connection follows directly from the original paper’s restriction to the observed token sequence. A rewritten passage may still be useful to the person who generated it while displaying much less of the original pattern. Retrieval frames the detection problem through the possibility of finding related material, adding another route to evidence when direct signals in the revised text are hard to recover.

Can AI-Generated Text be Reliably Detected? poses the broader reliability question. The original paper’s detection test exploits a specific cooperative source whose output probabilities have been intentionally changed. Asking about reliable detection across generated text more generally widens the scope to the adequacy of the available evidence. A deliberate mark, features of the writing, and information about how the passage was obtained are different resources for answering that question.

Several citing papers give names to other statistical signals used for detection. DetectGPT approaches zero-shot detection through probability curvature. DetectLLM uses log-rank information for zero-shot detection. Fast-DetectGPT names efficiency and conditional probability curvature as its focus. These works develop the passive side of the problem the watermark paper sets out in its related work. Their titles identify the evidence they examine. The original watermark gives a verifier different evidence by deliberately influencing the text before it is emitted.

The consequences of detector errors

GPT Detectors Are Biased Against Non-Native English Writers takes up a concern the watermark paper raises about style-based classification. It gives the issue of bias against non-native writers its own empirical question. This is relevant to the original design because the authors choose a randomized assignment as the test’s basis partly to avoid relying on conventional patterns of writing. Group-specific evaluation and theoretical chance calibration address different aspects of the risk and call for different evidence.

MAGE locates machine-generated text detection in naturally varied settings through its focus on detection “in the wild.” Monitoring AI-Modified Content at Scale addresses the role of ChatGPT in conference peer reviews. These topics put provenance questions in settings where text can be revised and where the units of interest may be documents or collections as well as individual generated passages. The original paper’s output watermark supplies evidence at the level of a scored sequence. Later work on editing, reliability, and applications explores conditions in which the available text and the question being asked about its production vary together.

 Institutions

 Fields, topics and concepts

Cite

Cite as John Kirchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz, Ian Miers and Tom Goldstein. 2023. A Watermark for Large Language Models. arXiv:2301.10226.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2301.10226 · arXiv 2301.10226

@misc{kirchenbauer2023watermark,
  title = {{A Watermark for Large Language Models}},
  author = {John Kirchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz, Ian Miers and Tom Goldstein},
  year = {2023},
  doi = {10.48550/arxiv.2301.10226},
  eprint = {2301.10226},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2301.10226}
}

References

60 references, from the paper's own bibliography.

  1. Aaronson, S. My AI Safety Lecture for UT Effective Altruism, November 2022. URL https://scottaaronson.blog/?p=6823. OpenAlex ↗ · Scholar ↗
  2. Abdelnabi, S. and Fritz, M. Adversarial Watermarking Transformer: Towards Tracing Text Provenance with Data Hiding. In 2021 IEEE Symposium on Security and Privacy (SP), pp. 121–140, May 2021. . OpenAlex ↗ · Scholar ↗
  3. Adi, Y., Baum, C., Cisse, M., Pinkas, B., and Keshet, J. Turning your weakness into a strength: Watermarking deep neural networks by backdooring. In Proceedings of the 27th USENIX Conference on Security Symposium, SEC'18, pp. 1615–1631, USA, August 2018. USENIX Association. ISBN 978-1-931971-46-1. OpenAlex ↗ · Scholar ↗
  4. Atallah, M. J., Raskin, V., Crogan, M., Hempelmann, C., Kerschbaum, F., Mohamed, D., and Naik, S. Natural Language Watermarking: Design, Analysis, and a Proof-of-Concept Implementation. In Moskowitz, I. S. (ed.), Information Hiding, Lecture Notes in Computer Science, pp. 185–200, Berlin, Heidelberg, 2001. Springer. ISBN 978-3-540-45496-0. . OpenAlex ↗ · Scholar ↗
  5. Atallah, M. J., Raskin, V., Hempelmann, C. F., Karahan, M., Sion, R., Topkara, U., and Triezenberg, K. E. Natural Language Watermarking and Tamperproofing. In Petitcolas, F. A. P. (ed.), Information Hiding, Lecture Notes in Computer Science, pp. 196–212, Berlin, Heidelberg, 2003. Springer. ISBN 978-3-540-36415-3. . OpenAlex ↗ · Scholar ↗
  6. Bai, Y., Kadavath, S., Kundu, S., Askell, A., Kernion, J., Jones, A., Chen, A., Goldie, A., Mirhoseini, A., McKinnon, C., Chen, C., Olsson, C., Olah, C., Hernandez, D., Drain, D., Ganguli, D., Li, D., Tran-Johnson, E., Perez, E., Kerr, J., Mueller, J., Ladish, J., Landau, J., Ndousse, K., Lukosiute, K., Lovitt, L., Sellitto, M., Elhage, N., Schiefer, N., Mercado, N., DasSarma, N., Lasenby, R., Larson, R., Ringer, S., Johnston, S., Kravec, S., Showk, S. E., Fort, S., Lanham, T., Telleen-Lawton, T., Conerly, T., Henighan, T., Hume, T., Bowman, S. R., Hatfield-Dodds, Z., Mann, B., Amodei, D., Joseph, N., McCandlish, S., Brown, T., and Kaplan, J. Constitutional AI: Harmlessness from AI Feedback, December 2022. URL https://www.anthropic.com/constitutional.pdf. our card
  7. Bender, E. M., Gebru, T., McMillan-Major, A., and Shmitchell, S. On the Dangers of Stochastic Parrots: Can Language Models Be Too Big? In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, FAccT '21, pp. 610–623, New York, NY, USA, March 2021. Association for Computing Machinery. ISBN 978-1-4503-8309-7. . URL https://doi.org/10.1145/3442188.3445922. OpenAlex ↗ · Scholar ↗
  8. Bergman, A. S., Abercrombie, G., Spruit, S., Hovy, D., Dinan, E., Boureau, Y.-L., and Rieser, V. Guiding the Release of Safer E2E Conversational AI through Value Sensitive Design. In Proceedings of the 23rd Annual Meeting of the Special Interest Group on Discourse and Dialogue, pp. 39–52, Edinburgh, UK, September 2022. Association for Computational Linguistics. URL https://aclanthology.org/2022.sigdial-1.4. OpenAlex ↗ · Scholar ↗
  9. Boenisch, F. A Systematic Review on Model Watermarking for Neural Networks. Frontiers in Big Data, 4, 2021. ISSN 2624-909X. . URL https://www.frontiersin.org/articles/10.3389/fdata.2021.729663. OpenAlex ↗ · Scholar ↗
  10. Boucher, N., Shumailov, I., Anderson, R., and Papernot, N. Bad Characters: Imperceptible NLP Attacks. In 2022 IEEE Symposium on Security and Privacy (SP), pp. 1987–2004, May 2022. . OpenAlex ↗ · Scholar ↗
  11. Butoi, V. Things like GPTZero are scary. I'm sure the creator didn't have the intention, but the fact that it's marketed as "a solution to detecting AI written responses" even though there's no evidence to show it works consistently and is nevertheless being EMPLOYED by schools, is crazy., January 2023. URL https://twitter.com/VictorButoi/status/1614779846210752512. OpenAlex ↗ · Scholar ↗
  12. Chiang, Y.-L., Chang, L.-P., Hsieh, W.-T., and Chen, W.-C. Natural Language Watermarking Using Semantic Substitution for Chinese Text. In Kalker, T., Cox, I., and Ro, Y. M. (eds.), Digital Watermarking, Lecture Notes in Computer Science, pp. 129–140, Berlin, Heidelberg, 2004. Springer. ISBN 978-3-540-24624-4. . OpenAlex ↗ · Scholar ↗
  13. Christiano, P., Leike, J., Brown, T. B., Martic, M., Legg, S., and Amodei, D. Deep reinforcement learning from human preferences. arxiv:1706.03741[cs, stat], July 2017. . URL http://arxiv.org/abs/1706.03741. our card
  14. Crothers, E., Japkowicz, N., and Viktor, H. Machine Generated Text: A Comprehensive Survey of Threat Models and Detection Methods. arxiv:2210.07321[cs], November 2022. . URL http://arxiv.org/abs/2210.07321. OpenAlex ↗ · Scholar ↗
  15. Dai, F. and Cai, Z. Towards Near-imperceptible Steganographic Text. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 4303–4308, Florence, Italy, July 2019. Association for Computational Linguistics. . URL https://aclanthology.org/P19-1422. OpenAlex ↗ · Scholar ↗
  16. Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv:1810.04805 [cs], May 2019. URL http://arxiv.org/abs/1810.04805. our card
  17. Fang, T., Jaggi, M., and Argyraki, K. Generating Steganographic Text with LSTMs. In Proceedings of ACL 2017, Student Research Workshop, pp. 100–106, Vancouver, Canada, July 2017. Association for Computational Linguistics. URL https://aclanthology.org/P17-3017. OpenAlex ↗ · Scholar ↗
  18. Foltýnek, T., Meuschke, N., and Gipp, B. Academic Plagiarism Detection: A Systematic Literature Review. ACM Computing Surveys, 520 (6):0 112:1–112:42, October 2019. ISSN 0360-0300. . URL https://doi.org/10.1145/3345317. OpenAlex ↗ · Scholar ↗
  19. Gabrilovich, E. and Gontmakher, A. The homograph attack. Communications of the ACM, 450 (2):0 128, February 2002. ISSN 0001-0782, 1557-7317. . URL https://dl.acm.org/doi/10.1145/503124.503156. OpenAlex ↗ · Scholar ↗
  20. Gambini, M., Fagni, T., Falchi, F., and Tesconi, M. On pushing DeepFake Tweet Detection capabilities to the limits. In 14th ACM Web Science Conference 2022, WebSci '22, pp. 154–163, New York, NY, USA, June 2022. Association for Computing Machinery. ISBN 978-1-4503-9191-7. . URL https://doi.org/10.1145/3501247.3531560. OpenAlex ↗ · Scholar ↗
  21. Goodside, R. There are adversarial attacks for that proposal as well — in particular, generating with emojis after words and then removing them before submitting defeats it., January 2023. URL https://twitter.com/goodside/status/1610682909647671306. OpenAlex ↗ · Scholar ↗
  22. Grinbaum, A. and Adomaitis, L. The Ethical Need for Watermarks in Machine-Generated Language. arxiv:2209.03118[cs], September 2022. . URL http://arxiv.org/abs/2209.03118. OpenAlex ↗ · Scholar ↗
  23. Gu, C., Huang, C., Zheng, X., Chang, K.-W., and Hsieh, C.-J. Watermarking Pre-trained Language Models with Backdooring. arxiv:2210.07543[cs], October 2022. . URL http://arxiv.org/abs/2210.07543. OpenAlex ↗ · Scholar ↗
  24. He, X., Xu, Q., Lyu, L., Wu, F., and Wang, C. Protecting Intellectual Property of Language Generation APIs with Lexical Watermark. Proceedings of the AAAI Conference on Artificial Intelligence, 360 (10):0 10758–10766, June 2022a. ISSN 2374-3468. . URL https://ojs.aaai.org/index.php/AAAI/article/view/21321. OpenAlex ↗ · Scholar ↗
  25. He, X., Xu, Q., Zeng, Y., Lyu, L., Wu, F., Li, J., and Jia, R. CATER: Intellectual Property Protection on Text Generation APIs via Conditional Watermarks. In Advances in Neural Information Processing Systems, October 2022b. URL https://openreview.net/forum?id=L7P3IvsoUXY. OpenAlex ↗ · Scholar ↗
  26. Helfrich, J. N. and Neff, R. Dual canonicalization: An answer to the homograph attack. In 2012 eCrime Researchers Summit, pp. 1–10, October 2012. . OpenAlex ↗ · Scholar ↗
  27. Jalil, Z. and Mirza, A. M. A Review of Digital Watermarking Techniques for Text Documents. In 2009 International Conference on Information and Multimedia Technology, pp. 230–234, December 2009. . OpenAlex ↗ · Scholar ↗
  28. Jawahar, G., Abdul-Mageed, M., and Lakshmanan, V.S., L. Automatic Detection of Machine Generated Text: A Critical Survey. In Proceedings of the 28th International Conference on Computational Linguistics, pp. 2296–2309, Barcelona, Spain (Online), December 2020. International Committee on Computational Linguistics. . URL https://aclanthology.org/2020.coling-main.208. our card
  29. Joshi, M., Choi, E., Weld, D. S., and Zettlemoyer, L. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, Vancouver, Canada, July 2017. Association for Computational Linguistics. our card
  30. Kaptchuk, G., Jois, T. M., Green, M., and Rubin, A. D. Meteor: Cryptographically secure steganography for realistic distributions. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, pp. 1529–1548, 2021. OpenAlex ↗ · Scholar ↗
  31. Katzenbeisser, S. and Petitcolas, F. A. Information Hiding Techniques for Steganography and Digital Watermarking. Artech House, Inc., USA, 1st edition, 2000. ISBN 978-1-58053-035-4. OpenAlex ↗ · Scholar ↗
  32. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. RoBERTa: A Robustly Optimized BERT Pretraining Approach. arXiv:1907.11692 [cs], July 2019. URL http://arxiv.org/abs/1907.11692. our card
  33. Lu, S.-P., Wang, R., Zhong, T., and Rosin, P. L. Large-Capacity Image Steganography Based on Invertible Neural Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10816–10825, 2021. URL https://openaccess.thecvf.com/content/CVPR2021/html/Lu_Large-Capacity_Image_Steganography_Based_on_Invertible_Neural_Networks_CVPR_2021_paper.html. OpenAlex ↗ · Scholar ↗
  34. Meral, H. M., Sankur, B., Sumru Özsoy, A., Güngör, T., and Sevin c, E. Natural language watermarking via morphosyntactic alterations. Computer Speech & Language, 230 (1):0 107–125, January 2009. ISSN 0885-2308. . URL https://www.sciencedirect.com/science/article/pii/S0885230808000284. OpenAlex ↗ · Scholar ↗
  35. Mirsky, Y., Demontis, A., Kotak, J., Shankar, R., Gelei, D., Yang, L., Zhang, X., Pintor, M., Lee, W., Elovici, Y., and Biggio, B. The Threat of Offensive AI to Organizations. Computers & Security, 124:0 103006, January 2023. ISSN 0167-4048. . URL https://www.sciencedirect.com/science/article/pii/S0167404822003984. OpenAlex ↗ · Scholar ↗
  36. Muennighoff, N., Wang, T., Sutawika, L., Roberts, A., Biderman, S., Scao, T. L., Bari, M. S., Shen, S., Yong, Z.-X., Schoelkopf, H., et al. Crosslingual generalization through multitask finetuning. arXiv preprint arXiv:2211.01786, 2022. our card
  37. Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C. L., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P., Leike, J., and Lowe, R. Training language models to follow instructions with human feedback. arxiv:2203.02155[cs], March 2022. . URL http://arxiv.org/abs/2203.02155. our card
  38. Pajola, L. and Conti, M. Fall of Giants: How popular text-based MLaaS fall against a simple evasion attack. In 2021 IEEE European Symposium on Security and Privacy (EuroS&P), pp. 198–211, September 2021. . OpenAlex ↗ · Scholar ↗
  39. Petitcolas, F., Anderson, R., and Kuhn, M. Information hiding-a survey. Proceedings of the IEEE, 870 (7):0 1062–1078, July 1999. ISSN 1558-2256. . OpenAlex ↗ · Scholar ↗
  40. Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., and Sutskever, I. Language Models are Unsupervised Multitask Learners. OpenAI, pp. 24, 2019. OpenAlex ↗ · Scholar ↗
  41. Radford, A., Kim, J. W., Xu, T., Brockman, G., McLeavey, C., and Sutskever, I. Robust Speech Recognition via Large-Scale Weak Supervision. arxiv:2212.04356[cs, eess], December 2022. . URL http://arxiv.org/abs/2212.04356. our card
  42. Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv e-prints, 2019. our card
  43. Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer. arXiv:1910.10683 [cs, stat], July 2020. URL http://arxiv.org/abs/1910.10683. our card
  44. Schulman, J., Zoph, B., Kim, C., Hilton, J., Menick, J., Weng, J., Uribe, J. F. C., Fedus, L., Metz, L., Pokorny, M., Gontijo-Lopes, R., Zhao, S., Vijayvergiya, A., Sigler, E., Perelman, A., Voss, C., Heaton, M., Parish, J., Cummings, D., Nayak, R., Balcom, V., Schnurr, D., Kaftan, T., Hallacy, C., Turley, N., Deutsch, N., Goel, V., Ward, J., Konstantinidis, A., Zaremba, W., Ouyang, L., Bogndonoff, L., Gross, J., Medina, D., Yoo, S., Lee, T., Lowe, R., Mossing, D., Huizinga, J., Jiang, R., Wainwright, C., Almeida, D., Lin, S., Zhang, M., Xiao, K., Slama, K., Bills, S., Gray, A., Leike, J., Pachocki, J., Tillet, P., Jain, S., Brockman, G., and Ryder, N. ChatGPT: Optimizing Language Models for Dialogue, November 2022. URL https://openai.com/blog/chatgpt/. OpenAlex ↗ · Scholar ↗
  45. Tan, R., Plummer, B., and Saenko, K. Detecting Cross-Modal Inconsistency to Defend Against Neural Fake News. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 2081–2106, Online, November 2020. Association for Computational Linguistics. . URL https://aclanthology.org/2020.emnlp-main.163. OpenAlex ↗ · Scholar ↗
  46. Tay, Y., Bahri, D., Zheng, C., Brunk, C., Metzler, D., and Tomkins, A. Reverse Engineering Configurations of Neural Text Generation Models. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 275–279, Online, July 2020. Association for Computational Linguistics. . URL https://aclanthology.org/2020.acl-main.25. OpenAlex ↗ · Scholar ↗
  47. Tay, Y., Dehghani, M., Tran, V. Q., Garcia, X., Bahri, D., Schuster, T., Zheng, H. S., Houlsby, N., and Metzler, D. Unifying language learning paradigms. arXiv preprint arXiv:2205.05131, 2022. OpenAlex ↗ · Scholar ↗
  48. Tian, E. Gptzero update v1, January 2023. URL https://gptzero.substack.com/p/gptzero-update-v1. OpenAlex ↗ · Scholar ↗
  49. Topkara, M., Riccardi, G., Hakkani-Tür, D., and Atallah, M. J. Natural language watermarking: Challenges in building a practical system. In Security, Steganography, and Watermarking of Multimedia Contents VIII, volume 6072, pp. 106–117. SPIE, February 2006a. . URL https://www.spiedigitallibrary.org/conference-proceedings-of-spie/6072/60720A/Natural-language-watermarking-challenges-in-building-a-practical-system/10.1117/12.643560.full. OpenAlex ↗ · Scholar ↗
  50. Topkara, U., Topkara, M., and Atallah, M. J. The hiding virtues of ambiguity: Quantifiably resilient watermarking of natural language text through synonym substitutions. In Proceedings of the 8th Workshop on Multimedia and Security, MM&Sec '06, pp. 164–174, New York, NY, USA, September 2006b. Association for Computing Machinery. ISBN 978-1-59593-493-2. . URL https://doi.org/10.1145/1161366.1161397. OpenAlex ↗ · Scholar ↗
  51. Ueoka, H., Murawaki, Y., and Kurohashi, S. Frustratingly Easy Edit-based Linguistic Steganography with a Masked Language Model. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 5486–5492, Online, June 2021. Association for Computational Linguistics. . URL https://aclanthology.org/2021.naacl-main.433. OpenAlex ↗ · Scholar ↗
  52. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention Is All You Need. arXiv:1706.03762 [cs], December 2017. URL http://arxiv.org/abs/1706.03762. our card
  53. Venugopal, A., Uszkoreit, J., Talbot, D., Och, F., and Ganitkevitch, J. Watermarking the Outputs of Structured Prediction with an application in Statistical Machine Translation. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pp. 1363–1372, Edinburgh, Scotland, UK., July 2011. Association for Computational Linguistics. URL https://aclanthology.org/D11-1126. our card
  54. Wilson, A., Blunsom, P., and Ker, A. D. Linguistic steganography on Twitter: Hierarchical language modeling with manual interaction. In Media Watermarking, Security, and Forensics 2014, volume 9028, pp. 9–25. SPIE, February 2014. . URL https://www.spiedigitallibrary.org/conference-proceedings-of-spie/9028/902803/Linguistic-steganography-on-Twitter--hierarchical-language-modeling-with-manual/10.1117/12.2039213.full. OpenAlex ↗ · Scholar ↗
  55. Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., Funtowicz, M., Davison, J., Shleifer, S., von Platen, P., Ma, C., Jernite, Y., Plu, J., Xu, C., Scao, T. L., Gugger, S., Drame, M., Lhoest, Q., and Rush, A. M. HuggingFace's Transformers: State-of-the-art Natural Language Processing. arXiv:1910.03771 [cs], July 2020. URL http://arxiv.org/abs/1910.03771. our card
  56. Wolff, M. and Wolff, S. Attacking Neural Text Detectors. arxiv:2002.11768[cs], January 2022. . URL http://arxiv.org/abs/2002.11768. OpenAlex ↗ · Scholar ↗
  57. Zellers, R., Holtzman, A., Rashkin, H., Bisk, Y., Farhadi, A., Roesner, F., and Choi, Y. Defending Against Neural Fake News. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/paper/2019/hash/3e9f0fc9b2f89e043bc6233994dfcf76-Abstract.html. our card
  58. Zhang, S., Roller, S., Goyal, N., Artetxe, M., Chen, M., Chen, S., Dewan, C., Diab, M., Li, X., Lin, X. V., Mihaylov, T., Ott, M., Shleifer, S., Shuster, K., Simig, D., Koura, P. S., Sridhar, A., Wang, T., and Zettlemoyer, L. Opt: Open pre-trained transformer language models, 2022. our card
  59. Zhu, J., Kaplan, R., Johnson, J., and Fei-Fei, L. HiDDeN: Hiding Data with Deep Networks. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 657–672, 2018. URL https://openaccess.thecvf.com/content_ECCV_2018/html/Jiren_Zhu_HiDDeN_Hiding_Data_ECCV_2018_paper.html. OpenAlex ↗ · Scholar ↗
  60. Ziegler, Z., Deng, Y., and Rush, A. Neural Linguistic Steganography. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 1210–1215, Hong Kong, China, November 2019. Association for Computational Linguistics. . URL https://aclanthology.org/D19-1115. OpenAlex ↗ · Scholar ↗

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/kirchenbauer-2023-watermark-large-language-models/