Back to list
コードをマークしないで壊さない: LLM生成コードの検出用コーディングワーテック
Marking Code Without Breaking It: Code Watermarking for Detecting LLM-Generated Code
Translated: 2026/2/14 7:12:28
Japanese Translation
arXiv:2502.18851v4 発表種類:上書きクロス发布
概要:LLM生成されたコードを発現する手段で、機能的な正確性を守ることは課題になっていますが、水印技術を使用することによりこの問題を解決できます。既存の方法は、高情報量トークンを通じて効果的に出力の品質を維持できるという仮定に基づいています。しかし、我々の分析によると、これは根本的な限界点を持っています: ステキキュアの要素である言語コードと関連するキー・ワードなどは多数、情報量が最も高く、そのため存在するアプローチには論理的腐食性で弱くなる可能性があります。私はSTONEと呼ばれる syntacticなターンを理解する水印技術を提案します彼女は、主要なtokenのみコードの信頼性を維持しながら水印を埋め込むように設計されています。評価のための厳密な評価のためにも、STEMという統合的なメトリクスは三つの重要な要素:正しさ、発見力、無聴知性までバランスを取るように設計されました彼女は、Python、C++、Javaなどさまざまな言語で正確性を維持し、強力な検出力を保ち、計算の負担が少ない条件下でもbalancedパフォーマンスを実現します。私の実装はhttps://github.com/inistory/STONE-watermarkingまで公開されました。
Original Content
arXiv:2502.18851v4 Announce Type: replace-cross
Abstract: Identifying LLM-generated code through watermarking poses a challenge in preserving functional correctness. Previous methods rely on the assumption that watermarking high-entropy tokens effectively maintains output quality. Our analysis reveals a fundamental limitation of this assumption: syntax-critical tokens such as keywords often exhibit the highest entropy, making existing approaches vulnerable to logic corruption. We present STONE, a syntax-aware watermarking method that embeds watermarks only in non-syntactic tokens and preserves code integrity. For rigorous evaluation, we also introduce STEM, a comprehensive metric that balances three critical dimensions: correctness, detectability, and imperceptibility. Across Python, C++, and Java, STONE preserves correctness, sustains strong detectability, and achieves balanced performance with minimal computational overhead. Our implementation is available at https://github.com/inistory/STONE-watermarking.