Logo image
Automated Vulnerability Detection in Source Code Using Quantum Natural Language Processing
Book chapter   Peer reviewed

Automated Vulnerability Detection in Source Code Using Quantum Natural Language Processing

Mst Shapna Akter, Hossain Shahriar and Zakirul Alam Bhuiya
Ubiquitous Security, pp.83-102
Communications in Computer and Information Science, Springer Nature
Ubiquitous Security Second International Conference (UbiSec 2022), 2nd (Zhangjiajie, China, 12/28/2022–12/31/2022)
2023

Metrics

1 Record Views

Abstract

Classical machine learning Feature extraction Quantum natural language processing Vulnerability detection Cybersecurity Machine Learning
One of the most important challenges in the field of software code audit is the presence of vulnerabilities in software source code. Every year, more and more software flaws are found, either internally in proprietary code or revealed publicly. These flaws are highly likely exploited and lead to system compromise, data leakage, or denial of service. C and C++ open-source codes are now available in order to create a large-scale, classical machine-learning and quantum machine-learning system for function-level vulnerability identification. We assembled a sizable dataset of millions of open-source functions that point to potential exploits. We created an efficient and scalable vulnerability detection method based on a deep neural network model– Long Short-Term Memory (LSTM), and quantum machine learning model– Long Short-Term Memory (QLSTM), that can learn features extracted from the source codes. The source code is first converted into a minimal intermediate representation to remove the pointless components and shorten the dependency. Previous studies lack analyzing features of the source code that causes models to recognize flaws in real-life examples. Therefore, We keep the semantic and syntactic information using state-of-the-art word embedding algorithms such as Glove and fastText. The embedded vectors are subsequently fed into the classical and quantum convolutional neural networks to classify the possible vulnerabilities. To measure the performance, we used evaluation metrics such as F1 score, precision, recall, accuracy, and total execution time. We made a comparison between the results derived from the classical LSTM and quantum LSTM using basic feature representation as well as semantic and syntactic representation. We found that the QLSTM with semantic and syntactic features detects significantly accurate vulnerability and runs faster than its classical counterpart.

Details

Logo image