LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code

Naman Jain, King Han, Alex Gu, Wen-Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Armando Solar-Lezama, Koushik Sen, Ion Stoica

TL;DR

LiveCodeBench (LCB) is a new, continuously updated benchmark designed to solve the "contamination" problem in Code LLMs by using fresh problems from competitive programming contests. By evaluating models on tasks like code generation, self-repair, and execution, it reveals that many models are significantly overfitted to older, static benchmarks like HumanEval.

What Problem Does This Paper Address?

Evaluating Large Language Models (LLMs) for code has become a game of cat and mouse. Traditional benchmarks like HumanEval and MBPP are static; because they have been public for years, they have almost certainly leaked into the massive web-scale training sets of modern LLMs. This "data contamination" makes it impossible to tell if a model is actually a good programmer or if it’s just reciting a memorized solution.

Furthermore, these older benchmarks are becoming "saturated" (models are hitting near-perfect scores) and focus almost exclusively on simple code generation. Real-world programming involves much more: debugging (self-repair), understanding what code does (execution), and reasoning about edge cases. There is a desperate need for a "live" evaluation framework that is holistic, difficult, and contamination-free.

Methods

The authors introduce LiveCodeBench, which adopts a "scrolling through time" approach to evaluation.

  1. Continuous Sourcing: The system automatically scrapes new problems from three major competitive programming platforms: LeetCode, AtCoder, and Codeforces.
  2. Temporal Guardrails: Every problem is tagged with a release date. To ensure a fair test, a model is only evaluated on problems released after its training data cutoff date.
  3. Holistic Scenarios: LCB goes beyond just writing code from a prompt. It tests four distinct capabilities:
  4. Code Generation: Writing a solution from a natural language description.
  5. Self-Repair: Fixing a buggy solution when provided with interpreter error messages.
  6. Code Execution: Predicting the exact output of a given code snippet (testing "mental simulation").
  7. Test Output Prediction: Given a problem statement and an input, predicting the expected output.
Holistic Evaluation Scenarios
  1. Quality Control: To avoid the "noisy" tests common in competitive programming, the authors used GPT-4-Turbo to build robust test-case generators, ensuring each problem has an average of 18+ high-quality tests.

Datasets

  • LiveCodeBench (LCB): The primary contribution, featuring 612 problems published between May 2023 and August 2024.
  • Comparison Benchmarks: The study compares LCB results against established benchmarks including HumanEval, HumanEval+, MBPP, APPS, and CodeContests.

Key Insights and Ideas

  • The Contamination "Cliff": The paper provides striking visual evidence of contamination. When plotting model performance over time, there is often a "stark drop" in Pass@1 scores immediately following the model's training cutoff date. For example, DeepSeek models show a massive performance dip on problems released after August 2023.
Contamination Cliff over Time
  • The HumanEval Specialists: The authors identified a "red cluster" of models—mostly fine-tuned open-source variants—that perform exceptionally well on HumanEval but fail miserably on LCB. This suggests these models are being "over-optimized" for specific, older benchmarks rather than gaining general coding intelligence.
  • Closed Models Still Lead: While open-source models are catching up on older benchmarks, the gap remains wide on LCB. GPT-4o and Claude 3.5 Sonnet consistently outperform open models on the most recent, "clean" problems.
  • Execution is Harder than Generation: Interestingly, some models that are great at writing code are surprisingly poor at predicting what that same code will output. This highlights a gap between "syntactic fluency" and "semantic understanding."

Key Results

  • Scale of Evaluation: The authors conducted the largest study of its kind, evaluating over 50 LLMs.
  • Performance Gaps: On the "Easy" subset of LCB, the gap between top-tier closed models and open-source models is much larger than what HumanEval suggests. For instance, DeepSeek-Coder-33B is only 4.3 points behind GPT-4 on HumanEval+, but it lags by 16.2 points (a 69% relative gap) on LCB Code Generation.
  • Top Performers: As of the paper's publication, GPT-4o and Claude 3.5 Sonnet lead the pack across almost all scenarios. Among open models, DeepSeek-V2 and Llama-3-70B showed the most resilience to the harder, newer problems.
  • Self-Repair Gains: GPT-4-Turbo showed a remarkable jump in performance (from 24.5% to 36.9%) when allowed to "self-repair" based on feedback, a capability less pronounced in smaller or overfitted models.

Limitations and Future Work

  • Python-Centric: Currently, the benchmark focuses almost entirely on Python. The authors acknowledge that adding more languages is a priority.
  • Prompt Sensitivity: Like all LLM benchmarks, results can vary based on the specific prompt used. While the authors used standard prompts, they note that "prompt engineering" remains a variable.
  • Shrinking Test Sets: As models are updated with more recent data, the pool of "unseen" problems for the very newest models becomes smaller, potentially increasing the variance (noise) in scores.
  • Future Directions: The authors plan to expand to more platforms, include private (unreleased) test sets to further combat contamination, and explore more complex "agentic" workflows where models use tools and multiple turns to solve problems.

Summary updated

BibTeX
@inproceedings{jain2025livecodebench,
  author = {Naman Jain and King Han and Alex Gu and Wen-Ding Li and Fanjia Yan and Tianjun Zhang and Sida Wang and Armando Solar-Lezama and Koushik Sen and Ion Stoica},
  title = {{LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=chfJJYC3iL},
}
Figure