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

基于ML/密码学协同设计的大语言模型鲁棒安全代码水印

Robust and Secure Code Watermarking for Large Language Models via ML/Crypto Codesign

University of California, San Diego(加利福尼亚大学圣迭戈分校);San Diego State University(圣地亚哥州立大学)

Ruisi Zhang, Neusha Javidnia, Nojan Sheybani, Farinaz Koushanfar

AI总结:

该研究提出首个ML/密码学协同设计的RoSeMary框架,通过端到端训练结合CodeT5实现高质量代码水印,用零知识证明安全验证,兼具高检测准确率、抗攻击能力与高效性。

摘要:

本文提出了RoSeMary,这是首个ML/密码学协同设计的水印框架,用于约束大语言模型(LLM)生成的代码,避免软件开发中侵犯知识产权和不当滥用。由于代码的低熵特性,符合可检测性-保真度-鲁棒性三目标的高质量水印十分有限。然而,水印验证通常需要披露签名,且代码复用时需重新编码新签名,这可能损害系统可用性。为克服这些挑战,RoSeMary通过端到端训练水印插入与提取模块获取高质量水印,确保:(i)水印代码功能未改变;(ii)利用预训练的CodeT5作为插入骨干,扩大代码句法和变量重命名变换的搜索空间,提升可检测性与鲁棒性。部署时,RoSeMary使用零知识证明进行安全验证,无需披露底层签名。大量评估表明,RoSeMary在保持代码功能的同时实现了高检测准确率,还具备抗攻击鲁棒性,且能提供高效的安全水印验证。

英文摘要:

This paper introduces RoSeMary, the first-of-its-kind ML/Crypto codesign watermarking framework that regulates LLM-generated code to avoid intellectual property rights violations and inappropriate misuse in software development. High-quality watermarks adhering to the detectability-fidelity-robustness tri-objective are limited due to codes' low-entropy nature. Watermark verification, however, often needs to reveal the signature and requires re-encoding new ones for code reuse, which potentially compromising the system's usability. To overcome these challenges, RoSeMary obtains high-quality watermarks by training the watermark insertion and extraction modules end-to-end to ensure (i) unaltered watermarked code functionality and (ii) enhanced detectability and robustness leveraging pre-trained CodeT5 as the insertion backbone to enlarge the code syntactic and variable rename transformation search space. In the deployment, RoSeMary uses zero-knowledge proofs for secure verification without revealing the underlying signatures. Extensive evaluations demonstrated RoSeMary achieves high detection accuracy while preserving the code functionality. RoSeMary is also robust against attacks and provides efficient secure watermark verification.

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

↑