Where’s the Bug? Attention Probing for Scalable Fault Localization

要約

コード関連のタスクでは、大規模な言語モデル(LLM)がますます能力があるにもかかわらず、コードの正確性を確保することは依然として困難な問題のままです。
LLMベースのプログラム修理システムは、ユーザーのバグレポートのみを使用してバグ修正を提案できますが、その有効性は、人間とLLMの両方にとって困難な問題である障害ローカリゼーション(FL)を実行する能力によって根本的に制限されています。
既存のFLアプローチは、実行可能なテストのケースに依存しており、費用がかかり、しばしば騒々しいラインレベルの注釈のトレーニングが必要です。
このホワイトペーパーでは、直接ローカリゼーションラベルなしで最先端の障害ローカリゼーションを学習し、従来のFLベースラインを上回り、大規模なLLMSのプロンプトを作成する方法を学習する方法であるバグ注意プローブ(BAP)を紹介します。
標準的な欠陥4Jデータセットからの実際のJavaバグや、バグタイプと言語の多様なセットに及ぶ他の7つのデータセットなど、さまざまなコード設定にわたるアプローチを評価します。
8つのデータセットすべてにわたって平均して、BAPは、最強のベースラインと比較して34.6%のTOP-1精度、ゼロショットよりも93.4%がGPT-4Oを促します。
また、BAPはプロンプトをプロンプトするよりもはるかに効率的であり、計算コストのごく一部で大きなオープンウェイトモデルを上回ります。

要約(オリジナル)

Ensuring code correctness remains a challenging problem even as large language models (LLMs) become increasingly capable at code-related tasks. While LLM-based program repair systems can propose bug fixes using only a user’s bug report, their effectiveness is fundamentally limited by their ability to perform fault localization (FL), a challenging problem for both humans and LLMs. Existing FL approaches rely on executable test cases, require training on costly and often noisy line-level annotations, or demand resource-intensive LLMs. In this paper, we present Bug Attention Probe (BAP), a method which learns state-of-the-art fault localization without any direct localization labels, outperforming traditional FL baselines and prompting of large-scale LLMs. We evaluate our approach across a variety of code settings, including real-world Java bugs from the standard Defects4J dataset as well as seven other datasets which span a diverse set of bug types and languages. Averaged across all eight datasets, BAP improves by 34.6% top-1 accuracy compared to the strongest baseline and 93.4% over zero-shot prompting GPT-4o. BAP is also significantly more efficient than prompting, outperforming large open-weight models at a small fraction of the computational cost.

arxiv情報

著者 Adam Stein,Arthur Wayne,Aaditya Naik,Mayur Naik,Eric Wong
発行日 2025-02-20 02:29:19+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.LG, cs.SE パーマリンク