Skip to main content
QUICK REVIEW

[论文解读] SWE-Bench+: Enhanced Coding Benchmark for LLMs

Reem Aleithan, Huayuan Xue|arXiv (Cornell University)|Oct 9, 2024
Advanced Data Storage TechnologiesComputer Science被引用 3
一句话总结

本文识别出 SWE-Bench 基准测试中存在关键的数据质量问题,包括解决方案泄露和测试用例薄弱,这些问题导致大语言模型(LLM)性能被夸大。为解决此问题,作者提出了 SWE-Bench+,一个经过优化的数据集,采用大语言模型训练截止日期之后的 GitHub 问题,且不包含任何解决方案泄露,将 SWE-Agent+GPT-4 的通过率从 12.47% 降低至 0.55%,从而为大语言模型在软件工程领域的评估建立了更严格的基准标准。

ABSTRACT

Large Language Models (LLMs) in Software Engineering (SE) can offer assistance for coding. To facilitate a rigorous evaluation of LLMs in practical coding contexts, Carlos et al. introduced the SWE-bench dataset, which comprises 2,294 real-world GitHub issues and their corresponding pull requests, collected from 12 widely used Python repositories. Several impressive LLM-based toolkits recently are developed and evaluated on this dataset. However, a systematic evaluation of the quality of SWE-bench remains missing. In this paper, we addressed this gap by presenting an empirical analysis of the SWE-bench dataset. We conducted a manual screening of instances where SWEAgent + GPT-4 successfully resolved issues by comparing the model-generated patches with the actual pull requests. SWE-Agent+GPT-4 was at the top of SWE-bench leaderboard during the time of our study. Our analysis reveals some critical issues with the SWE-bench dataset: 1) 32.67% of the successful patches involve cheating as the solutions were directly provided in the issue report or the comments. We refer to as solution leakage problem. 2) 31.08% of the passed patches are suspicious patches due to weak test cases, i.e., the tests were not adequate to verify the correctness of a patch. When we filtered out these problematic issues, the resolution rate of SWE-Agent+GPT-4 dropped from 12.47% to 3.97%. We also observed that the same data quality issues also exist in the two variants of SWE-bench, i.e., SWE-bench Lite and SWE-Bench Verified. In addition, over 94% of the issues were created before LLM's knowledge cutoff dates, posing potential data leakage issues.

研究动机与目标

  • 评估 SWE-Bench 基准测试在真实世界软件工程任务中对大语言模型评估的鲁棒性与可靠性。
  • 识别并分析关键的数据质量问题,特别是解决方案泄露和薄弱测试用例,这些因素损害了以往大语言模型性能评估的有效性。
  • 通过创建 SWE-Bench+ 数据集,即一个完全无解决方案泄露和数据泄露的基准,开发出更严格的评估标准,该数据集使用大语言模型训练截止日期之后创建的真实 GitHub 问题。
  • 通过测量大语言模型解决率的下降来验证新基准,证明以往结果因数据集缺陷而被夸大。
  • 为未来在软件工程领域的大语言模型开发提供一个可信且可复现的评估框架。

提出的方法

  • 开展人工补丁验证研究,将 SWE-Agent+GPT-4 生成的补丁与官方拉取请求中的黄金补丁进行对比。
  • 识别并分类出模型生成修复中的 8 种不同模式,根据内容和与黄金补丁的一致性,将其归类为正确或可疑。
  • 系统分析问题报告和评论,检测‘解决方案泄露’现象——即解决方案在问题描述或评论中被直接提供。
  • 通过检查弱或不完整的测试套件是否允许错误或不完整的补丁通过,来评估测试用例的充分性。
  • 通过收集大语言模型知识截止日期之后创建的真实 GitHub 问题,并排除任何包含解决方案提示的问题,构建 SWE-Bench+。
  • 通过在 SWE-Bench+ 上重新评估多个大语言模型代理(如 SWE-RAG、AutoCodeRover),测量性能下降并确认通过率降低,从而验证新基准。
(a) Answer Leak vs Weak Tests across Datasets
(a) Answer Leak vs Weak Tests across Datasets

实验结果

研究问题

  • RQ1SWE-Bench 数据集中解决方案泄露在多大程度上夸大了大语言模型的报告通过率?
  • RQ2SWE-Bench 中的测试用例在多大程度上不充分,以及它们在多大程度上允许错误的补丁被标记为正确?
  • RQ3在清理后、更严格的基准上,最先进的大语言模型代理的真实解决率是多少,该基准完全消除了数据泄露和薄弱测试?
  • RQ4与原始 SWE-Bench 及其变体相比,使用 SWE-Bench+ 时性能指标发生了怎样的变化?
  • RQ5在去除数据集缺陷后,现有大语言模型代理在 SWE-Bench+ 上的性能表现仍有多好?

主要发现

  • SWE-Agent+GPT-4 的成功补丁中,有 32.67% 涉及‘解决方案泄露’,即修复方案直接出现在问题或评论中。
  • 31.08% 的通过补丁基于薄弱的测试用例,这些测试用例未能检测出错误或不完整的代码更改。
  • 在过滤掉存在解决方案泄露和薄弱测试的实例后,SWE-Agent+GPT-4 在精炼后的 SWE-Bench 数据集上的解决率从 12.47% 下降至 3.97%。
  • 在最终的 SWE-Bench+ 数据集上,SWE-Agent+GPT-4 的解决率进一步下降至 0.55%,表明由于数据质量提升,性能出现显著下降。
  • 其他模型,包括 SWE-RAG+GPT-4(0.73%)和 SWE-RAG+GPT-3.5(0.55%),在 SWE-Bench+ 上也表现出显著的性能下降,证实了该基准的更高严谨性。
  • 相同的数据质量问题也被发现在 SWE-Bench Lite 和 SWE-Bench Verified 中存在,表明 SWE-Bench 生态系统中存在系统性缺陷。
(b) Performance of SWE-Agent + GPT-4
(b) Performance of SWE-Agent + GPT-4

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。