Training a Quantum Annealing Based Restricted Boltzmann Machine on Cybersecurity Data

Vivek Dixit, Raja Selvarajan, Tamer Aldwairi, Yaroslav Koshka, Mark A. Novotny, Travis S. Humble, Muhammad Ashraful Alam, Sabre Kais

TL;DR

This paper explores using quantum annealing (QA) to train Restricted Boltzmann Machines (RBMs) for cybersecurity intrusion detection. They demonstrate that QA-trained RBMs can effectively learn patterns from imbalanced cybersecurity data and generate synthetic data to improve classifier performance, offering a potential speedup over traditional methods.

What Problem Does This Paper Address?

Cybersecurity is a critical and growing concern, with financial losses from cybercrime projected to reach nearly a trillion dollars annually. Detecting network intrusions is a key aspect of cybersecurity, but it's hampered by two main challenges: the inherent insecurity of network communication and the imbalanced nature of cybersecurity datasets. These datasets often have a vast majority of "benign" traffic and a small fraction of "attack" traffic, making it difficult for machine learning models to learn to detect attacks effectively. Traditional methods for training RBMs, like contrastive divergence (CD), can be computationally expensive and may not always capture the underlying data distribution optimally.

Methods

The core of this research lies in training Restricted Boltzmann Machines (RBMs) using two distinct methods:

  • Contrastive Divergence (CD): This is a standard, widely used algorithm for training RBMs. The paper uses CD-1, a common variant.
  • Quantum Annealing (QA): This approach leverages the D-Wave 2000Q quantum annealer. The RBM model is mapped onto the quantum annealer's hardware, and quantum annealing is performed to find low-energy states that represent the model's parameters. This is fundamentally different from CD as it exploits quantum phenomena like superposition and tunneling.

The paper also explores two schemes to address the imbalanced dataset problem:

  1. Undersampling: The training dataset is divided into smaller, balanced sub-datasets. RBMs are trained on each sub-dataset, and a majority vote of their predictions is used to determine the final classification.
  2. Synthetic Data Generation: RBMs (trained via both CD and QA) are used to generate synthetic data. This synthetic data is then used to augment the original training data, creating a balanced dataset for training classifiers.

Datasets

The primary dataset used in this study is the ISCX IDS dataset 2012. This dataset was preprocessed and binarized. The original dataset contained 137,584 instances, which were reduced to 25,230 unique records (20,313 benign and 4,917 attack) after removing duplicates. The training set comprised 29,147 unique records, and the test set consisted of 500 attack and 500 benign records.

Key Insights and Ideas

  • Quantum Annealing for RBMs is Feasible: The paper successfully demonstrates that RBMs can be trained using quantum annealing on a cybersecurity dataset, proving the concept's viability.
  • Synthetic Data Generation: RBMs, whether trained with CD or QA, can generate useful synthetic data that accurately reflects the training data's distribution. This is a significant advantage over methods like SMOTE, which might not preserve the original data distribution.
  • Balancing Datasets Improves Performance: Both undersampling and synthetic data generation schemes significantly improve classification accuracy, highlighting the critical need to address dataset imbalance in cybersecurity.
  • QA Offers Potential Speed Advantages: While not directly quantified in terms of training time for the entire RBM, the paper notes that quantum annealers can generate samples almost instantaneously, which could lead to faster RBM training in the future, especially as quantum hardware improves.
  • QA's Unique Sampling Capabilities: Previous work (cited in the paper) suggests QA sampling can explore configuration spaces that MCMC-based methods (like CD) might miss, potentially leading to better model learning.

Key Results

  • Scheme 1 (Undersampling + Majority Vote):
    • With CD-trained RBMs, majority voting increased accuracy from 90.24% to 95.68%.
  • With QA-trained RBMs, majority voting increased accuracy from 74.14% to 80.04%.
  • Scheme 2 (Synthetic Data Generation):
    • When using synthetic data to balance the training set and then training various classifiers, K-Nearest Neighbor (KNN) and Neural Networks (NN) achieved the highest accuracy of 93%.
  • RBMs trained on synthetic data generated by QA-trained RBMs showed classification accuracies comparable to those trained on synthetic data from CD-trained RBMs.
  • Performance Comparison: The paper notes that while QA-trained RBMs showed lower accuracies than CD-trained RBMs in Scheme 1, the QA approach is still promising, especially considering the current limitations of quantum hardware.

Limitations and Future Work

  • QA Hardware Limitations: The D-Wave 2000Q has a limited number of qubits (2048) and a specific connectivity graph (Chimera), which restricts the size and complexity of the RBM that can be embedded. This necessitates feature reduction or using more complex embedding strategies.
  • Instance-Dependent Temperature: The paper acknowledges that an "instance-dependent effective temperature" for the D-Wave annealer is not precisely calculated, and a fixed hyperparameter is used. This mismatch might degrade learning performance. Developing an accurate method to estimate this temperature is a key area for future work.
  • Noise and Coherence: Current quantum annealers are subject to noise and have limited coherence times, which can impact the quality of samples and thus the RBM training.
  • Future Work Suggestions:
    • Improving QA-based RBM training by optimizing D-Wave annealing parameters.
  • Developing efficient procedures to determine the quantum annealer's effective temperature.
  • Leveraging newer quantum annealers with more qubits and better connectivity for larger datasets and more complex RBMs.
  • Exploring other quantum machine learning approaches for cybersecurity.

Summary updated

Abstract

We present a real-world application that uses a quantum computer. Specifically, we train a RBM using QA for cybersecurity applications. The D-Wave 2000Q has been used to implement QA. RBMs are trained on the ISCX data, which is a benchmark dataset for cybersecurity. For comparison, RBMs are also trained using CD. CD is a commonly used method for RBM training. Our analysis of the ISCX data shows that the dataset is imbalanced. We present two different schemes to balance the training dataset before feeding it to a classifier. The first scheme is based on the undersampling of benign instances. The imbalanced training dataset is divided into five sub-datasets that are trained separately. A majority voting is then performed to get the result. Our results show the majority vote increases the classification accuracy up from 90.24% to 95.68%, in the case of CD. For the case of QA, the classification accuracy increases from 74.14% to 80.04%. In the second scheme, a RBM is used to generate synthetic data to balance the training dataset. We show that both QA and CD-trained RBM can be used to generate useful synthetic data. Balanced training data is used to evaluate several classifiers. Among the classifiers investigated, K-Nearest Neighbor (KNN) and Neural Network (NN) perform better than other classifiers. They both show an accuracy of 93%. Our results show a proof-of-concept that a QA-based RBM can be trained on a 64-bit binary dataset. The illustrative example suggests the possibility to migrate many practical classification problems to QA-based techniques. Further, we show that synthetic data generated from a RBM can be used to balance the original dataset.
BibTeX
@article{dixit2022training,
  author = {Vivek Dixit and Raja Selvarajan and Tamer Aldwairi and Yaroslav Koshka and Mark A. Novotny and Travis S. Humble and Muhammad Ashraful Alam and Sabre Kais},
  title = {{Training a Quantum Annealing Based Restricted Boltzmann Machine on Cybersecurity Data}},
  journal = {IEEE Trans. Emerg. Top. Comput. Intell},
  year = {2022},
  doi = {10.1109/tetci.2021.3074916},
}
Figure