Vulnerability Detection Based on Pre-trained Code Language Model and Convolutional Neural Network

Software vulnerabilities damage the reliability of software systems.Recently, many methods based on deep learning have been proposed for vulnerability detection by learning features from code sequences or various property graphs.However, sequence-based methods frequently fail to consider the structural information of the code, whereas graph-based methods often encounter difficulties in capturing long-distance contextual semantic information.To overcome these limitations, we propose PTCN, a novel vulnerability detection method that integrates Pre-Trained code language model and Convolutional Neural Network (CNN).First, the code tokens sequence and the propagation chains are constructed from the source code in preparation for the subsequent feature extraction.Next, GraphCodeBERT, a graph-based pre-trained code language model, is introduced as a means of learning both the semantic and structural information contained in the code tokens sequence and the propagation chains.Then, a CNN architecture is designed to effectively extract the crucial vulnerability features from the hidden states of the last Transformer layer of GraphCodeBERT for vulnerability detection.The experiments on the public benchmark dataset REVEAL indicate that PTCN outperforms the state-of-the-art methods with respect to the Accuracy and F1-score metrics by 3.41%-15.80%and 22.68%-104.27%,respectively.

Authors

Publication Details

Journal
Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering
Published
2024-10-28
DOI
https://doi.org/10.18293/seke2024-098
Primary Topic
Network Security and Intrusion Detection
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Vulnerability Detection Based on Pre-trained Code Language Model and Convolutional Neural Network

Tingfeng Liao, Siliang Suo, Lu Lu, Zhihong Liang
Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering
Network Security and Intrusion Detection
article

Vulnerability Detection Based on Pre-trained Code Language Model and Convolutional Neural Network

Tingfeng Liao, Siliang Suo, Lu Lu, Zhihong Liang
article en

Abstract

Software vulnerabilities damage the reliability of software systems.Recently, many methods based on deep learning have been proposed for vulnerability detection by learning features from code sequences or various property graphs.However, sequence-based methods frequently fail to consider the structural information of the code, whereas graph-based methods often encounter difficulties in capturing long-distance contextual semantic information.To overcome these limitations, we propose PTCN, a novel vulnerability detection method that integrates Pre-Trained code language model and Convolutional Neural Network (CNN).First, the code tokens sequence and the propagation chains are constructed from the source code in preparation for the subsequent feature extraction.Next, GraphCodeBERT, a graph-based pre-trained code language model, is introduced as a means of learning both the semantic and structural information contained in the code tokens sequence and the propagation chains.Then, a CNN architecture is designed to effectively extract the crucial vulnerability features from the hidden states of the last Transformer layer of GraphCodeBERT for vulnerability detection.The experiments on the public benchmark dataset REVEAL indicate that PTCN outperforms the state-of-the-art methods with respect to the Accuracy and F1-score metrics by 3.41%-15.80%and 22.68%-104.27%,respectively.

Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge EngineeringVol. 2024
Natural Science Foundation of Guangdong Province
Openalex Percentile: Top 71%
Network Security and Intrusion Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.