Agent 与自动化 4.0 · 优秀 2026-07-29 · 文章

Graph Is the Verifier: Agentic RL for Interprocedural Vulnerability Detection (VulAgentRL)

VulAgentRL 用代码属性图 (CPG) 同时担任推理查询和训练证据验证因为 CPG 节点带持久整数 ID,证据验证是精确比较而非文本匹配,reward 只奖励有证据支撑的判定这对做 Agent reward 设计的人有参考价值

打开原文回到归档

Graph Is the Verifier: Agentic RL for Interprocedural Vulnerability Detection (VulAgentRL)

Source: https://arxiv.org/abs/2607.26656
Authors: Yikun Li, Ting Zhang, Jiakun Liu, Jinfeng Jiang, Yuheng Yieh, Yixin Yang, Wen Bin Leow, Yide Yin, Yintong Huo, Eng Lieh Ouh, Lwin Khin Shar, David Lo
Published: 2026-07-29
Categories: cs.CR, cs.AI, cs.SE

Abstract

Real-world vulnerabilities often span multiple functions, yet most learning-based detectors classify each function in isolation: on a sample of real CVEs, 71.7% of vulnerable functions require evidence from outside the function to be classified correctly. Agentic reinforcement learning (RL) could close this gap by enabling a model to gather that evidence itself, but it lacks a reliable reward, since a reward defined on the final verdict alone can be obtained without performing any investigation.

VulAgentRL is an agentic RL framework for interprocedural vulnerability detection built on a Code Property Graph (CPG). The CPG serves two roles: at inference time the policy queries it for callers, callees, dataflow, and other queries, and at training time the same graph verifies the evidence the policy cites. Because every CPG node carries a persistent integer identifier, this verification is an exact comparison rather than a textual match, so the reward credits verdicts that are supported by evidence.

The framework initializes the policy by distilling teacher investigations, and shows that this warm start is necessary, since RL cannot acquire tool-use behavior it never samples. Under a repository-level split that prevents leakage, VulAgentRL outperforms state-of-the-art baselines, including frontier models, on the strict pair-wise-correct metric.

Evidence (Obsidian)

From 论文流水线 2026-07-31:

  • 「Graph is the verifier」:CPG 节点带持久整数 ID,证据验证是精确整数比较而非文本匹配,reward 只奖励有证据支撑的判定。
  • 对做 Agent reward 设计的人,这篇的价值在「怎么让 reward 诚实地反映过程而非只看结果」。