Large Language Models and Simple, Stupid Bugs

要約

強力なニューラル言語モデルの出現により、開発者のコ​​ーディング タスクを支援する AI ベースのシステムが広く利用できるようになりました。
Copilot はそのようなシステムの 1 つです。
Copilot は、大規模言語モデル (LLM) である Codex を使用して、前の「プロンプト」で条件付けられたコードを完成させます。
ただし、Codex は公開 GitHub リポジトリ、つまりバグや脆弱性を含む可能性のあるコードでトレーニングされています。
以前の研究 [1]、[2] は、Codex がトレーニングで見られる脆弱性を再現することを示しています。
この調査では、MSR コミュニティで単純で愚かなバグまたは SStuB と一般に呼ばれる、興味深いバグ カテゴリである単一ステートメントのバグを Codex が生成する傾向があるかどうかを調べます。
Codex および同様の LLM は、一部の SStuB を回避するのに役立ちますが、既知の逐語的な正しいコードよりも 2 倍の確率で、既知の逐語的な SStuB を生成します。
Codex で生成された SStuB の結果を調査し、既知の逐語的な SStub の生成を減らす可能性を示唆する回避戦略を提案し、既知の逐語的な修正を生成する可能性を高めます。

要約(オリジナル)

With the advent of powerful neural language models, AI-based systems to assist developers in coding tasks are becoming widely available; Copilot is one such system. Copilot uses Codex, a large language model (LLM), to complete code conditioned on a preceding ‘prompt’. Codex, however, is trained on public GitHub repositories, viz., on code that may include bugs and vulnerabilities. Previous studies [1], [2] show Codex reproduces vulnerabilities seen in training. In this study, we examine how prone Codex is to generate an interesting bug category, single statement bugs, commonly referred to as simple, stupid bugs or SStuBs in the MSR community. We find that Codex and similar LLMs do help avoid some SStuBs, but do produce known, verbatim SStuBs as much as 2x as likely than known, verbatim correct code. We explore the consequences of the Codex generated SStuBs and propose avoidance strategies that suggest the possibility of reducing the production of known, verbatim SStubs, and increase the possibility of producing known, verbatim fixes.

arxiv情報

著者 Kevin Jesse,Toufique Ahmed,Premkumar T. Devanbu,Emily Morgan
発行日 2023-03-20 21:14:06+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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