Who Wrote this Code? Watermarking for Code Generation

要約

大規模な言語モデルの生成パフォーマンスは顕著であるため、盗作や著作権の問題など、その使用に関する倫理的および法的懸念が提起されています。
このような懸念に対して、LLM で生成されたテキストに透かしを入れて検出するためのいくつかのアプローチが最近提案されました。
ただし、コードの構文的および意味的特性により、以前の方法はコード生成タスクで適切に機能しないことがわかりました。
\citet{Kirchenbauer2023watermark} に基づいて、私たちは新しい透かし手法である Selective WatErmarking via Entropy Thresholding (SWEET) を提案します。これは、生成中にトークン分布のエントロピーが高い位置でのみ「緑色」トークンを促進し、それによって、
生成されたコード。
ウォーターマークが入ったコードは、エントロピー情報に基づいた統計テストと Z スコアによって検出されます。
HumanEval と MBPP に関する実験では、SWEET がコードの正確性と透かし検出パフォーマンスの間のパレート フロンティアを大幅に向上させることがわかりました。
また、注目すべき事後検出手法 (DetectGPT など) がこのタスクではうまく機能しないことも示します。
最後に、適切なエントロピーしきい値を設定することはそれほど難しいことではないことを示します。
コードは https://github.com/hongcheki/sweet-watermark で入手できます。

要約(オリジナル)

With the remarkable generation performance of large language models, ethical and legal concerns about using them have been raised, such as plagiarism and copyright issues. For such concerns, several approaches to watermark and detect LLM-generated text have been proposed very recently. However, we discover that the previous methods fail to function appropriately with code generation tasks because of the syntactic and semantic characteristics of code. Based on \citet{Kirchenbauer2023watermark}, we propose a new watermarking method, Selective WatErmarking via Entropy Thresholding (SWEET), that promotes ‘green’ tokens only at the position with high entropy of the token distribution during generation, thereby preserving the correctness of the generated code. The watermarked code is detected by the statistical test and Z-score based on the entropy information. Our experiments on HumanEval and MBPP show that SWEET significantly improves the Pareto Frontier between the code correctness and watermark detection performance. We also show that notable post-hoc detection methods (e.g. DetectGPT) fail to work well in this task. Finally, we show that setting a reasonable entropy threshold is not much of a challenge. Code is available at https://github.com/hongcheki/sweet-watermark.

arxiv情報

著者 Taehyun Lee,Seokhee Hong,Jaewoo Ahn,Ilgee Hong,Hwaran Lee,Sangdoo Yun,Jamin Shin,Gunhee Kim
発行日 2023-11-17 04:20:01+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク