Abstract
This study explores the application of Quantum Machine Learning (QML) to the domain of cybersecurity, specifically malware classification. We compare two hybrid architectures—Quantum Multilayer Perceptrons (QMLP) and Quantum Convolutional Neural Networks (QCNN)—across diverse, high-dimensional datasets including API-Graph, EMBER, and AZ. Our results indicate that while both models achieve high accuracy (95-96%) in binary classification, QMLP demonstrates superior robustness in multiclass scenarios. Conversely, QCNN offers significant training efficiency but struggles with information loss during qubit pooling in complex tasks. This work establishes a foundation for utilizing NISQ-era quantum circuits in real-world security applications.
Introduction
Classical machine learning (CML) is the current standard for malware detection. However, the increasing complexity of malicious code has led researchers to investigate the potential "quantum advantage." Unlike standard QML benchmarks like MNIST, malware data is high-dimensional and structured, posing significant encoding challenges. Furthermore, current hardware operates in the Noisy Intermediate-Scale Quantum (NISQ) regime, characterized by low qubit counts and high error rates. This paper evaluates whether hybrid quantum-classical models can effectively classify malware under these constraints.
Methods
Two hybrid architectures were implemented using the PennyLane framework:
- Quantum Multilayer Perceptron (QMLP): Employs "data re-uploading," where input features are repeatedly injected into the circuit to introduce non-linearity. It measures all 16 qubits to maintain a dense feature representation.
- Quantum Convolutional Neural Network (QCNN): Utilizes quantum gates for convolutional operations followed by pooling layers that discard qubits, mirroring classical CNN architectures to enhance computational efficiency.
The workflow begins with data preprocessing, where Principal Component Analysis (PCA) reduces thousands of features to 16 components. These are encoded into the quantum state via Angle Embedding. The quantum circuit (QNode) then processes the data through trainable rotation gates and entanglement (CRX gates) before a final classical linear layer performs classification.
Results and Discussion
The models were evaluated on five large-scale datasets covering Windows and Android platforms. In binary classification (benign vs. malicious), both models performed exceptionally, reaching 96.0% accuracy on the API-Graph dataset.
However, a "multiclass wall" emerged for the QCNN model. As shown in the performance data, QCNN's accuracy significantly degrades as the number of classes increases. For example, on the 23-class AZ-Class dataset, QCNN accuracy fell to 41.7%, whereas QMLP maintained 57.8% accuracy. This suggests that the aggressive dimensionality reduction in QCNN's pooling layers may discard critical semantic information necessary for fine-grained classification.
Despite the heavy compression of features via PCA, the high accuracy in binary tasks suggests that quantum circuits are remarkably adept at identifying salient features within noisy security data. QMLP stands out for its expressivity and representational capacity, while QCNN is noted for its training speed.
Conclusion
This research demonstrates the viability of QML for malware analysis beyond simple toy datasets. While hardware limitations like decoherence remain, hybrid models show promise in handling structured security data. Future work will investigate more efficient encoding methods, such as Amplitude Embedding, and evaluate performance on actual quantum hardware.
Summary updated