atlas

Research map / Large language models / Reasoning and chain of thought

CRUXEval: A Benchmark for Code Reasoning, Understanding and Execution

ICML 2024 · Large language models › Reasoning and chain of thought · approach: Long CoT dynamics and efficiency · 5 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces CRUXEval, an 800-function Python benchmark for code input and output prediction built by generate-and-filter from Code Llama 34B, evaluates about 20 code LMs and GPT models, and tests CoT and fine-tuning.

Problem

Existing code benchmarks (HumanEval, MBPP) measure code generation, leaving code execution and understanding ability of code LMs unmeasured.

Approach

Generate a large pool of simple Python functions with input-output pairs by prompting Code Llama 34B, filter them to human-solvable short programs, and sample 800 to form a benchmark with two tasks: output prediction (CRUXEval-O) and input prediction (CRUXEval-I), with a recipe that can be rerun for harder variants.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add chain-of-thought prompting (ablation)GPT-4 · CRUXEvalpass@1: +7.7% input, +18.5% outputHelped
add chain-of-thought prompting (ablation)Code Llama 34B · CRUXEvalpass@1: +3.9% input, +4.9% outputHelped
add chain-of-thought prompting (ablation)GPT-3.5 · CRUXEvalpass@1: -0.1% input, +13.3% outputMixed
add chain-of-thought prompting (ablation)Code Llama 13B · CRUXEvalpass@1: +0.1% input, +0.9% outputNo clear effect
anonymize variable names to x1, x2 identifiers (ablation)Code Llama 34B · CRUXEval subsetpass@1: +1.5% input, -2.0% outputMixed
distilling on GPT-4-style data (WizardCoder, Phind, Phi) vs base Code Llama 34BHumanEval-to-CRUXEval relationship · CRUXEvalpass@1No clear effect
fine-tune Code Llama 34B on ~140K distilled execution samplesCode Llama 34B · CRUXEvalpass@1Helped
use Code Llama 34B-generated functions vs GPT-3.5-generated functions for benchmark (ablation)benchmark data generation · CRUXEval data-generating model ablationpass@1Mixed

Surprising findings

Limitations

Experimental setup

Datasets: Python standard library method prompts (str, list, dict) Code Llama 34B generated functions and input-output pairs

Benchmarks: CRUXEval-I CRUXEval-O HumanEval

Metrics: pass@1 pass@5 bootstrap confidence intervals

Baselines: HumanEval MBPP GPT-3.5 WizardCoder Phind v2 Phi-1 Phi-1.5 DeepSeek Coder

Builds on: HumanEval Chain-of-thought prompting Scratchpad

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy