arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.30105cs.SE
收藏

EvoRepair: 通过基于经验的自我进化增强漏洞修复智能体

Learning from Repair Experience: Self-Evolving Agents for Automated Vulnerability Repair

Nanjing University of Science and Technology(南京理工大学);Nanjing University(南京大学);Technical University of Munich(慕尼黑工业大学)

Haichuan Hu, Guoqing Xie, Quanjun Zhang, Jiawei Liu, Shengcheng Yu, Chunrong Fang, Zhenyu Chen, Liang Xiao

AI总结:

提出EvoRepair框架,通过循环学习-修复过程积累和复用漏洞修复经验,在多个基准上显著提升LLM的自动漏洞修复性能。

摘要:

大型语言模型(LLM)在自动漏洞修复(AVR)中展现出潜力,但仍面临若干限制,包括缺乏漏洞内经验积累和跨漏洞经验复用。因此,LLM在迭代修复中可能重复犯类似错误,并未能充分利用历史漏洞中的宝贵修复知识。为应对这些挑战,我们提出EvoRepair,首个基于经验的自我进化AVR智能体框架,使LLM能够在长期漏洞修复中积累、精炼并利用领域特定知识。EvoRepair遵循循环学习-修复过程,检索相关过往经验以指导修复,从修复轨迹中提取新经验,并通过质量感知评分更新经验库。我们在PATCHEVAL和SEC-bench上使用GPT-5-mini对EvoRepair与12个代表性漏洞修复基线进行了评估。结果表明,EvoRepair取得了最佳整体性能,在PATCHEVAL上达到93.47%,在SEC-bench上达到87.00%,整体达到90.46%。特别是,EvoRepair在PATCHEVAL和SEC-bench上分别比最新的基于LLM的基线LoopRepair高出39.56%和33.50%,并超过IntentFix 70.86%和50.50%。在两个基准上,EvoRepair整体也比近期自我进化智能体Live-SWE-Agent高出6.98%。在VUL4J上的额外迁移实验进一步证明了EvoRepair跨模型、编程语言和数据集的鲁棒性。这些发现表明,基于经验的自我进化显著增强了智能体AVR,并超越了现有的自我进化技术。

英文摘要:

Large Language Models (LLMs) have shown promise for automated vulnerability repair (AVR), but they still face several limitations, including the lack of intra-vulnerability experience accumulation and the lack of cross-vulnerability experience reuse. As a result, LLMs may repeatedly make similar mistakes during iterative repair and underutilize valuable repair knowledge from historical vulnerabilities. To address these challenges, we propose EvoRepair, an experience-based self-evolving AVR agent framework that enables LLMs to accumulate, refine, and leverage domain-specific knowledge across long-horizon vulnerability repairs. EvoRepair follows a cyclic learn-and-repair process that retrieves relevant past experiences to guide repair, extracts new experiences from repair trajectories, and updates an experience bank using quality-aware scoring. We evaluate EvoRepair against 15 representative vulnerability repair baselines on PATCHEVAL and SEC-bench. Results show that EvoRepair achieves the best overall performance, reaching 93.47% on PATCHEVAL, 87.00% on SEC-bench, and 90.46% overall. In particular, EvoRepair outperforms the latest LLM-based baseline LoopRepair by 39.56% and 33.50% on PATCHEVAL and SEC-bench, respectively, and surpasses IntentFix by 70.86% and 50.50%. Across both benchmarks, EvoRepair also exceeds the recent self-evolving agent Live-SWE-Agent by 6.98% overall. Additional transfer experiments on VUL4J further demonstrate the robustness of EvoRepair across models, programming languages, and datasets. These findings demonstrate that experience-based self-evolution substantially strengthens agentic AVR and goes beyond existing self-evolving techniques.

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

↑