Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation

要約

プログラム合成は、大規模言語モデル (LLM) の機能を直接使用してコードを生成することに焦点を当てた最近のアプローチで長い間研究されてきました。
厳選された合成問題とテストケースを含むプログラミング ベンチマークは、コード合成におけるさまざまな LLM のパフォーマンスを測定するために使用されます。
ただし、生成されたコードの機能の正確さを完全に評価するには、これらのテスト ケースが量と品質の両方で制限される可能性があります。
既存のベンチマークにおけるこのような制限により、次の疑問が生じます。LLM の時代に、生成されたコードは本当に正しいのでしょうか?
これに答えるために、私たちは LLM 合成コードの機能の正確さを厳密に評価するコード合成ベンチマーク フレームワークである EvalPlus を提案します。
EvalPlus は、LLM ベースと突然変異ベースの両方の戦略を活用した自動テスト入力ジェネレーターによって新たに生成された大量のテスト ケースで、特定の評価データセットを強化します。
EvalPlus は一般的なものですが、人気のある HUMANEVAL ベンチマークのテスト ケースを 81 倍拡張して HUMANEVAL+ を構築します。
19 の人気のある LLM (GPT-4 や ChatGPT など) にわたる広範な評価では、HUMANEVAL+ が LLM によって合成された、これまで検出されなかった大量の間違ったコードを捕捉でき、pass@k を平均 13.6 ~ 15.3% 削減できることが実証されました。
私たちの研究は、これまで一般的に行われていたコード合成の評価結果が、コード合成における LLM の真のパフォーマンスを正確に反映していないことを示しただけでなく、自動テストを通じてそのようなプログラミング ベンチマークを改善するという新たな方向性も切り開きました。

要約(オリジナル)

Program synthesis has been long studied with recent approaches focused on directly using the power of Large Language Models (LLMs) to generate code. Programming benchmarks, with curated synthesis problems and test-cases, are used to measure the performance of various LLMs on code synthesis. However, these test-cases can be limited in both quantity and quality for fully assessing the functional correctness of the generated code. Such limitation in the existing benchmarks begs the following question: In the era of LLMs, is the code generated really correct? To answer this, we propose EvalPlus — a code synthesis benchmarking framework to rigorously evaluate the functional correctness of LLM-synthesized code. EvalPlus augments a given evaluation dataset with large amounts of test-cases newly produced by an automatic test input generator, powered by both LLM- and mutation-based strategies. While EvalPlus is general, we extend the test-cases of the popular HUMANEVAL benchmark by 81x to build HUMANEVAL+. Our extensive evaluation across 19 popular LLMs (e.g., GPT-4 and ChatGPT) demonstrates that HUMANEVAL+ is able to catch significant amounts of previously undetected wrong code synthesized by LLMs, reducing the pass@k by 13.6-15.3% on average. Our work not only indicates that prior popular code synthesis evaluation results do not accurately reflect the true performance of LLMs for code synthesis, but also opens up a new direction to improve such programming benchmarks through automated testing.

arxiv情報

著者 Jiawei Liu,Chunqiu Steven Xia,Yuyao Wang,Lingming Zhang
発行日 2023-06-12 06:49:51+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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