paper-with-me

Papers

Optimizing Token Choice for Code Watermarking: An RL Approach

2025-08-16 · Zhimeng Guo, Huaisheng Zhu, Siyuan Xu, Hangfan Zhang, Teng Xiao, Minhao Cheng arxiv

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 https://github.com/TimeLovercc/CodeTracer.

📄 PDF Abstract BibTeX arXiv:2508.11925

Code (0)

등록된 구현이 없습니다.

Tasks

Reinforcement Learning

Similar Papers 제목 키워드 기반

Toward Stronger Code Watermarking: A Grammar-Driven Approach to Optimizing the Trade-off Between Quality and Detectability

2026-07-11 · Licheng Yu, Aiwei Liu, Songze Li arxiv

With the rapid development of Large Language Models (LLMs), text watermarking has emerged as a crucial technique for identifying machine-generated content. However, directly applying existing logits-based watermarking me…

Code Generation

From Trade-off to Synergy: A Versatile Symbiotic Watermarking Framework for Large Language Models

2025-05-15 · Yidan Wang, Yubing Ren, Yanan Cao, Binxing Fang

The rise of Large Language Models (LLMs) has heightened concerns about the misuse of AI-generated text, making watermarking a promising solution. Mainstream watermarking schemes for LLMs fall into two categories: logits-…

I Know You Did Not Write That! A Sampling Based Watermarking Method for Identifying Machine Generated Text

2023-11-29 · Kaan Efe Keleş, Ömer Kaan Gürbüz, Mucahid Kutlu

Potential harms of Large Language Models such as mass misinformation and plagiarism can be partially mitigated if there exists a reliable way to detect machine generated text. In this paper, we propose a new watermarking…

Misinformation

ClusterMark: Towards Robust Watermarking for Autoregressive Image Generators with Visual Token Clustering

2025-08-08 · Denis Lukovnikov, Andreas Müller, Erwin Quiring, Asja Fischer arxiv

In-generation watermarking for latent diffusion models has recently shown high robustness in marking generated images for easier detection and attribution. However, its application to autoregressive (AR) image models is …

No Free Lunch in LLM Watermarking: Trade-offs in Watermarking Design Choices

2024-02-25 · Qi Pang, Shengyuan Hu, Wenting Zheng, Virginia Smith

Advances in generative models have made it possible for AI-generated text, code, and images to mirror human-generated content in many applications. Watermarking, a technique that aims to embed information in the output o…

Navigate