Skip to content
Preprint

Structured Security Explanations for Learning-Based Vulnerability Detection

Oct 2026 · 0 citations · 36 references
Computer Science

TL;DR

VulnLens is presented, an explanation-augmented framework for binary C/C++ vulnerability detection that separates program-behavior analysis from the final decision and outperforms DeepSeek V4 Pro and Gemini 2.5 Pro.

Abstract

Software vulnerability detection remains difficult because existing approaches rely on predefined analysis rules, learn vulnerability patterns implicitly from code and labels, or use large language models (LLMs) to make the final security judgment. It remains unclear whether structured descriptions of security-relevant program behavior can improve supervised detection. We present VulnLens, an explanation-augmented framework for binary C/C++ vulnerability detection that separates program-behavior analysis from the final decision. A label-blind LLM-based Explainer examines each function from seven fixed perspectives: data flow, memory access, object lifetime, arithmetic and type behavior, control flow, shared state, and external-resource access. Without receiving vulnerability labels or CWE information, it generates structured explanations. A supervised Detector combines source code and explanations through sequential cross-attention. We evaluate VulnLens on a PrimeVul-derived dataset covering ten CWE categories and test transfer to SecVulEval without retraining. On the 526-function PrimeVul test set, VulnLens achieves 75.5% accuracy and 77.2% F1, exceeding DeepSeek V4 Pro by 4.2 percentage points in accuracy and Gemini 2.5 Pro by 2.2 points in F1. Matched explanations improve F1 by 7.3 points over a separately trained code-only detector. On SecVulEval, VulnLens achieves 66.4% accuracy and 65.8% F1, outperforming DeepSeek V4 Pro by 7.6 points in accuracy and 20.0 points in F1, and Gemini 2.5 Pro by 16.6 points in accuracy and 7.8 points in F1.

View source

Similar papers

#artificial intelligence Review Oct 2026

VulValidate: Auditing Function-Level Vulnerability Labels with Executable Evidence

VulValidate is presented, a framework that uses LLM agents to coordinate dynamic analysis tools and construct vulnerability-triggering experiments from runtime feedback that reconstructs vulnerable and fixed revisions, selects suitable tools and execution paths, refines triggering inputs, and compares runtime behavior...

Lei-Zhen Zhang, Sheng Chen · 0 citations
Preprint Oct 2026

Enhancing LLM-Based Vulnerability Detection via Representation-Aware Logical Ensemble

Automated vulnerability detection in C source code is a long-standing challenge, as traditional static analysis tools often trade precision for scalability and struggle with complex vulnerability patterns. Recently, large language models (LLMs) have shown promising results; yet, most approaches rely on a single code re...

Francesco C. Grasso, Pietro Liguori, R. Natella et al. · 0 citations
Review Open access Oct 2026

A Review of Source Code Vulnerability Detection Methods Based on Large Language Models: Models, Techniques, and Evaluation

In source code vulnerability detection, large language models (LLMs) are no longer used only as substitutes for traditional fixed classifiers. With prompt design, parameter fine-tuning, and program-context information, they can judge whether code contains vulnerabilities and can also provide suspicious locations and ex...

Le Qin · 0 citations
Review Open access Sep 2026

Program Graph Learning for Software Vulnerability Analysis: A Survey

Software vulnerabilities represent an enduring threat to modern cyberspace. Effective vulnerability detection increasingly relies on reasoning about complex program semantics, structural dependencies, and execution behaviors. Consequently, extracting vulnerability-relevant features from code efficiently has become a pr...

Jun-Jie Wang, Tong Yu, Ming Li et al. · 0 citations
Open access 2026

An Uncertainty-Aware Adaptive Hybrid Framework for Robust Source Code Vulnerability Detection

: Source code vulnerability detection is important for improving software security and reliability. Pre-trained code representation models, such as CodeBERT and GraphCodeBERT, have improved vulnerability detection by learning semantic and structural characteristics from source code. However, existing approaches often r...

Tuan Nguyen Kim, Chieu Ta Quang, Nin Ho Le Viet · 0 citations
#generative ai Review Open access Oct 2026

Machine Learning-Based Vulnerability Detection in AI-Generated Source Code: A Systematic Literature Review and Research Directions

The rapid adoption of Generative AI and Large Language Models (LLMs) has transformed software development, but AI-generated code may contain security vulnerabilities such as injection flaws, weak authentication, and unsafe API usage. Traditional rule-based and static-analysis techniques struggle with semantically diver...

Prof. Rana Afreen Sheikh, Shrutika Mehare, Vishakh · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.