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

📄 arXiv: 2403.07974v2 📥 PDF

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

分类: cs.SE, cs.CL, cs.LG

发布日期: 2024-03-12 (更新: 2024-06-06)

备注: Website - https://livecodebench.github.io/


💡 一句话要点

提出LiveCodeBench以解决现有代码评估基准不足问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 代码评估 无污染评估 自我修复 代码执行 性能比较 编程问题

📋 核心要点

  1. 现有的代码评估基准无法满足新型大型语言模型的评估需求,存在污染和过拟合问题。
  2. 提出LiveCodeBench,通过持续收集来自多个竞赛平台的新问题,提供全面的代码能力评估。
  3. 对18个基础LLM和34个指令调优LLM进行评估,展示了新基准在性能比较和污染问题上的优势。

📝 摘要(中文)

大型语言模型(LLMs)在代码相关应用中逐渐成为一个重要领域,然而现有的评估基准(如HumanEval、MBPP)已无法充分评估新模型的能力。本文提出了LiveCodeBench,一个全面且无污染的LLM代码评估工具,持续从LeetCode、AtCoder和CodeForces等竞赛平台收集新问题。该基准不仅关注代码生成,还涵盖自我修复、代码执行和测试输出预测等多种代码相关能力。目前,LiveCodeBench收录了2023年5月至2024年5月间发布的400个高质量编程问题,并对18个基础LLM和34个指令调优LLM进行了评估,展示了污染、整体性能比较、现有基准的潜在过拟合及各模型的比较结果。

🔬 方法详解

问题定义:现有的代码评估基准(如HumanEval和MBPP)在评估新型大型语言模型时存在污染和过拟合的问题,无法全面反映模型的实际能力。

核心思路:LiveCodeBench通过持续收集来自LeetCode、AtCoder和CodeForces等平台的新问题,提供一个无污染的评估环境,关注更广泛的代码能力,包括自我修复和代码执行等。

技术框架:LiveCodeBench的整体架构包括问题收集模块、评估模块和结果分析模块。问题收集模块定期从多个竞赛平台获取新问题,评估模块对不同模型进行性能测试,结果分析模块则对模型表现进行深入比较。

关键创新:LiveCodeBench的主要创新在于其无污染的评估机制和对多种代码能力的全面覆盖,这与传统基准的单一评估维度形成鲜明对比。

关键设计:在设计上,LiveCodeBench设定了严格的问题筛选标准,确保收录的问题具有高质量和多样性,同时提供了详细的评估工具和数据集,以便社区进行进一步分析。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

在实验中,LiveCodeBench对18个基础LLM和34个指令调优LLM进行了评估,发现现有基准存在明显的污染和过拟合问题。通过使用LiveCodeBench,模型在多种代码能力上的表现得到了显著提升,具体性能数据和对比结果将在后续发布的工具包中提供。

🎯 应用场景

LiveCodeBench的潜在应用领域包括教育、软件开发和人工智能研究等。它可以帮助开发者和研究人员更好地评估和比较不同大型语言模型在代码生成和相关任务中的表现,从而推动模型的改进与应用。未来,LiveCodeBench可能成为代码相关AI应用的标准评估工具,促进技术的进步与创新。

📄 摘要(原文)

Large Language Models (LLMs) applied to code-related applications have emerged as a prominent field, attracting significant interest from both academia and industry. However, as new and improved LLMs are developed, existing evaluation benchmarks (e.g., HumanEval, MBPP) are no longer sufficient for assessing their capabilities. In this work, we propose LiveCodeBench, a comprehensive and contamination-free evaluation of LLMs for code, which continuously collects new problems over time from contests across three competition platforms, namely LeetCode, AtCoder, and CodeForces. Notably, our benchmark also focuses on a broader range of code related capabilities, such as self-repair, code execution, and test output prediction, beyond just code generation. Currently, LiveCodeBench hosts four hundred high-quality coding problems that were published between May 2023 and May 2024. We have evaluated 18 base LLMs and 34 instruction-tuned LLMs on LiveCodeBench. We present empirical findings on contamination, holistic performance comparisons, potential overfitting in existing benchmarks as well as individual model comparisons. We will release all prompts and model completions for further community analysis, along with a general toolkit for adding new scenarios and model