[論文レビュー] CRUXEval: A Benchmark for Code Reasoning, Understanding and Execution
CRUXEval は 800-sample Python ベンチマークを導入して、LM におけるコード実行(CRUXEval-O)とコード理解(CRUXEval-I)をテストし、オープンソースモデルと GPT-4 の間にギャップを浮き彫りにし、CoT およびファインチューニングが役立つもののベンチマークを解決しないことを示す。
We present CRUXEval (Code Reasoning, Understanding, and eXecution Evaluation), a benchmark consisting of 800 Python functions (3-13 lines). Each function comes with an input-output pair, leading to two natural tasks: input prediction and output prediction. First, we propose a generic recipe for generating our execution benchmark which can be used to create future variation of the benchmark. Second, we evaluate twenty code models on our benchmark and discover that many recent high-scoring models on HumanEval do not show the same improvements on our benchmark. Third, we show that simple CoT and fine-tuning schemes can improve performance on our benchmark but remain far from solving it. The best setup, GPT-4 with chain of thought (CoT), achieves a pass@1 of 75% and 81% on input and output prediction, respectively. In contrast, Code Llama 34B achieves a pass@1 of 50% and 46% on input and output prediction, highlighting the gap between open and closed source models. As no model is close to acing CRUXEval, we provide examples of consistent GPT-4 failures on simple programs as a lens into its code reasoning capabilities and areas for improvement.
研究の動機と目的
- HumanEval や MBPP のような生成タスクを超えたコード理解と実行を測定するベンチマークを動機づける。
- 2 つのタスクを提供する:入力予測(コードについての推論)と出力予測(コードの実行)。
- 将来のバリエーションの実行ベンチマークを生成する汎用レシピを記述する。
提案手法
- Code Llama 34B を用いて 69 の標準ライブラリ関数から 102,000 個の候補関数と 489,306 個の入出力ペアを生成する。
- 解ける・メモリ負荷が低い問題(浮動小数点数なし、アリティ制限、決定的、副作用なし)になるようサンプルをフィルタリングする。
- 800-sample ベンチマークを、両タスクで実行ベースの正確性指標(pass@1 および pass@5)を用いてランダム選択で構築する。
- GPT-4、GPT-3.5、Code Llama、WizardCoder、Phi、Phind、Mistral、DeepSeek、StarCoder の各モデルを、非 GPT モデルは N=100、GPT モデルは N=10 のサンプルで評価する。
- CRUXEval の性能に対する Chain-of-Thought プロンプティングと単純なファインチューニングの影響を検討する。
実験結果
リサーチクエスチョン
- RQ1LM ベースのコードモデルは、コード実行を推論し、単純な Python 関数の出力を予測できるか(CRUXEval-O)?
- RQ2LM ベースのモデルは、関数を適用したときに特定の出力を生む入力を予測できるか(CRUXEval-I)?
- RQ3オープンソースモデルはコード実行・理解タスクで GPT-4 と比較してどうか?
- RQ4Chain-of-Thought のようなプロンプティング技法や単純なファインチューニングは CRUXEval の性能を改善するか?
- RQ5現代の大規模言語モデルは、単純なコード実行タスクでどのような失敗モードを示すか?
主な発見
- GPT-4 with Chain-of-Thought は最高の成績を報告(pass@1: ~75% input, ~81% output)。
- オープンソースモデルは GPT-4 に遅れ、Code Llama 34B は両タスクで GPT-4 の約半分の性能を達成。
- CoT および単純なファインチューニングは CRUXEval の性能を改善するが、ベンチマークを制覇するにはまだ不足。
- HumanEval 相関モデルでも CRUXEval でギャップが残り、特に蒸留 GPT-4 ベースのモデルは実行理解を一貫して改善できない。
- 多くの GPT-4 の単純プログラムに対する失敗は、強力なモデルでもコード実行理解に根深いギャップを示す。
- 同様のサンプルでのファインチューニングは両タスクで GPT-4 に匹敵するが、70% の精度を下回ると停滞し、このベンチマークが依然として難しいことを示す。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。