Skip to main content
Log in

Network intrusion detection based on variational quantum convolution neural network

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

With the rapid development of quantum machine learning (QML), quantum convolutional neural networks (QCNN) have been proposed and shown advantages in classification problems. An intrusion detection system (IDS) based on the QML method is proven to have higher accuracy than IDS based on the traditional machine learning (ML) method. However, the multiple convolution pooling operations of QCNN will cause the loss of valuable data features, resulting in a large error in the final measurement results. In this paper, we design an IDS model of QCNN based on a variational quantum neural network (VQNN), which can effectively reduce data feature loss and improve detection accuracy. We compare this model with traditional ML models such as artificial neural network (ANN), logistic regression (LR), K-nearest neighbor (KNN) algorithm, support vector machine (SVM), and decision tree (DT). Experiment results show that the accuracy of our proposed model is 94.51%, which is higher than other classical IDS models.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

Data availability

https://research.unsw.edu.au/projects/unsw-nb15-dataset

References

  1. Gao Y, Wu H, Song B, Jin Y, Luo X, Zeng X (2019) A distributed network intrusion detection system for distributed denial of service attacks in vehicular ad hoc network. IEEE Access 7:154560–154571

    Article  Google Scholar 

  2. SANSInstitute: The history and evolution of intrusion detection

  3. Sarkar T, Das N (2014) Survey on host and network based intrusion detection system. Int J Adv Netw Appl 6(2):2266

    Google Scholar 

  4. Yin C, Zhu Y, Fei J, He X (2017) A deep learning approach for intrusion detection using recurrent neural networks. IEEE Access 5:21954–21961

    Article  Google Scholar 

  5. Lecun Y, Bengio Y, Hinton G (2015) Deep learning. Nature 521:436–444

    Article  ADS  CAS  PubMed  Google Scholar 

  6. Lecun Y, Bottou L, Bengio Y, Haffner P (1998) Gradient-based learning applied to document recognition. Proc IEEE 86(11):2278–2324

    Article  Google Scholar 

  7. Krizhevsky A, Sutskever I, Hinton G (2012) Imagenet classification with deep convolutional neural networks. Adv Neural Inf Process Syst 25(2)

  8. Simonyan K, Zisserman A (2015) Very deep convolutional networks for large-scale image recognition. In: International conference on learning representations

  9. Szegedy C, Liu W, Jia Y, Sermanet P, Rabinovich A (2015) Going deeper with convolutions. In: 2015 IEEE conference on computer vision and pattern recognition (CVPR)

  10. He K, Zhang X, Ren S, Sun J (2016) Deep residual learning for image recognition. In: 2016 IEEE conference on computer vision and pattern recognition (CVPR). pp 770–778

  11. Girshick R, Donahue J, Darrell T, Malik J (2014) Rich feature hierarchies for accurate object detection and semantic segmentation. In: 2014 IEEE conference on computer vision and pattern recognition (CVPR). pp 580–587

  12. Girshick R (2015) Fast r-cnn. In: 2015 IEEE international conference on computer vision (ICCV). pp 1440–1448

  13. Redmon J, Divvala S, Girshick R, Farhadi A (2016) You only look once: unified, real-time object detection. In: 2016 IEEE conference on computer vision and pattern recognition (CVPR). pp 779–788

  14. He K, Gkioxari G, Dollár P, Girshick R (2017) Mask r-cnn. In: 2017 IEEE international conference on computer vision (ICCV). pp 2980–2988

  15. Olaf R, Philipp F, Thomas B (2015) U-net: convolutional networks for biomedical image segmentation. In: 2015 medical image computing computer assisted intervention (MICCAI)

  16. Chen L, Zhu Y, Papandreou G, Schroff F. Adam H (2018) Encoder-decoder with atrous separable convolution for semantic image segmentation. In: Computer vision – ECCV 2018

  17. Anastasia B, Sander B, Cornelis O (2017) Conditional time series forecasting with convolutional neural networks. arXiv preprint arXiv:1703.04691

  18. Yitian C, Yanfei K, Yixiong C, Zizhuo W (2020) Probabilistic forecasting with temporal convolutional neural network. Neurocomputing 399:491–501

    Article  Google Scholar 

  19. Oord A, Dieleman S, Zen H (2016) Wavenet: a generative model for raw audio. arXiv preprint arXiv:1609.03499

  20. Yuan F, Karatzoglou A, Arapakis I, Jose JM, He X (2019) A simple convolutional generative network for next item recommendation. In: Proceedings of the Twelfth ACM international conference on web search and data mining

  21. Xiaohe H, Chunsen L, Yu-Gang J, Peng Z (2020) In-memory computing to break the memory wall. Chin Phys B 29(7):078504

    Article  Google Scholar 

  22. Lloyd S, Mohseni M, Rebentrost P (2013) Quantum algorithms for supervised and unsupervised machine learning. arXiv preprint arXiv:1307.0411

  23. Lloyd S, Mohseni M, Rebentrost P (2014) Quantum principal component analysis. Nat Phys 10:631–633

    Article  CAS  Google Scholar 

  24. Wiebe N, Kapoor A, Svore KM (2015) Quantum algorithms for nearest-neighbor methods for supervised and unsupervised learning. Quantum Inf Comput 15(3–4):316–356

    MathSciNet  Google Scholar 

  25. Rebentrost P, Mohseni M, Lloyd S (2014) Quantum support vector machine for big data classification. Phys Rev Lett 113(13):130503

    Article  ADS  PubMed  Google Scholar 

  26. Kerenidis I, Landman J, Luongo A, Prakash A (2019) q-means: a quantum algorithm for unsupervised machine learning. In: Proceedings of the 33rd international conference on neural information processing systems

  27. Blank C, Park DK, Rhee JK (2020) Quantum classifier with tailored quantum kernel. NPJ Quantum Inf 6:41

    Article  ADS  Google Scholar 

  28. Cong I, Choi S, Lukin MD (2019) Quantum convolutional neural networks. Nat Phys 15:1273–1278

    Article  CAS  Google Scholar 

  29. Iordanis K, Jonas L, Anupam P (2019) Quantum algorithms for deep convolutional neural networks. arXiv preprint arXiv:1911.01117

  30. Liu J, Lim KH, Wood KL (2021) Hybrid quantum-classical convolutional neural networks. Sci China Phys Mech Astron 64:290311

    Article  ADS  Google Scholar 

  31. Maxwell PH, Samriddhi S, Shashindra P, Tristan C (2019) Quanvolutional neural networks: powering image recognition with quantum circuits. Quantum Mach Intell 2:1–9

    Google Scholar 

  32. Chen SYC, Wei TC, Zhang C, Yu H, Yoo S (2022) Quantum convolutional neural networks for high energy physics data analysis. Phys Rev Res 4(1):013231

    Article  CAS  Google Scholar 

  33. Dietterich TG (2000) Ensemble methods in machine learning. In: Multiple classifier systems

  34. YaoChong L (2020) A quantum deep convolutional neural network for image recognition. Quantum Sci Technol 5:044003

    Article  Google Scholar 

  35. MacCormack I, Delaney C, Galda A, Aggarwal N, Narang P (2022) Branching quantum convolutional neural networks. Phys. Rev. Res. 4(1):013117

    Article  CAS  Google Scholar 

  36. Wei S, Chen Y, Zhou Z (2022) A quantum convolutional neutral network on NISQ devices. AAPPS Bull 32(2):1–11

    ADS  Google Scholar 

  37. Mangini S (2021) Quantum computing models for artificial neural networks. EPL 134:10002

    Article  ADS  CAS  Google Scholar 

  38. Arthur P (2021) Absence of barren plateaus in quantum convolutional neural networks. Phys. Rev. X 11(4):041011

    Google Scholar 

  39. Preskill J (2018) Quantum computing in the NISQ era and beyond. Quantum 2:79

    Article  Google Scholar 

  40. Cerezo M (2021) Variational quantum algorithms. Nat Rev Phys 3:625–644

    Article  Google Scholar 

  41. Bharti K (2014) Noisy intermediate-scale quantum algorithms. Rev Mod Phys 94:015004

    Article  ADS  MathSciNet  Google Scholar 

  42. Mitarai K, Negoro M, Fujii K (2018) Quantum circuit learning. Phys Rev A 98:032309

    Article  ADS  CAS  Google Scholar 

  43. Havlicek V, Dcorcoles A, Temme K (2019) Supervised learning with quantum-enhanced feature spaces. Nature 567:209–212

    Article  ADS  CAS  PubMed  Google Scholar 

  44. Caro MC, Huang HY, Cerezo M, Sharma K, Sornborger A, Cincio L, Coles PJ (2022) Generalization in quantum machine learning from few training data. Nat Commun 13:4919

    Article  ADS  CAS  PubMed  PubMed Central  Google Scholar 

  45. Kobayashi M, Nakaji K, Yamamoto N (2022) Overfitting in quantum machine learning and entangling dropout. Quantum Mach Intell 4:30

    Article  Google Scholar 

  46. Vidal G (2008) Class of quantum many-body states that can be efficiently simulated. Phys Rev Lett 101:110501

    Article  ADS  CAS  PubMed  Google Scholar 

  47. Zoufal C, Lucchi A, Woerner S (2019) Quantum generative adversarial networks for learning and loading random distributions. NPJ Quantum Inf 5:103

    Article  ADS  Google Scholar 

  48. Xia R, Kais S (2020) Hybrid quantum-classical neural network for calculating ground state energies of molecules. Entropy 22:828

    Article  ADS  MathSciNet  CAS  PubMed  PubMed Central  Google Scholar 

  49. Zhou L, Wang S-T, Choi S, Pichler H, Lukin MD (2020) Quantum approximate optimization algorithm: performance, mechanism, and implementation on near-term devices. Phys Rev X 10:021067

    CAS  Google Scholar 

  50. Vladyslav V (2020) Measurement optimization in the variational quantum eigensolver using a minimum clique cover. J Chem Phys 152:124114

    Article  ADS  Google Scholar 

  51. Pepper A, Tischler N, Pryde GJ (2019) Experimental realization of a quantum autoencoder: the compression of qutrits via machine learning. Phys Rev Lett 112:060501

    Article  Google Scholar 

  52. Benedetti M, Lloyd E, Sack S, Fiorentini M (2019) Parameterized quantum circuits as machine learning models. Quantum Sci Technol 4:043001

    Article  ADS  Google Scholar 

  53. Moustafa N, Slay J (2016) The evaluation of network anomaly detection systems: statistical analysis of the unsw-nb15 data set and the comparison with the kdd99 data set. Inf Secur J Glob Perspect 25:1–3

    Google Scholar 

  54. Giovannetti V, Lloyd S, Maccone L (2008) Quantum random access memory. Phys Rev Lett 100:160501

    Article  ADS  MathSciNet  PubMed  Google Scholar 

  55. Lloyd S, Mohseni M, Rebentrost P (2014) Quantum principal component analysis. Nat Phys 10:631–633

    Article  CAS  Google Scholar 

  56. Rebentrost P, Mohseni M, Lloyd S (2014) Quantum support vector machine for big data classification. Phys Rev Lett 113:130503

    Article  ADS  PubMed  Google Scholar 

  57. Schuld M, Killoran N (2019) Quantum machine learning in feature Hilbert spaces. Phys Rev Lett 122:040504

    Article  ADS  CAS  PubMed  Google Scholar 

  58. Park DK, Petruccione F, Rhee JK (2019) Circuit-based quantum random access memory for classical data. Sci Rep 9:3949

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  59. Veras TML, Araujo ICS, Park DK, Silva AJ (2021) Circuit-based quantum random access memory for classical data with continuous amplitudes. IEEE Trans Comput 70(12):2125–2135

    Article  MathSciNet  Google Scholar 

  60. Araujo IF, Park DK, Petruccione F (2021) A divide-and-conquer algorithm for quantum state preparation. Sci Rep 11:6329

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  61. Hur T, Kim L, Park D (2022) Quantum convolutional neural network for classical data classification. Quantum Mach Intell 4:3

    Article  Google Scholar 

  62. Gong C, Guan W, Gani A, Qi H (2022) Network attack detection scheme based on variational quantum neural network. J Supercomput 78:16876–16897

    Article  Google Scholar 

  63. Moustafa N, Slay J (2015) The significant features of the unsw-nb15 and the kdd99 sets for network intrusion detection systems. In: 4th international workshop on building analysis datasets and gathering experience returns for security (BADGERS)

  64. Janarthanan T, Zargari S (2017) IEEE 26th international symposium on industrial electronics (ISIE). Scientific reports

  65. Husain A, Salem A, Jim C, Dimitoglou G (2019) Development of an efficient network intrusion detection model using extreme gradient boosting (xgboost) on the unsw-nb15 dataset. In: IEEE international symposium on signal processing and information technology (ISSPIT)

  66. Bagui S (2019) Using machine learning techniques to identify rare cyber-attacks on the unsw-nb15 dataset. Secur Privacy 2:91

    Article  Google Scholar 

  67. Kasongo S, Sun Y (2019) Performance analysis of intrusion detection systems using a feature selection method on the unsw-nb15 dataset. J Big Data 7:105

    Article  Google Scholar 

  68. Jing D, Chen H (2019) Svm based network intrusion detection for the unsw-nb15 dataset. In: IEEE 13th international conference on ASIC (ASICON)

Download references

Acknowledgements

This work was funded in part by the Liaoning Provincial Department of Education Research under Grant LJKZ0208, in part by the Scientific Research Foundation for Advanced Talents from Shenyang Aerospace University under Grant 18YB06, and National Basic Research Program of China Under Grant JCKY2018410C004.

Funding

This work was funded in part by the Liaoning Provincial Department of Education Research under Grant LJKZ0208, in part by the Scientific Research Foundation for Advanced Talents from Shenyang Aerospace University under Grant 18YB06, and National Basic Research Program of China Under Grant JCKY2018410C004.

Author information

Authors and Affiliations

Authors

Contributions

Applicable for submissions with multiple authors.

Corresponding author

Correspondence to Han Qi.

Ethics declarations

Conflict of interest

Always applicable and includes interests of a financial or personal nature.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix A: QCNN

The circuit structure of QCNN model applied in this paper is shown in Fig. 13. Figure 13 is a 10-qubit QCNN model with multiple convolution filters and pooling operations in each layer. Among them, the convolution filter we selected is circuit 10 in Fig. 6, and the pooling circuit we selected is (b) in Fig. 7. Given a quantum state \(\rho _\textrm{in} \), after four layers of convolution pooling operation, the user-defined cost function is calculated using the measurement results of the quantum circuit. The classical computer is used to calculate a new set of parameters based on gradient, and the parameters of the subsequent round of quantum circuit are updated accordingly.

Fig. 13
figure 13

The circuit structure of QCNN model

Appendix B: The experimental results of 10 convolution circuits

In this part, we give the experimental results of these 10 convolution circuits. For each combination of convolution and pooling operations, five groups of data are obtained from the random initialization of trainable parameters, and Tables 8, 9, 10, and 11 are obtained. They are divided into two groups. Tables 8 and 9 show the accuracy and FAR obtained by applying the first pooling operation to the VQNN–QCNN model. Tables 10 and 11 show the accuracy and FAR obtained by applying the second pooling operation to the VQNN–QCNN model. And we give the time for each combination to iterate over one time dataset.

From Tables 8 and 10, it can be seen that the experimental effect is improved with the increase in parameters. The best experimental effect is circuit 9, and the worst experimental effects are circuit 1 and circuit 2. However, the iteration time of circuit 7, circuit 8, and circuit 9 is too long. So we finally choose convolution circuit 10 as the convolution filter of the VQNN–QCNN model.

Table 8 Accuracy obtained by applying the first pooling operation
Table 9 FAR obtained by applying the first pooling operation
Table 10 Accuracy obtained by applying the second pooling operation
Table 11 FAR obtained by applying the second pooling operation

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gong, C., Guan, W., Zhu, H. et al. Network intrusion detection based on variational quantum convolution neural network. J Supercomput (2024). https://doi.org/10.1007/s11227-024-05919-y

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11227-024-05919-y

Keywords

Navigation