arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.19012cs.CRcs.SE
收藏

安全性是相对的:通过多智能体行为合同合成实现无训练漏洞检测

Security Is Relative: Training-Free Vulnerability Detection via Multi-Agent Behavioral Contract Synthesis

College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics(南京航空航天大学计算机科学与技术学院)

Yongchao Wang, Zhiqiu Huang

AI总结:

本文提出Phoenix框架,通过行为合同合成解决漏洞检测中的语义模糊问题,实现更高准确率的漏洞识别,使用开源模型达到更小规模和更优性能。

摘要:

深度学习在漏洞检测中展示了早期基准的有希望的结果,但最近的评估揭示了灾难性退化:在传统数据集上实现F1>0.68的模型在严格去重下降至0.031。我们识别出根本原因是语义模糊问题:相同代码可以是安全或易受攻击的,取决于项目特定的行为合同,使全局分类从根本上不足。我们提出Phoenix,一种无训练的多智能体框架,通过行为合同合成解决这一模糊性。Phoenix将检测分解为三个阶段:语义切片器提取最小的漏洞相关上下文,需求反向工程师合成Gherkin行为规范编码的安全合同,以及合同法官通过严格合规检查评估代码。在PrimeVul Paired上,Phoenix实现F1=0.825和Pair-Correct=64.4%,超越RASM-Vul(F1=0.668)和VulTrial(F1=0.563),同时使用开源模型小48倍(7-14B vs. 671B)。25种配置的消融分析显示Gherkin规范是决定性驱动因素(+0.09至+0.35 F1)。错误分析揭示18%的“假阳性”识别出修补代码中的真实安全问题,证明安全是相对于行为合同定义的属性,而不是代码语法的绝对属性。

英文摘要:

Deep learning for vulnerability detection has shown promising results on early benchmarks, but recent evaluations reveal catastrophic degradation: models achieving F1 > 0.68 on legacy datasets collapse to 0.031 under strict deduplication. We identify the root cause as the semantic ambiguity problem: identical code can be secure or vulnerable depending on project-specific behavioral contracts, rendering global classification fundamentally inadequate. We propose Phoenix, a training-free multi-agent framework that resolves this ambiguity through Behavioral Contract Synthesis. Phoenix decomposes detection into three stages: a Semantic Slicer extracting minimal vulnerability-relevant context, a Requirement Reverse Engineer synthesizing Gherkin behavioral specifications encoding the security contract, and a Contract Judge evaluating code against these specifications via strict compliance checking. On PrimeVul Paired, Phoenix achieves F1 = 0.825 and Pair-Correct = 64.4%, surpassing RASM-Vul (F1 = 0.668) and VulTrial (F1 = 0.563) while using open-source models up to 48x smaller (7-14B vs. 671B). Ablation across 25 configurations demonstrates Gherkin specifications as the decisive driver (+0.09 to +0.35 F1). Error analysis reveals 18% of "False Positives" identify genuine security concerns in patched code, demonstrating that security is a relative property defined against behavioral contracts, not an absolute property of code syntax.

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

↑