arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.21199cs.SEcs.CL
收藏

HumanEval Pro 与 MBPP Pro:评估大语言模型的自调用代码生成能力

HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generation

Tsinghua University(清华大学);Yale University(耶鲁大学)

Zhaojian Yu, Yilun Zhao, Arman Cohan, Xiao-Ping Zhang

AI总结:

本文提出自调用代码生成任务,并构建 HumanEval Pro、MBPP Pro 和 BigCodeBench-Lite Pro 三个基准,通过二十多个 LLMs 的实验揭示现有模型在该任务上性能明显下降,为提升代码推理能力提供新方向。

摘要:

我们引入了自调用代码生成这一新任务,旨在评估大语言模型(LLMs)的递进推理与问题解决能力。在该任务中,模型会收到一个基础问题以及一个与之相关的更复杂问题。模型必须先解决基础问题,然后利用其解决方案来处理更复杂的问题。本工作具有三项关键贡献。第一,我们提出了一种通用方法,用于生成现有基准的更具挑战性版本,由此产生了三个新基准:HumanEval Pro、MBPP Pro 和 BigCodeBench-Lite Pro,它们专门用于评估 LLMs 在自调用代码生成上的表现。第二,通过分析二十多个 LLMs 在我们基准上的实验结果,我们得到两个重要发现:(i)大多数 LLMs 在 HumanEval 和 MBPP 等传统代码生成基准上表现优异,但在自调用任务上性能下降。例如,o1-mini 在 HumanEval 上达到 96.2% 的 pass@1,但在 HumanEval Pro 上仅为 76.2%。(ii)在自调用代码生成任务上,经过指令微调的模型相较于基础模型仅表现出边际提升。第三,我们揭示了评估结果中存在的失败模式类型。所有这些结果都表明,自调用代码生成任务需要进一步发展,并为未来增强 LLMs 代码推理能力的研究提供了新方向。

英文摘要:

We introduce self-invoking code generation, a new task designed to evaluate the progressive reasoning and problem-solving capabilities of LLMs. In this task, models are presented with a base problem and a related, more complex problem. They must solve the base problem and then utilize its solution to address the more complex one. This work features three key contributions. First, we propose a general recipe for generating more challenging versions of existing benchmarks, resulting in three new benchmarks: HumanEval Pro, MBPP Pro, and BigCodeBench-Lite Pro, specifically designed to assess LLMs on self-invoking code generation. Second, from the analysis of experimental results over twenty LLMs on our benchmarks, we have two important observations: (i) Most LLMs excel in traditional code generation benchmarks like HumanEval and MBPP, but their performance declines on self-invoking tasks. For example, o1-mini achieves 96.2% pass@1 on HumanEval but only 76.2% on HumanEval Pro. (ii) On self-invoking code generation task, the instruction-tuned models demonstrate only marginal improvements compared to the base models. Third, we disclose the types of failure modes that exist in our evaluation results. All these results underscore the need for further advancements in self-invoking code generation tasks and provide a new direction for future research on enhancing LLMs' code reasoning capabilities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑