論文の概要: SemGuard: Real-Time Semantic Evaluator for Correcting LLM-Generated Code
- arxiv url: http://arxiv.org/abs/2509.24507v1
- Date: Mon, 29 Sep 2025 09:21:32 GMT
- ステータス: 翻訳完了
- システム内更新日: 2025-09-30 22:32:19.894827
- Title: SemGuard: Real-Time Semantic Evaluator for Correcting LLM-Generated Code
- Title(参考訳): SemGuard: LLM生成コードの修正のためのリアルタイムセマンティック評価器
- Authors: Qinglin Wang, Zhihong Sun, Ruyun Wang, Tao Huang, Zhi Jin, Ge Li, Chen Lyu,
- Abstract要約: ポストホック修復パイプラインは、実行後にのみそのような障害を検出する。
本稿では,実時間で行レベルのセマンティック監視を行うセマンティック評価フレームワークSemGuardを紹介する。
- 参考スコア(独自算出の注目度): 46.20378145112059
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Large Language Models (LLMs) can translate natural language requirements into code, yet empirical analyses of representative models reveal that semantic errors-programs that compile but behave incorrectly-constitute the majority of observed faults (e.g., >60% on DeepSeek-Coder-6.7B and QwenCoder-7B). Post-hoc repair pipelines detect such faults only after execution, incurring latency, relying on incomplete test suites, and often mis-localizing the defect. Since semantic drift originates in the autoregressive decoding process, intervening while the code is being generated is a direct way to stop error propagation. Constrained-decoding approaches such as ROCODE attempt this, but still wait until the entire program runs to obtain feedback and use entropy heuristics that do not truly capture semantics. A more effective solution must inject semantic signals-early and precisely-into the decoding process.We present SemGuard, a semantic-evaluator-driven framework that performs real-time, line-level semantic supervision. To train the evaluator, we build SemDiff, the first dataset with fine-grained annotations that mark the exact line where a correct and an incorrect implementation diverge. The evaluator, once embedded in the LLM's decoder, flags deviations on partial code, rolls back to the faulty line, and guides regeneration-without executing the program or requiring test cases. Across four benchmarks, SemGuard consistently outperforms state-of-the-art baselines. It lowers the semantic error rate by 19.86% on SemDiff relative to ROCODE, and lifts Pass@1 by 48.92% on the real-world LiveCodeBench with CodeLlama-7B. Similar gains hold for StarCoder2-7B on MBPP and for DeepSeekCoder-6.7B on the Java benchmark SemDiff-Java, demonstrating model- and language-agnostic effectiveness.
- Abstract(参考訳): 大規模言語モデル(LLM)は、自然言語の要求をコードに変換することができるが、代表モデルの実証分析により、コンパイルされるが正しく動作するセマンティックエラープログラムは、観測されたフォールトの大部分を構成する(例えば、DeepSeek-Coder-6.7BとQwenCoder-7Bの60%)。
ホット後の修復パイプラインは、実行後にのみそのような障害を検出し、レイテンシーを発生し、不完全なテストスイートに依存し、しばしば欠陥を非ローカライズする。
セマンティックドリフトは自己回帰復号プロセスに起因しているため、コードが生成される間はエラーの伝播を止める直接的な方法である。
ROCODEのような制約付きデコーディングアプローチは、これを試みているが、プログラム全体が実行されてフィードバックを取得し、意味論を真に捉えないエントロピーヒューリスティックを使用するのを待つ。
より効果的なソリューションは、デコーディングプロセスにセマンティックシグナルを早期かつ正確に注入する必要がある。
評価器をトレーニングするために、正しい実装と正しくない実装が分岐する正確な行を示す、きめ細かいアノテーションを備えた最初のデータセットであるSemDiffを構築します。
LLMのデコーダに埋め込まれた評価器は、部分的なコードへの偏差をフラグし、欠陥ラインにロールバックし、プログラムの実行やテストケースの必要なしに再生をガイドする。
4つのベンチマークで、SemGuardは一貫して最先端のベースラインを上回っている。
セマンティックエラー率をROCODEに対するSemDiffで19.86%低下させ、CodeLlama-7Bで現実世界のLiveCodeBenchでPass@1を48.92%上昇させる。
MBPPのStarCoder2-7BやJavaベンチマークのSemDiff-JavaのDeepSeekCoder-6.7Bにも同様の利点があり、モデルと言語に依存しない効果を示している。
関連論文リスト
- Towards Automated Error Discovery: A Study in Conversational AI [48.735443116662026]
本稿では,会話型AIにおけるエラーの検出と定義のためのフレームワークであるAutomated Error Discoveryを紹介する。
また,その実装に対するエンコーダに基づくアプローチとして,SEEED(Soft Clustering Extended-Based Error Detection)を提案する。
論文 参考訳(メタデータ) (2025-09-13T14:53:22Z) - Probing Pre-trained Language Models on Code Changes: Insights from ReDef, a High-Confidence Just-in-Time Defect Prediction Dataset [0.0]
本稿では,22の大規模C/C++プロジェクトから得られた関数レベル修正の信頼性の高いベンチマークであるReDefを紹介する。
欠陥ケースはコミットの反転によって固定され、クリーンケースはポストホック履歴チェックによって検証される。
このパイプラインは3,164の欠陥と10,268のクリーンな修正をもたらし、既存のリソースよりも信頼性の高いラベルを提供する。
論文 参考訳(メタデータ) (2025-09-11T07:07:11Z) - Diffusion Language Models Know the Answer Before Decoding [56.96815863705218]
拡散言語モデル (DLM) は自己回帰的アプローチの代替として登場した。
我々の研究は、DLMの早期回答収束の見過ごされた特性を強調し、活用する。
Prophetは、早期コミット復号を可能にするトレーニングフリーの高速復号化パラダイムである。
論文 参考訳(メタデータ) (2025-08-27T15:40:25Z) - Repairing vulnerabilities without invisible hands. A differentiated replication study on LLMs [5.10123605644148]
自動脆弱性修復(AVR: Automated Vulnerability repair)は、プログラム修復の急激な分岐である。
近年の研究では、大きな言語モデル(LLM)が従来の手法より優れていることが示されている。
論文 参考訳(メタデータ) (2025-07-28T16:39:16Z) - EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking [58.15568681219339]
大規模言語モデル(LLM)を評価するための新しいベンチマークであるEquiBenchを紹介する。
このタスクは、プログラムのセマンティクスについて推論するモデルの能力を直接テストする。
19の最先端LCMを評価し、最も難しいカテゴリでは、最高の精度は63.8%と76.2%であり、50%のランダムベースラインよりわずかに高い。
論文 参考訳(メタデータ) (2025-02-18T02:54:25Z) - A test-free semantic mistakes localization framework in Neural Code Translation [32.5036379897325]
本稿では,Large Language Model(LLM)に基づく静的解析フレームワークであるEISPを紹介する。
このフレームワークはソースコードと翻訳されたコード間の意味マッピングを生成する。
EISPは、AIチェーンを通じて、各サブコードのフラグメントをきめ細かい知識ヒントで接続する。
論文 参考訳(メタデータ) (2024-10-30T08:53:33Z) - Impact of Large Language Models of Code on Fault Localization [2.936007114555107]
本稿では,FLタスクのための大規模言語モデルの微調整のための,単純だが効果的なシーケンス生成手法を提案する。
具体的には、FLタスク用の代表エンコーダ、エンコーダデコーダ、デコーダベースの13のLLMCを微調整する。
実験結果から, LLMCは50.6%, 64.2%, 72.3%の誤差位置を検出できた。
論文 参考訳(メタデータ) (2024-08-19T02:36:07Z) - Let the Code LLM Edit Itself When You Edit the Code [50.46536185784169]
underlinetextbfPositional textbfIntegrity textbfEncoding (PIE)
PIEは、標準的な完全再計算手法に比べて計算オーバーヘッドを85%以上削減する。
その結果、PIEは計算オーバーヘッドを標準の完全再計算手法に比べて85%以上削減することを示した。
論文 参考訳(メタデータ) (2024-07-03T14:34:03Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。