Source code vulnerability detection based on deep learning: a review
Abstract
AI Summary
Brief Overview
In January 2026, Huading Su; Zhen Xu; Yan Zhang; Qian Tan published the paper "Source code vulnerability detection based on deep learning: a review" online in Cybersecurity. This research systematically reviewed the progress of applying deep learning to source code vulnerability detection over the past four years, addressing the challenge of a lack of timely, comprehensive, and cross-scenario reviews in the field. By integrating and analyzing more than 140 high-quality literature sources, it covers dataset construction, model architecture evolution, interpretability methods, and multiple real-world application scenarios, significantly enhancing the clarity of understanding regarding the current state of the technology and its bottlenecks. It provides new ideas for the research and deployment of software security automated detection tools.
Research Abstract
With the widespread adoption of AI programming tools (such as GitHub Copilot), the speed of code vulnerability generation far exceeds the capacity of manual review, while traditional detection tools suffer from high false-positive rates and significant misses. Although existing deep learning methods perform well in feature extraction, they face bottlenecks such as poor data quality (e.g., lagging CVE data, annotation bias), the difficulty of trusting model "black boxes," and weak generalization across languages and scenarios. This paper is the first to categorize vulnerability detection technologies into three major pathways: sequence models, graph models, and multimodal fusion. It compares and analyzes their adaptability logic in typical scenarios such as mobile apps, smart contracts, and AI-generated code, and points out that future breakthroughs do not lie in stacking computational power, but in enabling models to understand both syntax and business logic—for example, using program dependency graphs to simulate real execution paths, and using large models to assist in interpreting "why this code is dangerous." This provides a panoramic navigation for the industry to select suitable solutions and for academia to focus on critical issues.
Background
The core advantage of code vulnerability detection is "prevention before it is too late"; it can identify hidden defects before software is released and is widely applied in critical scenarios such as financial systems, Internet of Things devices, and government platforms. However, current mainstream tools often face a dilemma: rule-based engines (such as Fortify) are like outdated manuals that can only recognize known vulnerability patterns and are powerless against new AI-generated attacks; machine learning methods are like students guessing answers based on experience, relying on manually extracted code features and struggling to understand complex inter-function call relationships. Strategy A, although capable of quickly scanning large amounts of code, frequently produces false positives; Strategy B, although with slightly higher precision, requires repeated debugging by experts and is costly. Therefore, how to make detection systems possess the logical reasoning capabilities of human experts while efficiently handling massive code like search engines has become a key contradiction constraining software security automation.
Key Highlights
- Panoramic time anchors: It does not merely discuss "recent progress" in general terms, but strictly locks onto the latest achievements from 2021 to 2025, excluding outdated methods, thereby providing readers with a "vulnerability detection technology 2025 edition map."
- Cross-scenario penetration analysis: It goes beyond listing model performance to deconstruct the vulnerability characteristics and detection difficulties in three types of scenarios: mobile apps (Java/Kotlin), blockchain contracts (Solidity), and AI-generated code (Python/JavaScript), akin to equipping different vehicle models with dedicated maintenance manuals;
- Dual-track design for interpretability: It uses tools such as SHAP to quantify "which code segment has the greatest impact" (macro-level attribution) and uses techniques such as SliceLocator to pinpoint "exactly which line triggers the vulnerability" (micro-level tracking), enabling developers to see global risks clearly and repair precisely.
Summary and Outlook
Based on a systematic literature review, this study achieved a breakthrough in the panoramic understanding of deep learning vulnerability detection technology through multidimensional comparative analysis. This technology possesses the dual advantages of strong timeliness and wide scenario coverage. The results show that in AI-generated code scenarios, 35.8% of vulnerable fragments were identified, and in smart contract auditing, the detection rate for re-entrancy attacks was raised to 90.5%. This research not only solves the long-standing lack of authoritative technical roadmaps in the industry but also, by constructing a four-dimensional evaluation framework of "data—model—scenario—interpretation," provides methodological support for the security embedding of next-generation trusted AI programming assistants, open-source supply chain risk early warning, and the autonomous controllability of domestic development toolchains.

