





















Abstract:Protecting intellectual property on LLM-generated code necessitates effective watermarking systems that can operate within code's highly structured, syntactically constrained nature. In this work, we introduce CodeTracer, an innovative adaptive code watermarking framework underpinned by a novel reinforcement learning training paradigm. At its core, CodeTracer features a policy-driven approach that utilizes a parameterized model to intelligently bias token choices during next-token prediction. This strategy ensures that embedded watermarks maintain code functionality while exhibiting subtle yet statistically detectable deviations from typical token distributions. To facilitate policy learning, we devise a comprehensive reward system that seamlessly integrates execution feedback with watermark embedding signals, balancing process-level and outcome-level rewards. Additionally, we employ Gumbel Top-k reparameterization to enable gradient-based optimization of discrete watermarking decisions. Extensive comparative evaluations demonstrate CodeTracer's significant superiority over state-of-the-art baselines in both watermark detectability and the preservation of generated code's functionality. Our code is available at this https URL.
| Comments: | ICML 2026, 18 pages, 3 figures |
| Subjects: | Cryptography and Security (cs.CR); Computation and Language (cs.CL); Machine Learning (cs.LG) |
| Cite as: | arXiv:2508.11925 [cs.CR] |
| (or arXiv:2508.11925v3 [cs.CR] for this version) | |
| https://doi.org/10.48550/arXiv.2508.11925 arXiv-issued DOI via DataCite |
From: Zhimeng Guo [view email]
[v1]
Sat, 16 Aug 2025 06:11:29 UTC (170 KB)
[v2]
Sun, 2 Nov 2025 15:47:22 UTC (210 KB)
[v3]
Mon, 25 May 2026 07:42:23 UTC (205 KB)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。