Manuscript Offprint

arXiv:2609.06012

Robustness Evaluation and Detection of Transferable Adversarial Attacks in ML-Based NIDS

Huda Ali Alatawi

Abstract

Machine learning-based network intrusion detection systems (ML-based NIDS) are vulnerable to adversarial evasion, where malicious samples are perturbed to evade detection and be misclassified as benign. Despite growing research on adversarial attacks and defenses for ML-based NIDS, comparative evaluations of multiple attack types, detection models, and defense strategies under a common setting remain limited. In this paper, we evaluate eight adversarial evasion attacks, fifteen detection models, and three representative defense strategies using the NF-UQ-NIDS dataset, which includes recent traditional and IoT network traffic with twenty distinct attack categories. The evaluation compares model performance on clean test data and on robustness evaluation sets that include adversarial samples, analyzes attack success consistency across models, and examines the effect of defense strategies on adversarial robustness. To support model comparison, we introduce the Robustness Index (RI), a compact comparative metric that rewards high balanced accuracy and macro-F1 score computed on the robustness evaluation set while penalizing high attack success rate (ASR). We further present AR-NIDS, a two-stage framework that uses an adversarially trained ensemble to distinguish normal, attack, and adversarial samples, followed by an adversarial attack classifier to identify the attack type. Under the evaluated transfer-based setting, the proposed adversarially trained ensemble achieves the strongest overall trade-off between classification performance on the robustness evaluation set and evasion resistance, reducing the average ASR from 0.41 to 0.03 and achieving an RI of 0.98.

Keywords: Network Intrusion Detection, Adversarial Defense, Adversarial Robustness, Adversarial Examples, Adversarial Attacks, Adversarial Machine Learning, Network Security

1. Introduction

Network Intrusion Detection Systems (NIDS) protect networks by monitoring traffic for signs of security violations. Signature-based NIDS compare traffic patterns to a database of known attack signatures but are ineffective against zero-day attacks [1]. Anomaly-based NIDS, on the other hand, use machine learning to detect deviations from normal traffic behavior, enabling them to identify previously unseen attacks and enhance network security [1, 2]. Despite these advantages, ML-based NIDS are vulnerable to adversarial examples, where malicious samples are intentionally perturbed to deceive machine learning models and evade detection [3]. These adversarial examples exploit model vulnerabilities and may transfer across models, meaning that samples generated against one model can also fool other detection models [4]. This transferability is particularly important in NIDS because an attacker may use a surrogate IDS model to generate adversarial samples and then attempt to evade a different deployed detector without direct access to its internal parameters [3].

Significant research has been conducted on evaluating and defending against adversarial attacks in ML-based NIDS [5-14]. Despite these advancements, existing studies often examine isolated aspects of the problem, such as a limited set of attacks, a small number of models, or a single defense mechanism. Comparative assessments that jointly compare attack behavior, model robustness, and defense effectiveness under a common evaluation setting remain limited. This issue is further complicated by the continued use of older datasets in parts of the literature, which may reduce the relevance of findings to recent network environments [15]. Therefore, evaluating multiple adversarial attacks, detection models, and defense strategies using recent NetFlow-based data is important for understanding the robustness of ML-based NIDS under modern adversarial conditions.

In ML-based NIDS, robustness refers to a model's ability to maintain reliable detection performance when facing adversarial attacks or other perturbations [12, 16]. Robustness evaluations often report detection performance and attack success rate (ASR) separately. While these metrics are useful, reporting them in isolation can obscure important trade-offs. For example, a model may achieve strong performance on clean data while remaining vulnerable to adversarial evasion, or it may reduce ASR while suffering degraded classification performance. This motivates the need for a compact comparative metric that considers both classification performance when adversarial samples are included and resistance to evasion when comparing ML-based NIDS models.

Research on enhancing ML-NIDS robustness has explored strategies such as adversarial training [7, 8, 10–14], ensemble learning [5, 6], and specialized adversarial detectors [9]. These

∗^{*}Corresponding author

Email address: haladheedi@ut.edu.sa (Huda Ali Alatawi) approaches have shown improvements in some settings, but their effectiveness can vary depending on the attack type, model architecture, and evaluation scenario. Ensemble methods may improve predictive performance on clean data but do not necessarily guarantee adversarial robustness. Similarly, adversarial training may reduce attack success but can be sensitive to the types of adversarial examples used during training. These trade-offs highlight the need to compare representative defense strategies under the same transfer-based adversarial setting.

In this paper, we present an empirical robustness evaluation of ML-based NIDS under transferable adversarial attacks. We use the NF-UQ-NIDS dataset [17], which contains recent traditional and IoT network traffic with twenty attack categories. The study evaluates eight adversarial evasion attacks, fifteen detection models, and three representative defense strategies. The adversarial examples are generated against a feed-forward deep neural network surrogate model and evaluated across other ML-based NIDS models to assess transferability. This evaluation setting allows us to analyze how different models and defenses respond to adversarial samples generated under a common threat model.

Contributions: The contributions of this paper are as follows:

We conduct a comparative evaluation of adversarial attack performance, model robustness, and defense effectiveness. Our assessment includes eight attack types, fifteen detection models, and three representative defense strategies using the NF-UQ-NIDS dataset [17], which includes recent traditional and IoT network traffic with twenty attack categories. We compare models' performance on clean test data and robustness evaluation sets (Sections 6.1 and 6.2), analyze attacks' performance consistency across detection models (Section 6.4), and examine the effect of defense strategies on adversarial attack success (Section 7.5).

  • We introduce the Robustness Index (RI), a compact comparative metric that combines balanced accuracy and macro-F1 score computed on the robustness evaluation set with attack success rate. RI supports model comparison by capturing the trade-off between classification performance when adversarial samples are included and resistance to adversarial evasion (Section 4.1).

  • We introduce the Adversarial-Robust NIDS (AR-NIDS), a two-stage framework that uses an adversarially trained ensemble to distinguish normal, attack, and adversarial samples, followed by an adversarial attack classifier to identify the attack type (Section 4.2). Under the evaluated transfer-based setting, the adversarially trained ensemble improves empirical robustness compared with the evaluated baseline and defense models (Section 7).

References (33)