言語モデルのバグ修正は最小修正か書き直しか
Large Language Models for Programming: Actually Fixing or Reimplementing Incorrect Code?
この論文をやさしく読む
ひとことで言うと
言語モデルのバグ修正が、人間のような部分修正より全体の書き直しに近くなるかを調べた。
何に役立つ?
AIによるプログラミング支援で、利用者のコードを保つ修正方法を考える材料になる。
この研究の面白いところ
約3000件の提出からバグ版と人間の修正版を対応づけ、一から解く場合とパッチを作る場合も比べた。
どこまで分かった?
対象はCodeforcesの数人の利用者の提出と3モデルで、正解判定には生成テストを含むデータセットを用いた。一般の開発作業への広がりは要旨にない。
v1のアブストラクトに基づくAI解説。日本語訳とは別に、用途の解釈を含みます。
アブストラクトの日本語訳
最近の研究では、大規模言語モデルが競技プログラミングを含むさまざまな環境で問題を解き、バグを修正できると示されている。しかし問題を一から解く能力とバグ修正能力の関係は十分に調べられていない。著者らは、言語モデルがバグのある解答を人間の修正に比べてどれほど変更するか、解答を丸ごと新しく生成しがちかを調べる。Codeforcesの数人の利用者による約3000件の全提出を集め、バグを含む各提出と対応する人間の修正を組にした。元の解答と人間の修正の類似度を基準に、OpenAIのGPT系3モデル、gpt-5-nano、gpt-5-mini、gpt-5.1による修正の質を評価する。生成された解答が問題を解くかは、DeepSeek-R1で生成したテストを含む公開のCodeforces-R1データセットで調べる。結果から、モデルは人間の修正より必要以上に多くの行を変え、場合によっては解答全体を新しく作る傾向が示された。また、元のバグを含む解答が人間の修正に近い場合でも、モデルはパッチを作るより一から解答を生成する方が正解する問題が多かった。この知見は、解答の置き換えではなく、利用者のデバッグと段階的な問題解決を支援するプログラミングツールの設計に関わる。
v1の要旨から自動生成。本文の精読・人による確認は未実施。
- 初稿
- 2026-09-24(UTC)
- 最新改訂
- 2026-09-24 · v1
- 査読・掲載
- 査読状況未確認
更新履歴
- v1 2026-09-24 この版を読む
取得できた版を表示。版の更新は査読済みを意味しません。過去版の本文差分は未解析です。
原文の要旨
Recent studies have shown that Large Language Models can effectively solve problems and fix bugs in diverse programming environments, including competitive programming. Existing approaches primarily evaluate LLM performance in problem solving or bug fixing independently, but do not explore the relationship between these two capabilities. This work focuses on determining how much the LLM deviates from a buggy solution to fix the bug compared to a human-written patch, and if there is a bias towards generating entirely new solutions. We construct a dataset with all the submissions ($\sim$ 3000) from a couple of users from Codeforces, and we match each buggy submission with its corresponding human fix. By using the similarity between the buggy solution and the human fix as a baseline, we evaluate the quality of LLM-generated bug fixes on 3 OpenAI GPT models (gpt-5-nano, gpt-5-mini, gpt-5.1). We check if the generated solutions solve the problem by using the Codeforces-R1 dataset, an openly available dataset that has tests generated with the DeepSeek-R1 model. Our findings suggest that LLMs tend to modify more lines than necessary compared to human fixes and, in some cases, generate entirely new solutions. We also observe that LLMs solve more problems correctly when allowed to generate solutions from scratch rather than patch buggy submissions, even when those submissions are close to the human patch. This has important implications for the design of AI-assisted programming tools, particularly in supporting user debugging processes and promoting incremental problem-solving strategies rather than solution replacement.
arXiv ID: 2609.29410 / 要約の誤りについて