Line-level Semantic Structure Learning for Code Vulnerability Detection
Not on the map. Why?
Abstract (arXiv)
Unlike the flow structure of natural languages, programming languages have an inherent rigidity in structure and grammar.However, existing detection methods based on pre-trained models typically treat code as a natural language sequence, ignoring its unique structural information. This hinders the models from understanding the code's semantic and structual information.To address this problem, we introduce the Code Structure-Aware Network through Line-level Semantic Learning (CSLS), which comprises four components: code preprocessing, global semantic awareness, line semantic awareness, and line semantic structure awareness.The preprocessing step transforms the code into two types of text: global code text and line-level code text.Unlike typical preprocessing methods, CSLS retains structural elements such as newlines and indent characters to enhance the model's perception of code lines during global semantic awareness.For line semantics structure awareness, the CSLS network emphasizes capturing structural relationships between line semantics.Different from the structural modeling methods based on code blocks (control flow graphs) or tokens, CSLS uses line semantics as the minimum structural unit to learn nonlinear structural relationships, thereby improving the accuracy of code vulnerability detection.We conducted extensive experiments on vulnerability detection datasets from real projects. The CSLS model outperforms the state-of-the-art baselines in code vulnerability detection, achieving 70.57% accuracy on the Devign dataset and a 49.59% F1 score on the Reveal dataset.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). First posted on arXiv 26 Jul 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 2; 2026: 2.
4 papers.
- 2025A Systematic Literature Review on Detecting Software Vulnerabilities with Large Language Modelscited by 8
- 2025ReDef: Do Code Language Models Truly Understand Code Changes for Just-in-Time Software Defect Prediction?cited by 0
- 2026Beyond Function-Level Analysis: Context-Aware Reasoning for Inter-Procedural Vulnerability Detectioncited by 0
- 2026A systematic literature Review for Transformer-based Software Vulnerability detectioncited by 0
- 2026A systematic literature Review for Transformer-based Software Vulnerability detection27 Apr 2026
- 2026Beyond Function-Level Analysis: Context-Aware Reasoning for Inter-Procedural Vulnerability Detection6 Feb 2026
- 2025ReDef: Do Code Language Models Truly Understand Code Changes for Just-in-Time Software Defect Prediction?11 Sep 2025
- 2025A Systematic Literature Review on Detecting Software Vulnerabilities with Large Language Models30 Jul 2025