Graph Is the Verifier: Agentic Reinforcement Learning for Interprocedural Vulnerability Detection
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
Abstract
Real-world vulnerabilities often span multiple functions, yet most learning-based detectors classify each function in isolation: on a sample of real CVEs, we find that 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. We propose VulAgentRL, 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. We further initialize the policy by distilling teacher investigations, and show 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 while issuing fewer tool calls, and its advantage persists on an out-of-distribution corpus and under class imbalance.
Create a lesson
Metadata
- Categories
- cs.CR, cs.AI, cs.SE
Related papers
FAVA: Formal Authorization for Verified Agents with Evidence-Backed Permission Graphs
Shared title terminologycs.CRYifan Zhang, Xinkui Zhao, Sai Liu et al.
AgentLens: Graph-guided Security Auditing for LLM-based Agents
Shared title terminologycs.CRPeizhuo Lv, Tao Chen, Mengya Shi et al.
Are Web Agents Still Detectable? Stress-Testing Bot Defenses with Coordinated Evasion
Shared title terminologycs.CRParsa Nilforushan, Gemmin Sugiura, Kourosh Hashemi et al.
Neuro-Symbolic Participation Governance for Verifiable AI Agents in Open Digital Twin Ecosystems
Shared title terminologycs.CRJuan Li, Wei Cai, Yan Bai
Adversarial Attacks in Multi-Agent LLM Pipelines: Unveiling Structural Vulnerabilities in Agentic AI Architectures
Shared title terminologycs.CRFaisal Haque Bappy, Tahrim Hossain, Tarannum Shaila Zaman et al.
Guarding Organizations Against Malware Risk: A Novel Graph-Based Malware Detection Method
Shared title terminologycs.CRYinan Gao, Jiarong Xu, Xiaohang Zhao et al.