用推理模型自动修复漏洞,提升修复准确率和可验证性。
Vul-R2: A Reasoning LLM for Automated Vulnerability Repair
- 设计带推理能力的LLM,分步生成修复方案
- 在真实漏洞数据上训练,修复成功率显著提升
- 适合安全研究者与自动化工具开发者使用
软件漏洞数量激增,亟需自动化漏洞修复(AVR)方案。现有方法将AVR视为序列生成任务,利用大语言模型(LLMs)直接生成修复代码。尽管表现领先,但仍面临两大挑战:(1) 缺乏高质量的漏洞相关推理数据,现有模型主要依赖通用编程知识,难以捕捉多样化的修复模式;(2) 难以在训练过程中验证中间修复过程。现有强化学习方法依赖沙箱执行反馈,但漏洞修复通常缺乏可验证的中间反馈,增加了训练难度。本文提出Vul-R2,通过引入漏洞特定的推理机制与结构化修复路径,有效提升修复准确性和可解释性。
原文摘要 · Abstract (English)
The exponential increase in software vulnerabilities has created an urgent need for automatic vulnerability repair (AVR) solutions. Recent research has formulated AVR as a sequence generation problem and has leveraged large language models (LLMs) to address this problem. Typically, these approaches prompt or fine-tune LLMs to generate repairs for vulnerabilities directly. Although these methods show state-of-the-art performance, they face the following challenges: (1) Lack of high-quality, vulnerability-related reasoning data. Current approaches primarily rely on foundation models that mainly encode general programming knowledge. Without vulnerability-related reasoning data, they tend to fail to capture the diverse vulnerability repair patterns. (2) Hard to verify the intermediate vulnerability repair process during LLM training. Existing reinforcement learning methods often leverage intermediate execution feedback from the environment (e.g., sandbox-based execution results) to guide reinforcement learning training. In contrast, the vulnerability repair process generally lacks such intermediate, verifiable feedback, which poses additional challenges for model training.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。