顶尖大模型在代码任务中可能靠记忆而非推理,评测结果存在夸大风险。
The SWE-Bench Illusion: When State-of-the-Art LLMs Remember Instead of Reason
- 通过文件路径识别和函数复现任务,检验模型是否真会解题
- 仅凭问题描述就能准确定位错误文件,最高达76%准确率
- 在未收录的仓库上表现下降,说明评测集可能被模型记住了
随着大语言模型(LLMs)能力提升与广泛应用,基准测试在评估其实际效能中扮演核心角色。例如,SWE-Bench Verified已成为衡量大模型软件工程能力的关键基准,尤其针对解决真实世界GitHub问题的能力。近期大模型在SWE-Bench上表现出色,引发对其复杂编程能力的乐观预期。然而,现有评估协议可能高估了模型的真实能力。本文引入两项诊断任务:仅凭问题描述识别文件路径,以及仅凭当前文件上下文和问题描述复现真实函数,以探查模型底层知识。实证表明,性能提升部分源于记忆而非真正的问题求解。状态最优模型仅用问题描述即可实现高达76%的文件路径识别准确率,但在未包含于SWE-Bench的仓库任务中准确率降至53%,暗示数据污染或记忆现象。函数复现任务亦呈现类似趋势:在SWE-Bench Verified与Full上连续5-gram准确率达35%,而在其他基准上仅18%。这些发现对现有评测结果的有效性提出质疑,强调需建立更抗污染、更稳健的基准以可靠评估大模型的编码能力。
原文摘要 · Abstract (English)
As large language models (LLMs) become increasingly capable and widely adopted, benchmarks play a central role in assessing their practical utility. For example, SWE-Bench Verified has emerged as a critical benchmark for evaluating LLMs' software engineering abilities, particularly their aptitude for resolving real-world GitHub issues. Recent LLMs show impressive performance on SWE-Bench, leading to optimism about their capacity for complex coding tasks. However, current evaluation protocols may overstate these models' true capabilities. It is crucial to distinguish LLMs' generalizable problem-solving ability and other learned artifacts. In this work, we introduce two diagnostic tasks: file path identification from issue descriptions alone and ground truth function reproduction with only the current file context and issue description to probe models' underlying knowledge. We present empirical evidence that performance gains on SWE-Bench-Verified may be partially driven by memorization rather than genuine problem-solving. We show that state-of-the-art models achieve up to 76% accuracy in identifying buggy file paths using only issue descriptions, without access to repository structure. This performance is merely up to 53% on tasks from repositories not included in SWE-Bench, pointing to possible data contamination or memorization. Similar patterns are also observed for the function reproduction task, where the verbatim similarity is much higher on SWE-Bench Verified than on other similar coding benchmarks (up to 35% consecutive 5-gram accuracy on SWE-Bench Verified and Full, but only up to 18% for tasks in other benchmarks). These findings raise concerns about the validity of existing results and underscore the need for more robust, contamination-resistant benchmarks to reliably evaluate LLMs' coding abilities.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。