通过伪代码输入分离语言编码与问题求解能力,揭示大模型在不同编程语言中的瓶颈
Isolating Language-Coding from Problem-Solving: Benchmarking LLMs with PseudoEval
- 用伪代码替代自然语言描述,隔离代码生成中问题求解与语言编码的瓶颈
- 发现Python任务瓶颈在问题求解,而Rust任务更受限于语言编码能力
- 问题求解能力可跨语言迁移,语言编码需针对特定语言专门训练
现有代码生成基准(如HumanEval和MBPP)通常以自然语言问题描述为输入,评估大语言模型在特定编程语言中的端到端生成能力。然而,这种评估方式难以判断模型瓶颈是源于问题求解还是语言编码。为此,我们构建了多语言基准PseudoEval,以伪代码作为输入,从而分离并识别不同编程语言下代码生成的瓶颈。研究发现:在Python中,模型主要受限于问题求解能力;而在Rust中,语言编码能力成为更大障碍。此外,问题求解能力可能跨语言迁移,但语言编码仍需针对特定语言进行专门训练,尤其对低资源语言更明显。我们已公开PseudoEval构建流程,便于扩展至现有基准。PseudoEval获取地址:https://anonymous.4open.science/r/PseudocodeACL25-7B74。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。