WorksComputer Science
Operationalizing Quantum Machine Learning for IoT Network Intrusion Detection
Abstract
The rapid growth of the Internet of Things (IoT) has increased networked systems' exposure to cyber threats, making Network Intrusion Detection Systems (NIDSs) essential for securing heterogeneous environments. While Deep Learning (DL) has shown strong performance in traffic analysis, Quantum Machine Learning (QML) has recently gained attention as an alternative approach to learn complex traffic patterns. We assess QML's practical applicability to intrusion detection in heterogeneous IoT scenarios. We present a hybrid quantum-classical NIDS and evaluate it on three recent IoT security datasets, under operationally relevant conditions. Beyond detection accuracy, we compare QML with a classical DL baseline across five operational perspectives: (i) performance under data scarcity, (ii) transferability through cross-domain evaluation, (iii) resilience to temporal constraints, (iv) robustness to quantum non-idealities across multiple noisy backends, and (v) prediction trustworthiness through calibration analysis. Experiments on binary and multiclass misuse detection show that DL generally outperforms QML under ideal and noisy conditions. However, QML remains competitive in data-scarcity and domain-shift scenarios and can outperform the DL baseline under temporal constraints.
Introduction
The widespread adoption of the Internet of Things (IoT) enables a broad range of services such as remote monitoring, smart infrastructures, and safety-critical applications [1]. The increasing number of interconnected devices, including wearables and smart home systems, has significantly expanded both the volume and heterogeneity of network traffic.1 However, the highly distributed and heterogeneous nature of IoT environments also enlarges the attack surface available to malicious actors. Cyberattacks targeting IoT systems may lead to severe consequences, including privacy breaches, financial losses, service disruption, and threats to human safety [2]. Consequently, significant research efforts have focused on developing solutions that detect cyber threats in a timely and reliable manner. Among them, Network Intrusion Detection Systems (NIDSs) are designed to distinguish legitimate network activities from malicious traffic and identify the specific type of attack carried out by the adversary. However, traditional approaches often struggle to cope with the increasing complexity, scale, and encryption of modern network traffic. Machine Learning (ML) and, more recently, Deep Learning (DL) techniques have become central to modern NIDSs, especially in IoT scenarios, where the proliferation of connected devices considerably expands the attack surface. Quantum Computing (QC) represents
To address these challenges, we first discuss QML for network intrusion detection and position our contribution with respect to prior work. Then, we present the proposed hybrid quantum–classical NIDS and the experimental methodology. Finally, we evaluate the framework through the five OCs to identify practical QML opportunities and limitations for IoT network intrusion detection. Data and code to reproduce all results are available at https://github.com/viciEnzoh/qml-nids.
The Advent of Quantum-Enhanced Network Intrusion Detection
Detecting attacks in network traffic is critical in IoT environments, where malicious activities can cause data leakage, service disruption, and economic losses. Traditional ML and DL approaches have proven highly effective in addressing cybersecurity tasks [2]. However, their deployment in real-world IoT environments remains challenging due to severe resource constraints and the growing scale and heterogeneity of network traffic. These limitations have motivated QC-based alternatives, with QML emerging as a promising direction for network security [8]. Recent studies have explored QML for attack detection and classification [4, 9, 10], but several operational challenges remain poorly addressed. First, most existing approaches rely on statistical (post-mortem) features extracted from complete traffic aggregates (e.g., flows or biflows). Consequently, attacks are often detected only after communication has ended, limiting the NIDS ability to react promptly and mitigate potential damage. The behavior of QML models under limited training data also remains largely unexplored, despite being a common condition in cybersecurity, especially for rare or zero-day attacks. Generalization of QML models remains under-researched as well. Addressing this gap is key to a “one NIDS to detect them all” paradigm [11, 12], where a single framework generalizes across heterogeneous network environments without retraining. Another critical challenge is the resilience to temporal constraints. In operational settings, reducing detection latency implies temporally-constrained traffic visibility, forcing NIDSs to decide before attack signatures fully manifest. This trade-off between responsiveness and detection accuracy has been studied for classical ML/DL models but has received limited attention in QML. Beyond these operational challenges, deploying QML in real-world network security environments is still limited by current quantum hardware. While deployment is restricted by the limited availability and scale of actual quantum computers, current Noisy Intermediate-Scale Quantum (NISQ) devices also suffer from noise and qubit decoherence, which can corrupt measurements and degrade NIDS effectiveness. Recent studies using simulated and real quantum hardware [5, 6] provide limited insights into how hardware-induced noise affects model reliability. Hence, the trustworthiness of QML-based NIDSs under noisy hardware remains an open challenge.
Positioning. This work extends our preliminary study [4], which investigated the early detection of a QML-powered NIDS under fixed packet visibility across two IoT datasets. Here, we broaden the evaluation to three IoT datasets spanning medical, industrial, and smart home domains under different data-scarcity regimes. We investigate key operational aspects previously overlooked. We assess the impact of limited traffic observation time on the NIDS performance via a maximum observation window. Then, we evaluate how quantum hardware noise and finite-shot sampling affect detection performance across multiple noisy quantum backends. Finally, we assess NIDS trustworthiness via calibration analysis to determine whether predictive confidence aligns with classification accuracy, thereby validating the system’s operational reliability.
Building the Quantum NIDS
The following describes the proposed hybrid classical–quantum pipeline for early NIDS, focusing on the quantum components of the architecture (Path B in Figure 1).

Figure 1. End-to-end hybrid pipeline for multi-domain IoT NIDS. Each domain is represented by a distinct dataset. After traffic segmentation and pre-processing, the pipeline splits into two paths: (A) DL and (B) QML, the latter featuring a classical backbone-based dimensionality reduction, a quantum variational circuit, and a classical classification head. The quantum variational circuit consists of: (i) a feature map (AMP, ANG), (ii) an ansatz (SEL), and (iii) a measurement process, executed over a fixed number () of shots. The framework maps network traffic to threat intelligence, distinguishing benign from attack traffic (e.g., DDoS, Malware), while addressing five Operational Challenges (OCs): (OC1) data efficiency, (OC2) cross-domain generalization, (OC3) resilience to temporal constraints, (OC4) robustness to noise and sampling errors, and (OC5) trustworthiness assessment. Circuit complexity is characterized in terms of circuit depth () and number of trainable parameters ().
Hybrid classical/quantum NIDS pipeline. Network traffic is segmented into bidirectional flows (biflows) based on the standard five-tuple. The NIDS input is derived from header fields extracted from the first packets of each biflow, i.e., without inspecting payloads. The NIDS performs early detection, enabling the identification of malicious activity before the attack is fully established. To optimize response time, biflows can be processed in parallel across both classical and quantum layers, provided sufficient resources, viz., qubit counts, are available. Biflows are used to feed a hybrid DL/QML-based model. Structurally, the model pipeline is composed as follows: (i) a classical Backbone compressing data to satisfy quantum input constraints, (ii) a Quantum Circuit processing the compressed data, and (iii) a final Classification Layer providing the output label. The framework can scale to (i) higher-dimensional features via backbone compression tailored to feature-map requirements, and (ii) larger deployments by extending the classification layer for a wider attack spectrum.
Attack Detection and Classification via Quantum Neural Networks (QNNs). QC relies on qubits, through properties like superposition and entanglement, for optimized information encoding. To achieve this, QML effectively exploits quantum mechanics principles by employing parameterized quantum circuits in complex input processing. In this context, QML employs parameterized circuits to model complex nonlinearities by projecting classical data into higher-dimensional Hilbert spaces [3, 8]. QNNs represent the most common approach [13, 14], thanks to their reduced architectural complexity and low parameter footprint. As shown in the Quantum Circuit block of Figure 1, these networks are based on three fundamental elements: (i) a feature map, (ii) an ansatz, and (iii) a measurement process. The feature map translates classical data into a quantum representation (quantum encoding). In this work, we consider two popular strategies: (i) Amplitude embedding (AMP𝑒), that encodes a normalized feature vector into the probability amplitudes of a quantum state offering a highly compact data representation; (ii) Angle embedding (ANG𝑒), that converts features into rotation angles, requiring one qubit per field. The ansatz is the trainable component of the quantum layer. It consists of sequential layers composed of rotation gates, whose angles represent the weights, adjusted during optimization. Each layer consists of single- and multi-qubit gates. Quantum processing outputs are converted back into a classical representation through a measurement process. In this work, the circuit produces a probability vector of size , where is the number of qubits, with each entry representing the probability of measuring a specific computational basis state. This joint representation captures both individual qubit behavior and entanglement-induced correlations. Crucially, under noisy conditions, empirical probability estimation via finite measurements ( shots) affects overall runtime latency rather than structural circuit complexity. Finally, the probability vector feeds a classification stage, where softmax produces class probabilities, and the most likely label identifies benign traffic or a specific attack. Training follows classical gradient-based optimization, minimizing a loss function between the predicted soft output and the one-hot encoded ground truth.
Experimental Setup
Datasets. To ensure a comprehensive evaluation, our analysis spans three distinct IoT domains: medical, industrial, and smart home. This allows us to characterize the specific threat landscape of each domain and to practically assess cross-domain NIDS portability. Accordingly, we leverage three IoT datasets, each corresponding to one of the aforementioned domains: CIC-IoMT2024 (IOMT), EDGE-IIoT (EDGE), and IoT-NIDD (NIDD). These datasets encompass benign traffic, and 16, 13, and 9 distinct attack types across approximately 604k, 731k, and 201k biflows, respectively, covering a broad spectrum of network threats, e.g., (D)DoS, Man-in-the-Middle, Injection, and Malware. For each biflow, we extract 4 header fields from the first packets: Packet Direction (DIR), Packet Size (PS), TCP Window Size (WIN), and Inter Arrival Time (IAT). We consider 10 packets, as they provide a suitable trade-off between earliness and detection capabilities.
Proposed Models. We compare the performance of a classical DL architecture against various QML configurations. As a robust baseline for binary and multiclass misuse detection, we consider CNN+LSTM [15], which consists of alternating convolutional and pooling layers followed by an LSTM layer. The QML models leverage AMP and ANG feature maps, preceded by an initial dense layer (DENSE) for data compression. For the variational component, we adopt the Strongly Entangling Layers ansatz. Furthermore, since AMP was found to be the most effective feature map in our evaluation, we introduce AMP (CNN+LSTM), an extended model that integrates DL-based data compression by leveraging a CNN+LSTM backbone before the AMP stage. In all hybrid models, the backbone acts as an independent dimensionality-reduction stage, decoupling the classical pipeline from the downstream quantum circuit. Notably, CNN+LSTM and the deep compression of AMP (CNN+LSTM) have the same structure but different bottleneck size, i.e., 100 and 32, respectively. Hence, they represent two complete model configurations, whose parameters are optimized independently during training. In line with qubit counts in the state of the art [6, 10], all simulations employ 5 qubits, due to NISQ-era constraints.
Quantum Devices Simulation. The models are implemented with the PennyLane simulation device default.qubit. Initial training is conducted in analytic mode to establish performance under ideal (Noiseless) conditions. However, to account for the inherent noise, decoherence, and gate errors characterizing NISQ devices, we extend the evaluation to noisy scenarios. We leverage the qiskit.aer simulator to reproduce the noise profiles of real IBM hardware (fake backends). Specifically, these noisy profiles represent static snapshots of real quantum processors, capturing the target’s physical error rates, qubit decoherence, and readout infidelity at a given point in their lifetime. Given a fake backend, expectation values are estimated from a finite number of shots (), approximating the probability distribution of the circuit’s basis states to account for operational hardware constraints. The analytic mode adopted for the Noiseless reference corresponds to . Thus, deviations from it jointly reflect (i) finite-shot measurement error, and (ii) simulated quantum device noise.
Evaluation Strategy. Evaluation follows the well-established stratified 5-fold cross-validation protocol. For each fold, we reserve 20% of the training data for validation and apply MinMax normalization fitted only on the training set to prevent data leakage. Experiments are conducted on both binary and multi-class misuse detection scenarios, leveraging the partial Area Under Curve (pAUC) and (macro) F1-score as primary metrics, respectively. The pAUC measures the (partial) area under the Receiver Operating Characteristic (ROC) curve for a fixed False Positive Rate (FPR) interval (pAUC at 1%FPR in our setup). We prioritize a low FPR threshold to meet operational requirements for network service continuity in real-world NIDS deployments, thus limiting false alarms. Conversely, the (macro) F1-score averages the harmonic means of per-class precision and recall, providing a balanced performance measure across both benign traffic and each specific attack class. It quantifies the NIDS capability not only to isolate benign from malicious traffic, but also to differentiate among attack types. Finally, we assess calibration in the multi-class scenario via the Expected Calibration Error (ECE), which quantifies the deviation between predicted confidence and actual accuracy using 10 bins over the maximum predicted class probabilities. A higher ECE indicates poorer calibration and lower reliability of the NIDS confidence estimates when distinguishing between traffic classes.
Operationalizing Quantum NIDS: Five Critical Perspectives
OC1: Data Efficiency. We first analyze the ability of models to generalize under limited training data. This setting reflects real-world IoT security scenarios, where emerging threats and zero-day attacks often lack sufficient samples for training NIDSs. To emulate these scenarios, we systematically vary the training set fraction and evaluate the resulting impact on performance. We vary , spanning one order of magnitude while retaining an adequate number of training samples. Figure 2 compares the binary (pAUC at 1% FPR) with the multi-class misuse detection performance (F1-score) for each QML model as the training set size increases. For comparison, we also include the results of the DL baseline (CNN+LSTM). Our analysis reveals three primary performance drivers that dictate the effectiveness of the proposed

Figure 2. F1-score vs. pAUC (FPR max. 1%) for DL and QML models on all datasets across distinct training data proportions (). Values are averaged across 5 folds.
architectures: (i) the expressivity of the feature map, (ii) the depth of the data-compression backbone, and (iii) the impact of the quantum processing. Among the quantum encoding strategies, ANGE is the least effective, particularly on IoMT and NIDD. On the former, for instance, performance does not exceed 54% F1-score and 61% pAUC, highlighting its limited capacity to capture complex threat patterns in these environments. In contrast, AMPe demonstrates superior representative power, achieving a F1-score (pAUC) of up to 69% (95%) on the same dataset. This encoding also highlights remarkable data efficiency: training on only 50% of the dataset yields performance within 3% of the model trained on the entire dataset, suggesting that quantum embedding captures the threat signatures with significantly fewer samples.
The data-compression performed by the backbone is equally decisive. In fact, by holding the AMPe feature map constant, we observe that transitioning from a shallow architecture (DENSE) to a deeper one (CNN+LSTM) triggers a significant performance boost, even under extreme data scarcity (), where the pAUC remains above 91% on IoMT. Interestingly, on EDGE, performance saturates at 50% training data, obtaining > 99.8% of pAUC. This suggests that a reduced, well-stratified training set acts as an implicit regularizer, enabling the model to ignore stochastic network fluctuations and prioritize extracting universal threat signatures.
Finally, the performance gap between CNN+LSTM and AMPe (CNN+LSTM), which are powered by the same backbone architecture, is at most 3% in F1-score and 1% in pAUC in full data regimes, highlighting the dominant role of the common compression structure. Still, as the two models do not share the parameters adjusted during training, this gap is not fully motivated by the quantum circuit alone. However, a notable disparity emerges under extreme data scarcity: at , the AMPe (CNN+LSTM) architecture exhibits a significantly lower F1-score than its classical counterpart, with a gap of on the NIDD dataset. This indicates that the quantum circuit requires more samples to achieve the same level of training stability as classical layers. Based on these findings, since AMPe (CNN+LSTM) demonstrates the highest overall effectiveness, we select it for subsequent in-depth analyses against the CNN+LSTM DL baseline.
OC2: Cross-domain Generalization. We conduct a cross-domain evaluation to assess the robustness of DL and QML models under domain shift. The goal is to determine whether the models can generalize to unfamiliar network environments without requiring site-specific retraining. This analysis is particularly important for practical NIDS deployment, since models trained and tested on the same network data distribution may unintentionally hide environment-specific patterns that limit their portability. In our evaluation, we train a model on a source dataset and evaluate it using benign biflows from the source domain and malicious biflows from a target domain (sourcetarget). This strategy allows us to assess whether attack patterns learned on the source network enable the detection of malicious traffic originating from different networks. Moreover, keeping benign samples from the source domain in both training and testing helps reduce false alarms after deployment [12]. Figure 3 shows the pAUC at 1% FPR for all sourcetarget pairs, comparing AMP (CNN+LSTM) and CNN+LSTM. The in-domain baseline is shown on the main diagonal, with both benign and malicious samples from the same dataset. As expected, in-domain performance is consistently high, with both models achieving a pAUC exceeding 95% across all datasets. This confirms that the architectures are highly effective when the training and testing distributions align. However, robustness to domain shift varies significantly across source datasets. Models trained on EDGE demonstrate superior portability, maintaining a pAUC of at least 67% across all unfamiliar environments. In contrast, training on NIDD leads to significant, and in some cases catastrophic, performance degradation (pAUC < 17%), with models struggling to distinguish benign from malicious traffic. This lack of generalization is likely due to the specific composition of NIDD, where approximately 80% of the biflows consist of a single packet. Such a limited observation window precludes the learning of complex temporal or structural patterns, forcing models to overfit to environment-specific artifacts that do not translate into portable attack representations. Comparing AMP (CNN+LSTM) and CNN+LSTM reveals considerable discrepancies in cross-domain generalization between the two configurations. In IoMTNIDD, AMP (CNN+LSTM) achieves +23% average pAUC compared to the DL baseline, yet it shows a 6% decrease in EDGEIoMT, suggesting that the quantum-enhanced feature mapping could extract more resilient cross-domain representations. However, the large standard deviations across folds make

Figure 3. pAUC (FPR max. 1%) of CNN+LSTM (left) and AMP (CNN+LSTM) (right) in cross-evaluation setup. Rows/columns denote source/target datasets, respectively. Values are mean std.dev. across 5 folds. Dashed boxes highlight configurations where ⌣ achieves higher pAUC than ⌢ in folds.
it challenging to identify a clear winner. Rather, a trend can be inferred from fold-by-fold inspection. Accordingly, Figure 3 also highlights cases where one model achieves higher pAUC in at least 4 out of 5 folds across several configurations. These results underscore that cross-domain robustness remains a critical, yet frequently overlooked, challenge.
OC3: Resilience to Temporal Constraints. We conduct a fine-grained analysis to assess the capability of the NIDS to provide accurate detection under limited traffic observation time, a critical factor for rapid threat mitigation and damage minimization to network equipment or users under attack. To simulate time-bounded observation, we enforce a maximum observation window for each biflow, whereby only packets observed within this window are used for inference. This operational setup differs from earliness since the latter restricts the analysis to a fixed packet count (), whereas imposes a hard temporal constraint. Consequently, if the first packets are not fully collected before expires, classification is triggered using only the available packets at that instant. Figure 4 depicts the F1-score achieved by CNN+LSTM and AMP (CNN+LSTM) models on all datasets as increases. We also include the “unconstrained” scenario (). The experimental results across different datasets reveal distinct behaviors regarding the sensitivity to the observation window . On EDGE, we observe a marginal performance gap of approximately 2% between AMP (CNN+LSTM) and CNN+LSTM when enforcing strict operational latency constraints (s). This discrepancy progressively narrows as increases, with both architectures performing similarly as early as s. Conversely, performance on NIDD remains largely invariant to the observation window. In fact, both models exhibit near-identical behavior regardless of , a result that aligns with our previous observation regarding the dataset’s composition: since the majority of biflows are extremely short, enforcing a temporal deadline has a negligible impact on the available information for detection. The most significant divergence occurs on IoMT. In the high-response regime (ms), AMP (CNN+LSTM) achieves a higher F1-score than CNN+LSTM, suggesting that quantum-enhanced feature mapping might be more effective at extracting threat signatures under limited traffic visibility. However, this trend reverses for , where the baseline emerges as the top-performing model. Notably, both models show increased instability for , as evidenced by the wider variance. This suggests that these time intervals capture a transition phase in which the available packets may not yet represent a stable fingerprint of the underlying threat. Lastly, when no responsiveness constraints are enforced on the system, the performance gap remains consistent, with CNN+LSTM outperforming AMP (CNN+LSTM) by F1-score.

Figure 4. F1-score of AMP (CNN+LSTM) and CNN+LSTM as the maximum observation window () increases. : unconstrained scenario. Values are avg. std. across 5 folds. x-axis is in log scale.
OC4: Robustness to Noise and Sampling Errors. Contemporary quantum hardware is inherently susceptible to environmental decoherence and gate-level errors, which act as signal distorters in a NIDS pipeline. To quantify the impact of physical noise and finite-shot sampling on detection capability, we compare the ideal simulation (Noiseless) against five noisy backends: FakeLagos (FLa), FakeNairobi (FN), FakeLondon (FLo), FakeFractional (FF), and FakeYorktown (FY). These backends are selected to span a wide spectrum of noise profiles, capturing the evolution of NISQ technologies from legacy platforms (e.g., FY) to mid-generation architectures (e.g., FLa and FN). This heterogeneity allows us to evaluate the framework under diverse physical conditions, including readout errors arising from imperfect qubit measurement and limited qubit coherence times, i.e., the duration a qubit retains its quantum state before undergoing environmental decoherence. Crucially, featuring up to 7 qubits, they align with our feature mapping dimensionality, ensuring a realistic assessment of physical NISQ constraints. Figure 5 depicts the F1-score of AMP (CNN+LSTM) across all datasets. We assess stochastic sampling by varying to evaluate the trade-off between measurement overhead and detection accuracy, identifying the minimum sampling depth required for satisfactory operational performance. As expected, is a primary performance driver, with scaling from 8 to 1024 generally yielding a substantial improvement in F1-score. A notable exception occurs on NIDD, where FLa and FY show a decreasing F1-score as increases. A possible interpretation is that, under high-noise conditions, e.g., high readout errors or short coherence times, increasing merely consolidates systematic hardware bias, potentially degrading performance. On the one hand, operating with only 8 shots is practically infeasible across all backends, with a gap of (e.g., FN on IoMT) compared to Noiseless, due to the combined effect of low-shot sampling variance and hardware noise. On the other hand, FN and FLo emerge as the most noise-resilient architectures. This likely stems from their efficient topologies (H- and T-shape) and modern native gates (CX/SX), yielding near-optimal performance with just 64 shots and approaching the baseline across almost all datasets (e.g., losing at most 2% with FN on IoMT and EDGE).

Figure 5. F1-score of AMP (CNN+LSTM) for different backends and shots (). —: Noiseless backend. Values are avg. \pm std. across 5 folds.
OC5: Trustworthiness Assessment. To assess the predictive reliability of the proposed pipeline under realistic deployments, we conduct a calibration analysis. While model calibration is paramount in classical NIDSs 2, evaluating it in the NISQ era is critical. In fact, hardware-induced noise, systematic biases, and gate inaccuracies directly corrupt the output probability distributions of quantum circuits, potentially leading to misaligned predictive confidence. Consequently, a model might achieve high accuracy but exhibit a severe discrepancy between empirical performance and predicted confidence. This mismatch manifests as a high ECE, indicating that the quantum NIDSs are miscalibrated. From an operational standpoint, hardware-induced miscalibration may lead to catastrophic security failures, such as generating false alarms or leaving actual intrusions unnoticed. Conversely, a well-calibrated model ensures that output probabilities accurately reflect the true likelihood of its predictions. Hence, ECE assesses whether advances in modern quantum backends translate into reliable operational benefits by reducing alarm overload through effective thresholding strategies. Table I reports the ECE achieved by AMP (CNN+LSTM) across all datasets for each (Backend, Shots) pair. For comparison, we also report performance for the Noiseless scenario and the DL baseline. Since both models share the same backbone architecture, this comparison serves a twofold purpose: (i) evaluating the effect of the hybrid classical-quantum design on model calibration and (ii) assessing how calibration changes under noisy finite-shot execution compared to the analytic Noiseless setting. On the one hand, adopting a hybrid model does not degrade calibration. Instead, it yields slight improvements on EDGE and NIDD, allowing both models to exhibit excellent calibration on all datasets with an ECE consistently below 1%. On the other hand, comparing the backends against the Noiseless scenario confirms the trends observed in our previous analysis, corroborating that noisy finite-shot execution could be the cause of degraded calibration. Specifically, the ECE under realistic hardware environments remains consistently
| Dataset | S | FLa | FN | FLo | FY | FF | ||
| IoMT | 8 | 14.4 ± 6.5 | 2.3 ± 2.3 | 2.8 ± 2.5 | 17.9 ± 8.9 | 3.8 ± 3.0 | ||
| IoMT | 64 | 9.7 ± 2.5 | 2.0 ± 0.6 | 3.0 ± 1.2 | 15.0 ± 4.5 | 4.9 ± 1.7 | 0.7 ± 0.6 | 0.6 ± 0.3 |
| IoMT | 1024 | 17.9 ± 4.8 | 1.9 ± 0.9 | 2.9 ± 1.3 | 27.0 ± 5.7 | 4.5 ± 1.7 | ||
| EDGE | 8 | 13.8 ± 6.7 | 1.3 ± 0.8 | 2.0 ± 1.4 | 20.3 ± 10.8 | 3.3 ± 2.3 | ||
| EDGE | 64 | 7.8 ± 2.6 | 0.5 ± 0.1 | 0.8 ± 0.3 | 9.3 ± 3.7 | 1.6 ± 0.6 | 0.1 ± 0.0 | 0.2 ± 0.1 |
| EDGE | 1024 | 10.1 ± 3.8 | 0.5 ± 0.1 | 0.7 ± 0.2 | 22.8 ± 14.5 | 1.4 ± 0.5 | ||
| NIDD | 8 | 7.7 ± 3.3 | 3.3 ± 1.0 | 3.6 ± 1.2 | 10.0 ± 2.5 | 4.1 ± 1.6 | ||
| NIDD | 64 | 13.1 ± 3.9 | 3.0 ± 1.0 | 4.6 ± 1.1 | 16.1 ± 4.3 | 7.6 ± 1.5 | 0.2 ± 0.1 | 0.3 ± 0.2 |
| NIDD | 1024 | 20.6 ± 3.5 | 2.7 ± 0.9 | 4.2 ± 1.1 | 22.7 ± 7.9 | 7.4 ± 1.8 |
Table 1. ECE of AMP (CNN+LSTM). Values are averaged across 5 folds. Green (resp. red) cells highlight under- (resp. over-) confident models. 🟩: Dataset. S: Shots. ◇: Noiseless. ⚑: DL baseline.
higher than in the Noiseless baseline. Moreover, calibration instability is further substantiated by the high variability across some noisy backends, particularly FLa and FY, which demonstrate relevant standard deviations in their ECE. Among the evaluated backends, FN is the only one in which the ECE monotonically improves with increasing shots, crossing the sub-1% ECE threshold exclusively on EDGE. An inspection of the reliability diagrams, omitted for brevity, reveals that the quantum circuit tends to reduce predictive confidence, leading to under-confidence. Although this helps maintain calibration under noiseless conditions, hardware noise exacerbates the effect, degrading output probabilities and causing misclassifications. These findings suggest that the noiseless regime targeted by future fault-tolerant quantum architectures enables well-calibrated QML-based NIDSs, whereas current quantum hardware suffers calibration degradation from hardware noise and finite-shot uncertainty.
Conclusion
This work provides a practical assessment of a QML-based NIDS for early intrusion detection under operationally relevant conditions, spanning data efficiency, cross-domain generalization, temporal resilience, robustness to noise and sampling errors, and prediction trustworthiness. In several scenarios, QML remains competitive under limited training data (OC1), suggesting their potential applicability to emerging threats and zero-day attacks. The results highlight the importance of classical compression for high-quality quantum embedding and circuit optimization, helping narrow the performance gap between current QML and DL. At the same time, portability across heterogeneous network environments remains a major challenge (OC2). Cross-domain performance depends on the characteristics of the training dataset, emphasizing the difficulty of learning attack representations that generalize beyond environment-specific traffic patterns, for both classical and quantum models. The analysis of resilience to temporal constraints (OC3) shows that QML can improve early-stage intrusion detection, particularly when operating with limited traffic information. Our study highlights that current limitations of quantum hardware cannot be overlooked in operational deployments (OC4). Detection performance and model calibration are sensitive to hardware-induced noise, qubit decoherence, and backend-specific characteristics. While recent noisy backends approach noiseless behavior under favorable operating conditions, some hardware configurations still induce miscalibrated predictions, potentially compromising the reliability of generated alarms (OC5). Overall, QML emerges as a viable component of future intelligent cybersecurity systems, particularly for early and adaptive intrusion detection in heterogeneous IoT environments. From a deployment perspective, cloud queuing and orchestration overheads can hinder inline inspection, whereas compact few-qubit architectures could facilitate on-premises implementation.
Future work will explore larger quantum architectures with more qubits, advanced feature maps, ansatze, measurement schemes, and bottleneck-matched ablations to isolate quantum contributions. We will extend OC2 to a full deployment setting, drawing benign and attack traffic from the target network, to assess false alarms and portability. Moreover, noiseless simulations with matched shot budgets will decouple finite-shot sampling error from physical noise. We plan physical quantum hardware deployments to evaluate end-to-end decision latency and throughput beyond simulations, with post-hoc calibration to mitigate sampling- and noise-related miscalibration. Finally, fault-tolerant regimes will be investigated to understand OC behavior when hardware noise becomes less relevant, while finite-sampling and networking constraints remain.
Biographies
Domenico Ciuonzo
Domenico Ciuonzo [SM] ([email protected]) is an Associate Professor at the University of Napoli Federico II. His research concerns data fusion, network analytics, IoT, signal processing, and AI.
Idio Guarino
Idio Guarino [M] ([email protected]) is an Assistant Professor at the University of Bologna, Italy. His research focuses on Internet traffic analytics, developing data-driven methods to model, classify, and predict network traffic.
Alfredo Nascita
Alfredo Nascita ([email protected]) is an Assistant Professor at the University of Napoli Federico II. His research interests include Internet traffic analysis, machine and deep learning, and explainable artificial intelligence.
Antonio Pescapè
Antonio Pescapè [SM] ([email protected]) is a Full Professor at the University of Napoli Federico II. His work focuses on measurement, monitoring, and analysis of the Internet.
Vincenzo Spadari
Vincenzo Spadari ([email protected]) is a Ph.D. Student at the University of Napoli Federico II. His research focuses on the application of quantum machine learning on network traffic data analysis.
References
- [1]J. Zhou et al., “Security and Privacy for Cloud-based IoT: Challenges,” IEEE Commun. Mag., vol. 55, no. 1, pp. 26–33, 2017.
- [2]N. Bugshan et al., “Intrusion Detection-based Ensemble Learning and Microservices for Zero Touch Networks,” IEEE Commun. Mag., vol. 61, no. 6, pp. 86–92, 2023.
- [3]L. Alchieri et al., “An Introduction to Quantum Machine Learning: from Quantum Logic to Quantum Deep Learning,” Quantum Mach. Intell., vol. 3, no. 2, p. 28, 2021.
- [4]V. Spadari et al., “Towards Network Intrusion Detection Via Quantum Machine Learning: A Reality Check,” in IEEE INFOCOM Workshops, 2025, pp. 1–6.
- [5]A. Tudisco et al., “Evaluating the Computational Advantages of the Variational Quantum Circuit Model in Financial Fraud Detection,” IEEE Access, vol. 12, pp. 102918–102940, 2024.
- [6]F. Cirillo et al., “Benchmarking Quantum Machine Learning Methods for Intrusion Detection on Noisy Quantum Computers,” Quantum Mach. Intell., vol. 8, no. 1, p. 27, 2026.
- [8]J. Biamonte et al., “Quantum Machine Learning,” Nature, vol. 549, no. 7671, pp. 195–202, 2017.
- [9]D. Abreu et al., “QML-IDS: Quantum Machine Learning Intrusion Detection System,” in IEEE Symp. Comput. Commun. (ISCC), 2024, pp. 1–6.
- [10]I. Ahmad et al., “Quantum Machine Learning for Anomaly Detection: The Future of Smarter and Safer IoT Networks,” IEEE Netw., 2026.
- [11]I. Ismail et al., “Intrusion Detection in IoT and IIoT: Comparing Lightweight Machine Learning Techniques using TON_IoT, WUSTL-IIOT-2021, and EdgeIIoTset Datasets,” IEEE Access, vol. 13, pp. 73468–73485, 2025.
- [12]G. Apruzzese et al., “The Cross-Evaluation of Machine Learning-Based Network Intrusion Detection Systems,” IEEE Trans. Netw. Service Manag., vol. 19, no. 4, pp. 5152–5169, 2022.
- [13]A. Reijesha et al., “Improving Image Classification with Quantum Neural Network,” in IEEE Int. Conf. Comput., Electron. Electr. Eng. their Appl. (IC2E3), 2023, pp. 1–12.
- [14]X. Ding et al., “QFMLNet: An AI-Driven Quantum Communication Architecture for 6G Space-Ground Networks,” IEEE Commun. Mag., vol. 63, no. 7, pp. 34–40, 2025.
- [15]M. Lopez-Martin et al., “Network Traffic Classifier with Convolutional and Recurrent Neural Networks for Internet of Things,” IEEE Access, vol. 5, pp. 18042–18050, 2017.