Submitted:
26 August 2026
Posted:
28 August 2026
You are already at the latest version
Abstract
A TabNet-based network intrusion detection system can achieve 97% global accuracy while simultaneously exhibiting near-total adversarial collapse in the URLLC slice (PSRI = 0.023)—a critical vulnerability that conventional metrics entirely conceal. This paper introduces the Per-Slice Robustness Index (PSRI) and Slice-Weighted F1 (SW-F1) to expose such hidden vulnerabilities in 5G network slicing environments, and proposes Attention-Guided Evasion (AGE), a transfer-based adversarial attack that exploits TabNet’s native attention mask to concentrate perturbations on the most influential features. Using the CICIoT2023 dataset with 34 attack categories mapped to eMBB, URLLC, and mMTC service slices, we demonstrate that AGE achieves a 50.2% accuracy drop at ε=0.10 while using 17× less L2 perturbation than FGSM and modifying only 8.5% of features. The proposed metrics expose a 0.121-point gap between global weighted F1 (0.928) and slice-balanced SW-F1 (0.807), demonstrating that conventional evaluation systematically overestimates protection for minority slices in heterogeneous 5G environments. These findings highlight the necessity of slice-aware adversarial evaluation frameworks for 5G network security.

Keywords:
adversarial machine learning
; network intrusion detection
; TabNet
; 5G network slicing
; evasion attack
; attention mechanism
; per-slice robustness
; CICIoT2023
1. Introduction
The security of 5G network slicing cannot be reliably characterised using aggregate intrusion detection metrics alone. Although a NIDS may achieve high overall accuracy, its protection can be highly uneven across heterogeneous slices. This issue is particularly critical in 5G environments because Enhanced Mobile Broadband (eMBB), Ultra-Reliable Low-Latency Communication (URLLC), and Massive Machine-Type Communication (mMTC) serve fundamentally different operational requirements [1,2]. Consequently, a security evaluation that aggregates all traffic classes into a single global score may conceal severe vulnerabilities affecting a specific slice. The rapid proliferation of Internet of Things (IoT) devices and the deployment of 5G networks have further expanded the attack surface of modern communication infrastructures, making the problem of slice-level security evaluation both timely and practically significant. Machine learning (ML)-based Network Intrusion Detection Systems (NIDS) have become a central component for securing such heterogeneous environments, owing to their ability to detect complex and evolving attack patterns that signature-based systems cannot capture.
However, ML-based NIDS are themselves vulnerable to adversarial evasion attacks, in which an attacker introduces carefully crafted perturbations to malicious traffic features so that the classifier misclassifies the traffic as benign [3]. This vulnerability is particularly concerning in security-critical infrastructures such as 5G, where a successful evasion attack could allow malicious traffic to bypass detection within a specific slice, undermining the isolation guarantees that slicing is meant to provide.
The adversarial robustness of NIDS has been investigated along several complementary lines of research: strengthening detection through attention-based ensemble architectures, generating evasion attacks that target a small subset of highly influential features rather than perturbing the entire feature space, and empirically assessing the practical feasibility of evasion attacks under realistic, feature-space-constrained threat models [4,5,6,7,8]. In parallel, TabNet [11], a deep learning architecture designed for tabular data, has attracted growing interest in the NIDS literature due to its built-in, sequential attention mechanism, which offers instance-wise interpretability while achieving competitive classification performance [12,13]. The broader idea of using model explanations to guide adversarial attacks is not unprecedented in the wider machine learning literature: explainability outputs such as SHAP values have been used to localize perturbations against malware detectors [15], and the interplay between post-hoc explanations and adversarial manipulation has recently been systematized [16]. However, to the best of our knowledge, no existing study leverages the native, architecture-embedded attention mechanism of an interpretable tabular classifier such as TabNet to guide evasion attack design within the network intrusion detection domain, and no existing study evaluates adversarial robustness at the granularity of individual 5G network slices. A closely related, contemporaneous study proposes security-aware evaluation guidelines for adversarially-robust anomaly detection in the 5G Core network [17]; however, it targets protocol-level (PFCP) control-plane attacks rather than service-level network slicing, and does not employ an interpretable, attention-based classifier.
This limitation is not merely theoretical. As shown later in this study, a TabNet-based NIDS trained on the CICIoT2023 dataset [18] achieves a global weighted F1-score of 0.928, suggesting strong overall performance; yet the same model attains an F1-score of only 0.483 on the mMTC slice under clean, non-adversarial conditions. Under adversarial perturbation, the picture inverts further: URLLC, the slice with the highest clean accuracy, proves to be the most vulnerable to evasion, while mMTC, the weakest slice under clean conditions, is comparatively robust. Such asymmetries are entirely obscured by global accuracy and weighted F1-score, motivating the need for evaluation metrics that are explicitly aware of slice structure.
Motivated by this gap, this paper makes the following contributions:
- A slice-aware adversarial evaluation framework is developed to investigate the vulnerability of ML-based NIDSs across heterogeneous 5G service slices, rather than relying solely on aggregate performance metrics.
- Attention-Guided Evasion (AGE) is introduced as an attention-guided, transfer-based adversarial attack that exploits TabNet’s attention mechanism to concentrate perturbations on the most influential features, improving attack effectiveness while maintaining a low perturbation footprint.
- Two slice-aware evaluation metrics, PSRI and SW-F1, are proposed to quantify adversarial robustness and balanced detection performance across eMBB, URLLC, and mMTC slices.
- The experiments reveal a previously hidden slice-level vulnerability pattern in which URLLC experiences severe degradation under adversarial attacks despite strong global NIDS performance, while mMTC remains comparatively robust.
- The study demonstrates the limitations of aggregate security metrics in heterogeneous 5G environments, showing that a global weighted F1 score of 0.928 can coexist with a substantially lower slice-balanced score of 0.807.
2. Related Work
Although there is no study in the literature that exactly matches our work, there are valuable studies that show strong similarities in certain respects. The existing literature addresses adversarial NIDS research along three axes: the use of attention mechanisms to strengthen defenses [4], targeted evasion attacks aimed at a small number of features [5], and the analysis of evasion feasibility under realistic attack constraints [6,7,8]. However, none of these studies have directly integrated the attention mask output into attack design or performed slice-based robustness evaluation in the context of 5G slicing.
Reference [4] developed an attention and dilated convolution-based ensemble model (ADCEN), achieving 95% accuracy against adversarial evasion attacks. However, as this study is defense-oriented, it does not utilize the features the model focuses on in attack design. Furthermore, class imbalance and slice-based evaluation were not addressed.
Reference [5] demonstrated that targeting only a small number of features is more effective than applying perturbations to all features, using the Jacobian Saliency Map for feature selection. This finding constitutes one of the primary motivations behind AGE’s approach of targeting only five critical features using the attention mask output. However, model-specific attention information is not integrated into the attack design, and the 5G slicing environment and slice-based robustness evaluation are outside the scope of that study.
Reference [6] generated realistic adversarial botnet traffic in a black-box scenario, demonstrating the practical feasibility of evasion attacks under feature-space constraints. Although this study supports our threat model, the white-box scenario and slice-based robustness evaluation distinguish our work from theirs.
Reference [7] aimed to detect evasion attacks by designing a multi-adversarial detector based on transfer learning. This defense approach proved effective in attack detection. However, the attention mechanism specific to TabNet and 5G slice-based evaluation were not addressed.
Reference [8] studied the practical feasibility of evasion attacks against ML-based NIDS and demonstrated that factors such as Boolean and discrete features, feature correlations, and model access constraints significantly limit the effectiveness of such attacks. This finding contextually supports our white-box assumption and preference for feature-space perturbations.
In a related study, Baldini [9] investigated the mitigation of adversarial attacks in 5G networks using Extremely Randomized Trees (ERT) combined with Infinite Feature Selection, demonstrating robustness against label flipping and feature-based attacks on a 5G-specific dataset. However, that study relies on global classification metrics without slice-level analysis, and does not address feature-space evasion attacks or interpretable attention-based models.
The TabNet architecture proposed for tabular data [11] has also begun to be used in the IDS field in recent years [12,13]. However, current TabNet-based IDS studies focus solely on detection accuracy. Adversarial robustness and slice-based performance evaluation have not yet been addressed.
Reference [12] adapted the TabNet architecture to classify MQTT protocol traffic in IoT environments. This study demonstrates the success of TabNet’s attention mechanism in selecting network traffic features. However, the model was evaluated only under clean conditions, and adversarial robustness and slice-based analysis were not investigated.
In the TabNet-IDS study [13], TabNet wasevaluated on the UNSW-NB15 [14], CIC-IDS2018, and CICIoT2023 [18] datasets [13]. The use of CICIoT2023 enables direct comparison with our study. However, no adversarial robustness analysis was conducted, and the 5G slicing context was not considered.
Recently, Reference [10] proposed a DeepSHAP-based adversarial attack that selectively alters only the most influential features of network flows to evade ML-based NIDS. While conceptually similar to AGE in its feature-selective perturbation strategy, their approach relies on post-hoc SHAP explanations applied to arbitrary classifiers, rather than exploiting the native, architecture-embedded attention mechanism of an interpretable model such as TabNet. Furthermore, slice-aware evaluation across 5G service categories is not addressed.
A detailed comparison of all studies is provided in Table 1.
3. Dataset, Threat Model, and Experimental Setup
3.1. Dataset
In this study, we used the CICIoT2023 dataset published by the Canadian Institute for Cyber Security (CIC) in 2023 [18]. The dataset contains network traffic collected from real IoT devices and includes both normal and attack traffic. There are 34 classes in total: 33 represent different attack types such as DDoS, DoS, Mirai botnet, reconnaissance, and injection attacks, while the remaining one represents normal (benign) traffic [19]. The dataset is provided in three pre-defined partitions—training, test, and validation—which we used as-is without additional splitting.
TabNet baseline classification performance was evaluated on the full test set (1,176,851 samples) to ensure a comprehensive performance report. Subsequent adversarial and slice-based analyses were conducted on a stratified subsample of 50,000 test samples for computational efficiency, preserving the original class distribution [20]. Each sample contains 46 numerical features including flow-level network statistics such as packet count, byte count, inter-arrival time (IAT), TCP flag counts, and protocol type. Dataset statistics are presented in Table 2.
3.2. 5G Network Slice Mapping
We grouped the 34 classes according to the three core 5G service categories: eMBB, URLLC, and mMTC [1,2]. High-volume DDoS attacks were assigned to the eMBB slice due to their high bandwidth consumption. DoS, MITM, and DNS spoofing attacks were assigned to URLLC due to their critical effects on latency and reliability [21]. Mirai botnet, reconnaissance, and injection attacks were assigned to mMTC, as they target low-power IoT devices [22]. The resulting distribution is shown in Table 3 and Figure 1. The slice assignment follows the service-level traffic characterisation guidelines of 3GPP TR 22.261 [1,2] and is consistent with prior slice-aware security studies [22]. To assess the sensitivity of our results to this mapping, we verified that reassigning borderline attack types (e.g., DNS_Spoofing between URLLC and mMTC) does not qualitatively alter the slice-level PSRI ranking: URLLC remains the most vulnerable slice and mMTC the most robust under all tested perturbation budgets.
3.3. Threat Model
We adopt a white-box attack scenario in which the adversary has full knowledge of the model architecture, weights, and test data [23]. The attacker’s goal is to perturb malicious traffic so that the model classifies it as benign—an evasion attack [3]. A key constraint is that the attacker can only modify network flow statistics (e.g., IAT, packet count, flag values), not the packet payload [11,24].
Two standard baselines are employed:
FGSM [25]:
PGD [26]:
For both attacks, was tested and results were evaluated per slice [24].
3.4. Data Preprocessing
No missing or infinite values were present, so no imputation was required. All numerical features were standardized using StandardScaler (zero mean, unit variance) [27], fitted on the training set only and applied separately to the test and validation sets to prevent data leakage. The class imbalance (up to 3,000:1 ratio) was left intact intentionally: real network traffic exhibits such imbalance naturally, and demonstrating how it misleads global metrics is a central motivation of this work [28]. To separate the effect of class imbalance from adversarial vulnerability, PSRI is computed at the slice level using aggregate accuracy rather than per-class F1.
3.5. TabNet Configuration
We selected TabNet [11] as the classifier due to its sequential attention mechanism, which enables both competitive detection accuracy and instance-wise feature importance analysis. Although Random Forest and MLP achieve comparable global accuracy, TabNet was selected for its instance-wise sequential attention mechanism, which enables the proposed AGE attack by providing a dynamic, per-sample feature importance signal that neither tree-based nor standard neural network architectures offer natively. Hyperparameters are listed in Table 4.
3.6. Adversarial Attack Configuration
Attacks were applied in the feature space [24]. Feature importance ranking via TabNet’s attention mask was computed using only the validation set to avoid any overlap with the test set used for attack evaluation. The top five features by attention weight are: syn_count, IAT, SMTP, UDP, and TCP (Table 5). The attack configuration is summarised in Table 6 and the experimental workflow is shown in Figure 2.
3.7. Proposed Evasion Attack: Attention-Guided Evasion (AGE)
This study proposes two original contributions. The first is AGE (Attention-Guided Evasion). Since TabNet’s sparse attention mechanism interrupts gradient flow—a phenomenon known as gradient masking [8]—AGE is implemented via a transfer-based approach in which the gradient direction is obtained from a surrogate MLP , while the perturbation magnitude and feature selection are governed by the TabNet attention mask. The perturbation vector for feature j is:
where is the attention weight of feature j, is the top-5 attention feature set, is the perturbation budget, is the surrogate MLP (three hidden layers: 256–128–64 neurons, ReLU), and J is the cross-entropy loss. The adversarial examples are transferred to TabNet for evaluation [29,30].
The second contribution consists of PSRI and SW-F1, whose formal definitions are provided in Section 4.
3.8. Evaluation Metrics
4. Proposed Slice-Aware Evaluation Metrics
Standard metrics assume a homogeneous operational environment where all classes contribute proportionally to the overall score. In 5G slicing architectures this assumption fails: each slice serves a distinct application domain, and a model that performs well on the dominant slice may catastrophically fail on a minority slice without any indication from global metrics [31,32,33].
4.1. Motivation
Table 7 shows the discrepancy between global and per-slice F1-scores under clean conditions. The global weighted F1 of 0.928 suggests strong overall performance, yet the mMTC slice achieves only 0.483. This 0.445-point gap is entirely masked by eMBB’s 0.981 F1 and 70.5% sample weight.
4.2. Per-Slice Robustness Index (PSRI)
Let . For adversarial attack a with perturbation budget :
indicates perfect robustness; indicates complete collapse. It should be noted that classes with F1 = 0.00 under clean conditions are excluded from PSRI computation at the class level, as their clean accuracy baseline is already zero, making the ratio undefined. PSRI is therefore computed over the aggregate accuracy of all samples within each slice.
The aggregate PSRI across all slices is:
4.3. Slice-Weighted F1 (SW-F1)
Unlike , SW-F1 assigns equal weight to each slice regardless of sample size. In our experiments:
The 0.121-point gap quantifies the degree to which global metrics overestimate protection for minority slices.
4.4. Stealthiness Metrics
where and .
5. Results and Discussion
5.1. TabNet Baseline Performance
An accuracy of 97.07% was achieved on the test set. The weighted F1 is 0.97, but the macro F1 is only 0.56 [31], indicating highly unbalanced per-class performance. Selected class results are in Table 9 and the confusion matrix in Figure 3. The full classification report is in Appendix A.
Table 8.
TabNet Baseline Summary Performance Metrics (Test Set).
| Metric | Value |
|---|---|
| Test Accuracy | 0.9707 |
| Weighted F1 | 0.97 |
| Macro F1 | 0.56 |
| Macro Precision | 0.59 |
Table 9.
Classification Report for Selected Classes (Test Set).
| Class | Precision | Recall | F1 | Support | Slice |
|---|---|---|---|---|---|
| DDoS-ICMP_Flood | 1.00 | 1.00 | 1.00 | 180,447 | eMBB |
| DoS-UDP_Flood | 1.00 | 1.00 | 1.00 | 83,627 | URLLC |
| Mirai-udpplain | 0.99 | 0.99 | 0.99 | 22,536 | mMTC |
| DNS_Spoofing | 0.00 | 0.00 | 0.00 | 4,570 | URLLC |
| Backdoor_Malware | 0.00 | 0.00 | 0.00 | 89 | mMTC |
| XSS | 0.00 | 0.00 | 0.00 | 103 | mMTC |
| DictionaryBruteForce | 0.00 | 0.00 | 0.00 | 319 | mMTC |
| Macro Avg | 0.59 | 0.56 | 0.56 | 1,176,851 | All |
| Weighted Avg | 0.97 | 0.97 | 0.97 | 1,176,851 | eMBB-weighted |
5.2. Attention Mask Analysis
5.3. Adversarial Attack Comparison
Table 10 and Table 11 summarise the epsilon-sweep results. At , AGE-Transfer achieves a 50.2% accuracy drop while modifying only 3.9 features and using an norm of 0.037. FGSM modifies all 46 features with , using more perturbation for a comparable effect [29,30].
To further validate that AGE’s effectiveness stems specifically from TabNet’s native attention mechanism rather than generic feature-selective perturbation, we implemented a DeepSHAP-guided baseline (AGE-SHAP) following the approach of [10]. In AGE-SHAP, the top-5 features are selected using SHAP values computed on the surrogate MLP rather than TabNet’s attention mask. Despite sharing 3 of 5 features with AGE-Attention (TCP, Protocol Type, syn_count), AGE-SHAP achieves a negligible accuracy drop of 0.1% compared to AGE-Attention’s 54.0%. This result demonstrates that the effectiveness of AGE is not attributable to feature-selective perturbation alone, but specifically to the exploitation of TabNet’s native, architecture-embedded attention mechanism. Post-hoc SHAP explanations computed on a surrogate model fail to capture the decision-relevant feature structure of TabNet, confirming the necessity of using the model’s own interpretability signal for attack design.
Figure 5.
Accuracy and accuracy drop comparison of AGE-Transfer, FGSM, and PGD attacks across epsilon values.
Figure 5.
Accuracy and accuracy drop comparison of AGE-Transfer, FGSM, and PGD attacks across epsilon values.

To assess statistical significance, a bootstrap confidence interval (1,000 resamples) was computed for the difference in accuracy drop between AGE-Attention and FGSM. The observed difference is (AGE achieves 4.4 percentage points higher accuracy drop), with a 95% bootstrap CI of . Since the interval lies entirely above zero, the superiority of AGE-Attention over FGSM in terms of attack effectiveness is statistically significant at the 5% level.
5.4. Per-Slice Robustness Analysis (PSRI)
It is important to distinguish between two sources of low per-slice performance: (i) pre-existing misclassification of rare classes under clean conditions, and (ii) adversarial degradation caused by attack perturbations. PSRI isolates the second effect by normalising post-attack accuracy against the clean baseline within each slice.
Table 12 presents per-slice results under FGSM and AGE-Transfer at . URLLC is the most vulnerable slice: . The SW-F1 gap further underscores this: versus , a difference of 0.121.
Figure 6.
Per-slice PSRI, accuracy, and F1-drop comparison under FGSM and AGE-Transfer ().

5.5. Baseline Model Comparison
All baseline models and TabNet were trained on the same training partition (200,000 samples). TabNet baseline classification performance (Table 8 and Table 9) was evaluated on the full test set () to provide a comprehensive per-class report. Subsequent adversarial and slice-based analyses (Table 12, Table 13 and Table 14) were conducted on a stratified subsample of 50,000 test samples ( after slice assignment) for computational efficiency, preserving the original class distribution. Baseline models (Table 13) were evaluated on the same 50,000-sample test set with five random seeds. Table 13 compares clean performance across models. All three models achieve comparable global accuracy (0.972–0.982), confirming that TabNet does not sacrifice detection performance for interpretability.
While Random Forest and MLP exhibit broadly similar PSRI profiles across slices (URLLC: 0.482 and 0.512 respectively; mMTC: 0.750 and 0.839), TabNet demonstrates a pronounced cross-slice asymmetry: the URLLC slice collapses under adversarial perturbation (PSRI = 0.022), while the mMTC slice remains highly robust (PSRI = 0.983). This asymmetry is directly attributable to TabNet’s attention mechanism and validates both the AGE attack design and the necessity of PSRI.
Figure 7.
Clean performance comparison of Random Forest, MLP, and TabNet (mean ± std over 5 seeds).

5.6. Discussion
Three key findings emerge. First, adversarial attacks cause markedly asymmetric slice-level damage: URLLC is the most vulnerable (PSRI≈0.02 under both attacks), while mMTC is relatively robust to transfer-based AGE (PSRI=0.983) but highly susceptible to FGSM (PSRI=0.453). This cross-attack, cross-slice asymmetry is a novel empirical finding with direct operational implications for 5G network operators.
Second, global metrics hide this asymmetry: a global weighted F1 of 0.928 masks an mMTC F1 of only 0.483 under clean conditions, and a global PSRI of 0.444 (AGE) obscures the near-total collapse of URLLC (PSRI=0.023). The proposed PSRI and SW-F1 make these disparities visible and quantifiable.
Third, AGE-Transfer achieves a comparable or higher accuracy drop than FGSM at (50.2% vs. 48.4%) while modifying only 8.5% of features and using less perturbation. This stealthiness advantage is directly relevant for evading anomaly-based defenses [29,30].
Feature-Space vs. Problem-Space Limitations.
A fundamental limitation shared by this study and most adversarial NIDS research is that perturbations are applied in the feature space rather than the problem space (i.e., raw network packets). Feature-space attacks modify pre-computed flow statistics which may not be directly realizable in live network traffic due to protocol constraints and feature dependencies [8]. For example, modifying syn_count without a corresponding change in TCP flag counts would produce a statistically inconsistent flow. Future work should incorporate constraint-aware perturbation generation to bridge this gap [5,6].
Static Dataset Limitations.
This study evaluates adversarial robustness on a static benchmark dataset. The 5G slice mapping is based on traffic-level characteristics rather than actual 5G protocol-layer information. Validation against a testbed environment—such as Open5GS with srsRAN or ns-3 with the 5G NR module—is planned as a primary direction for future work.
Future Directions.
Future work will focus on: (i) extending evaluation to a second benchmark dataset (UNSW-NB15 [11]) to assess the generalisability of PSRI and SW-F1 across different traffic distributions and attack taxonomies — a necessary step to confirm that the observed slice-level asymmetries are not artefacts of CICIoT2023’s specific class distribution; (ii) implementing constraint-aware adversarial examples valid in the problem space; and (iii) deploying the proposed framework in an Open5GS/srsRAN testbed. Additionally, adversarial training augmented with attention regularisation will be explored as a defence mechanism.
Operational Impact for 5G Network Operators.
The near-total adversarial collapse of the URLLC slice (PSRI = 0.023) carries direct operational consequences for 5G network operators. URLLC is the service category that underpins mission-critical applications such as remote surgery, autonomous vehicle coordination, industrial automation, and smart grid control—all of which operate under strict latency and reliability Service Level Agreements (SLAs), typically requiring end-to-end latency below 1 ms and availability of 99.999%. A PSRI of 0.023 implies that under adversarial conditions, the NIDS correctly identifies only 2.3% of URLLC-slice attack traffic that it would detect under clean conditions, effectively rendering the intrusion detection mechanism inoperative for this slice. In practical terms, an attacker aware of this vulnerability could craft low-perturbation evasion traffic—consuming as few as 3.9 modified flow features—to conduct DoS, MITM, or DNS spoofing attacks against URLLC infrastructure while evading detection entirely. This finding suggests that 5G network operators relying on global NIDS metrics may be operating under a false sense of security, and that slice-aware robustness evaluation frameworks such as the one proposed in this study should be incorporated into 5G security auditing standards.
6. Conclusions
In this study, we presented a comprehensive, slice-aware adversarial vulnerability analysis of a TabNet-based NIDS operating within a 5G network slicing context. The proposed Attention-Guided Evasion (AGE) attack leverages TabNet’s native attention mask to perturb only the top five influential features, achieving a 50.2% accuracy drop at while requiring less perturbation than FGSM, thereby demonstrating remarkable stealthiness. Crucially, our introduced metrics—Per-Slice Robustness Index (PSRI) and Slice-Weighted F1 (SW-F1)—exposed critical security blind spots masked by conventional global metrics, revealing an asymmetric collapse in URLLC (PSRI = 0.023) and quantifying a 0.121-point overestimation gap in overall protection. These findings highlight the absolute necessity of slice-aware evaluation frameworks for heterogeneous 5G environments. Future research will focus on developing slice-aware adversarial defense strategies and validating the proposed framework within real-time 5G network simulators (e.g., ns-3).
Supplementary Materials
The following supporting information can be downloaded at the website of this paper posted on Preprints.org, The source code and experimental scripts are available at [URL].
Author Contributions
Conceptualization, G.Ö.Y. and I.S.K.; methodology, G.Ö.Y. and I.S.K.; software, G.Ö.Y.; validation, G.Ö.Y. and I.S.K.; formal analysis, G.Ö.Y.; investigation, G.Ö.Y.; resources, I.S.K.; data curation, G.Ö.Y.; writing—original draft preparation, G.Ö.Y. and I.S.K.; writing—review and editing, I.S.K.; visualization, G.Ö.Y.; supervision, I.S.K.; project administration, I.S.K. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The CICIoT2023 dataset is publicly available at https://github.com/SibelKervanci/TabNet-5G-Slicing-Adversarial-Robustness.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| AGE | Attention-Guided Evasion |
| eMBB | Enhanced Mobile Broadband |
| FGSM | Fast Gradient Sign Method |
| IDS | Intrusion Detection System |
| mMTC | Massive Machine-Type Communication |
| NIDS | Network Intrusion Detection System |
| PGD | Projected Gradient Descent |
| PSRI | Per-Slice Robustness Index |
| SW-F1 | Slice-Weighted F1 |
| URLLC | Ultra-Reliable Low-Latency Communication |
Appendix A
The complete per-class classification report on the test set () is provided in Table A1.
Table A1.
Full Classification Report — TabNet Baseline (Test Set, ).
| Class | Precision | Recall | F1 | Support | 5G Slice |
|---|---|---|---|---|---|
| Backdoor_Malware | 0.00 | 0.00 | 0.00 | 89 | mMTC |
| BenignTraffic | 0.64 | 0.94 | 0.76 | 27,709 | — |
| BrowserHijacking | 0.00 | 0.00 | 0.00 | 134 | mMTC |
| CommandInjection | 0.00 | 0.00 | 0.00 | 119 | mMTC |
| DDoS-ACK_Fragmentation | 0.94 | 0.98 | 0.96 | 7,292 | eMBB |
| DDoS-HTTP_Flood | 0.40 | 0.08 | 0.14 | 709 | eMBB |
| DDoS-ICMP_Flood | 1.00 | 1.00 | 1.00 | 180,447 | eMBB |
| DDoS-ICMP_Fragmentation | 0.99 | 0.97 | 0.98 | 11,402 | eMBB |
| DDoS-PSHACK_Flood | 1.00 | 1.00 | 1.00 | 103,326 | eMBB |
| DDoS-RSTFINFlood | 1.00 | 1.00 | 1.00 | 101,819 | eMBB |
| DDoS-SYN_Flood | 0.99 | 1.00 | 0.99 | 102,208 | eMBB |
| DDoS-SlowLoris | 0.41 | 0.44 | 0.43 | 622 | eMBB |
| DDoS-SynonymousIP_Flood | 1.00 | 1.00 | 1.00 | 90,480 | eMBB |
| DDoS-TCP_Flood | 1.00 | 1.00 | 1.00 | 113,735 | eMBB |
| DDoS-UDP_Flood | 1.00 | 1.00 | 1.00 | 136,717 | eMBB |
| DDoS-UDP_Fragmentation | 0.94 | 0.99 | 0.96 | 7,224 | eMBB |
| DNS_Spoofing | 0.00 | 0.00 | 0.00 | 4,570 | URLLC |
| DictionaryBruteForce | 0.00 | 0.00 | 0.00 | 319 | mMTC |
| DoS-HTTP_Flood | 0.60 | 0.64 | 0.62 | 1,805 | URLLC |
| DoS-SYN_Flood | 0.98 | 0.99 | 0.98 | 51,116 | URLLC |
| DoS-TCP_Flood | 1.00 | 0.99 | 0.99 | 67,697 | URLLC |
| DoS-UDP_Flood | 1.00 | 1.00 | 1.00 | 83,627 | URLLC |
| MITM-ArpSpoofing | 0.48 | 0.35 | 0.40 | 7,840 | URLLC |
| Mirai-greeth_flood | 0.98 | 0.63 | 0.76 | 24,934 | mMTC |
| Mirai-greip_flood | 0.67 | 0.97 | 0.79 | 19,279 | mMTC |
| Mirai-udpplain | 0.99 | 0.99 | 0.99 | 22,536 | mMTC |
| Recon-HostDiscovery | 0.59 | 0.26 | 0.36 | 3,331 | mMTC |
| Recon-OSScan | 0.33 | 0.00 | 0.00 | 2,433 | mMTC |
| Recon-PingSweep | 0.00 | 0.00 | 0.00 | 53 | mMTC |
| Recon-PortScan | 0.44 | 0.16 | 0.23 | 2,082 | mMTC |
| SqlInjection | 0.00 | 0.00 | 0.00 | 148 | mMTC |
| Uploading_Attack | 0.00 | 0.00 | 0.00 | 33 | mMTC |
| VulnerabilityScan | 0.71 | 0.81 | 0.76 | 913 | mMTC |
| XSS | 0.00 | 0.00 | 0.00 | 103 | mMTC |
| Accuracy | 0.97 | 1,176,851 | |||
| Macro Avg | 0.59 | 0.56 | 0.56 | 1,176,851 | |
| Weighted Avg | 0.97 | 0.97 | 0.97 | 1,176,851 |
References
- Dangi, R.; Jadhav, A.; Choudhary, G.; Dragoni, N.; Mishra, M.K.; Lalwani, P. ML-Based 5G Network Slicing Security: A Comprehensive Survey. Future Internet 2022, 14, 116. [Google Scholar] [CrossRef]
- Gao, S.; Lin, R.; Fu, Y.; Li, H.; Cao, J. Security Threats, Requirements and Recommendations on Creating 5G Network Slicing System: A Survey. Electronics 2024, 13, 1860. [Google Scholar] [CrossRef]
- Alshahrani, E.; et al. Adversarial Attacks Against Supervised Machine Learning Based Network Intrusion Detection Systems. PLoS ONE 2022. [Google Scholar] [CrossRef] [PubMed]
- Awad, O.F.; Çevik, M.; Farhan, H.M. An Enhanced Attention and Dilated Convolution-Based Ensemble Model for NIDS Against Adversarial Evasion Attacks. Peer-To-Peer Netw. Appl. 2025, 18, 191. [Google Scholar] [CrossRef]
- Mohammadian, H.; Ghorbani, A.A.; Lashkari, A.H. A Gradient-Based Approach for Adversarial Attack on Deep Learning-Based Network Intrusion Detection Systems. Appl. Soft Comput. 2023, 137, 110173. [Google Scholar] [CrossRef]
- Debicha, I.; Cochez, B.; Kenaza, T.; Debatty, T.; Dricot, J.M.; Mees, W. Adv-Bot: Realistic Adversarial Botnet Attacks Against Network Intrusion Detection Systems. Comput. Secur. 2023, 129, 103176. [Google Scholar] [CrossRef]
- Debicha, I.; Bauwens, R.; Debatty, T.; Dricot, J.M.; Kenaza, T.; Mees, W. TAD: Transfer Learning-Based Multi-Adversarial Detection of Evasion Attacks Against NIDS. Future Gener. Comput. Syst. 2023, 138, 185–197. [Google Scholar] [CrossRef]
- ElShehaby, M.; Matrawy, A. Evasion Adversarial Attacks Remain Impractical Against ML-Based NIDS, Especially Dynamic Ones. arXiv 2024, arXiv:2306.05494. [Google Scholar]
- Baldini, G. Mitigation of Adversarial Attacks in 5G Networks with a Robust Intrusion Detection System Based on Extremely Randomized Trees and Infinite Feature Selection. Electronics 2024, 13, 2405. [Google Scholar] [CrossRef]
- Chung, B.C.; Han, G.B. A DeepSHAP-based adversarial attack on machine learning-based network intrusion detection. IEEE Access 2026, 14, 2566–2575. [Google Scholar] [CrossRef]
- Arik, S.Ö.; Pfister, T. TabNet: Attentive Interpretable Tabular Learning. Proc. AAAI 2021, Vol. 35, 6679–6687. [Google Scholar] [CrossRef]
- Kouhi, A.; Lashkari, A.H. MQTTFlowLyzer: Interpretable TabNet-Based Flow-Level MQTT Intrusion Detection for IoT. J. Supercomput. 2026, 82, 334. [Google Scholar] [CrossRef]
- Rahman, M.H.; Rahman, M.W.; Mishra, A.; Mahmud, T.; Nijim, M. TabNet-IDS: A TabNet-Driven Tabular Deep Learning Framework for Intrusion Detection Systems. In Proceedings of the 2026 IEEE 5th International Conference on AI in Cybersecurity (ICAIC), Houston, TX, USA, February 2026; pp. 1–6. [Google Scholar]
- Moustafa, N.; Slay, J. UNSW-NB15: A comprehensive data set for network intrusion detection systems. Proc. MilCIS 2015, 1–6. [Google Scholar] [CrossRef]
- Aryal, K.; Gupta, M.; Abdelsalam, M.; Saleh, M. Explainability Guided Adversarial Evasion Attacks on Malware Detectors. arXiv 2024, arXiv:2405.01728. [Google Scholar]
- Noppel, M.; Wressnegger, C. SoK: Explainable Machine Learning in Adversarial Environments. In Proceedings of the IEEE Symposium on Security and Privacy (S&P), 2024; pp. 2441–2459. [Google Scholar]
- Manca, C.; Scano, C.; Piras, G.; Brau, F.; Pintor, M.; Biggio, B. SAGE-5GC: Security-Aware Guidelines for Evaluating Anomaly Detection in the 5G Core Network. arXiv 2026, arXiv:2602.03596. [Google Scholar]
- Neto, E.C.P.; Dadkhah, S.; Ferreira, R.; Zohourian, A.; Lu, R.; Ghorbani, A.A. CICIoT2023: A Real-Time Dataset and Benchmark for Large-Scale Attacks in IoT Environment. Sensors 2023, 23, 5941. [Google Scholar] [CrossRef] [PubMed]
- Hizal, S.; Cavusoglu, U.; Akgun, D. A Novel Deep Learning-Based Intrusion Detection System for IoT DDoS Security. Internet of Things, 2024. [Google Scholar]
- Canadian Institute for Cybersecurity. IoT Dataset 2023. University of New Brunswick. 2023. Available online: https://www.unb.ca/cic/datasets/iotdataset-2023.html.
- Thantharate, A.; Paropkari, R.; Walunj, V.; Beard, C.; Kankariya, P. Secure5G: A Deep Learning Framework Towards a Secure Network Slicing in 5G and Beyond. In Proceedings of the IEEE CCWC, 2020. [Google Scholar]
- Ganiuly, D.; Bolatbek, N. Slice-Aware Spoofing Detection in 5G Networks Using Lightweight Machine Learning. arXiv 2025, arXiv:2511.09610. [Google Scholar]
- He, K.; Kim, D.D.; Asghar, M.R. Adversarial Machine Learning for Network Intrusion Detection Systems: A Comprehensive Survey. IEEE Commun. Surv. Tutor. 2023, 25, 538–566. [Google Scholar] [CrossRef]
- Han, D.; Wang, Z.; Zhong, Y.; Chen, W.; Yang, J. Practical Traffic-Space Adversarial Attacks on Learning-based NIDSs. IEEE/ACM Transactions on Networking, 2022. [Google Scholar]
- Goodfellow, I.J.; Shlens, J.; Szegedy, C. Explaining and Harnessing Adversarial Examples. In Proceedings of the ICLR, 2015. [Google Scholar]
- Madry, A.; Makelov, A.; Schmidt, L.; Tsipras, D.; Vladu, A. Towards Deep Learning Models Resistant to Adversarial Attacks. In Proceedings of the ICLR, 2018. [Google Scholar]
- Pedregosa, F.; et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- He, H.; Garcia, E.A. Learning from Imbalanced Data. IEEE Trans. Knowl. Data Eng. 2009, 21, 1263–1284. [Google Scholar] [CrossRef]
- Qiu, H.; Dong, T.; Zhang, T.; Lu, J.; Memmi, G.; Qiu, M. Adversarial Attacks Against Network Intrusion Detection in IoT Systems. IEEE Internet Things J. 2021, 8, 10327–10335. [Google Scholar] [CrossRef]
- Ferrag, M.A.; Friha, O.; Hamouda, D.; Maglaras, L.; Janicke, H. An Enhanced Ensemble Defense Framework for Boosting Adversarial Robustness of Intrusion Detection Systems. Sci. Rep. 2025, 15, 14023. [Google Scholar] [CrossRef] [PubMed]
- Grandini, M.; Bagli, E.; Visani, G. Metrics for Multi-Class Classification: An Overview. arXiv 2020, arXiv:2008.05756. [Google Scholar]
- Gaber, T.; Awotunde, J.B.; Torky, M.; Ajagbe, S.A.; Hammoudeh, M.; Li, W. Metaverse-IDS: Deep Learning-Based Intrusion Detection System for Metaverse-IoT Networks. Internet Things 2023, 24, 100977. [Google Scholar] [CrossRef]
- Acharya, S.; Doyle, T.E.; Samavi, R. Evaluating MCC for Low-Frequency Cyberattack Detection in Imbalanced Intrusion Detection Data. arXiv 2024, arXiv:2512.19203. [Google Scholar]
Figure 1.
5G Slice-Based Distribution of the CICIoT2023 Dataset.

Figure 2.
Overall experimental workflow: from dataset preprocessing and TabNet training to adversarial attack generation and per-slice evaluation.
Figure 2.
Overall experimental workflow: from dataset preprocessing and TabNet training to adversarial attack generation and per-slice evaluation.

Figure 3.
TabNet Baseline — Confusion Matrix (Test Set, ).

Figure 4.
TabNet Attention Mask — Top-15 Features by Average Attention Weight.

Table 1.
Comparison of Related Work.
| Ref | Title | Method | Data | Gap vs. Ours |
|---|---|---|---|---|
| [4] | Enhanced attention ensemble for NIDS | ICO + ADCEN | CICIDS2017 | Defense-focused; no 5G or PSRI. |
| [5] | Gradient-based adversarial attacks | Jacobian Saliency Map | CIC-IDS2017/18 | No TabNet attention; no 5G. |
| [6] | Adv-Bot: Adversarial botnet attacks | Black-box evasion | Real PCAP | Black-box; no slice robustness. |
| [7] | TAD: Transfer multi-adversarial detection | Transfer multi-detector | Botnet traces | Defense-focused; no 5G. |
| [8] | Evasion attacks impractical vs NIDS | Attack tree feasibility | CSE-CIC-IDS2018 | No TabNet or slice metrics. |
| [10] | DeepSHAP adversarial attack on NIDS | DeepSHAP + masked-PGD | X-IIoTID | Post-hoc SHAP; no 5G. |
| [12] | MQTTFlowLyzer: TabNet IDS | TabNet via attention | MQTT-IoT-2024 | Clean only; no adversarial. |
| [13] | TabNet-IDS framework | TabNet multi-dataset | UNSW, CIC, CICIoT | No adversarial; no 5G. |
| Ours | AGE + PSRI + SW-F1 for 5G NIDS | TabNet + AGE + PSRI + SW-F1 | CICIoT2023 | First slice-aware adversarial study |
Table 2.
Dataset Statistics.
| Parameter | Value |
|---|---|
| Dataset | CICIoT2023 (UNB) |
| Total Samples (full) | ∼7.8 million |
| Analyzed (train/test/val) | 200,000 / 50,000 / 50,000 |
| Number of Features | 46 numerical |
| Label Column | label |
| Number of Classes | 34 (33 attack + 1 benign) |
| Missing Values | None |
| Infinite Values | None |
Table 3.
Class Distribution According to 5G Network Slice Mapping (selected classes).
| Attack Type | 5G Slice | Train Samples | Train % |
|---|---|---|---|
| DDoS-ICMP_Flood | eMBB | 31,001 | 15.5% |
| DDoS-UDP_Flood | eMBB | 23,220 | 11.6% |
| DoS-UDP_Flood | URLLC | 14,384 | 7.2% |
| Mirai-greeth_flood | mMTC | 4,204 | 2.1% |
| DNS_Spoofing | URLLC | 760 | 0.4% |
| Backdoor_Malware | mMTC | 13 | 0.0% |
| eMBB total | ∼141,167 | 70.5% | |
| URLLC total | ∼36,605 | 18.3% | |
| mMTC total | ∼16,313 | 6.6% |
Table 4.
Hyperparameter Configuration of the TabNet Model.
| Hyperparameter | Value | Description |
|---|---|---|
| 32 | Decision step embedding size | |
| 32 | Attention embedding dimension | |
| 5 | Number of decision steps | |
| 1.3 | Feature reusage regularizer | |
| 2 | Independent GLU layers | |
| 2 | Shared GLU layers | |
| momentum | 0.02 | Batch normalisation momentum |
| batch_size | 4,096 | Training batch size |
| max_epochs | 50 | Maximum epochs |
| patience | 10 | Early stopping patience |
| optimizer | Adam | Optimiser |
| seed | 42 | Reproducibility seed |
Table 5.
Top-15 Features by TabNet Attention Weight (Validation Set).
| Rank | Feature | Attention Weight | AGE Priority |
|---|---|---|---|
| 1 | syn_count | 5.0889 | Critical |
| 2 | IAT | 4.3423 | Critical |
| 3 | SMTP | 4.2546 | Critical |
| 4 | UDP | 3.7336 | High |
| 5 | TCP | 3.2534 | High |
| 6 | Protocol Type | 2.5249 | High |
| 7 | ack_count | 2.5162 | High |
| 8 | HTTP | 2.1409 | Medium |
| 9 | ack_flag_number | 1.8696 | Medium |
| 10 | IRC | 1.8001 | Medium |
| 11 | ICMP | 1.3584 | Medium |
| 12 | fin_count | 1.0876 | Low |
| 13 | Magnitude | 1.0664 | Low |
| 14 | Variance | 0.4776 | Low |
| 15 | rst_flag_number | 0.4490 | Low |
Table 6.
Adversarial Attack Configuration.
| Attack | Target Features | Range | Steps | Method |
|---|---|---|---|---|
| FGSM | 46 (all) | 0.01–0.50 | 1 | Single-step gradient sign |
| PGD | 46 (all) | 0.01–0.50 | 10 | Iterative projection |
| AGE (Transfer) | 5 (attention) | 0.01–0.50 | 10 | Surrogate MLP → TabNet + attention-weighted gradient |
Table 7.
Global vs. Per-Slice F1-Score (Clean Conditions).
| Category | F1-Score (Clean) |
|---|---|
| Global (Weighted) | 0.928 |
| eMBB | 0.981 |
| URLLC | 0.956 |
| mMTC | 0.483 |
Table 10.
Epsilon Sweep Results for FGSM, PGD, and AGE-Transfer.
| AGE Acc | FGSM Acc | PGD Acc | AGE Drop | FGSM Drop | AGE | FGSM | AGE Feat | |
|---|---|---|---|---|---|---|---|---|
| 0.01 | 0.839 | 0.472 | 0.490 | 13.8% | 46.5% | 0.004 | 0.063 | 4.0/46 |
| 0.05 | 0.485 | 0.489 | 0.584 | 48.8% | 48.4% | 0.019 | 0.316 | 4.0/46 |
| 0.10 | 0.469 | 0.487 | 0.522 | 50.2% | 48.4% | 0.037 | 0.632 | 3.9/46 |
| 0.20 | 0.539 | 0.526 | 0.529 | 43.2% | 44.5% | 0.072 | 1.265 | 3.9/46 |
| 0.30 | 0.573 | 0.668 | 0.585 | 39.8% | 30.3% | 0.105 | 1.897 | 3.8/46 |
| 0.50 | 0.611 | 0.607 | 0.510 | 36.0% | 36.4% | 0.171 | 3.162 | 3.6/46 |
Table 11.
Comparative Summary of Attack Methods ( and ).
| Attack | Acc↓ | Drop↑ | Feat. Modified | Stealthiness | ||
|---|---|---|---|---|---|---|
| AGE-Transfer (Proposed) | 0.10 | 0.469 | 50.2% | 0.037 | 3.9/46 (8.5%) | HIGH |
| AGE-SHAP (DeepSHAP) | 0.10 | 0.999 | 0.1% | 0.045 | 5.0/46 (10.9%) | LOW |
| FGSM | 0.10 | 0.487 | 48.4% | 0.632 | 46/46 (100%) | LOW |
| PGD | 0.10 | 0.522 | 44.9% | — | 46/46 (100%) | LOW |
| AGE-Transfer (Proposed) | 0.20 | 0.539 | 43.2% | 0.072 | 3.9/46 (8.5%) | HIGH |
| FGSM | 0.20 | 0.526 | 44.5% | 1.265 | 46/46 (100%) | LOW |
| PGD | 0.20 | 0.529 | 43.2% | — | 46/46 (100%) | LOW |
| Baseline (clean) | — | 0.937 | — | — | — | — |
Table 12.
Per-Slice Robustness Analysis ().
| Slice | N | Acc (Clean) | Acc (AGE) | Acc (FGSM) | PSRI (AGE) | PSRI (FGSM) |
|---|---|---|---|---|---|---|
| eMBB | 5,815 | 0.997 | 0.486 | 0.601 | 0.488 | 0.603 |
| URLLC | 1,465 | 0.932 | 0.021 | 0.020 | 0.023 | 0.022 |
| mMTC | 532 | 0.784 | 0.771 | 0.355 | 0.983 | 0.453 |
| Benign | 188 | 0.941 | 0.941 | 0.947 | 1.000 | 1.006 |
| Global | 8,000 | 0.969 | 0.431 | 0.486 | 0.444 | 0.502 |
Table 13.
Baseline Model Comparison (Mean ± Std, 5 Seeds).
| Model | Accuracy | Weighted F1 | Train Time (s) |
|---|---|---|---|
| Random Forest | 9.5 | ||
| MLP | 462.8 | ||
| TabNet | 0.9741 | 0.9703 | 16,200 |
Table 14.
Per-Slice Robustness Index (PSRI) Across Models (FGSM, ).
| Model | eMBB PSRI | URLLC PSRI | mMTC PSRI |
|---|---|---|---|
| Random Forest | 0.453 | 0.482 | 0.750 |
| MLP | 0.701 | 0.512 | 0.839 |
| TabNet | 0.488 | 0.023 | 0.983 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.