Who Wrote this Code? Watermarking for Code Generation

被引:0
|
作者
Lee, Taehyun [1 ]
Hong, Seokhee [1 ,3 ]
Ahn, Jaewoo [1 ]
Hong, Ilgee [1 ,4 ]
Lee, Hwaran [2 ]
Yun, Sangdoo [1 ,2 ]
Shin, Jamin [2 ]
Kim, Gunhee [1 ]
机构
[1] Seoul Natl Univ, Seoul, South Korea
[2] NAVER AI Lab, Grenoble, France
[3] LG AI Res, Seoul, South Korea
[4] Georgia Inst Technol, Atlanta, GA USA
基金
新加坡国家研究基金会;
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Since the remarkable generation performance of large language models raised ethical and legal concerns, approaches to detect machine-generated text by embedding watermarks are being developed. However, we discover that the existing works fail to function appropriately in code generation tasks due to the task's nature of having low entropy. Extending a logit-modifying watermark method, we propose Selective WatErmarking via Entropy Thresholding ( SWEET), which enhances detection ability and mitigates code quality degeneration by removing low-entropy segments at generating and detecting watermarks. Our experiments show that SWEET significantly improves code quality preservation while outperforming all baselines, including post-hoc detection methods, in detecting machine-generated code text. Our code is available in https://github.com/hongcheki/sweet-watermark.
引用
收藏
页码:4890 / 4911
页数:22
相关论文
共 50 条
  • [1] Who Wrote This Code? Identifying the Authors of Program Binaries
    Rosenblum, Nathan
    Zhu, Xiaojin
    Miller, Barton P.
    COMPUTER SECURITY - ESORICS 2011, 2011, 6879 : 172 - 189
  • [2] Who wrote the book of life? A history of the genetic code
    Lewontin, RC
    SCIENCE, 2001, 291 (5507) : 1263 - +
  • [3] Who wrote the book of life? A history of the genetic code
    Judson, HF
    NATURE, 2001, 410 (6825) : 146 - 147
  • [4] Who wrote the book of life? A history of the genetic code.
    Abir-Am, PG
    TECHNOLOGY AND CULTURE, 2001, 42 (02) : 390 - 392
  • [5] Who wrote the book of life? A history of the genetic code.
    Allen, GE
    BULLETIN OF THE HISTORY OF MEDICINE, 2002, 76 (03) : 643 - 646
  • [6] Who wrote the book of life? A history of the genetic code.
    不详
    HISTORY OF SCIENCE, 2002, 40 (127) : 118 - 118
  • [7] Watermarking QR Code
    Barmawi, Ari Moesriami
    Yulianto, Fazmah Arif
    2015 2ND INTERNATIONAL CONFERENCE ON INFORMATION SCIENCE AND SECURITY (ICISS), 2015, : 65 - 68
  • [8] Text to Code: Pseudo Code Generation
    Din, Altaf U.
    Adnan, Awais
    CONTEXT-AWARE SYSTEMS AND APPLICATIONS, AND NATURE OF COMPUTATION AND COMMUNICATION, 2019, 298 : 20 - 37
  • [9] Code-Centric Code Generation
    Busch, Daniel
    Smyth, Steven
    Tegeler, Tim
    Steffen, Bernhard
    LEVERAGING APPLICATIONS OF FORMAL METHODS, VERIFICATION AND VALIDATION: REOCAS COLLOQUIUM IN HONOR OF ROCCO DE NICOLA, PT I, ISOLA 2024, 2025, 15219 : 340 - 355
  • [10] Wrote the book of life? A history of the genetic code.
    Roberts, C
    Mackenzie, A
    ANNALS OF SCIENCE, 2004, 61 (01) : 136 - 137