HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generation
该论文提出了HumanEval Pro和MBPP Pro两个新的基准测试,用于评估大型语言模型在自调用代码生成任务上的能力,发现当前LLMs在自调用代码生成任务上存在挑战。
更新于 2024-12-31。作者:Zhaojian Yu、Yilun Zhao、Arman Cohan、Xiao-Ping Zhang。
中文摘要
我们引入了自我调用代码生成,这是一个旨在评估大型语言模型(LLM)渐进推理和问题解决能力的新任务。在这个任务中,模型会接收到一个基础问题和与其相关、更复杂的问题。它们必须先解决基础问题,然后利用其解决方案来解决更复杂的问题。这项工作有三个关键贡献。首先,我们提出了一种通用方法,用于生成现有基准测试的更具挑战性的版本,从而产生了三个新的基准测试:HumanEval Pro、MBPP Pro和BigCodeBench-Lite Pro,这些基准测试专门设计用于评估LLM在自我调用代码生成方面的能力。其次,通过对二十个LLM在我们基准测试上的实验结果进行分析,我们得出两个重要观察结果:(i)大多数LLM在传统的代码生成基准测试,如HumanEval和MBPP中表现出色,但在自我调用任务上的表现下降。例如,o1-mini在HumanEval上达到了96.2%的pass@1,但在HumanEval Pro上只有76.2%。(ii)在自我调用代码生成任务中,与基础模型相比,指令调整模型仅显示出微小的改进。第三,我们揭示了在我们评估结果中存在的失败模式类型。所有这些结果都强调了在自我调用代码生成任务中进一步进步的必要性,并为未来研究如何增强LLM的代码推理能力提供了新的方向。
英文摘要
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.
解读
一句话总结
该论文提出了HumanEval Pro和MBPP Pro两个新的基准测试,用于评估大型语言模型在自调用代码生成任务上的能力,发现当前LLMs在自调用代码生成任务上存在挑战。
问题1:这篇论文想要解决什么具体问题?
• 问题背景:随着大型语言模型(LLMs)在代码相关任务上的应用越来越广泛,评估LLMs在代码生成和推理方面的能力变得尤为重要。 • 现有方案不足:现有的代码生成基准测试,如HumanEval和MBPP,主要关注孤立的单功能代码生成,无法全面评估LLMs在复杂问题解决和代码推理方面的能力。 • 研究目标:提出一种新的基准测试,评估LLMs在自调用代码生成任务上的能力,并分析其性能和局限性。
问题2:论文的核心创新点是什么?
• 技术创新:提出了HumanEval Pro和MBPP Pro两个新的基准测试,要求LLMs解决基础问题并利用其解决方案来解决更复杂的问题。 • 方法改进:通过构建自调用问题,增加了问题的复杂性和挑战性,更全面地评估LLMs的编程能力。 • 优势:与现有方法相比,该基准测试能够更真实地反映LLMs在复杂问题解决和代码推理方面的能力。
问题3:实验结果如何验证了方法的有效性?
• 关键实验:对20多个LLMs在HumanEval Pro和MBPP Pro上的表现进行了评估。 • 性能提升:实验结果显示,大多数LLMs在传统代码生成基准测试上表现良好,但在自调用任务上的表现有所下降。 • 对比结果:与基线模型相比,指令微调模型在自调用代码生成任务上的性能提升有限。
问题4:这个研究的实际应用价值是什么?
• 应用场景:该基准测试可用于评估和比较不同LLMs在代码生成和推理方面的能力,为LLMs的开发和应用提供指导。 • 实施建议:在LLMs的训练和评估过程中,应考虑自调用代码生成任务的重要性,并针对这一任务进行专门的训练和评估。 • 局限与展望:该基准测试目前仅限于Python编程语言,未来可以扩展到其他编程语言,并开发更多样化的自调用问题,以更全面地评估LLMs的编程能力。
来源
机器可读索引:llms.txt