arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2309.00860cs.CR
收藏

迈向基于双通道变换的代码水印

Towards Code Watermarking with Dual-Channel Transformations

Borui Yang, Wei Li, Liyao Xiang, Bo Li

AI总结:

针对源代码版权追踪问题,提出水印系统 SrcMarker,通过基于 AST 的双通道变换与特征近似技术实现跨语言代码水印的端到端训练,在不影响代码语义的前提下有效嵌入 ID 比特串。

摘要:

开源社区的扩张和大语言模型的兴起引发了对源代码分发的伦理和安全担忧,如对受版权保护的代码的不当行为、未获适当许可的分发,或出于恶意目的滥用代码。因此,追踪源代码的所有权至关重要,其中水印是一项主要技术。然而,与自然语言截然不同,源代码水印需要更严格和复杂的规则,以确保源代码的可读性及功能性。因此,我们引入了 SrcMarker,这是一个将 ID 比特串隐蔽地编码到源代码中,而不影响代码的使用和语义的水印系统。为此,SrcMarker 在基于 AST 的中间表示上执行变换,从而实现跨不同编程语言的统一变换。该系统的核心利用基于学习的嵌入和提取模块,为水印选择基于规则的变换。此外,设计了一种新颖的特征近似技术,以解决规则选择固有的不可微性,从而将基于规则的变换和基于学习的网络无缝集成到一个互联系统中,以实现端到端训练。大量实验证明了 SrcMarker 在各种水印需求上优于现有方法。

英文摘要:

The expansion of the open source community and the rise of large language models have raised ethical and security concerns on the distribution of source code, such as misconduct on copyrighted code, distributions without proper licenses, or misuse of the code for malicious purposes. Hence it is important to track the ownership of source code, in which watermarking is a major technique. Yet, drastically different from natural languages, source code watermarking requires far stricter and more complicated rules to ensure the readability as well as the functionality of the source code. Hence we introduce SrcMarker, a watermarking system to unobtrusively encode ID bitstrings into source code, without affecting the usage and semantics of the code. To this end, SrcMarker performs transformations on an AST-based intermediate representation that enables unified transformations across different programming languages. The core of the system utilizes learning-based embedding and extraction modules to select rule-based transformations for watermarking. In addition, a novel feature-approximation technique is designed to tackle the inherent non-differentiability of rule selection, thus seamlessly integrating the rule-based transformations and learning-based networks into an interconnected system to enable end-to-end training. Extensive experiments demonstrate the superiority of SrcMarker over existing methods in various watermarking requirements.

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

↑