arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2105.09938cs.SEcs.CLcs.LG
收藏

使用APPS衡量编码挑战能力

Measuring Coding Challenge Competence With APPS

UC Berkeley(加州大学伯克利分校);UChicago(芝加哥大学);UIUC(伊利诺伊大学厄巴纳-香槟分校);Cornell(康奈尔大学)

Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, Jacob Steinhardt

摘要:

虽然编程是现代社会中最广泛应用的技能之一,但现代机器学习模型仍然无法为基本问题编码解决方案。尽管代码生成很重要,但在评估它方面的工作却少得令人惊讶,而且很难严格地准确评估代码生成的性能。为了应对这一挑战,我们引入了APPS,一个代码生成的基准。与以前在更受限制的环境中的工作不同,我们的基准测试测量了模型采用任意自然语言规范并生成令人满意的Python代码的能力。与公司评估候选软件开发人员的方式类似,我们通过在测试用例上检查生成的代码来评估模型。我们的基准测试包括10,000个问题,从简单的单线解决方案到大量的算法挑战。我们在GitHub和我们的训练集上微调了大语言模型,我们发现语法错误的发生率随着模型的改进呈指数级下降。最近的模型,如GPT-Neo,可以通过大约20%的入门问题的测试用例,所以我们发现机器学习模型现在开始学习如何编码。随着自动代码生成的社会意义在未来几年的增加,我们的基准可以提供一个重要的措施,跟踪进步。

英文摘要:

While programming is one of the most broadly applicable skills in modern society, modern machine learning models still cannot code solutions to basic problems. Despite its importance, there has been surprisingly little work on evaluating code generation, and it can be difficult to accurately assess code generation performance rigorously. To meet this challenge, we introduce APPS, a benchmark for code generation. Unlike prior work in more restricted settings, our benchmark measures the ability of models to take an arbitrary natural language specification and generate satisfactory Python code. Similar to how companies assess candidate software developers, we then evaluate models by checking their generated code on test cases. Our benchmark includes 10,000 problems, which range from having simple one-line solutions to being substantial algorithmic challenges. We fine-tune large language models on both GitHub and our training set, and we find that the prevalence of syntax errors is decreasing exponentially as models improve. Recent models such as GPT-Neo can pass approximately 20% of the test cases of introductory problems, so we find that machine learning models are now beginning to learn how to code. As the social significance of automatic code generation increases over the coming years, our benchmark can provide an important measure for tracking advancements.

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

↑