arXiv:2604.17184cs.SEcs.LG2026-04ACL被引 1

用符号反馈提升代码漏洞修复的可靠性,让生成补丁真正可用。

SynthFix: Adaptive Neuro-Symbolic Code Vulnerability Repair

论文配图:SynthFix: Adaptive Neuro-Symbolic Code Vulnerability Repair
图 1 · 摘自论文原文
  • 结合监督微调与符号反馈,动态选择修复策略
  • 修复成功率提升54%,安全清除率提高14%
  • 适合需要高可靠性的自动化代码修复场景

大型语言模型能生成看似合理的代码补丁,但仅靠合理性不足以实现自动修复:补丁必须通过编译、通过测试并消除漏洞。我们提出SynthFix,一种神经符号修复框架,融合监督修复学习与编译器反馈。训练阶段,轻量级路由模块根据修复模式选择监督微调(SFT)或奖励微调(RFT);奖励融合静态结构、lint/编译检查、安全扫描及公开执行测试结果。推理时,同样依据证据进行贪心的best-of-K候选选择。在pyrepair、CodeFlaws和SVEN数据集上,针对五个代码LLM(1.3B-7B),SynthFix在可部署修复指标上优于纯SFT和纯RFT基线,功能正确性相对提升最高达54%,安全清除率提升14%。代码与数据已开源。

原文摘要 · Abstract (English)

Large Language Models (LLMs) can generate plausible code patches, but plausibility is not enough for automated repair: a patch must compile, pass tests, and remove the target vulnerability. We present SynthFix, a neuro-symbolic repair framework that combines supervised repair learning with compiler-informed feedback. During training, a lightweight router selects between Supervised Fine-Tuning (SFT) for common repair patterns and Reward Fine-Tuning (RFT) for examples that benefit from symbolic feedback. The reward combines static structure, lint/compile checks, security scanning, and public execution tests where available; at inference time, the same evidence guides best-of-K candidate selection under a greedy floor. Across five code LLMs (1.3B-7B) on pyrepair, CodeFlaws, and SVEN, SynthFix improves deployable repair metrics over SFT-only and RFT-only baselines, with relative gains up to 54 percent in functional correctness and 14 percent in security clearance. Our code and data are available at https://github.com/CoderDoge1108/SynthFix.

代码修复神经符号漏洞检测

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。