arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.16292cs.SEcs.AIcs.CL
收藏

通过分级练习评估大语言模型的代码生成能力

An evaluation of LLM code generation capabilities through graded exercises

Instituto de Ingeniería del Conocimiento(知识工程研究所);Universidad Autónoma de Madrid(马德里自治大学)

Álvaro Barbero Jiménez

AI总结:

本文通过 Codewars 分级编程题评估 GPT4-o-mini 在 8 种语言上的代码生成能力,发现其表现与题目难度、语言流行度和发布时间相关,并指出当前评估方法可能因训练集泄漏而高估模型真实编码水平。

摘要:

大语言模型在根据自然语言描述生成可运行代码方面已展现出显著能力。然而,目前仍缺乏一种标准化方法,能够以客观且无偏的方式评估这些能力。本文回顾了当前可用于此目的的评估方法,并对一个最先进模型(GPT4-o-mini)在解决精心挑选的编程挑战中的表现进行了新的评估,这些挑战来自软件开发社区 Codewars,涵盖 8 种编程语言。我们的分析表明,该模型的成功概率与任务难度、所用编程语言的流行程度以及挑战发布以来的时间间隔呈正相关。进一步基于高层特征的近似解释性分析提示,虽然 46.6% 的模型表现可归因于任务难度,但约 37.4% 似乎与挑战解答泄漏到模型训练集中有关,其余 16% 则取决于编程语言。这些结果表明,当前的评估方法可能高估了大语言模型生成可运行代码的实际技能。

英文摘要:

Large Language Models have shown prominent capabilities in generating functional code from natural language descriptions. However, a standardized way to evaluate these capabilities in an objective and unbiased manner is still to be found. In this paper we review the current evaluation methods available to this end, and run a new evaluation of the performance of one state-of-the-art model (GPT4-o-mini) in solving curated coding challenges in 8 programming languages, obtained from Codewars, a software development community. Our analysis shows that the chance of success of the model has a positive correlation with the task difficulty, the popularity of the programming language being used and the time elapsed since the publication of the challenge. A further approximate explanatory analysis in terms of high-level features hints that while 46.6% of the model performance could be attributed to task difficulty, a 37.4% seems to be related to leakage of the challenge solutions into the model training set, while the remaining 16% depends on the programming language. These results suggest that current evaluation methodologies might be overestimating the actual skill of Large Language Models for generating functional code.

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

↑