# Automated Vulnerability Detection in Source Code Using Quantum Natural Language Processing

arXiv: https://arxiv.org/abs/2303.07525 · HTML: https://mlsanity.com/paper/2303.07525/

## Key facts

- Cited by 6 papers in the map (data through 14 Oct 2026).
- Builds on 8 of its 45 references that are in the map.
- First posted on arXiv 13 Mar 2023.

## Builds on (most cited first, 8 of 8)

- [Supervised learning with quantum enhanced feature spaces](https://mlsanity.com/paper/1804.11326/) (2018)
- [Quantum Long Short-Term Memory](https://mlsanity.com/paper/2009.01783/) (2020)
- [Automated Vulnerability Detection in Source Code Using Deep Representation Learning](https://mlsanity.com/paper/1807.04320/) (2018)
- [Transfer learning in hybrid classical-quantum neural networks](https://mlsanity.com/paper/1912.08278/) (2019)
- [A Review of Quantum Cybersecurity: Threats, Risks and Opportunities](https://mlsanity.com/paper/2207.03534/) (2022)
- [Survey of Automated Vulnerability Detection and Exploit Generation Techniques in Cyber Reasoning Systems](https://mlsanity.com/paper/1702.06162/) (2017)
- [Quantum Machine Learning for Software Supply Chain Attacks: How Far Can We Go?](https://mlsanity.com/paper/2204.02784/) (2022)
- [FaSTExt: Fast and Small Text Extractor](https://mlsanity.com/paper/1908.08994/) (2019)

## Built on by (most cited first, 6 of 6)

- [Photovoltaic power forecasting using quantum machine learning](https://mlsanity.com/paper/2312.16379/) (2023)
- [Exploring the Vulnerabilities of Machine Learning and Quantum Machine Learning to Adversarial Attacks using a Malware Dataset: A Comparative Analysis](https://mlsanity.com/paper/2305.19593/) (2023)
- [Risks of ignoring uncertainty propagation in AI-augmented security pipelines](https://mlsanity.com/paper/2407.14540/) (2024)
- [Case Study-Based Approach of Quantum Machine Learning in Cybersecurity: Quantum Support Vector Machine for Malware Classification and Protection](https://mlsanity.com/paper/2306.00284/) (2023)
- [Feature Engineering-Based Detection of Buffer Overflow Vulnerability in Source Code Using Neural Networks](https://mlsanity.com/paper/2306.07981/) (2023)
- [Direction for Detection: A Survey of Automated Vulnerability Detection and all of its Pain Points](https://mlsanity.com/paper/2412.11194/) (2024)

## Abstract (arXiv)

One of the most important challenges in the field of software code audit is the presence of vulnerabilities in software source code. These flaws are highly likely ex-ploited and lead to system compromise, data leakage, or denial of ser-vice. C and C++ open source code 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 siz-able dataset of millions of open-source functions that point to poten-tial 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 de-pendency. 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, re-call, 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 represen-tation. We found that the QLSTM with semantic and syntactic features detects significantly accurate vulnerability and runs faster than its classical counterpart.
