EffiBench: Benchmarking the Efficiency of Automatically Generated Code

要約

コード生成モデルは、コード補完、デバッグ、コード変換などのタスクを支援し、ソフトウェア開発を支援するためにますます不可欠なものとなっています。
現在の研究では、コード生成モデルによって生成されたコードの正確性が徹底的に検査されていますが、重要な側面、つまり生成されたコードの効率性は無視されることがよくあります。
このペーパーでは、コード生成モデルによって生成されたコードの効率を評価するための、効率が重要な 1,000 のコーディング問題を備えたベンチマークである EffiBench について説明します。
EffiBench には、LeetCode コーディングの問題のさまざまなセットが含まれています。
各問題は、人間が作成した実行可能な標準的な解決策とペアになっています。
EffiBench を使用して、効率的なコードを生成する際の 21 個の大規模言語モデル (13 個がオープンソース、8 個がクローズドソース) の機能を実証的に検査します。
結果は、GPT-4-turbo が最も効率的なコードを生成し、Palm-2-chat-bison、Claude-instant-1、Gemini-pro、GPT-4、および GPT-3.5 を大幅に上回っていることを示しています。
それにもかかわらず、そのコード効率は、人間が作成した標準ソリューションの効率よりも依然として悪いです。
特に、GPT-4 ターボで生成されたコードの平均実行時間と最悪の実行時間は、標準ソリューションの 1.69 倍と 45.49 倍です。

要約(オリジナル)

Code generation models have increasingly become integral to aiding software development, offering assistance in tasks such as code completion, debugging, and code translation. Although current research has thoroughly examined the correctness of code produced by code generation models, a vital aspect, i.e., the efficiency of the generated code, has often been neglected. This paper presents EffiBench, a benchmark with 1,000 efficiency-critical coding problems for assessing the efficiency of code generated by code generation models. EffiBench contains a diverse set of LeetCode coding problems. Each problem is paired with an executable human-written canonical solution. With EffiBench, we empirically examine the capability of 21 Large Language Models (13 open-sourced and 8 closed-sourced) in generating efficient code. The results demonstrate that GPT-4-turbo generates the most efficient code, significantly outperforming Palm-2-chat-bison, Claude-instant-1, Gemini-pro, GPT-4, and GPT-3.5. Nevertheless, its code efficiency is still worse than the efficiency of human-written canonical solutions. In particular, the average and worst execution time of GPT-4-turbo generated code is 1.69 and 45.49 times that of the canonical solutions.

arxiv情報

著者 Dong Huang,Jie M. Zhang,Yuhao Qing,Heming Cui
発行日 2024-02-15 15:57:06+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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