mlsanityData to 7 Oct 2026

VULPO: Context-Aware Vulnerability Detection via On-Policy LLM Optimization

arXiv 2511.11896 ↗First posted 14 Nov 2025cs.CR cs.AI cs.SEcited by 3

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Large language models (LLMs) have recently shown strong potential in vulnerability detection (VD). However, accurately detecting vulnerabilities in real-world repositories requires reasoning over complex contextual interactions. Existing LLM-based VD approaches remain limited because current datasets lack complete contextual information and high-quality reasoning supervision, while existing optimization methods primarily rely on coarse outcome-centric supervision signals that fail to model the vulnerability reasoning process. To address these limitations, we first construct ContextVul, a new dataset that augments high-quality function-level vulnerability benchmarks with repository-level contextual information and curated vulnerability reasoning traces. Building upon ContextVul, we introduce a two-stage optimization framework consisting of lightweight cold-start supervised fine-tuning followed by vulnerability-adaptive on-policy optimization (VULPO). VULPO incorporates multidimensional rewards that jointly evaluate vulnerability identification, vulnerability-relevant localization, and causal reasoning quality, along with difficulty-adaptive reward scaling to mitigate reward hacking and improve RL effectiveness. Extensive experiments demonstrate the superiority of VULPO for context-aware VD. Our VULPO-4B, the first specialized vulnerability reasoning LLM, substantially outperforms existing VD baselines, improving Pairwise Pass@1 by 203% relative to Qwen3-4B and achieving competitive performance against a 150% larger-scale LLM, DeepSeek-V3.1.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 32 of its 64 references that are in the map. First posted on arXiv 14 Nov 2025.

Builds on

32 of 64 references.

Closest ancestors · 4

Same direction, newest first

  1. 2025Improving LLM Reasoning for Vulnerability Detection via Group Relative Policy Optimization3 Jul
  2. 2025Boosting Vulnerability Detection of LLMs via Curriculum Preference Optimization with Synthetic Reasoning Data9 Jun
  3. 2025SV-TrustEval-C: Evaluating Structure and Semantic Reasoning in Large Language Models for Source Code Vulnerability Analysis27 May
  4. 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillation7 Apr

Other references · 28

  1. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
  2. 2025Qwen3 Technical Reportcited by 8,195
  3. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  4. 2024ORPO: Monolithic Preference Optimization without Reference Modelcited by 556
  5. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 149
  6. 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 142
  7. 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 133
  8. 2019IPO: Interior-point Policy Optimization under Constraintscited by 119
  9. 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 98
  10. 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 94
  11. 2021CVEfixes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Softwarecited by 89
  12. 2023Prompt-Enhanced Software Vulnerability Detection Using ChatGPTcited by 51
16 more
  1. 2023Large Language Model-Powered Smart Contract Vulnerability Detection: New Perspectivescited by 48
  2. 2024ReposVul: A Repository-Level High-Quality Vulnerability Datasetcited by 35
  3. 2018Automated software vulnerability detection with machine learningcited by 34
  4. 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detectioncited by 30
  5. 2025Benchmarking LLMs and LLM-based Agents in Practical Vulnerability Detection for Code Repositoriescited by 29
  6. 2024MegaVul: A C/C++ Vulnerability Dataset with Comprehensive Code Representationcited by 27
  7. 2025Let the Trial Begin: A Mock-Court Approach to Vulnerability Detection using LLM-Based Agentscited by 20
  8. 2025SecVulEval: Benchmarking LLMs for Real-World C/C++ Vulnerability Detectioncited by 19
  9. 2024APPATCH: Automated Adaptive Prompting Large Language Models for Real-World Software Vulnerability Patchingcited by 18
  10. 2024Pre-training by Predicting Program Dependencies for Vulnerability Analysis Taskscited by 17
  11. 2024InstructPatentGPT: Training patent language models to follow instructions with human feedbackcited by 17
  12. 2025Everything You Wanted to Know About LLM-based Vulnerability Detection But Were Afraid to Askcited by 15
  13. 2024Security Vulnerability Detection with Multitask Self-Instructed Fine-Tuning of Large Language Modelscited by 14
  14. 2025MAVUL: Multi-Agent Vulnerability Detection via Contextual Reasoning and Interactive Refinementcited by 6
  15. 2025LLM-based Vulnerability Discovery through the Lens of Code Metricscited by 4
  16. 2025Are We Learning the Right Features? A Framework for Evaluating DL-Based Software Vulnerability Detection Solutionscited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026VulTriage: Triple-Path Context Augmentation for LLM-Based Vulnerability Detection
  2. 2025VulInstruct: Teaching LLMs Root-Cause Reasoning for Vulnerability Detection via Security Specifications
  3. 2026Beyond Function-Level Analysis: Context-Aware Reasoning for Inter-Procedural Vulnerability Detection
  4. 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning
  5. 2026From SFT to RL: Demystifying the Post-Training Pipeline for LLM-based Vulnerability Detection
  6. 2026VulWeaver: Weaving Broken Semantics for Grounded Vulnerability Detection
  7. 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMs
  8. 2026Three Heads Are Better Than One: A Multi-perspective Reasoning Framework for Enhanced Vulnerability Detection