Towards Explainable Vulnerability Detection with Large Language Models
Qiheng Mao, Zhenhao Li, Xing Hu, Kui Liu, Xin Xia, Jianling Sun

TL;DR
This paper introduces LLMVulExp, a framework that uses large language models to detect software vulnerabilities and generate detailed explanations, improving security analysis with high accuracy and interpretability.
Contribution
The paper presents a novel LLM-based approach for vulnerability detection and explanation, utilizing prompt techniques, instruction tuning with LoRA, and Chain-of-Thought strategies for enhanced performance.
Findings
Achieves over 90% F1 score on SeVC dataset
Provides detailed explanations including cause, location, and repair
Effectively combines detection accuracy with interpretability
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Adversarial Robustness in Machine Learning
