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

多通道扩频码水印

Multi-Channel Spread-Spectrum Code Watermarking

Singapore Management University(新加坡国立管理大学)

Soohyeon Choi, Debin Gao, Yue Duan

AI总结:

研究针对大语言模型代码出处等需求,现有水印无法满足的问题。提出多通道扩频码水印方法,无需训练,有24位有效载荷及鲁棒性保证。在多种测试文件和攻击下,水印检测准确率高、误报率为零,能有效恢复标识符。

摘要:

将代码归因于生成它的大语言模型对于出处、许可和滥用问责至关重要,但目前没有已部署的水印能满足这一需求。生成时方案需要访问生成模型,无法应用于第三方代码;事后方案虽适用于任何代码,但有效载荷最多4位,不足以区分众多已部署的模型配置。我们提出多通道扩频水印,这是首个具有24位有效载荷且无需训练的事后代码水印,并具有形式化的鲁棒性保证。该方案在变量命名约定和八对语义等效的代码模式中编码位,通过密钥伪随机置换将每个位置映射到码字位,使每个位获得多个独立投票。多数投票吸收分布式损坏,外部里德 - 所罗门码在集中通道攻击击败投票时恢复标识符,为格式化、句法和结构攻击提供了可证明的鲁棒性界限。在来自CodeNet以及GPT - 4.1和Llama - 4生成的1750个Python文件上,水印实现了100%的干净检测准确率且零误报。在17种攻击类型下,在8次变量重命名时恢复标识符的准确率为97.6%,在10%的随机逐位损坏下为94.1%,而最强的事后基线在任何单一变换攻击下准确率降至0%。在CPU上嵌入和检测 together take under 200 ms on CPU without training data or GPU。

英文摘要:

Attributing code to the large language model that produced it is essential for provenance, licensing, and misuse accountability, yet no deployed watermark meets this need. Generation-time schemes require access to the producing model and cannot be applied to third-party code, while post-hoc schemes work on any code but carry at most 4 bits of payload, far too few to distinguish the many deployed model configurations. We present multi-channel spread-spectrum watermarking, the first post-hoc, training-free code watermark with a 24-bit payload and formal robustness guarantees. The scheme encodes bits in variable naming conventions and in eight pairs of semantically equivalent code patterns, and a keyed pseudo-random permutation maps every site to a codeword bit so that each bit receives multiple independent votes. Majority voting absorbs distributed corruption, while an outer Reed-Solomon code recovers the identifier when concentrated channel attacks defeat the vote, yielding provable robustness bounds for formatting, syntactic, and structural attacks. Across 1,750 Python files from CodeNet and from GPT-4.1 and Llama-4 generations, the watermark achieves 100% clean-detection accuracy with zero false positives. Under 17 attack types, it recovers the identifier at 97.6% accuracy under 8 variable renames and 94.1% under 10% random per-site corruption, while the strongest post-hoc baseline collapses to 0% under any single-transform attack. Embedding and detection together take under 200 ms on CPU without training data or GPU.

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

↑