CRUXEval: 코드 추론, 이해 및 실행을 위한 벤치마크
CRUXEval: A Benchmark for Code Reasoning, Understanding and Execution
January 5, 2024
저자: Alex Gu, Baptiste Rozière, Hugh Leather, Armando Solar-Lezama, Gabriel Synnaeve, Sida I. Wang
cs.AI
초록
우리는 800개의 파이썬 함수(3-13줄)로 구성된 벤치마크인 CRUXEval(Code Reasoning, Understanding, and eXecution Evaluation)을 소개합니다. 각 함수는 입력-출력 쌍과 함께 제공되며, 이는 입력 예측과 출력 예측이라는 두 가지 자연스러운 과제로 이어집니다. 첫째, 우리는 이 실행 벤치마크를 생성하기 위한 일반적인 방법론을 제안하며, 이는 향후 벤치마크의 변형을 생성하는 데 사용될 수 있습니다. 둘째, 우리는 이 벤치마크에서 20개의 코드 모델을 평가하고, HumanEval에서 높은 점수를 기록한 최신 모델들이 우리 벤치마크에서는 동일한 개선을 보이지 않는다는 사실을 발견했습니다. 셋째, 우리는 간단한 CoT(Chain of Thought)와 미세 조정 기법이 우리 벤치마크에서 성능을 향상시킬 수 있지만, 이를 완전히 해결하기에는 여전히 멀었다는 것을 보여줍니다. 최고의 설정인 GPT-4 with CoT는 입력 예측과 출력 예측에서 각각 75%와 81%의 pass@1을 달성했습니다. 반면, Code Llama 34B는 입력 예측과 출력 예측에서 각각 50%와 46%의 pass@1을 기록하며, 오픈 소스와 클로즈드 소스 모델 간의 격차를 강조합니다. 어떤 모델도 CRUXEval을 완벽히 해결하지 못함에 따라, 우리는 간단한 프로그램에서 GPT-4의 일관된 실패 사례를 제공하여 그 코드 추론 능력과 개선이 필요한 부분을 살펴봅니다.
English
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.