Self-Edit: Fault-Aware Code Editor for Code Generation

要約

タイトル:Self-Edit:コード生成のための障害認知コードエディター

要約:
– 大規模言語モデル(LLMs)は競技プログラミングのタスクにおいてコードを生成する能力が高く、その性能が示されている。
– しかし、サンプル数が限られているため、LLMsはまだ正確性に問題を抱えている。
– 人間のプログラミングプロセスを参考に、私たちは生成と編集のアプローチを提案し、LLMsで生成されたコードの実行結果を利用して、競技プログラミングのタスクにおけるコードの品質を向上させる。
– 私たちは、問題で提供された例のテストケースで生成されたコードを実行し、実行結果を補足コメントにまとめる。
– このコメントをガイドとして利用し、私たちの障害認知コードエディターを使用して、生成されたコードのエラーを修正する。
– 私たちは、9つの異なるLLMsを使用した2つの競技プログラミングデータセット上で広範な評価を行う。
– LLMsから直接生成する場合と比較して、私たちのアプローチは、パラメーターサイズが110Mから175Bに及ぶ9つの人気のあるコード生成LLMsにおいて、APPS-devでpass@1の平均値を89%、APPS-testで31%、HumanEvalで48%向上させることができる。
– 他の事後処理方法と比較して、私たちの方法は優れた正確性と効率を示している。

要約(オリジナル)

Large language models (LLMs) have demonstrated an impressive ability to generate codes on competitive programming tasks. However, with limited sample numbers, LLMs still suffer from poor accuracy. Inspired by the process of human programming, we propose a generate-and-edit approach that utilizes execution results of the generated code from LLMs to improve the code quality on the competitive programming task. We execute the generated code on the example test case provided in the question and wrap execution results into a supplementary comment. Utilizing this comment as guidance, our fault-aware code editor is employed to correct errors in the generated code. We perform extensive evaluations across two competitive programming datasets with nine different LLMs. Compared to directly generating from LLMs, our approach can improve the average of pass@1 by 89\% on APPS-dev, 31\% on APPS-test, and 48\% on HumanEval over nine popular code generation LLMs with parameter sizes ranging from 110M to 175B. Compared to other post-processing methods, our method demonstrates superior accuracy and efficiency.

arxiv情報

著者 Kechi Zhang,Zhuo Li,Jia Li,Ge Li,Zhi Jin
発行日 2023-05-06 16:12:19+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, OpenAI

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