paperbot · PL 论文追踪

全部论文 待读 收藏

P2 CodeMark: Imperceptible Watermarking for Code Datasets against Neural Code Completion Models

CodeMark:面向神经代码补全模型的代码数据集不可感知水印
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 1/10 · 论文研究代码数据集水印以追踪神经代码补全模型的训练使用,属于代码数据安全与隐私方向,与用户关注的静态分析×LLM/Agent、浮点程序分析、贝叶斯程序分析等核心问题没有直接关联。引用 72 inbox
Zhensu Sun, Xiaoning Du, Fu Song, Li Li
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 CodeMark,通过语义保持变换向代码数据集嵌入不可感知水印,以追踪其是否被用于训练神经代码补全模型。

代码数据集对训练神经代码补全模型具有巨大价值,但面临数据泄露、许可违规和未经授权使用等风险;神经模型的黑盒特性又使外部难以审计其训练数据,而现有图像与自然语言水印方法因领域差异无法直接应用于代码。本文提出 CodeMark,基于自适应语义保持变换将用户定义的水印嵌入代码数据集,既保持代码功能不变,又使改动对违规者隐蔽。作者实现工具包并在代码补全模型上开展广泛评估,验证 CodeMark 满足实用水印的关键性质:不损害模型准确率、可验证、鲁棒且不可感知。

问题
代码数据集易被未经授权用于训练神经代码补全模型,而黑盒模型阻碍训练数据审计,现有水印方法又不适用于代码领域。
方法
CodeMark 采用自适应语义保持变换,在保持代码功能的同时向代码数据集嵌入用户定义的不可感知水印。
评估
实现 CodeMark 工具包并在多个代码补全模型上评估,验证其对模型准确率无害,并具备可验证性、鲁棒性与不可感知性。
原文摘要(Abstract)

Code datasets are of immense value for training neural-network-based code completion models, where companies or organizations have made substantial investments to establish and process these datasets. Unluckily, these datasets, either built for proprietary or public usage, face the high risk of unauthorized exploits, resulting from data leakages, license violations, etc. Even worse, the "black-box" nature of neural models sets a high barrier for externals to audit their training datasets, which further connives these unauthorized usages. Currently, watermarking methods have been proposed to prohibit inappropriate usage of image and natural language datasets. However, due to domain specificity, they are not directly applicable to code datasets, leaving the copyright protection of this emerging and important field of code data still exposed to threats. To fill this gap, we propose a method, named CodeMark, to embed user-defined imperceptible watermarks into code datasets to trace their usage in training neural code completion models. CodeMark is based on adaptive semantic-preserving transformations, which preserve the exact functionality of the code data and keep the changes covert against rule-breakers. We implement CodeMark in a toolkit and conduct an extensive evaluation of code completion models. CodeMark is validated to fulfill all desired properties of practical watermarks, including harmlessness to model accuracy, verifiability, robustness, and imperceptibility.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{abs-2308-14401,
  title = {CodeMark: Imperceptible Watermarking for Code Datasets against Neural Code Completion Models},
  author = {Zhensu Sun and Xiaoning Du and Fu Song and Li Li},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616297}
}