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

我们的星星中的错误:代码生成基准的质量评估

The Fault in our Stars: Quality Assessment of Code Generation Benchmarks

University of Notre Dame(圣母大学);University of Virginia(弗吉尼亚大学)

Mohammed Latif Siddiq, Simantika Dristi, Joy Saha, Joanna C. S. Santos

AI总结:

本文首次系统评估了9个代码生成基准中3,566条提示的质量问题,发现修复这些问题可提升Python代码生成性能但对Java不显著,并揭示了GPT-3.5-Turbo和CodeGen-2.5可能存在数据污染。

摘要:

大型语言模型(LLMs)在软件工程师中越来越受欢迎。开发有效的代码生成LLMs的一个关键方面是使用稳健的基准来评估这些模型。存在质量问题的评估基准可能会造成性能的虚假印象。在这项工作中,我们开展了首个同类研究,考察用于比较不同代码生成模型性能的基准中提示(prompts)的质量。为了开展这项研究,我们分析了来自9个代码生成基准的3,566条提示,以识别其中的质量问题。我们还研究了修复基准提示中已识别的质量问题是否会影响模型的性能。我们还研究了评估数据集中的记忆(memorization)问题,这可能对基准的可信度提出质疑。我们发现,代码生成评估基准主要关注Python和编程练习,并且具有非常有限的上下文依赖性来挑战模型。这些数据集和开发者的提示存在质量问题,如拼写和语法错误、表达开发者意图的句子不清晰,以及未使用适当的文档风格。修复基准中的所有这些问题可以带来Python代码生成的更好性能,但对于Java代码生成未观察到显著改进。我们还发现了GPT-3.5-Turbo和CodeGen-2.5模型可能存在数据污染问题的证据。

英文摘要:

Large Language Models (LLMs) are gaining popularity among software engineers. A crucial aspect of developing effective code generation LLMs is to evaluate these models using a robust benchmark. Evaluation benchmarks with quality issues can provide a false sense of performance. In this work, we conduct the first-of-its-kind study of the quality of prompts within benchmarks used to compare the performance of different code generation models. To conduct this study, we analyzed 3,566 prompts from 9 code generation benchmarks to identify quality issues in them. We also investigated whether fixing the identified quality issues in the benchmarks' prompts affects a model's performance. We also studied memorization issues of the evaluation dataset, which can put into question a benchmark's trustworthiness. We found that code generation evaluation benchmarks mainly focused on Python and coding exercises and had very limited contextual dependencies to challenge the model. These datasets and the developers' prompts suffer from quality issues like spelling and grammatical errors, unclear sentences to express developers' intent, and not using proper documentation style. Fixing all these issues in the benchmarks can lead to a better performance for Python code generation, but not a significant improvement was observed for Java code generation. We also found evidence that GPT-3.5-Turbo and CodeGen-2.5 models may have data contamination issues.

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

↑