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

Codex Hacks HackerRank:代码化问题和代码综合评估框架

Codex Hacks HackerRank: Memorization Issues and a Framework for Code Synthesis Evaluation

Free University of Bozen-Bolzano(博尔扎诺自由大学);Software Institute(软件研究所)

Anjan Karmakar, Julian Aron Prenner, Marco D'Ambros, Romain Robbes

摘要:

Codex模型在从自然语言问题描述合成代码方面表现出了非凡的能力。然而,为了揭示未知的故障模式和隐藏的偏见,这种大规模的模型必须系统地进行多个和不同的评价研究。在这项工作中,我们评估的Codex模型的代码合成能力的基础上,从一个流行的竞争性编程门户网站:HackerRank的一组115 Python的问题语句。我们的评估表明,Codex确实精通Python,在zero-shot设置中解决了96%的问题,在Few-Shot设置中解决了100%的问题。然而,根据我们的评估,Codex显示出生成记忆代码的明显迹象。这是令人担忧的,特别是因为采用和使用这些模型可能会直接影响代码在可预见的未来的编写和生产方式。考虑到这一点,我们进一步讨论并强调了与大规模源代码模型相关的一些突出风险。最后,我们提出了一个框架的代码合成评估使用的问题语句的变化的基础上突变。

英文摘要:

The Codex model has demonstrated extraordinary competence in synthesizing code from natural language problem descriptions. However, in order to reveal unknown failure modes and hidden biases, such large-scale models must be systematically subjected to multiple and diverse evaluation studies. In this work, we evaluate the code synthesis capabilities of the Codex model based on a set of 115 Python problem statements from a popular competitive programming portal: HackerRank. Our evaluation shows that Codex is indeed proficient in Python, solving 96% of the problems in a zero-shot setting, and 100% of the problems in a few-shot setting. However, Codex exhibits clear signs of generating memorized code based on our evaluation. This is alarming, especially since the adoption and use of such models could directly impact how code is written and produced in the foreseeable future. With this in mind, we further discuss and highlight some of the prominent risks associated with large-scale models of source code. Finally, we propose a framework for code-synthesis evaluation using variations of problem statements based on mutations.

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

↑