arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.16124cs.SEcs.AIcs.CL
收藏

SWE-QA-Pro:一个代表性的基准和可扩展的训练配方用于仓库级代码理解

SWE-QA-Pro: A Representative Benchmark and Scalable Training Recipe for Repository-Level Code Understanding

University of Waterloo(滑铁卢大学);University of Toronto(多伦多大学);The Hong Kong University of Science and Technology(香港科学与技术大学);McGill University & MILA(麦吉尔大学及MILA);Verdent AI, Inc.(Verdent AI公司)
Songcheng Cai, Zhiheng Lyu, Yuansheng Ni, Xiangchao Chen, Baichuan Zhou, Shenzhe Zhu, Yi Lu, Haozhe Wang, Chi Ruan, Benjamin Schneider, Weixu Zhang, Xiang Li, A… 展开作者

Songcheng Cai, Zhiheng Lyu, Yuansheng Ni, Xiangchao Chen, Baichuan Zhou, Shenzhe Zhu, Yi Lu, Haozhe Wang, Chi Ruan, Benjamin Schneider, Weixu Zhang, Xiang Li, Andy Zheng, Yuyu Zhang, Ping Nie, Wenhu Chen

AI总结:

本文提出SWE-QA-Pro基准,通过多样化的长尾仓库和可执行环境构建,验证了代理工作流在代码理解任务中的优势,并提出可扩展的合成数据管道和两阶段训练方法,使小型模型在复杂行为学习中取得优异表现。

摘要:

代理级仓库级代码理解对于自动化复杂软件工程任务至关重要,但该领域缺乏可靠的基准。现有评估往往忽视长尾主题并依赖流行仓库,其中大语言模型可通过记忆知识作弊。为此,我们引入SWE-QA-Pro,该基准由多样化、长尾仓库和可执行环境构建而成。我们通过问题驱动聚类实现主题平衡,覆盖未被代表的任务类型,并应用严格难度校准过程:可直接通过直接回答基线解决的问题被过滤掉。这导致了一个数据集,其中代理工作流显著优于直接回答(例如,Claude Sonnet 4.5的约13分差距),证实了代理代码库探索的必要性。此外,为解决此类复杂行为训练数据稀缺问题,我们提出了一种可扩展的合成数据管道,该管道支持两阶段训练配方:监督微调(SFT)后接人工智能反馈强化学习(RLAIF)。这种方法使小型开源模型能够学习高效的工具使用和推理。实证表明,使用我们方法训练的Qwen3-8B模型在SWE-QA-Pro上超过GPT-4o 2.3分,并大幅缩小了与最先进专有模型之间的差距,证明了我们评估的有效性和代理训练工作流的有效性。

英文摘要:

Agentic repository-level code understanding is essential for automating complex software engineering tasks, yet the field lacks reliable benchmarks. Existing evaluations often overlook the long tail topics and rely on popular repositories where Large Language Models (LLMs) can cheat via memorized knowledge. To address this, we introduce SWE-QA-Pro, a benchmark constructed from diverse, long-tail repositories with executable environments. We enforce topical balance via issue-driven clustering to cover under-represented task types and apply a rigorous difficulty calibration process: questions solvable by direct-answer baselines are filtered out. This results in a dataset where agentic workflows significantly outperform direct answering (e.g., a ~13-point gap for Claude Sonnet 4.5), confirming the necessity of agentic codebase exploration. Furthermore, to tackle the scarcity of training data for such complex behaviors, we propose a scalable synthetic data pipeline that powers a two-stage training recipe: Supervised Fine-Tuning (SFT) followed by Reinforcement Learning from AI Feedback (RLAIF). This approach allows small open models to learn efficient tool usage and reasoning. Empirically, a Qwen3-8B model trained with our recipe surpasses GPT-4o by 2.3 points on SWE-QA-Pro and substantially narrows the gap to state-of-the-art proprietary models, demonstrating both the validity of our evaluation and the effectiveness of our agentic training workflow.

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

↑