Metraipolis › archive › dc_e031c37cbb3b

SEW: Style-Encoded Watermarking of LLM-Generated Code — arXiv:2609.39414

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.39414
License (as archived)
CC0-1.0
Archived
2026-10-07T13:43:16.609Z
SHA-256 of the archived text
e51369eb088da1607f429e39c9cac08fd07c689578c9eac549f7a9343f1afe1d
Stable URL of this page
https://metraipolis.com/documento/dc_e031c37cbb3b

How to cite

SEW: Style-Encoded Watermarking of LLM-Generated Code — arXiv:2609.39414 — arXiv (en), https://arxiv.org/abs/2609.39414 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_e031c37cbb3b (Metraipolis archive dc_e031c37cbb3b, sha256 e51369eb088da1607f429e39c9cac08fd07c689578c9eac549f7a9343f1afe1d)
BibTeX
@misc{dce031c37cbb3b,
  title = {SEW: Style-Encoded Watermarking of LLM-Generated Code — arXiv:2609.39414},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.39414},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_e031c37cbb3b; sha256 e51369eb088da1607f429e39c9cac08fd07c689578c9eac549f7a9343f1afe1d},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.39414. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Code watermarking supports provenance tracking for code generated by LLMs. Modifying token selection to embed watermarks as an LLM generates code can create a trade-off between detectability and functional correctness. Other methods instead watermark completed code using predefined transformations or trained neural models. Recurring patterns can make watermark choices predictable across programs, while treating patterns common in unwatermarked code as watermark evidence can cause false detections. We therefore introduce SEW, which embeds and detects watermarks in already generated code through three components: (i) code style rules collected from style guides and transformation rules, with style choices determined by a secret key and each program's structural context; (ii) style-preference calibration, which evaluates watermark evidence using style probabilities estimated from human-written code; and (iii) context-aware style aggregation, which combines evidence from structurally matching locations assigned the same code style choice, preventing repeated applications of that choice from inflating watermark evidence. On CodeContests across three LLMs and three programming languages, SEW achieves a mean relative improvement of 12.44% in TPR@FPR5% over the baselines and is robust to four non-LLM code-editing attacks, with only a 0.94% mean relative decrease. Our code is available at this https URL .

Tema degli esploratori: fiducia digitale e crittografia (retro-catalogo arXiv: annunci del 2026-10-01 in cs.CR).
Categorie arXiv: Cryptography and Security (cs.CR).
Pagina del lavoro: https://arxiv.org/abs/2609.39414 — 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-07T13:16:25.229Z dalla pagina https://arxiv.org/catchup/cs.CR/2026-10-01?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).