VDPST: Enhancing Line-Level Vulnerability Detection with Patch Slicing and Transformers
Vulnerability detection is essential for ensuring software security. In recent years, deep learning has seen widespread adoption in this domain due to its capacity to automatically extract features from vulnerable code, showcasing significant potential. However, existing approaches still struggle to accurately focus on vulnerability-relevant portions within vulnerable functions, and most solutions typically offering coarse-grained localization, usually at the function level. In this paper, we propose VDPST, a novel deep learning-based approach that achieves effective vulnerability detection through program slicing and an enhanced Transformer model. VDPST introduces a patch-based denoising strategy to eliminate irrelevant code information, improving detection accuracy. Additionally, the model integrates a Transformer architecture with residual inputs and cross-attention mechanisms to preserve the contextual integrity of code snippets and enhance the detection of vulnerability-specific features. Experimental results demonstrate that VDPST outper-forms existing state-of-the-art methods on public benchmark datasets, offering superior detection accuracy and fine-grained vulnerability localization capabilities.
Authors
- Shirun Liu
- Lixin Zhao (ORCID: https://orcid.org/0000-0001-8989-9849)
- Aimin Yu (ORCID: https://orcid.org/0000-0002-5521-4757)
- Z. H. Qin
- Haihua Gao
Institutions
- Chinese Academy of Sciences (CN)
- Institute of Information Engineering (CN)
Publication Details
- Published
- 2025-05-05
- DOI
- https://doi.org/10.1109/cscwd64889.2025.11033604
- Primary Topic
- Advanced Malware Detection Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00