atlas

Research map / Large language models / Agents, code and math

How efficient is LLM-generated code? A rigorous & high-standard benchmark

ICLR 2025 · Large language models › Agents, code and math · approach: Execution-based code verification · 3 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 ENAMEL, a benchmark of 142 HumanEval/HumanEval+ problems with expert reference solutions and strong test generators, plus an unbiased Rao-Blackwellized eff@k metric handling right-censored execution times; evaluates 30 LLMs and finds they fall short of expert-level efficiency.

Problem

Existing code-generation benchmarks evaluate only correctness, and prior efficiency evaluations mishandle right-censored execution times, use weak canonical or random test cases, and use non-expert reference solutions, so they overestimate LLM code efficiency.

Approach

A pass@k generalization (eff@k) that takes the expected maximum of a continuous efficiency score which is zero whenever execution exceeds the time limit, with a Rao-Blackwellized bootstrap estimator, combined with expert-written optimal reference solutions, multi-level expert test generators, and correctness filtering.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase the number of sampled code candidates from k=1 to k=100Phind Code Llama V2 · ENAMELeff@k: 0.351 -> 0.723Helped
Increase the number of sampled code candidates from k=1 to k=100Mixtral 8x22B Instruct · ENAMELeff@k: 0.407 -> 0.704Helped
Encourage generating the most efficient algorithm rather than use the basic prompt (ablation)Llama 3 70B Instruct · ENAMELeff@1: 0.421 -> 0.418Hurt
Encourage generating the most efficient algorithm rather than use the basic prompt (ablation)Mixtral 8x22B Instruct · ENAMELeff@1: 0.408 -> 0.426Helped
Increase timeout factor alpha from 1.5 to 3.5 (ablation)ENAMEL evaluated on GPT-4 Turbo · ENAMELeff@1: 0.421 -> 0.541Helped
Increase level-1 hardness h1 from 1 to 5 (ablation)ENAMEL evaluated on GPT-4 Turbo · ENAMELeff@1: 0.428 -> 0.498Helped
Increase level-3 hardness h3 from 1 to 5 (ablation)ENAMEL evaluated on GPT-4 Turbo · ENAMELeff@1: 0.520 -> 0.460Hurt
Use the Rao--Blackwellized estimator instead of the vanilla estimator (ablation)eff@k estimation with Llama 3 70B Instruct · ENAMEL, k=1standard deviation: 0.20 -> 0.02Helped
Use the Rao--Blackwellized estimator instead of the vanilla estimator (ablation)eff@k estimation with Llama 3 70B Instruct · ENAMEL, k=10standard deviation: 0.25 -> 0.08Helped
Use expert-written test cases instead of random test cases (ablation)Naive factorization algorithm · Problem #31, primality testingeff@1: 0.91 -> 0.17Hurt
Use expert-written test cases instead of random test cases (ablation)Fermat primality test · Problem #31, primality testingeff@1: 1.25 -> 0.00Hurt
Evaluate with ENAMEL instead of HumanEval+Benchmark evaluation · HumanEval+ versus ENAMELeff@1: 0.513 -> 1.000Hurt

Surprising findings

Limitations

Experimental setup

Datasets: HumanEval HumanEval+

Benchmarks: ENAMEL

Metrics: eff@k pass@k speedup

Baselines: EffiBench Mercury speedup metric HumanEval canonical solutions HumanEval+ canonical solutions

Builds on: pass@k HumanEval HumanEval+ bootstrap Self-Refine

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