VulnLLM-R: Specialized Reasoning LLM with Agent Scaffold for Vulnerability Detection

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Nie, Yuzhou, Li, Hongwei, Guo, Chengquan, Jiang, Ruizhe, Wang, Zhun, Li, Bo, Song, Dawn, Guo, Wenbo
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911308180357120
author Nie, Yuzhou
Li, Hongwei
Guo, Chengquan
Jiang, Ruizhe
Wang, Zhun
Li, Bo
Song, Dawn
Guo, Wenbo
author_facet Nie, Yuzhou
Li, Hongwei
Guo, Chengquan
Jiang, Ruizhe
Wang, Zhun
Li, Bo
Song, Dawn
Guo, Wenbo
contents We propose VulnLLM-R, the~\emph{first specialized reasoning LLM} for vulnerability detection. Our key insight is that LLMs can reason about program states and analyze the potential vulnerabilities, rather than simple pattern matching. This can improve the model's generalizability and prevent learning shortcuts. However, SOTA reasoning LLMs are typically ultra-large, closed-source, or have limited performance in vulnerability detection. To address this, we propose a novel training recipe with specialized data selection, reasoning data generation, reasoning data filtering and correction, and testing-phase optimization. Using our proposed methodology, we train a reasoning model with seven billion parameters. Through extensive experiments on SOTA datasets across Python, C/C++, and Java, we show that VulnLLM-R has superior effectiveness and efficiency than SOTA static analysis tools and both open-source and commercial large reasoning models. We further conduct a detailed ablation study to validate the key designs in our training recipe. Finally, we construct an agent scaffold around our model and show that it outperforms CodeQL and AFL++ in real-world projects. Our agent further discovers a set of zero-day vulnerabilities in actively maintained repositories. This work represents a pioneering effort to enable real-world, project-level vulnerability detection using AI agents powered by specialized reasoning models. The code is available at~\href{https://github.com/ucsb-mlsec/VulnLLM-R}{github}.
format Preprint
id arxiv_https___arxiv_org_abs_2512_07533
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle VulnLLM-R: Specialized Reasoning LLM with Agent Scaffold for Vulnerability Detection
Nie, Yuzhou
Li, Hongwei
Guo, Chengquan
Jiang, Ruizhe
Wang, Zhun
Li, Bo
Song, Dawn
Guo, Wenbo
Cryptography and Security
Artificial Intelligence
We propose VulnLLM-R, the~\emph{first specialized reasoning LLM} for vulnerability detection. Our key insight is that LLMs can reason about program states and analyze the potential vulnerabilities, rather than simple pattern matching. This can improve the model's generalizability and prevent learning shortcuts. However, SOTA reasoning LLMs are typically ultra-large, closed-source, or have limited performance in vulnerability detection. To address this, we propose a novel training recipe with specialized data selection, reasoning data generation, reasoning data filtering and correction, and testing-phase optimization. Using our proposed methodology, we train a reasoning model with seven billion parameters. Through extensive experiments on SOTA datasets across Python, C/C++, and Java, we show that VulnLLM-R has superior effectiveness and efficiency than SOTA static analysis tools and both open-source and commercial large reasoning models. We further conduct a detailed ablation study to validate the key designs in our training recipe. Finally, we construct an agent scaffold around our model and show that it outperforms CodeQL and AFL++ in real-world projects. Our agent further discovers a set of zero-day vulnerabilities in actively maintained repositories. This work represents a pioneering effort to enable real-world, project-level vulnerability detection using AI agents powered by specialized reasoning models. The code is available at~\href{https://github.com/ucsb-mlsec/VulnLLM-R}{github}.
title VulnLLM-R: Specialized Reasoning LLM with Agent Scaffold for Vulnerability Detection
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2512.07533