Preprint
Article

This version is not peer-reviewed.

Slice-Aware Adversarial Vulnerability Analysis of TabNet-Based Intrusion Detection in 5G Network Slicing

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: 
;  ;  ;  ;  ;  ;  ;  

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.
The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 describes the dataset, threat model, and experimental setup. Section 4 formalizes the proposed slice-aware evaluation metrics. Section 5 presents results and discussion. Section 6 concludes the paper.

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]:
x = x + ε · sign ( x J ( θ , x , y ) )
PGD [26]:
x t + 1 = Π x + S x t + α · sign ( x J ( θ , x t , y ) )
For both attacks, ε { 0.01 , 0.05 , 0.10 , 0.20 , 0.30 , 0.50 } 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 f s , while the perturbation magnitude and feature selection are governed by the TabNet attention mask. The perturbation vector for feature j is:
δ j = ε · a j TabNet k A a k TabNet · sign x j J ( f s , x , y ) if j A 0 otherwise
where a j TabNet is the attention weight of feature j, A is the top-5 attention feature set, ε is the perturbation budget, f s is the surrogate MLP (three hidden layers: 256–128–64 neurons, ReLU), and J is the cross-entropy loss. The adversarial examples x = x + δ 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

Standard metrics (Accuracy, Precision, Recall, weighted F1, macro F1) are reported alongside the proposed slice-aware metrics [31,32,33]. All metrics are computed separately under clean conditions and under each adversarial attack for every tested ε value, and reported per slice in Section 5.

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 S = { eMBB , URLLC , mMTC } . For adversarial attack a with perturbation budget ε :
PSRI s ( a , ε ) = Acc s adv ( a , ε ) Acc s clean
PSRI s = 1.0 indicates perfect robustness; PSRI s 0 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:
PSRI ¯ ( a , ε ) = 1 | S | s S PSRI s ( a , ε )

4.3. Slice-Weighted F1 (SW-F1)

SW - F 1 = 1 | S | s S F 1 s weighted
Unlike F 1 weighted , SW-F1 assigns equal weight to each slice regardless of sample size. In our experiments:
F 1 weighted = 0.928 , SW - F 1 = 0.981 + 0.956 + 0.483 3 = 0.807
The 0.121-point gap quantifies the degree to which global metrics overestimate protection for minority slices.

4.4. Stealthiness Metrics

L 2 ( a , ε ) = 1 n i = 1 n x i adv x i 2
F C ( a , ε ) = 1 n i = 1 n j = 1 d 1 | x i j adv x i j | > δ
where δ = 10 6 and d = 46 .

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).
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).
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

Feature importance ranking was computed over 2,000 validation examples to avoid test set leakage. The top five features are: syn_count (5.09), IAT (4.34), SMTP (4.25), UDP (3.73), and TCP (3.25). The full ranking is in Table 5 and visualised in Figure 4.

5.3. Adversarial Attack Comparison

Table 10 and Table 11 summarise the epsilon-sweep results. At ε = 0.10 , AGE-Transfer achieves a 50.2% accuracy drop while modifying only 3.9 features and using an L 2 norm of 0.037. FGSM modifies all 46 features with L 2 = 0.632 , using 17 × 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.
Preprints 230261 g005
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 + 0.044 (AGE achieves 4.4 percentage points higher accuracy drop), with a 95% bootstrap CI of [ 0.036 , 0.052 ] . 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 ε = 0.10 . URLLC is the most vulnerable slice: PSRI URLLC ( AGE ) = 0.023 . The SW-F1 gap further underscores this: F 1 weighted = 0.928 versus SW - F 1 = 0.807 , a difference of 0.121.
Figure 6. Per-slice PSRI, accuracy, and F1-drop comparison under FGSM and AGE-Transfer ( ε = 0.10 ).
Figure 6. Per-slice PSRI, accuracy, and F1-drop comparison under FGSM and AGE-Transfer ( ε = 0.10 ).
Preprints 230261 g006

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 ( n = 1 , 176 , 851 ) 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 ( N = 8 , 000 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).
Figure 7. Clean performance comparison of Random Forest, MLP, and TabNet (mean ± std over 5 seeds).
Preprints 230261 g007

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 ε = 0.10 (50.2% vs. 48.4%) while modifying only 8.5% of features and using 17 × less L 2 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 ε = 0.10 while requiring 17 × less L 2 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.

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 ( n = 1 , 176 , 851 ) is provided in Table A1.
Table A1. Full Classification Report — TabNet Baseline (Test Set, n = 1 , 176 , 851 ).
Table A1. Full Classification Report — TabNet Baseline (Test Set, n = 1 , 176 , 851 ).
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

  1. 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]
  2. 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]
  3. Alshahrani, E.; et al. Adversarial Attacks Against Supervised Machine Learning Based Network Intrusion Detection Systems. PLoS ONE 2022. [Google Scholar] [CrossRef] [PubMed]
  4. 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]
  5. 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]
  6. 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]
  7. 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]
  8. ElShehaby, M.; Matrawy, A. Evasion Adversarial Attacks Remain Impractical Against ML-Based NIDS, Especially Dynamic Ones. arXiv 2024, arXiv:2306.05494. [Google Scholar]
  9. 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]
  10. 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]
  11. Arik, S.Ö.; Pfister, T. TabNet: Attentive Interpretable Tabular Learning. Proc. AAAI 2021, Vol. 35, 6679–6687. [Google Scholar] [CrossRef]
  12. Kouhi, A.; Lashkari, A.H. MQTTFlowLyzer: Interpretable TabNet-Based Flow-Level MQTT Intrusion Detection for IoT. J. Supercomput. 2026, 82, 334. [Google Scholar] [CrossRef]
  13. 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]
  14. Moustafa, N.; Slay, J. UNSW-NB15: A comprehensive data set for network intrusion detection systems. Proc. MilCIS 2015, 1–6. [Google Scholar] [CrossRef]
  15. Aryal, K.; Gupta, M.; Abdelsalam, M.; Saleh, M. Explainability Guided Adversarial Evasion Attacks on Malware Detectors. arXiv 2024, arXiv:2405.01728. [Google Scholar]
  16. 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]
  17. 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]
  18. 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]
  19. Hizal, S.; Cavusoglu, U.; Akgun, D. A Novel Deep Learning-Based Intrusion Detection System for IoT DDoS Security. Internet of Things, 2024. [Google Scholar]
  20. Canadian Institute for Cybersecurity. IoT Dataset 2023. University of New Brunswick. 2023. Available online: https://www.unb.ca/cic/datasets/iotdataset-2023.html.
  21. 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]
  22. Ganiuly, D.; Bolatbek, N. Slice-Aware Spoofing Detection in 5G Networks Using Lightweight Machine Learning. arXiv 2025, arXiv:2511.09610. [Google Scholar]
  23. 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]
  24. 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]
  25. Goodfellow, I.J.; Shlens, J.; Szegedy, C. Explaining and Harnessing Adversarial Examples. In Proceedings of the ICLR, 2015. [Google Scholar]
  26. 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]
  27. Pedregosa, F.; et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
  28. He, H.; Garcia, E.A. Learning from Imbalanced Data. IEEE Trans. Knowl. Data Eng. 2009, 21, 1263–1284. [Google Scholar] [CrossRef]
  29. 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]
  30. 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]
  31. Grandini, M.; Bagli, E.; Visani, G. Metrics for Multi-Class Classification: An Overview. arXiv 2020, arXiv:2008.05756. [Google Scholar]
  32. 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]
  33. 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 1. 5G Slice-Based Distribution of the CICIoT2023 Dataset.
Preprints 230261 g001
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.
Preprints 230261 g002
Figure 3. TabNet Baseline — Confusion Matrix (Test Set, n = 50 , 000 ).
Figure 3. TabNet Baseline — Confusion Matrix (Test Set, n = 50 , 000 ).
Preprints 230261 g003
Figure 4. TabNet Attention Mask — Top-15 Features by Average Attention Weight.
Figure 4. TabNet Attention Mask — Top-15 Features by Average Attention Weight.
Preprints 230261 g004
Table 1. Comparison of Related Work.
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.
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).
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.
Table 4. Hyperparameter Configuration of the TabNet Model.
Hyperparameter Value Description
N d 32 Decision step embedding size
N a 32 Attention embedding dimension
N steps 5 Number of decision steps
γ 1.3 Feature reusage regularizer
N independent 2 Independent GLU layers
N shared 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).
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.
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).
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.
Table 10. Epsilon Sweep Results for FGSM, PGD, and AGE-Transfer.
ε AGE Acc FGSM Acc PGD Acc AGE Drop FGSM Drop AGE L 2 FGSM L 2 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 ( ε = 0.10 and ε = 0.20 ).
Table 11. Comparative Summary of Attack Methods ( ε = 0.10 and ε = 0.20 ).
Attack ε Acc↓ Drop↑ L 2 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 ( ε = 0.10 ).
Table 12. Per-Slice Robustness Analysis ( ε = 0.10 ).
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).
Table 13. Baseline Model Comparison (Mean ± Std, 5 Seeds).
Model Accuracy Weighted F1 Train Time (s)
Random Forest 0.9739 ± 0.0048 0.9714 ± 0.0049 9.5
MLP 0.9824 ± 0.0003 0.9810 ± 0.0002 462.8
TabNet 0.9741 0.9703 16,200
Table 14. Per-Slice Robustness Index (PSRI) Across Models (FGSM, ε = 0.10 ).
Table 14. Per-Slice Robustness Index (PSRI) Across Models (FGSM, ε = 0.10 ).
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.
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.