Towards Explainable Vulnerability Detection with Large Language Models
Not on the map. Why?
Abstract (arXiv)
Software vulnerabilities pose significant risks to the security and integrity of software systems. Although prior studies have explored vulnerability detection using deep learning and pre-trained models, these approaches often fail to provide the detailed explanations necessary for developers to understand and remediate vulnerabilities effectively. The advent of large language models (LLMs) has introduced transformative potential due to their advanced generative capabilities and ability to comprehend complex contexts, offering new possibilities for addressing these challenges. In this paper, we propose LLMVulExp, an automated framework designed to specialize LLMs for the dual tasks of vulnerability detection and explanation. To address the challenges of acquiring high-quality annotated data and injecting domain-specific knowledge, LLMVulExp leverages prompt-based techniques for annotating vulnerability explanations and finetunes LLMs using instruction tuning with Low-Rank Adaptation (LoRA), enabling LLMVulExp to detect vulnerability types in code while generating detailed explanations, including the cause, location, and repair suggestions. Additionally, we employ a Chain-of-Thought (CoT) based key code extraction strategy to focus LLMs on analyzing vulnerability-prone code, further enhancing detection accuracy and explanatory depth. Our experimental results demonstrate that LLMVulExp achieves over a 90% F1 score on the SeVC dataset, effectively combining high detection accuracy with actionable and coherent explanations. This study highlights the feasibility of utilizing LLMs for real-world vulnerability detection and explanation tasks, providing critical insights into their adaptation and application in software security.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). First posted on arXiv 14 Jun 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
- 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillationcited by 7
- 2026EvoRepair: Enhancing Vulnerability Repair Agents Through Experience-Based Self-Evolutioncited by 2
- 2026ExplainBench: Evaluating Code Explanations from Agentscited by 0
- 2026ExplainBench: Evaluating Code Explanations from Agents29 Jul 2026
- 2026EvoRepair: Enhancing Vulnerability Repair Agents Through Experience-Based Self-Evolution28 May 2026
- 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillation7 Apr 2025
Similar, not cited
Close in wording, no citation either way
- 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning
- 2026VulTriage: Triple-Path Context Augmentation for LLM-Based Vulnerability Detection
- 2025Boosting Vulnerability Detection of LLMs via Curriculum Preference Optimization with Synthetic Reasoning Data
- 2024To Err is Machine: Vulnerability Detection Challenges LLM Reasoning
- 2026An Empirical Evaluation of LLM-Based Approaches for Code Vulnerability Detection: RAG, SFT, and Dual-Agent Systems
- 2025VulInstruct: Teaching LLMs Root-Cause Reasoning for Vulnerability Detection via Security Specifications
- 2025LLMpatronous: Harnessing the Power of LLMs For Vulnerability Detection
- 2024Security Vulnerability Detection with Multitask Self-Instructed Fine-Tuning of Large Language Models