Papers › A Watermark for Large Language Models

A Watermark for Large Language Models

24 Jan 2023arXiv:2301.10226archive 2025-07-28

John Kirchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz, Ian Miers, Tom Goldstein

Potential harms of large language models can be mitigated by watermarking model output, i.e., embedding signals into generated text that are invisible to humans but algorithmically detectable from a short span of tokens. We propose a watermarking framework for proprietary language models. The watermark can be embedded with negligible impact on text quality, and can be detected using an efficient open-source algorithm without access to the language model API or parameters. The watermark works by selecting a randomized set of "green" tokens before a word is generated, and then softly promoting use of green tokens during sampling. We propose a statistical test for detecting the watermark with interpretable p-values, and derive an information-theoretic framework for analyzing the sensitivity of the watermark. We test the watermark using a multi-billion parameter model from the Open Pretrained Transformer (OPT) family, and discuss robustness and security.

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="2301.10226")

Code

Syntology Ran 11 of 16 code samples harvested from 7 repositories linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · violated contract; 1 ran · our draft was wrong; 8 ran with no contract checked.

By repository: official repository: 3 samples from 1 repository, 2 ran; community (archive-listed): 13 samples from 6 repositories, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

jwkirchenbauer/lm-watermarking officialmentioned in papermentioned on GitHubpytorch report
BrianPulfer/LMWatermark mentioned on GitHubpytorch report
chengez/adversarial-paraphrasing mentioned on GitHubpytorch report
eva-giboulot/watermax mentioned on GitHubpytorch report
facebookresearch/three_bricks mentioned on GitHubpytorch report
fyyfu/semantic-watermark mentioned on GitHubpytorch report
huggingface/text-generation-inference 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; 11 ran; 1 honoured the contract we drafted; 5 have 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 · honoured contract
1ran · violated contract
1ran · our draft was wrong
8ran
5unverified

Licence: 5 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 7 repositories linked to this paper, official or community; each sample names its own and says which. “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.

WatermarkLogitsProcessor jwkirchenbauer/lm-watermarking/watermark_processor.py official repository ran Apache-2.0 (permissive) · 63e6607939ea84a0 · report
str2bool jwkirchenbauer/lm-watermarking/demo_watermark.py official repository ran · violated contract Apache-2.0 (permissive) · 678874b625786116 · report
WatermarkBase jwkirchenbauer/lm-watermarking/watermark_processor.py official repository unverified Apache-2.0 (permissive) · ba3557aac9e7bf4c · report
ContextMasking Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling/wm/coupling.py community (archive-listed) ran Apache-2.0 (permissive) · f26efcccf5a3772f · report
CouplingGenerator Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling/wm/coupling.py community (archive-listed) ran Apache-2.0 (permissive) · 42f6923bf0733dbe · report
MarylandGenerator facebookresearch/three_bricks/wm/generator.py community (archive-listed) ran licence not identified · pointer only · e4a6e1de65880ce7 · report
OpenaiGenerator Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling/wm/coupling.py community (archive-listed) ran Apache-2.0 (permissive) · b773c77757980226 · report
WmGenerator eva-giboulot/watermax/models/wm.py community (archive-listed) ran no licence file found · pointer only · 13b864aa60fdbcdd · report
WmGenerator facebookresearch/three_bricks/wm/generator.py community (archive-listed) ran licence not identified · pointer only · 84002164ce29edb7 · report
WmGenerator Xieyangxinyu/Unbiased-Watermark-via-Maximal-Coupling/wm/coupling.py community (archive-listed) ran Apache-2.0 (permissive) · 1df0136501003b60 · report
default_hash_fn BrianPulfer/LMWatermark/src/watermarking.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · bdea8c3520cb2de0 · report
generate BrianPulfer/LMWatermark/src/watermarking.py community (archive-listed) ran · our draft was wrong MIT (permissive) · e8a3bc02d0c28ef0 · report
WatermarkBase fyyfu/semantic-watermark/watermark_processor.py community (archive-listed) unverified no licence file found · pointer only · dd584304f6d90615 · report
WatermarkBase chengez/adversarial-paraphrasing/kgw_wm/extended_watermark_processor.py community (archive-listed) unverified Apache-2.0 (permissive) · 19f3e32f390a20ae · report
WatermarkLogitsProcessor fyyfu/semantic-watermark/watermark_processor.py community (archive-listed) unverified no licence file found · pointer only · a74f13e55a5c37a6 · report
WatermarkLogitsProcessor chengez/adversarial-paraphrasing/kgw_wm/extended_watermark_processor.py community (archive-listed) unverified Apache-2.0 (permissive) · 51fae2306a5ebeda · report

Tasks

Language ModelingLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTestTransformer

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