大模型生成代码水印攻防技术综述
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP309

基金项目:

国家自然科学基金(62302497, 92270204); 中国科学院稳定支持基础研究领域青年团队计划 (YSBR-118)


Survey on Attack and Defense Technologies for LLM-generated Code Watermarks
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    随着以大模型(large language model, LLM)为核心的智能编程助手逐渐重塑软件工程范式, AI生成的代码已成为关键的数字资产, 而由此引发的知识产权归属模糊与软件供应链安全风险也日益严峻. 代码水印作为数字版权确权与溯源的“数字锚点”, 在编程语言严格的语法约束与低信息熵环境下, 面临独特的挑战. 针对当前研究中存在的技术方案分散、评估体系不完整等问题, 从模型全生命周期的系统性视角出发, 对现有研究进行系统性分类与理论模型构建. 首先, 提出一种基于生命周期的新型分类框架, 将现有技术精准归纳为训练时的后门触发、推理时的采样偏置嵌入以及生成后的语义重述嵌入这3大范式, 并深度解析其运作机理与演进路径. 其次, 深入剖析代码水印关键性能指标之间的制约关系, 揭示在当前技术条件下保真度、鲁棒性与水印容量之间存在的内在矛盾与权衡逻辑. 此外, 引入对抗博弈视角, 剖析破坏、欺骗及探测等攻击手段, 并梳理从功能一致性到对抗溯源能力的评测基准. 最后, 针对现有技术在工程化可用性和全生命周期评测方面的不足, 展望面向DevOps (development and operations)全链路的动态防护与生态集成等未来研究方向, 旨在推动相关技术由概念验证阶段迈向工业级应用场景.

    Abstract:

    As large language model (LLM)-based intelligent programming assistants gradually reshape software engineering paradigms, AI-generated code has become a critical digital asset, while the resulting ambiguity in intellectual property ownership and risks to software supply chain security are becoming increasingly severe. Code watermarking, serving as a “digital anchor” for copyright ownership confirmation and provenance tracking, faces unique difficulties due to the strict syntactic constraints and low information entropy of programming languages. To address problems in current research, such as fragmented technical approaches and incomplete evaluation systems, this study provides a systematic classification of existing research and develops a theoretical model from a full-lifecycle perspective. First, a novel lifecycle-based classification framework is proposed that categorizes existing techniques into three paradigms: backdoor triggering during training, sampling-bias embedding during inference, and semantic-rephrasing embedding after generation. Their operating mechanisms and evolutionary paths are then analyzed in depth. Second, the constraining relationships among key performance metrics of code watermarking are analyzed in depth, revealing the inherent contradictions and trade-off logic among fidelity, robustness, and watermark capacity under current technological conditions. Furthermore, an adversarial game perspective is introduced to analyze attack methods involving destruction, deception, and detection, and evaluation benchmarks ranging from functional consistency to adversarial traceability capabilities are reviewed. Finally, in view of the limitations of existing techniques in engineering usability and full-lifecycle evaluation, future research directions are outlined, including dynamic protection and ecosystem integration across the entire DevOps pipeline, aiming to promote the transition of relevant technologies from the proof-of-concept stage to industrial-grade application scenarios.

    参考文献
    相似文献
    引证文献
引用本文

吕培卓,赵睿智,隋佩杭,杨茜云,梁瑞刚,孙伟松,陈宇轩,陈恺.大模型生成代码水印攻防技术综述.软件学报,,():1-25

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2026-03-21
  • 最后修改日期:2026-05-14
  • 录用日期:
  • 在线发布日期: 2026-09-18
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号