ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generation

要約

この作業では、より困難なコード生成シナリオ、つまりクラスレベルのコード生成で LLM を評価する最初の試みを行います。
まず、約 500 人時間で 100 個のクラス レベルの Python コード生成タスクからなる最初のクラス レベルのコード生成ベンチマーク ClassEval を手動で構築します。
これに基づいて、クラスレベルのコード生成に関する 11 個の最先端の LLM の最初の調査を実行します。
その結果、以下の主な知見が得られました。
まず、既存のすべての LLM は、HumanEval のようなスタンドアロンのメソッド レベルのコード生成ベンチマークと比較して、クラス レベルのコード生成ではるかに悪いパフォーマンスを示すことがわかります。
また、メソッドレベルのコーディング能力は、LLM 間のクラスレベルのコーディング能力を等価に反映することはできません。
第 2 に、GPT-4 と GPT-3.5 は、クラスレベルのコード生成において他の LLM よりも圧倒的に優れていることがわかりました。また、第 2 層モデルには、非常に似たパフォーマンスを持つ Instruct-Starcoder、Instruct-Codegen、および Wizardcoder が含まれています。
第三に、クラス全体を一度に生成する (つまり、全体的な生成戦略) が GPT-4 と GPT-3.5 の場合にのみ最適な生成戦略であるのに対し、メソッドごとの生成 (つまり、増分的および構成的) はより良い戦略であることがわかりました。
他のモデルは、長い命令を理解して中間情報を利用する能力が限られています。
最後に、メソッド依存コードを生成するモデルの能力が限られていることを確認し、生成されたクラスで頻繁に発生するエラーの種類について説明します。
私たちのベンチマークは https://github.com/FudanSELab/ClassEval で入手できます。

要約(オリジナル)

In this work, we make the first attempt to evaluate LLMs in a more challenging code generation scenario, i.e. class-level code generation. We first manually construct the first class-level code generation benchmark ClassEval of 100 class-level Python code generation tasks with approximately 500 person-hours. Based on it, we then perform the first study of 11 state-of-the-art LLMs on class-level code generation. Based on our results, we have the following main findings. First, we find that all existing LLMs show much worse performance on class-level code generation compared to on standalone method-level code generation benchmarks like HumanEval; and the method-level coding ability cannot equivalently reflect the class-level coding ability among LLMs. Second, we find that GPT-4 and GPT-3.5 still exhibit dominate superior than other LLMs on class-level code generation, and the second-tier models includes Instruct-Starcoder, Instruct-Codegen, and Wizardcoder with very similar performance. Third, we find that generating the entire class all at once (i.e. holistic generation strategy) is the best generation strategy only for GPT-4 and GPT-3.5, while method-by-method generation (i.e. incremental and compositional) is better strategies for the other models with limited ability of understanding long instructions and utilizing the middle information. Lastly, we find the limited model ability of generating method-dependent code and discuss the frequent error types in generated classes. Our benchmark is available at https://github.com/FudanSELab/ClassEval.

arxiv情報

著者 Xueying Du,Mingwei Liu,Kaixin Wang,Hanlin Wang,Junwei Liu,Yixuan Chen,Jiayi Feng,Chaofeng Sha,Xin Peng,Yiling Lou
発行日 2023-08-14 09:07:00+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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