PuzzleMark: 为神经代码补全模型中的鲁棒代码数据集水印而设计的隐式拼图学习
PuzzleMark: Implicit Jigsaw Learning for Robust Code Dataset Watermarking in Neural Code Completion Models
AI总结:
本文提出PuzzleMark,通过代码复杂度选择载体并采用新型拼接模式,实现对代码数据集的鲁棒水印,实验表明其在验证成功率和误报率方面表现优异,且具有良好的隐蔽性。
摘要:
构建和整理高质量代码数据集需要大量资源,使其成为有价值的知识产权。不幸的是,这些数据集目前面临严重的未经授权使用风险。尽管数字水印提供了事后版权验证的机制,但现有方法大多基于共现模式,不够稳健且易受水印检测和移除攻击。本文提出PuzzleMark,一种用于代码数据集的稳健水印方法。为降低水印暴露风险,PuzzleMark引入了一种载体选择策略,利用代码复杂度评估代码片段作为水印载体的适用性,并选择高适用性的片段进行水印嵌入。为增强水印的鲁棒性,PuzzleMark提出了一种新的拼接模式,以取代传统的共现模式,并通过变量名拼接实现两种水印策略。PuzzleMark根据代码的内在特性自适应地嵌入水印,使其更隐蔽同时保持设计简单。对于水印验证,PuzzleMark采用Fisher's exact test在黑盒设置下验证可疑模型。实验结果表明,PuzzleMark实现了100%的验证成功率和0%的误报率,对模型性能影响极小。我们的人工研究和使用四种最先进的水印检测方法的评估均表明,PuzzleMark表现出强隐蔽性,平均可疑率≤0.24,平均召回率≤30.41%。作为一种实用的数字水印方法,PuzzleMark为代码数据集的知识产权提供了强大保护,并为未来研究提供了新见解。
英文摘要:
Constructing and curating high-quality code datasets requires significant resources, making them valuable intellectual property. Unfortunately, these datasets currently face severe risks of unauthorized use. Although digital watermarking offers a post hoc mechanism for copyright authentication, existing methods are predominantly based on the co-occurrence pattern, which is not robust and is susceptible to watermark detection and removal attacks. In this paper, we propose PuzzleMark, a robust watermarking method for code datasets. To reduce the risk of watermark exposure, PuzzleMark introduces a carrier selection strategy that leverages code complexity to evaluate the suitability of code snippets as watermark carriers, and selects those with high suitability for watermarking. To enhance the robustness of the watermark, PuzzleMark proposes a novel concatenation pattern to replace the traditional co-occurrence pattern, and implements two watermarking strategies through variable name concatenation. PuzzleMark adaptively embeds watermarks based on the inherent characteristics of the code, making it more stealthy while maintaining design simplicity. For watermark verification, PuzzleMark employs Fisher's exact test to verify suspicious models under a black-box setting. Experimental results demonstrate that PuzzleMark achieves a 100% verification success rate and a 0% false positive rate, with negligible impact on model performance. Both our human study and our evaluation using four state-of-the-art watermark detection methods show that PuzzleMark exhibits strong imperceptibility, with an average suspicious rate $\leq$ 0.24 and an average recall $\leq$ 30.41%, respectively. As a practical digital watermarking method, PuzzleMark provides strong protection for the intellectual property of code datasets and offers new insights for future research.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。