State Key Laboratory of Mathematical Engineering and Advanced Computing, Zhengzhou, 450000, Henan, China.
State Key Laboratory of Complex Electromagnetic Environment Effects on Electronics and Information System, Luoyang, 471000, Henan, China.
Sci Rep. 2022 May 16;12(1):8053. doi: 10.1038/s41598-022-11227-3.
In the field of network security, although there has been related work on software vulnerability detection based on classic machine learning, detection ability is directly proportional to the scale of training data. A quantum neural network has been proven to solve the memory bottleneck problem of classical machine learning, so it has far-reaching prospects in the field of vulnerability detection. To fill the gap in this field, we propose a quantum neural network structure named QDENN for software vulnerability detection. This work is the first attempt to implement word embedding of vulnerability codes based on a quantum neural network, which proves the feasibility of a quantum neural network in the field of vulnerability detection. Experiments demonstrate that our proposed QDENN can effectively solve the inconsistent input length problem of quantum neural networks and the problem of batch processing with long sentences. Furthermore, it can give full play to the advantages of quantum computing and realize a vulnerability detection model at the cost of a small amount of measurement. Compared to other quantum neural networks, our proposed QDENN can achieve higher vulnerability detection accuracy. On the sub dataset with a small-scale interval, the model accuracy rate reaches 99%. On each subinterval data, the best average vulnerability detection accuracy of the model reaches 86.3%.
在网络安全领域,虽然已经有基于经典机器学习的软件漏洞检测相关工作,但检测能力与训练数据的规模成正比。量子神经网络已被证明可以解决经典机器学习的内存瓶颈问题,因此在漏洞检测领域具有广阔的前景。为了填补这一领域的空白,我们提出了一种名为 QDENN 的量子神经网络结构,用于软件漏洞检测。这项工作首次尝试基于量子神经网络实现漏洞代码的词嵌入,证明了量子神经网络在漏洞检测领域的可行性。实验表明,我们提出的 QDENN 可以有效地解决量子神经网络输入长度不一致和长句子批处理的问题。此外,它可以充分发挥量子计算的优势,以少量的测量成本实现漏洞检测模型。与其他量子神经网络相比,我们提出的 QDENN 可以实现更高的漏洞检测准确性。在小规模间隔的子数据集上,模型准确率达到 99%。在每个子区间数据上,模型的最佳平均漏洞检测准确率达到 86.3%。