Generation Probabilities Are Not Enough: Exploring the Effectiveness of Uncertainty Highlighting in AI-Powered Code Completions

要約

大規模な生成モデルにより、AI を利用したコード補完ツールの開発が可能になり、プログラマーがコードを記述できるようになりました。
ただし、他の AI を利用したツールと同様に、AI を利用したコード補完は常に正確であるとは限らず、人間のプログラマーによって適切に検出および修正されない場合、コードにバグやセキュリティの脆弱性さえも導入される可能性があります。
プログラマーが潜在的なエラーを識別できるようにするために提案および実装された手法の 1 つは、不確実なトークンを強調表示することです。
ただし、この手法の有効性を調査する実証的研究はなく、生成モデルのコンテキストにおける不確実性の異なる、まだ合意されていない概念を調査することもありません。
不確実性に関する情報を伝達することで、プログラマーが AI を利用したコード補完ツールと連携してコードをより迅速かつ正確に生成できるようになるかどうか、もしそうなら、プログラマーのニーズに最適な不確実性の尺度は何かを探ります。
30 人のプログラマーを対象とした混合方法の調査を通じて、3 つの条件を比較しました。AI システムのコード補完のみを提供すること、基礎となる生成モデルによって生成される可能性が最も低いトークンを強調表示すること、およびによって編集される可能性が最も高いと予測されるトークンを強調表示することです。
プログラマー。
編集される可能性が最も高いと予測されたトークンを強調表示すると、タスクの完了が速くなり、より的を絞った編集が行われ、調査参加者に主観的に好まれることがわかりました。
対照的に、生成される可能性に従ってトークンを強調表示しても、強調表示がないベースラインよりもメリットはありません。
さらに、AI を利用したコード補完ツールで不確実性を伝える方法のデザイン スペースを調査したところ、プログラマーは詳細で、有益で、解釈可能で、圧倒されないハイライトを好むことがわかりました。

要約(オリジナル)

Large-scale generative models enabled the development of AI-powered code completion tools to assist programmers in writing code. However, much like other AI-powered tools, AI-powered code completions are not always accurate, potentially introducing bugs or even security vulnerabilities into code if not properly detected and corrected by a human programmer. One technique that has been proposed and implemented to help programmers identify potential errors is to highlight uncertain tokens. However, there have been no empirical studies exploring the effectiveness of this technique– nor investigating the different and not-yet-agreed-upon notions of uncertainty in the context of generative models. We explore the question of whether conveying information about uncertainty enables programmers to more quickly and accurately produce code when collaborating with an AI-powered code completion tool, and if so, what measure of uncertainty best fits programmers’ needs. Through a mixed-methods study with 30 programmers, we compare three conditions: providing the AI system’s code completion alone, highlighting tokens with the lowest likelihood of being generated by the underlying generative model, and highlighting tokens with the highest predicted likelihood of being edited by a programmer. We find that highlighting tokens with the highest predicted likelihood of being edited leads to faster task completion and more targeted edits, and is subjectively preferred by study participants. In contrast, highlighting tokens according to their probability of being generated does not provide any benefit over the baseline with no highlighting. We further explore the design space of how to convey uncertainty in AI-powered code completion tools, and find that programmers prefer highlights that are granular, informative, interpretable, and not overwhelming.

arxiv情報

著者 Helena Vasconcelos,Gagan Bansal,Adam Fourney,Q. Vera Liao,Jennifer Wortman Vaughan
発行日 2023-02-14 18:43:34+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.HC パーマリンク