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

将语言编码与问题求解分离:使用 PseudoEval 对 LLM 进行基准测试

Isolating Language-Coding from Problem-Solving: Benchmarking LLMs with PseudoEval

The Hong Kong University of Science and Technology(香港科技大学)

Jiarong Wu, Songqiang Chen, Jialun Cao, Hau Ching Lo, Shing-Chi Cheung

AI总结:

针对现有代码生成基准无法区分问题求解与语言编码瓶颈的问题,构建多语言基准 PseudoEval,以伪代码为输入隔离瓶颈,发现 Python 瓶颈在问题求解、Rust 在语言编码,且问题求解可跨语言迁移。

摘要:

现有的大语言模型(LLM)代码生成基准测试(如 HumanEval 和 MBPP)旨在研究 LLM 的端到端性能,这些基准测试以自然语言的问题描述作为输入,并检查特定编程语言生成的代码。然而,这种评估分数几乎无法提示代码生成的瓶颈——LLM 是在问题求解能力还是语言编码能力上存在困难。为了回答这个问题,我们构建了 PseudoEval,一个多语言代码生成基准测试,它以伪代码编写的解决方案作为输入。通过这种方式,可以隔离并识别各种编程语言中代码生成的瓶颈。我们的研究得出了几个有趣的发现。例如,我们发现 LLM 在 Python 编程中的瓶颈是问题求解,而 Rust 在语言编码方面相对更困难。此外,我们的研究表明,问题求解能力可能跨编程语言迁移,而语言编码需要更多针对特定语言的努力,尤其是对于训练不足的编程语言。最后,我们发布了构建 PseudoEval 的流程,以促进对现有基准测试的扩展。PseudoEval 可在以下网址获取:https://anonymous.4open.science/r/PseudocodeACL25-7B74。

英文摘要:

Existing code generation benchmarks for Large Language Models (LLMs) such as HumanEval and MBPP are designed to study LLMs' end-to-end performance, where the benchmarks feed a problem description in natural language as input and examine the generated code in specific programming languages. However, the evaluation scores revealed in this way provide a little hint as to the bottleneck of the code generation -- whether LLMs are struggling with their problem-solving capability or language-coding capability. To answer this question, we construct PseudoEval, a multilingual code generation benchmark that provides a solution written in pseudocode as input. By doing so, the bottleneck of code generation in various programming languages could be isolated and identified. Our study yields several interesting findings. For example, we identify that the bottleneck of LLMs in Python programming is problem-solving, while Rust is struggling relatively more in language-coding. Also, our study indicates that problem-solving capability may transfer across programming languages, while language-coding needs more language-specific effort, especially for undertrained programming languages. Finally, we release the pipeline of constructing PseudoEval to facilitate the extension to existing benchmarks. PseudoEval is available at: https://anonymous.4open.science/r/PseudocodeACL25-7B74.

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

↑