Efficient and Universal Watermarking for LLM-Generated Code Detection
Boquan Li, Zirui Fu, Mengdi Zhang, Peixin Zhang, Jun Sun, Xingmei Wang

TL;DR
This paper introduces ACW, a training-free, universal watermarking method for detecting AI-generated code by applying semantic-preserving transformations, achieving high efficiency, robustness, and broad applicability across various LLMs.
Contribution
The paper presents ACW, a novel, training-free watermarking technique for code detection that is universal, efficient, and resilient against code optimizations.
Findings
ACW effectively detects AI-generated code.
ACW preserves code utility and is resilient to optimizations.
ACW is efficient and universal across different LLMs.
Abstract
Large language models (LLMs) have significantly enhanced the usability of AI-generated code, providing effective assistance to programmers. This advancement also raises ethical and legal concerns, such as academic dishonesty or the generation of malicious code. For accountability, it is imperative to detect whether a piece of code is AI-generated. Watermarking is broadly considered a promising solution and has been successfully applied to identify LLM-generated text. However, existing efforts on code are far from ideal, suffering from limited universality and excessive time and memory consumption. In this work, we propose a plug-and-play watermarking approach for AI-generated code detection, named ACW (AI Code Watermarking). ACW is training-free and works by selectively applying a set of carefully-designed, semantic-preserving and idempotent code transformations to LLM code outputs. The…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Steganography and Watermarking Techniques · Advanced Data Storage Technologies · Cryptography and Data Security
