Know the Design, Pick the Attack: Sentence-Keyed Watermarks for LLMs
Organizations: J. Carmona, J. Irureta, J. Imaz and A. Lojo are with IKERLAN Technology Research Centre, Basque Research and Technology Alliance (BRTA), Arrasate-Mondragón, Spain. · J. Carmona, J. Martínez-Romo and L. Araujo are with Universidad Nacional de Educación a Distancia (UNED), Madrid, Spain.
Abstract
A watermark lets the provider of a language model recognise the text its model wrote, which matters more as generated text becomes hard to tell from human writing: provenance underpins academic integrity, the fight against misinformation and new regulation. Providers have started to watermark the text of their models, and to explain how their watermarks work. Explaining a watermark, however, also tells an attacker how to break it, and there are two ways to do so: reword the text to erase the mark, or learn the mark and copy it onto text the model never wrote. Each attack has been studied on its own. We study an attacker that reads the published design to choose between them: it erases the watermarks that are hard to learn and forges the ones that survive rewording. Against it, every existing watermark we compare fails. We propose KeyedLex, which reads its secret key from the grammar of the previous sentence, which rewording changes little, and whose detector does not need to recover the key exactly. It outperforms every watermark we compare on both models we test, losing about half of its signal where the best alternative loses two thirds, at no extra cost in text quality over the best-known watermarks.
Figures & tables
| Watermark | Key read from | Changes |
|---|---|---|
| Unigram [ 9 ] | None (fixed list) | Never |
| KGW-1 [ 7 ] | Previous token | Every token |
| KGW-4 [ 7 ] | Previous tokens | Every token |
| SynthID [ 4 ] | Previous tokens | Every token |
| DiPmark [ 11 ] | Previous tokens | Every token |
| SIR [ 10 ] | Meaning of the prefix | Every token |
| Watermark | Context | Forgery | Erasure |
|---|---|---|---|
| Unigram [ 9 ] | None (fixed list) | Count tokens | Adaptive paraphrase |
| KGW-1 [ 7 ] | Previous token | Count per context | Paraphrase |
| KGW-4 [ 7 ] | Previous tokens | Count per context | Paraphrase |
| SynthID [ 4 ] | Previous tokens | Count per context | Paraphrase |
| DiPmark [ 11 ] | Previous tokens | Count per context | Paraphrase |
| SIR [ 10 ] | Meaning of the prefix | Count per cluster | Paraphrase |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Value | What it does; how it was set |
|---|---|---|
| Cells | 4 | Groups, one list each; swept from 2 to 16 |
| Trimmed share | 0.4 | Worst sentences set aside; compared with no trimming |
| Bias | 2 | Push towards the green list; usual value, not tuned |
| Green share | 0.5 | Vocabulary in each list; usual value, not tuned |
| Temperature | 0.3 | Trust in the grammatical hint; starting value, not tuned |
| Tagger | spaCy 3.8 | Labels word classes; small English model ( en_core_web_sm ) |
LLM Watermarking
Large language model watermarking embeds or detects signals in text and models to trace provenance, ownership, and unauthorized use.
See all 125 papers