Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

Red-Green Sequence (RGS) Watermark Explained | Privacy, Provenance

Updated 7 November 2026
  • Red-Green Sequence (RGS) watermarks are locally differentially private mechanisms designed to estimate the prevalence of watermarked texts in a population, rather than detect individual machine-generated texts, by associating each sequence with a secret key, a red or green label, and an increased probability of green.
  • RGS watermarks hash complete sequences, ensuring one binary observation (red or green) per text, focusing on aggregate prevalence estimation and solving privacy issues encountered by perceptive readers.
  • Parameter ε controls the privacy/signal trade-off where a smaller ε reduces the individual completion evidence, weakening the watermark signal, and a larger ε improves aggregate estimation but makes individual completions more informative; in high entropy and diversity regimes, RGS ensures unbiased estimates due to the population-level focus.

The Red–Green Sequence (RGS) watermark is a locally differentially private watermark for LLMs designed to estimate the fraction of texts in a population that were generated through a watermarking process, rather than to determine with high confidence whether one particular text was machine-generated. RGS hashes each complete generated sequence with a secret keyed pseudorandom function, assigns the sequence a red or green label, and selectively increases the probability of green sequences subject to a likelihood-ratio constraint. Each text consequently contributes approximately one binary observation—green or red—to an aggregate prevalence estimator. The construction and its privacy–utility analysis are presented in “Reconciling Privacy with Provenance for LLM Watermarks” (Han et al., 4 Nov 2026).

1. Objective and distinction from token-level watermarking

Conventional red–green language-model watermarks assign tokens to keyed green and red sets, bias generation toward green tokens, and detect the watermark by accumulating green-token evidence across a completion. A sufficiently long completion can therefore provide strong evidence about its provenance. The RGS watermark adopts a different objective: estimating the fraction of texts in a population that were watermarked while limiting the evidence contributed by any individual text.

RGS colors an entire generated sequence rather than independently coloring every token. For a sequence yy, a secret key kk determines a binary label

hk(y)∈{G,R}.h_k(y)\in\{G,R\}.

The detector computes this label for each observed text and aggregates the resulting reports. A green report may correspond either to a watermarked text selected preferentially because it was green or to an unwatermarked text that happened to receive a green hash label. A red report likewise does not rule out watermarking.

This design sacrifices reliable individual-text classification in favor of population-level estimation. The resulting privacy distinction is structural: a conventional token-level watermark exposes a high-dimensional sequence of red–green outcomes, whereas RGS intentionally encodes essentially one private binary report per completion.

2. Local differential privacy formulation

Let pp denote the base language-model distribution over complete sequences, and let Γ(k;p)\Gamma(k;p) denote the RGS generation mechanism using key kk. RGS is ε\varepsilon-locally differentially private with respect to pp when, for every key kk and sequence yy,

kk0

Equivalently, the likelihood ratio between the watermarked and unwatermarked sequence distributions satisfies

kk1

The parameter kk2 controls the privacy–signal trade-off. Smaller kk3 limits the evidence available from an individual completion and weakens the watermark signal; larger kk4 permits a larger deviation from the base distribution and improves aggregate estimation while making individual completions more informative.

The privacy condition also bounds posterior key inference. If kk5 is the prior distribution over keys and kk6 is the posterior after observing kk7, then

kk8

The factor kk9 arises because both the numerator and denominator in Bayes’ rule can change by factors of hk(y)∈{G,R}.h_k(y)\in\{G,R\}.0.

3. Keyed sequence coloring

RGS uses an injective encoding of the complete token sequence followed by keyed 128-bit BLAKE2b hashing. Let

hk(y)∈{G,R}.h_k(y)\in\{G,R\}.1

be the integer hash value. Given a desired null green fraction hk(y)∈{G,R}.h_k(y)\in\{G,R\}.2, define

hk(y)∈{G,R}.h_k(y)\in\{G,R\}.3

Sequences whose hash values do not satisfy the threshold are labeled red. Under the ideal random-function model, distinct sequences receive independent colors with green probability

hk(y)∈{G,R}.h_k(y)\in\{G,R\}.4

The analysis treats the rounding difference as negligible and uses hk(y)∈{G,R}.h_k(y)\in\{G,R\}.5 as the green probability. The key is sampled once and reused across texts. Independent key randomization for every text would prevent the detector from recovering the red–green report consistently from the observed sequence.

The ideal-coloring assumption states that for every finite collection of distinct sequences fixed independently of the key, the corresponding green indicators behave as independent hk(y)∈{G,R}.h_k(y)\in\{G,R\}.6 variables. This is a cryptographic idealization of pseudorandomness: a keyed pseudorandom function should be computationally indistinguishable from a random function.

RGS therefore differs from context-dependent token watermarks in which a preceding token or context determines the green list for the next token. In the RGS construction, the complete sequence itself is the object being colored. The related token-level mechanism can be written as a green-token logit reweighting, but RGS applies its privacy-constrained reweighting at the sequence level.

4. Generation mechanisms

Parallel candidate sampler

Given a prompt hk(y)∈{G,R}.h_k(y)\in\{G,R\}.7, candidate budget hk(y)∈{G,R}.h_k(y)\in\{G,R\}.8, secret key hk(y)∈{G,R}.h_k(y)\in\{G,R\}.9, and privacy parameter pp0, the parallel sampler operates as follows:

  1. Draw pp1 independent candidates

pp2

  1. Deduplicate the candidates. If the distinct candidates are pp3, with counts pp4, define

pp5

  1. Partition the candidates using the keyed sequence hash:

pp6

  1. Set the target green mass to

pp7

  1. Reweight each candidate:

pp8

  1. Sample pp9 from the categorical distribution defined by the Γ(k;p)\Gamma(k;p)0.

If Γ(k;p)\Gamma(k;p)1, the candidate probabilities remain unchanged. The reweighting satisfies

Γ(k;p)\Gamma(k;p)2

The feasible interval for total green mass is

Γ(k;p)\Gamma(k;p)3

Γ(k;p)\Gamma(k;p)4

RGS uses the upper endpoint Γ(k;p)\Gamma(k;p)5, corresponding to the largest permissible increase in green mass under the privacy constraint.

Rejection sampler

The paper primarily uses a computationally more efficient rejection implementation. It repeatedly samples Γ(k;p)\Gamma(k;p)6 and accepts it with probability

Γ(k;p)\Gamma(k;p)7

Γ(k;p)\Gamma(k;p)8

The process stops after acceptance or after at most Γ(k;p)\Gamma(k;p)9 attempts, returning the final candidate if the cap is reached. If

kk0

the probability of acceptance on any non-final attempt is

kk1

The expected number of samples examined is at most

kk2

With an unlimited candidate budget, the rejection sampler has green probability

kk3

For the parallel sampler, the limiting green probability is

kk4

The parallel sampler can reach a larger green probability, whereas rejection sampling has lower computational cost.

5. Aggregate prevalence estimation

Suppose kk5 are observed texts, and let

kk6

indicate whether text kk7 was generated through RGS. The population prevalence is

kk8

The detector computes

kk9

For unwatermarked texts, the expected green probability is approximately ε\varepsilon0; for watermarked texts, it is approximately ε\varepsilon1. In the ideal high-entropy regime,

ε\varepsilon2

The corresponding unclipped estimator is

ε\varepsilon3

The implemented estimator projects the result onto the valid prevalence interval:

ε\varepsilon4

This is analogous to generalized randomized response, except that RGS modifies only the watermarked group. Unwatermarked texts are generated by processes outside the watermark provider’s control and are not transformed into randomized reports.

The estimator’s error separates into sampling variance and distribution-dependent bias. With

ε\varepsilon5

the conditional mean-squared-error bound is

ε\varepsilon6

The first term decreases as ε\varepsilon7. The second term represents key- and distribution-dependent bias, which may persist even as the number of texts increases.

6. Entropy, diversity, and parameter trade-offs

For a text distribution ε\varepsilon8, define its collision probability by

ε\varepsilon9

Under ideal coloring, the key-dependent variance of the unwatermarked green probability is

pp0

High-entropy distributions have smaller collision probabilities, making their green probabilities closer to pp1. Low-entropy distributions may cause a particular prompt’s likely completions to receive nearly deterministic colors. Prompt diversity can nevertheless make population averages well behaved, because distinct prompts produce less-overlapping sequence distributions.

For the watermarked group, the green-probability transformation is concave. Consequently,

pp2

and therefore the key-averaged watermarked bias is nonpositive. In high-entropy and high-diversity regimes, the average distributions become sufficiently diffuse that the estimator is approximately unbiased.

The nominal separation

pp3

controls statistical efficiency. A larger separation reduces sampling variance but increases individual informativeness and can amplify finite-entropy bias. For ideal binary randomized response, the privacy-optimal probabilities are

pp4

For the parallel sampler, separation is maximized at

pp5

For rejection sampling, separation is maximized at

pp6

At large sample sizes, a larger pp7 can nevertheless be preferable because it reduces persistent bias at the cost of increased sampling variance.

7. Empirical results, limitations, and scope

The experiments use Qwen3-1.7B, Qwen3-4B, Qwen3-8B, and Llama-3.1-8B-Instruct. Unless otherwise stated, they use rejection sampling, candidate cap pp8, pp9, keyed 128-bit BLAKE2b, 20 random keys, and 50 Monte Carlo mixture repetitions per key.

On the C4 language-modeling task, the study uses 500 prompts, temperature kk0, top-kk1, 2,000-text mixtures, and privacy budgets kk2. At kk3, the reported mean absolute bias is kk4, with MSE kk5. The corresponding average half-width of the fifth-to-95th-percentile bands is approximately kk6. Increasing kk7, increasing the number of texts, increasing temperature, increasing prefix length, and increasing the candidate budget up to approximately kk8 generally reduce estimation error.

In the essay-writing experiment, which uses 100 texts at kk9, the reported MSE is approximately yy0, with mean absolute bias around yy1. The coding task exhibits more bias and variance because of lower entropy and greater prompt homogeneity, although it still produces useful aggregate estimates with 100 total samples.

RGS has several explicit limitations. It is intentionally weak for individual-text detection, is sensitive to paraphrasing and minor edits because the complete sequence is hashed, and depends on pseudorandom coloring assumptions. Low-entropy or highly homogeneous prompts can create persistent key-dependent bias that does not vanish merely by increasing the number of texts. Reusing a key is necessary for detection but can induce cross-text dependence when identical or overlapping sequences recur. The stated local-DP guarantee also does not provide protection against unlimited repeated inference by the same user.

RGS is therefore not a replacement for high-confidence provenance classification of individual documents. Its intended operating point is aggregate measurement: a weak per-text signal, bounded by a local privacy parameter, combined across a population to estimate watermark prevalence.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Red-Green Sequence (RGS) watermark.