Variational quantum circuits are said to buy richer decision boundaries for fewer parameters than a classical network needs, and intrusion detection on network flows is among the tasks where that claim is made most often. What backs it up is thinner than the publication count suggests: hybrid quantum IDS papers typically show one training run against loosely specified baselines, leaving no way to separate an architectural effect from run-to-run variance. We report a controlled evaluation of a hybrid quantum- classical detector, Q-NIDS, across three configurations sharing one preprocessing pipeline. Two use CICIDS2017 with a six-qubit circuit combining data re-uploading, a learnable entanglement topology and quantum recurrent memory gates; the third scales to eight qubits on BigFlow-NIDS, a 66.9-million-flow NetFlow corpus, using a batched state-vector simulator matching PennyLane's lightning.qubit to 9.7 × 10-8. On CICIDS2017 the calibrated model reaches 87.97% accuracy and 49.09% macro F1, exceeding a 1D-CNN (40.52 ± 0.83%), an LSTM (39.06 ± 2.04%) and an MLP (37.98 ± 3.97%) trained on identical data, but falling 12.47 points short of a Random Forest (61.56 ± 0.20%). Three findings cut against the usual story. Most of the margin over the neural baselines is bought by post-hoc prior adjustment, a classical correction worth 8.11 macro-F1 points. The learnable entanglement topology never trains: a non-differentiable branch in gate selection cuts its gradient path, after which an unopposed entropy regulariser drives the adjacency matrix to a value where every conditional gate switches off. On BigFlow-NIDS an ablated control with the quantum layer deleted reaches 10.79% macro F1 against the full model's 12.53%, a margin too narrow to credit to quantum processing. We report all of it, failed configurations included, and argue that controls of this kind belong in any hybrid quantum machine learning claim.
Variational quantum circuits are said to buy richer decision boundaries for fewer parameters than a classical network needs, and intrusion detection on network flows is among the tasks where that claim is made most often. What backs it up is thinner than the publication count suggests: hybrid quantum IDS papers typically show one training run against loosely specified baselines, leaving no way to separate an architectural effect from run-to-run variance. We report a controlled evaluation of a hybrid quantum- classical detector, Q-NIDS, across three configurations sharing one preprocessing pipeline. Two use CICIDS2017 with a six-qubit circuit combining data re-uploading, a learnable entanglement topology and quantum recurrent memory gates; the third scales to eight qubits on BigFlow-NIDS, a 66.9-million-flow NetFlow corpus, using a batched state-vector simulator matching PennyLane's lightning.qubit to 9.7 × 10-8. On CICIDS2017 the calibrated model reaches 87.97% accuracy and 49.09% macro F1, exceeding a 1D-CNN (40.52 ± 0.83%), an LSTM (39.06 ± 2.04%) and an MLP (37.98 ± 3.97%) trained on identical data, but falling 12.47 points short of a Random Forest (61.56 ± 0.20%). Three findings cut against the usual story. Most of the margin over the neural baselines is bought by post-hoc prior adjustment, a classical correction worth 8.11 macro-F1 points. The learnable entanglement topology never trains: a non-differentiable branch in gate selection cuts its gradient path, after which an unopposed entropy regulariser drives the adjacency matrix to a value where every conditional gate switches off. On BigFlow-NIDS an ablated control with the quantum layer deleted reaches 10.79% macro F1 against the full model's 12.53%, a margin too narrow to credit to quantum processing. We report all of it, failed configurations included, and argue that controls of this kind belong in any hybrid quantum machine learning claim.
Quantum machine learning (QML) for network intrusion detection (NIDS) is routinely reported to reach near-perfect accuracy, yet the most rigorous studies find that well-tuned classical models remain competitive, and that apparent quantum gains may be artefacts of classical dimensionality reduction and implicit regularisation rather than genuine quantum effects. We ask not whether a quantum model can post a high accuracy, but how quantum the advantage really is. We present a unified, reproducible QML-IDS benchmark evaluating hybrid variational quantum circuits and quantum-kernel SVMs against five honestly-tuned classical baselines across four standard NIDS datasets (NSL-KDD, UNSW-NB15, CICIDS2017, NF-ToN-IoT-v2) under one leakage-controlled protocol, with an equal-budget feature view, imbalance- and calibration-aware metrics with significance testing, and a simulated NISQ noise sweep. We introduce a quantum-attribution audit (parameter-matched classical controls, a random-feature kernel, and a regularisation sweep) that quantifies how much of any gain is genuinely attributable to the quantum component. Tuned classical models (Random Forest, XGBoost) match or exceed the quantum models on aggregate detection on every dataset, and the audit attributes this to classical preprocessing and regularisation rather than quantum effects. Two advantages survive false-discovery-rate correction: the quantum-kernel SVM out-ranks its direct classical surrogate (a random-feature kernel) on AUPRC and ROC-AUC, and a small four-qubit hybrid out-detects the best classical baseline at the 1% false-positive operating point on the distribution-shifted NSL-KDD task (p = 0.005, BH q = 0.030). Code, seeds, and splits are released; our contribution stands whether quantum wins, ties, or loses.
Network intrusion detection systems (NIDS) must classify high-dimensional, heavily imbalanced traffic flows under tight operational constraints, and the flow features produced by modern capture tools routinely exceed the qubit budgets available on today’s noisy intermediate-scale quantum (NISQ) hardware. Existing quantum machine-learning (QML) detectors typically either assume that every extracted feature can be encoded on a dedicated qubit or apply generic dimensionality reduction that is blind to the downstream quantum encoder; in both cases the qubit budget — the binding constraint on real devices — never drives which features are encoded, and evaluation is frequently confined to ideal statevector simulation that omits shot noise, depolarizing error, and readout confusion. This paper presents ANHQ-IDS, an adaptive, noise aware hybrid quantum intrusion-detection framework that makes the qubit budget a first-class design constraint. A resource-constrained feature-selection stage scores candidate features through a composite objective jointly balancing mutual-information relevance, inter-feature redundancy, cross-split stability, and an explicit quantum-encoding cost, and greedily selects a subset sized to a target qubit budget rather than fixed a priori. The retained features are embedded through parameterized angle and second-order (ZZ) feature maps and classified by a hardware-efficient variational quantum classifier (VQC) trained with gradient-free optimizers (COBYLA and SPSA) under finite-shot sampling. To characterize behaviour under realistic hardware conditions, the classifier is evaluated on a statevector reference and under synthetic depolarizing and readout-error models, and benchmarked on CIC-IDS2017 against classical baselines (logistic regression, random forest, support vector machine) using a leakage-resistant train/validation/test protocol. On a class-balanced CIC-IDS2017 benchmark, the ZZ-encoded VQC attains macro-F1 0.766 and ROC-AUC 0.853 under exact simulation — exceeding logistic regression (0.502) and approaching a support-vector baseline, while a random forest remains strongest (0.964); performance degrades gracefully under depolarizing and readout noise, consistent with the predicted (1−p) contraction. All preprocessing, feature-selection, and quantum-training components are released as a reproducible Qiskit package with fixed seeds and recorded circuit-resource metadata (qubits, depth, gate and parameter counts).
Unsupervised anomaly-based intrusion detection requires models that can generalize to attack patterns not observed during training. This work presents the first large-scale evaluation of hybrid quantum-classical (HQC) autoencoders for this task. We construct a unified experimental framework that iterates over key quantum design choices, including quantum-layer placement, measurement approach, variational and non-variational formulations, and latent-space regularization. Experiments across three benchmark NIDS datasets show that HQC autoencoders can match or exceed classical performance in their best configurations, although they exhibit higher sensitivity to architectural decisions. Under zero-day evaluation, well-configured HQC models provide stronger and more stable generalization than classical and supervised baselines. Simulated gate-noise experiments reveal early performance degradation, indicating the need for noise-aware HQC designs. These results provide the first data-driven characterization of HQC autoencoder behavior for network intrusion detection and outline key factors that govern their practical viability. All experiment code and configurations are available at https://github.com/arasyi/hqcae-network-intrusion-detection.
Quantum machine learning (QML) is increasingly investigated for network intrusion detection, but the practical value of current quantum models remains uncertain because many studies rely on small simulated data sets, idealized execution, weak classical baselines, or isolated accuracy comparisons. This study develops and evaluates a resource-aware hybrid quantum-classical intrusion detection framework that combines fixed fidelity quantum kernels, repaired Quantum Kernel Alignment (QKA), a Variational Quantum Classifier (VQC), LightGBM, prototype-based kernel reduction, and probabilistic stacking. Experiments use the UNSW-NB15 benchmark under a leakage-aware preprocessing protocol and repeated evaluation across five random seeds. The experimental program covers 4- and 6-qubit representations, multiple training sizes, prototype budgets, and finite-shot configurations, yielding 260 experimental configurations/runs. The strongest quantum-assisted model, a 6-qubit QKA-VQC-LightGBM stack at 100 samples per class, obtains mean F1=0.8480, MCC=0.7092, ROC-AUC=0.9398, and PR-AUC=0.9302. Repaired QKA improves F1 from 0.8043 for the corresponding fixed kernel to 0.8089, while 50-prototype QKA attains F1=0.8257 with a more favorable kernel-workload trade-off than larger prototype budgets. Finite-shot experiments between 1,024 and 4,096 shots remain stable in simulation. However, full-data LightGBM remains stronger overall (F1=0.8957, MCC=0.8068, ROC-AUC=0.9755, PR-AUC=0.9704), and corrected statistical tests do not establish general quantum superiority. These findings motivate a Selective Quantum Intrusion Detection System (S-QIDS), in which classical inference handles high-confidence traffic and quantum processing is reserved for uncertain, novel, or high-risk observations. The study therefore reframes near-term quantum intrusion detection from unconditional quantum advantage toward measurable quantum utility, quantum-classical complementarity, and resource-aware quantum intervention.
Quantum Neural Network (QNN) provides an exciting alternative to machine learning as they take advantage of quantum computer properties when making decisions and processing data. However, the integration of high-dimensional classical data with the limited number of qubits available on current Noisy Intermediate-Scale Quantum computers presents a major difficulty. This paper presents a complete hybrid quantum-classical architecture in Qiskit that utilizes the Network Security Laboratory-Knowledge Discovery and Data Mining (NSL-KDD) dataset to classify network intrusions among multiple classes. In order to work around the exponential cost of computations and reduce the number of times quantum circuits need to be run due to hardware limitations, a subset of the dataset will be created to use during both training and testing. The architecture proposed in this paper uses a four-qubit Variational Quantum Circuit (VQC). First, a classical feature vector is used to create a quantum Hilbert space via a ZZFeatureMap, which initializes the qubits via a Hadamard transformation followed by phase rotation gates that create controlled-entanglement between pairs of features. The quantum states are then passed through a RealAmplitudes variational circuit, while the classical layer optimizes the parameters using the Constrained Optimization BY Linear Approximations (COBYLA) algorithm. The overall accuracy of the model when tested on five classes of intrusion detection results in an accuracy level of 59%, with very strong classification accuracies for both Denial of Service (DoS) and User-to-Root (U2R) attacks as demonstrated by their F1 scores. The proposed QNN achieves a highly competitive baseline of 86% accuracy and 86% recall in specific configurations. These results underscore the potential of shallow, lower-complexity QNN architectures as an emergent tool for cybersecurity in the quantum era.
The rapid expansion of the Internet of Things in critical industrial environments has significantly increased the attack surface, exposing systems to sophisticated cyber threats. Traditional pattern-based intrusion detection systems struggle to detect such advanced attacks, while deep learning approaches, despite achieving high detection accuracy, often suffer from high computational cost and latency, limiting their deployment in resource-constrained edge gateways. Quantum machine learning offers a promising alternative by enabling high-dimensional feature representation; however, current implementations are constrained by hardware noise, limited qubit availability and backend-dependent execution characteristics in the Noisy Intermediate-Scale Quantum era. To address these challenges, this paper proposes a Residual Hybrid Quantum-Classical Neural Network (RHQ-CNN) for efficient intrusion detection in Edge-Industrial Internet of Things (Edge-IIoT) environments under idealized quantum simulation conditions. The proposed framework employs a classical neural network encoder to compress high-dimensional network traffic into a compact latent representation suitable for quantum processing. A variational quantum circuit with serial data re-uploading is then utilised to model complex non-linear decision boundaries without increasing qubit requirements. In addition, a residual connection fuses classical and quantum representations to improve training stability and preserve latent feature information. The model is evaluated on the Edge-IIoTset dataset and achieves a test accuracy of 99.94%, with high weighted performance across the 15-class detection task, although the extremely low-sample Fingerprinting class remains comparatively more challenging. Additional controlled ablation, deployment-cost, and bootstrap confidence interval analyses demonstrate the test-set metric stability and computational trade-offs of the proposed architecture. These findings highlight the potential of hybrid quantum-classical models for next-generation cybersecurity in industrial IoT systems.