Efficient and Universal Watermarking for LLM-Generated Code Detection
College of Computer Science and Technology, Harbin Engineering University(哈尔滨工程大学计算机科学与技术学院);School of Computing and Information Systems, Singapore Management University(新加坡管理大学计算与信息学院)
Boquan Li, Zirui Fu, Mengdi Zhang, Peixin Zhang, Jun Sun, Xingmei Wang
备注:
This work has been accepted by IEEE Transactions on Software Engineering for publication, and the copyright follows IEEE policies
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 and 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 presence or absence of the transformations serves as implicit watermarks, enabling the detection of AI-generated code. Our experimental results show that ACW effectively and efficiently detects AI-generated code, preserves code utility, and is resilient against potential code disruptions. Especially, ACW is universal across different LLMs, addressing the limitations of existing approaches.
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络与信息安全学院)
DHMark: Public-Key Watermarking for LLM-Generated Text via Diffie-Hellman-Guided Rejection Sampling
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院)
MarkLLM: An Open-Source Toolkit for LLM Watermarking
Tsinghua University(清华大学);Shanghai Jiao Tong University(上海交通大学);The University of Sydney(悉尼大学);UC Santa Barbara(加州大学圣巴巴拉分校);The Chinese University of Hong Kong(香港中文大学);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));The Hong Kong University of Science and Technology(香港科技大学);University of Illinois at Chicago(芝加哥大学伊利诺伊分校)
Mark Your LLM: Detecting the Misuse of Open-Source Large Language Models via Watermarking
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Tsinghua University(清华大学);The Hong Kong University of Science and Technology(香港科技大学)
MirrorMark: Generalizable Mirrored Sampling for Multi-bit LLM Watermarking
George Mason University(乔治·马歇尔大学);Department of Computer Science(计算机科学系);Wireless Cyber Center(无线网络安全中心);Department of Electrical and Computer Engineering(电气与计算机工程系)
MATRIX: Multi-Layer Code Watermarking via Dual-Channel Constrained Parity-Check Encoding
Beijing University of Posts and Telecommunications(北京邮电大学);Nanyang Technological University(南洋理工大学);Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳));School of Cyberspace Security, Huazhong University of Science and Technology(华中科技大学网络空间安全学院)
RTLMarker: Protecting LLM-Generated RTL Copyright via a Hardware Watermarking Framework
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);Hangzhou Institute for Advanced Study, University of Chinese Academy of Sciences(中国科学院大学杭州高等研究院);University of Chinese Academy of Sciences(中国科学院大学)
Blind PRNG Hijacking: An Undetectable Integrity-Preserving Attack Against LLM Watermarking
Fujian Provincial Key Laboratory of Automotive Electronics and Electric Drive(福建省汽车电子与电力驱动重点实验室);School of Electronic, Electrical and Physics(电子、电气与物理学院);Fujian University of Technology(福建理工大学);School of Humanities(人文学院);Institute of Applied Physics and Materials Engineering(应用物理与材料工程学院);University of Macau(澳门大学)
Towards Better Statistical Understanding of Watermarking LLMs
Imperial College Business School, Imperial College London(帝国理工学院商学院,帝国理工学院);The University of Sydney Business School, The University of Sydney(悉尼大学商学院,悉尼大学);Grado Department of Industrial and Systems Engineering, Virginia Tech(弗吉尼亚理工大学工业与系统工程系)