Metraipolis › archive › dc_2b6a11cd986d
Grammar-Guided Code Watermarking with Green Temperature — arXiv:2610.05323
- Source
- arXiv
- Original
- https://arxiv.org/abs/2610.05323
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-06T05:26:48.426Z
- SHA-256 of the archived text
ba0c5b52ffab4bf2a4fffbd0ffa9e54a99b6d896b450ca2383ee2e9d8a94664d- Stable URL of this page
https://metraipolis.com/documento/dc_2b6a11cd986d
How to cite
Grammar-Guided Code Watermarking with Green Temperature — arXiv:2610.05323 — arXiv, https://arxiv.org/abs/2610.05323 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_2b6a11cd986d (Metraipolis archive dc_2b6a11cd986d, sha256 ba0c5b52ffab4bf2a4fffbd0ffa9e54a99b6d896b450ca2383ee2e9d8a94664d)
BibTeX
@misc{dc2b6a11cd986d,
title = {Grammar-Guided Code Watermarking with Green Temperature — arXiv:2610.05323},
howpublished = {arXiv},
url = {https://arxiv.org/abs/2610.05323},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_2b6a11cd986d; sha256 ba0c5b52ffab4bf2a4fffbd0ffa9e54a99b6d896b450ca2383ee2e9d8a94664d},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv, https://arxiv.org/abs/2610.05323. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Large language model watermarking embeds detectable statistical signals during decoding, but the resulting changes to token probabilities can degrade generation quality. This trade-off is particularly important for code, where small changes in token selection can break syntax or alter program behavior. Existing code watermarking methods mitigate this risk through entropy-based insertion or syntax-aware token selection, but they do not directly construct the watermark over the set of continuations admitted by the current grammar state. We propose Grammar-Guided Code Watermarking with Green Temperature (GTCW), which integrates grammar-constrained decoding with probability-aware watermarking. At each decoding step, GTCW restricts the candidate set to grammar-admissible tokens and partitions this support into keyed green and red subsets. At eligible high-entropy positions, green temperature reweights the green tokens according to the model's relative preferences, strengthening the watermark signal while retaining the grammar constraint. Across five models and five benchmarks spanning four programming languages, GTCW achieves a mean AUROC of 73.61%, compared with 67.83% for the strongest baseline, while maintaining a mean Pass@1 of 59.18% versus 59.58% for unwatermarked generation. Our implementation is available at this https URL . Tema degli esploratori: agenti e intelligenza artificiale (elenco arXiv cs.AI, nuovi lavori del giorno). Categorie arXiv: Cryptography and Security (cs.CR) ; Artificial Intelligence (cs.AI). Pagina del lavoro: https://arxiv.org/abs/2610.05323 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-06T05:24:05.995Z dalla pagina https://arxiv.org/list/cs.AI/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).