Papers › Robust Distortion-free Watermarks for Language Models

Robust Distortion-free Watermarks for Language Models

28 Jul 2023arXiv:2307.15593archive 2025-07-28

Rohith Kuditipudi, John Thickstun, Tatsunori Hashimoto, Percy Liang

We propose a methodology for planting watermarks in text from an autoregressive language model that are robust to perturbations without changing the distribution over text up to a certain maximum generation budget. We generate watermarked text by mapping a sequence of random numbers -- which we compute using a randomized watermark key -- to a sample from the language model. To detect watermarked text, any party who knows the key can align the text to the random number sequence. We instantiate our watermark methodology with two sampling schemes: inverse transform sampling and exponential minimum sampling. We apply these watermarks to three language models -- OPT-1.3B, LLaMA-7B and Alpaca-7B -- to experimentally validate their statistical power and robustness to various paraphrasing attacks. Notably, for both the OPT-1.3B and LLaMA-7B models, we find we can reliably detect watermarked text (p ≤0.01) from $35$ tokens even after corrupting between $40$-50% of the tokens via random edits (i.e., substitutions, insertions or deletions). For the Alpaca-7B model, we conduct a case study on the feasibility of watermarking responses to typical user instructions. Due to the lower entropy of the responses, detection is more difficult: around 25% of the responses -- whose median length is around $100$ tokens -- are detectable with p ≤0.01, and the watermark is also less robust to certain automated paraphrasing attacks we implement.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2307.15593")

Code

Syntology Ran 15 of 16 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 1 ran · violated contract; 2 ran · our draft was wrong; 1 ran · fixture could not drive it; 11 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 12 ran; 4 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

jthickstun/watermark officialmentioned in papermentioned on GitHubpytorch report
dortsur/heavywater_simplexwater mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 15 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
2ran · our draft was wrong
1ran · fixture could not drive it
11ran
1unverified

Licence: 16 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from jthickstun/watermark. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

clip jthickstun/watermark/experiments/instruct-experiment.py official repository ran no licence file found · pointer only · 0e8d4cec229c39f6 · report
deletion_attack jthickstun/watermark/watermarking/attacks.py official repository ran no licence file found · pointer only · 914b888ef5e0a92d · report
exp_sampling jthickstun/watermark/demo/generate.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 10189519bf49509e · report
fast_permutation_test jthickstun/watermark/watermarking/detection.py official repository ran no licence file found · pointer only · cbd489faa5158a68 · report
generate jthickstun/watermark/watermarking/generation.py official repository ran no licence file found · pointer only · 505be9b1d86f6630 · report
generate_rnd jthickstun/watermark/watermarking/generation.py official repository ran no licence file found · pointer only · 5eaf567a3b48bd9b · report
gumbel_score jthickstun/watermark/watermarking/gumbel/score.py official repository ran no licence file found · pointer only · 382f3fb044209a61 · report
insertion_attack jthickstun/watermark/watermarking/attacks.py official repository ran no licence file found · pointer only · 2b0288f4b606671b · report
permutation_test jthickstun/watermark/watermarking/detection.py official repository ran no licence file found · pointer only · 11704cd0faaa0bda · report
phi jthickstun/watermark/watermarking/detection.py official repository ran no licence file found · pointer only · 4259f229c063dddd · report
substitution_attack jthickstun/watermark/watermarking/attacks.py official repository ran no licence file found · pointer only · 3310b2d9bf130318 · report
transform_score jthickstun/watermark/watermarking/transform/score.py official repository ran fingerprinted no licence file found · pointer only · 6fe18e0b7f1e2757 · report
bootstrap_pd identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · e50c48cad3cee475 · report
build_chat identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · f59d3f952a8d5950 · report
str2bool identical code first harvested elsewhere ran · violated contract licence of this copy not recorded · 678874b625786116 · report
parse_args identical code first harvested elsewhere unverified licence of this copy not recorded · 07264568683ce46b · report

Tasks

Language ModelingLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

ALIGN

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections