Benchmarking Classical and Quantum Machine Learning for Intrusion Detection Across Multiple Datasets
The study compares classical and quantum ML models for intrusion detection across three datasets, highlighting the importance of preprocessing and quantum‑aware feature selection for quantum models.

Introduction
Intrusion detection systems (IDS) are a cornerstone of network security, and machine learning (ML) has become a primary tool for spotting malicious traffic. A recent benchmark examines how classical and quantum ML approaches perform on three widely used IDS datasets—NSL‑KDD, UNSW‑NB15, and MQTTEEB‑D2025—while keeping the data‑processing pipeline consistent. By varying preprocessing steps, feature‑selection methods, and quantum encoding schemes, the authors reveal where quantum models excel, where they lag, and how practical considerations such as computational cost influence deployment decisions.
Unified preprocessing pipeline
A single end‑to‑end workflow is applied to all datasets to isolate the impact of the learning algorithms themselves. The pipeline includes:
- Normalization – features are scaled to a common range, which is essential for kernel‑based methods and for quantum state preparation.
- Class‑imbalance handling – synthetic minority oversampling (SMOTE) is used to mitigate the skewed distribution of attack versus benign samples.
- Dimensionality reduction – principal component analysis (PCA) reduces noise while preserving the majority of variance, easing the burden on quantum hardware with limited qubit counts.
- Feature selection – two strategies are compared:
Random Forest importance – a classical, model‑agnostic ranking based on impurity reduction. Quantum‑aware QKA‑MI – a hybrid method that aligns quantum kernel similarity with mutual information, selecting features that both preserve classical relevance and enhance quantum kernel expressivity.
The consistent pipeline ensures that any performance differences stem from the classifiers and the way they interact with the chosen features.
Classifiers under test
Four models are evaluated on each dataset:
| Model | Type | Key characteristics | |-------|------|----------------------| | Support Vector Machine (SVM) | Classical | Linear or RBF kernel, well‑established baseline | | Random Forest (RF) | Classical | Ensemble of decision trees, robust to noisy features | | Quantum Support Vector Machine (QSVM) | Quantum | Implements a quantum kernel via a variational circuit; sensitive to feature encoding | | Pegasos Quantum SVM (PQ‑SVM) | Quantum | Stochastic gradient descent formulation of QSVM; offers a trade‑off between accuracy and runtime |
The quantum models are executed on a simulated noiseless quantum processor, allowing a focus on algorithmic behavior rather than hardware noise.
Key findings
Classical models are stable across datasets
Both SVM and RF deliver comparable detection rates on NSL‑KDD, UNSW‑NB15, and MQTTEEB‑D2025. Their performance is relatively insensitive to the feature‑selection method, reflecting the robustness of classical kernels and ensemble learning to variations in input representation.
Quantum models depend heavily on feature representation
QSVM shows strong accuracy on the cleaner NSL‑KDD dataset when paired with the QKA‑MI selected features, but its performance drops noticeably on the noisier UNSW‑NB15 and MQTTEEB‑D2025 sets. This sensitivity underscores the importance of aligning quantum kernels with the underlying data distribution.
Quantum‑aware feature selection yields gains
When the QKA‑MI method is used, both quantum classifiers improve by 3–5 percentage points on NSL‑KDD and modestly on UNSW‑NB15. The improvement is less pronounced on MQTTEEB‑D2025, suggesting that highly heterogeneous traffic may require more sophisticated encoding or larger quantum circuits.
Pegasos Quantum SVM balances accuracy and cost
PQ‑SVM attains near‑QSVM accuracy on NSL‑KDD while requiring roughly half the training time, making it a more practical option for real‑time IDS deployment. On the noisier datasets, its speed advantage persists, though accuracy converges toward the classical baselines.
Practical implications
The benchmark highlights several take‑aways for practitioners considering quantum ML for IDS:
- Preprocessing matters – Normalization, imbalance correction, and dimensionality reduction are prerequisites for both classical and quantum pipelines.
- Feature selection is a lever for quantum advantage – Quantum‑aware methods that consider kernel alignment can unlock performance gains, especially on cleaner data.
- Hardware constraints shape model choice – Simpler quantum algorithms like PQ‑SVM may offer a more feasible path forward until larger, lower‑noise quantum processors become widely available.
- Hybrid deployments are realistic – Combining classical preprocessing and feature selection with quantum classifiers can yield incremental improvements without overhauling existing IDS infrastructure.
Conclusion
The comparative study demonstrates that while classical ML remains a reliable workhorse for intrusion detection, quantum models can provide competitive accuracy when the data preprocessing pipeline is carefully tuned. Quantum‑aware feature selection emerges as a critical component for extracting the most from quantum kernels. As quantum hardware matures, the insights from this benchmark will help guide the integration of quantum ML into next‑generation security systems, balancing performance gains against computational overhead.
Source
Read original sourceWhy we picked this
AI relevance scoring was unavailable; retained a source-matched candidate for manual review.