arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.14401cs.SEcs.AI
收藏

CodeMark:针对神经代码补全模型的代码数据集不可感知水印方法

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

Beihang University(北京航空航天大学);Monash University(莫纳什大学);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);University of Chinese Academy of Sciences(中国科学院大学)

Zhensu Sun, Xiaoning Du, Fu Song, Li Li

AI总结:

针对代码数据集版权保护缺失的问题,提出基于自适应语义保持变换的不可感知水印方法CodeMark,可嵌入水印追踪代码数据集在神经代码补全模型训练中的使用,且具备无害性、可验证性等实用水印特性。

摘要:

代码数据集对于训练基于神经网络的代码补全模型具有极高价值,企业或机构已投入大量资源构建和处理这类数据集。遗憾的是,无论是专有还是公开用途的代码数据集,都因数据泄露、许可证违规等问题面临极高的未授权利用风险。更糟糕的是,神经模型的“黑盒”特性让外部机构审计其训练数据集的门槛极高,进一步纵容了这类未授权使用行为。目前已有水印方法被提出用于禁止图像和自然语言数据集的不当使用,但由于领域特异性,这些方法无法直接应用于代码数据集,导致代码数据这一新兴重要领域的版权保护仍面临威胁。为填补这一空白,我们提出名为CodeMark的方法,将用户定义的不可感知水印嵌入代码数据集,以追踪其在神经代码补全模型训练中的使用情况。CodeMark基于自适应语义保持变换,能够完整保留代码数据的功能,且改动对违规者具有隐蔽性。我们将CodeMark实现为工具包,并针对代码补全模型开展了全面评估。实验验证CodeMark满足实用水印的所有理想特性,包括对模型准确性无损害、可验证性、鲁棒性和不可感知性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑