Skip to content
Back to the collection

A Watermark for Large Language Models

John Kirchenbauer, Jonas Geiping, Yuxin Wen

Show all 6 authors

Jonathan Katz, Ian Miers, Tom Goldstein

2023 · arXiv

Read the paper
HN score
1
Mentions
15
Readers
13
Months
8
What’s in a score?

From the abstract

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.

Metadata: arXiv. Abstracts retain their original authors’ rights.

In the conversation

Original HN comments, with labels from simple text rules. A label describes the whole comment and may miss context or irony. Read the discussion to make up your own mind. About the labels

15 selected excerpts · 15 total mentions

kimburgess
Recommendation · rule
Watermarking. From an outsiders perspective, the issue appears to reaching consensus on how this can be implemented (but not in the technical sense). There's a game theoretic challenge in that if models define and publish detection mechanisms, this creates a motivation for people to use other systems that don't include this. On the technical front there's a good paper here: https://arxiv.org/pdf/2301.10226.pdf, and a nice very approachable video explaining it here: https://www.youtube.com/watch?v=XZJc1p6RE78.
Majromax
Neutral mention · rule
A reasonable guess about the algorithm is 'A Watermark for Large Language Models' (https://arxiv.org/abs/2301.10226). The idea is that each generated token (or bigram) seeds a strong PRNG that splits the vocabulary into a 'green' and 'red' set. The sampler then tries to select a 'green' next-token for generation. After-the-fact checking only needs the vocabulary splitter, which is independent of the LLM. Over a sufficiently large text non-watermarked text would expect to use green and red tokens with the baseline probability, and that difference can easily become statistically significant over sufficiently long texts. The basic algorithm has obvious knobs to tune, among them the initial ratio of red to green tokens and how hard the sampler tries to pick a green token. These would balance fidelity to the original distribution against watermark detectability (minimum required content length for statistical power).
krackers
Neutral mention · rule
>fails to understand the gumbel softmax technique I think in this case it doesn't help that there are multiple watermarking schemes, and the easiest for people to understand is the red/green scheme by Kirchenbauer et al. (https://arxiv.org/pdf/2301.10226), which does technically distort the logits (but I'd argue only in cases where you wouldn't notice it anyway). I wasn't aware of this gumbel softmax scheme, it seems you're referring to https://simons.berkeley.edu/talks/scott-aaronson-ut-austin-o... ? That's really clever as it doesn't even distort the logits, basically cryptographically indistinguishable from a "real" random sample unless you have the key. The actual scheme Claude uses seems to be neither of those two though, they say it is SynthId-text which seems to be tournament sampling based.
m-chrzan
Neutral mention · rule
There's a computerphile video (https://www.youtube.com/watch?v=XZJc1p6RE78) with Dr. Mark Pound explaining a paper by John Kirchenbauer, Jonas Geiping et al. (https://arxiv.org/abs/2301.10226) that described a method for watermarking LLM output like this. It's not directly stated anywhere in the Claude support article that this is what they're using, but the properties of the watermark described seem to point to this method.
Der_Einzige
Neutral mention · rule
Models can't reliably follow instructions involving their own logprobs unless they can take agentic control and use quite sophisticated dynamic grammars/structures/constraints to force this behavior in one shot (which can be slow and the dynamic grammar modification feature isn't supported in closed model APIs for safety reasons) or repeated attempts at rewriting which is expensive/slow. Yes they can do this, but it's more likely closer to the original "red token, green token" paper: https://arxiv.org/abs/2301.10226 i.e. take half of your LLMs vocabulary, and upweight its probabilities by ~55% to the other half's ~45%, and scan for overuse of this half of all tokens. You can even choose a different half/slice for every individual user, for every individual action. You can implement this under the hood cheaply with logit-biasing.
tomsander1998
Neutral mention · rule
text watermarking works pretty well! https://arxiv.org/abs/2301.10226 When you generate a text with an LLM, you always have some choice. So you can sample in a way that is very likely under your watermark scheme, and unlikely otherwise
thewataccount
Neutral mention · rule
https://arxiv.org/pdf/2301.10226.pdf Here's a decent paper on it. It covers private watermarking (you can't detect it exists without a key), resistance to modifications, etc. Essentially you wouldn't know it was there and you can't make simple modifications to fool it. OpenAI could already be doing this, and they could be watermarking with your account ID if they wanted to. The current best countermeasure is likely paraphrasing attacks https://arxiv.org/pdf/2303.11156.pdf
kibibu
Neutral mention · rule
https://arxiv.org/abs/2301.10226 > 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. Alpaca uses this already.
stcg
Neutral mention · rule
I think watermarking is a better solution. There is a paper on it: Kirchenbauer, J., Geiping, J., Wen, Y., Katz, J., Miers, I., & Goldstein, T. (2023). A watermark for large language models. arXiv preprint arXiv:2301.10226. (https://arxiv.org/pdf/2301.10226.pdf) Also, Computerphile did a video on it: https://www.youtube.com/watch?v=XZJc1p6RE78 But of course, watermarking or your proposed solution (checksums) only work while the general public cannot run a tool like ChatGPT locally on personal computers. And it's only a matter of time before that happens. So in the long run, we need to either: 1. take away control from the users over their personal computers, in the form of what I would call 'AI DRM' (I strongly oppose this option), or 2. legislate: enforce a legal obligation to disclose that a text is not created by a human, or 3. accept that we cannot know whether or not a text is written by a human, and work with that reality
7373737373
Neutral mention · rule
From the Alpaca report (https://crfm.stanford.edu/2023/03/13/alpaca.html): > we watermark all the model outputs using the method described in Kirchenbauer et al. 2023, so that others can detect (with some probability) whether an output comes from Alpaca 7B https://arxiv.org/abs/2301.10226 > 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
Der_Einzige
Neutral mention · rule
Again, how do you reliably prove that I used your model if I do a bunch of tricks to "hide" this? i.e. high temperature, exotic samplers (i.e. typicality sampling), using lora/soft prompts/representation engineering, using it as part of a chain on top of other AI, etc I don't care if every lawyer on earth is hired by Meta. Show me evidence that any particular LLM can be trivially fingerprinted based on its outputs. No, that "red token green token" paper on watermarking (https://arxiv.org/pdf/2301.10226) is not an example of this because of how trivial it is to defeat. Edit: I can't reply to the comment saying "Subpoena" but this commentator seems to think that using any…
Read the full comment
LLM at all is grounds for a court to issue a Subpoena requiring you to disclose which LLM you're using. If this actually happened, you'd see a massive chilling effect. Also, what stops someone from silently replacing the model with a non infringing one the moment someone starts asking questions? I'm pretty sure that most courts aren't capable of getting expert testimony which is good enough to deduce that I silently swapped out my blarg_3.1 model which was made using a 1/3 llama3 merge with something else with gloop_1.5 which is no longer infringing. Like seriously, I again ask, given the idea of courts with warrants and Subpoena's, why should I care about meta's licensing? Edit2: If you're afraid of an employee leaking this info, don't tell your employees. Good thing clever model merging leaves no traces if you delete metadata!

Keep following the thread.

More in Language models

More from the same topics.