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
来源
PROCEEDINGS OF THE 62ND ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, VOL 1: LONG PAPERS | 2024年
基金
新加坡国家研究基金会;
关键词
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
相关论文
共 47 条
  • [1] Abdelnabi S, 2021, P IEEE S SECUR PRIV, P121, DOI 10.1109/SP40001.2021.00083
  • [2] Achiam J., 2023, Gpt-4 technical reppo
  • [3] Atallah Mikhail J, 2001, LECT NOTES COMPUTER, P185, DOI DOI 10.1007/3-540-45496-9_14
  • [4] Atallah MJ, 2003, LECT NOTES COMPUT SC, V2578, P196
  • [5] Austin J., 2021, arXiv
  • [6] Bavarian M., 2022, ARXIV
  • [7] Carlini Nicholas, 2021, P 30 US SEC S, V6
  • [8] Chen M., 2021, arXiv, DOI 10.48550/ARXIV.2107.03374
  • [9] Christ M, 2023, Arxiv, DOI arXiv:2306.09194
  • [10] Lai Yuhang, 2023, Proceedings of Machine Learning Research, PMLR, V202, P18319