面向代码的大语言模型的程序测试能力
The Program Testing Ability of Large Language Models for Code
AI总结:
本文探究面向代码的大语言模型的程序测试能力,分析相关模型特性并提出能力提升路径,将相关发现用于增强程序合成,在HumanEval+基准上较基线与现有最优方法分别实现11.77%和4.22%的通过率提升。
摘要:
面向代码的大语言模型(LLM)如CodeX和CodeT5+的最新发展,在实现代码智能方面展现出巨大前景。这类模型生成补全程序以完成预定义任务的能力,已在HumanEval、MBPP等基准数据集上得到了充分测试与验证。但考虑到其在软件工程中的广泛应用场景,学界也期待从程序合成之外的更多维度评估这类LLM。本文探究了面向代码的LLM的程序测试能力。通过对近年代码领域LLM的程序测试能力开展全面分析,本文揭示了这类模型的一系列有趣特性,并论证了提升LLM程序测试能力的可行路径。沿用近期利用生成测试用例增强程序合成的研究思路,本文进一步将研究发现用于提升合成程序的质量,在HumanEval+基准上,代码通过率相较于GPT-3.5-turbo基线和当前最优方法分别提升了11.77%和4.22%。
英文摘要:
Recent development of large language models (LLMs) for code like CodeX and CodeT5+ demonstrates tremendous promise in achieving code intelligence. Their ability of synthesizing code that completes a program for performing a pre-defined task has been intensively tested and verified on benchmark datasets including HumanEval and MBPP. Yet, evaluation of these LLMs from more perspectives (than just program synthesis) is also anticipated, considering their broad scope of applications in software engineering. In this paper, we explore the ability of LLMs for testing programs/code. By performing thorough analyses of recent LLMs for code in program testing, we show a series of intriguing properties of these models and demonstrate how program testing ability of LLMs can be improved. Following recent work which utilizes generated test cases to enhance program synthesis, we further leverage our findings in improving the quality of the synthesized programs and show +11.77% and +4.22% higher code pass rates on HumanEval+ comparing with the GPT-3.5-turbo baseline and the recent state-of-the-art, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。