Adversarial robustness is not zero-day generalization: a controlled evaluation of flow-based intrusion detectors on a corrected version of CIC-IDS2017Adversarial Robustness Is Not Zero-Day Generalization: A Controlled Evaluation of Flow-Based Intrusion Detectors on Corrected CIC-IDS2017
The authors comparatively evaluate four NIDS on a corrected version of CIC-IDS2017: adversarial perturbation robustness is 90.9%–99.7%, but held-out attack family detection is only 22.8%–76.2%; the authors state that robustness scores cannot be treated as zero-day detection scores.
- When evaluating NIDS, synthetic variants such as adversarial perturbations of known attacks are often used as a proxy for unseen (zero-day) attacks, but whether this proxy holds is rarely tested.
- Train RF, XGBoost, 1D-CNN, and FT-Transformer on corrected CIC-IDS2017, and at fixed 1% FPR over five seeds, compare bounded perturbation robustness on known attacks with detection rate on held-out entire attack families (LOAO).
- At ϵ ≤ 0.2, worst-case robustness is 90.9%–99.7%, while average LOAO detection rate drops to 22.8%–76.2%, a gap of 24–72 percentage points; on CSE-CIC-IDS2018 the gap is 16–68 points; neither benign-only anomaly detection baselines nor MSP open-set baselines close the gap.
- The authors note that perturbations are limited to feature space, attacks on neural models remain heuristic, the temporal split does not include FT-Transformer, and defenses are not evaluated; the experiments cover two corrected datasets, four detectors, and five seeds (the second dataset has three seeds and three models).
- Threat model
- The attacker modifies flows of known attack families to evade detection; perturbations act only on 42 attacker-controllable features (forward packet counts, sizes, timing, etc.), are bounded in the standardized signed-log feature space by the L∞ norm with ϵ∈{0.05,0.1,0.2,0.5}, and are projected back to the feasible region; the black-box attacker can see continuous scores and query freely.
- Evaluated models
- Random ForestXGBoost1D-CNNFT-Transformer
- Benchmarks
- CIC-IDS2017 (corrected release)CSE-CIC-IDS2018 (improved release)
- Metrics
- Detection rate at 1% FPRworst-case robustness (ϵ ≤ 0.2)mean LOAO detectionAUROCF1
The paper trains four flow-based intrusion detection models—random forest, XGBoost, 1D-CNN, and FT-Transformer—on a corrected version of CIC-IDS2017, and examines whether adversarial robustness can represent detection capability against unseen attack families; the authors conclude that it cannot. At a 1% false positive rate and with five random seeds, under the strongest perturbation (budget not exceeding 0.2), the detection rate remains between 90.9% and 99.7%, but the average detection rate under leave-one-attack-family-out (LOAO) drops to 76.2% for random forest, 40.2% for XGBoost, 25.8% for 1D-CNN, and 22.8% for FT-Transformer. Robustness is higher than LOAO detection for every model, with a gap of 24 to 72 percentage points, and the two metrics agree at most on a coarse ranking of models. An anomaly detector using only normal samples and a simple multiclass open-set baseline fail to close the gap; the gap reproduces for every model on CSE-CIC-IDS2018, and the authors recommend reporting robustness scores and zero-day generalization scores separately.
Paper analysis
What problem does this paper attempt to solve?
Tests whether "robust to adversarial perturbation of known attacks" can serve as evidence for "can detect zero-day attacks"; the authors state the two are not interchangeable.
Core question: whether using synthetic variants of known attacks (e.g., feature-space adversarial perturbations) as unseen ("zero-day") attacks to evaluate ML NIDS is a valid proxy.
- Scenario and motivation: the authors state that ML NIDS often report near-perfect detection rates on public benchmarks, but in deployment encounter traffic and attacks different from the training distribution; what really matters is detector performance on attacks never seen before, and labeled zero-day traffic is naturally scarce.
- Shortcomings of existing practice: the authors state that recent work approximates zero-day detection using cross-dataset evaluation or synthesizing "new" attacks from known ones (e.g., generative models, adversarial perturbations), but rarely tests whether these synthetic samples behave like genuinely new attack families; perturbed flows remain close to their source attack, while new attack families may be entirely different.
- Core observation: the authors originally treated perturbed/mixed attacks as a synthetic zero-day test set and held-out attack families only as a sanity check, but the sanity check failed—detectors that barely move under perturbation miss most traffic from never-seen attack families, so this became the research topic.
- The paper proposes: a controlled evaluation protocol comparing two regimes on the same data, models, and 1% FPR operating point—bounded perturbation robustness on known attacks versus held-out attack family (LOAO) detection; and gives reporting recommendations (report the two separately, report LOAO at fixed FPR, etc.).
- Threat model (for the perturbation side):
- Goal: the attacker modifies flows of known attack families to evade detection.
- Capability: perturbations act only on 42 attacker-controllable features (forward packet counts, sizes, timing, flow duration, inter-arrival times, active/idle statistics, flow-level aggregates); backward features, TCP flags, protocol fields, and initial window are not changed.
- Constraint: L∞ norm ϵ∈{0.05,0.1,0.2,0.5} in the standardized signed-log space, with projection back to the feasible region after perturbation (clipping to training range, integer rounding, min ≤ mean ≤ max reordering).
- Victim system and knowledge: the victim system is four binary detectors; the black-box attacker can see continuous scores and query freely (the authors state this exposes more than a deployed NIDS typically does, favoring a strong attacker).
What related research exists?
Related work falls into four groups: NIDS generalization and evaluation pitfalls, CIC-IDS2017 data quality, adversarial attacks on NIDS, and this paper's positioning.
Generalization and evaluation pitfalls of NIDS
- Sommer and Paxson [1] early on explained why machine learning struggles to discover new attacks in network traffic; Arp et al. [2] cataloged pitfalls that inflate results in security ML (e.g., data snooping, improper baselines).
- The cross-dataset evaluation of Layeghy and Portmann [3] exposed performance degradation of NIDS on another network's traffic; Ahmad et al. [12] systematically reviewed zero-day detection methods; Zoppi et al. [13] compared supervised, unsupervised, and meta-learning detectors on attacks unseen at training time.
- Other work generates "zero-day-like" samples from known attacks (GAN-generated malware records [4], synthetic attack signatures [5], generated low-frequency/unknown attack samples [14], traffic imitating zero-day patterns [15]) for training or evaluation; the paper notes that these works do not test whether synthetic samples resemble genuinely new attack families, and that [15] used a leave-one-attack-type-out protocol. Sarhan et al. [17] used a zero-shot protocol to hold out attack categories and found that detectors fail on attack groups whose features differ greatly from the training attacks; the authors state this is consistent with this paper's LOAO results. Taori et al. [18] found in computer vision that robustness to synthetic image perturbations rarely transfers to natural distribution shifts; the authors state that this paper asks the same question in NIDS.
CIC-IDS2017 data quality
- Engelen et al. [8] documented systematic flow construction and labeling errors in CIC-IDS2017 [19] and released corrected data; Liu et al. [9] quantified how prevalent the errors are in the dataset and released an improved version; Lanvin et al. [20] pointed out that these errors substantially change reported detection performance. This paper uses the corrected version and additionally removes exact duplicate and label-conflicting flows.
Adversarial attacks on NIDS
- Gradient attacks (FGSM [6], PGD [7]) require differentiable models; tree ensembles require dedicated evasion methods (Kantchelian et al. [11]) or black-box search (SimBA [10]).
- Pierazzi et al. [21] distinguished feature-space and problem-space attacks and formalized the constraints that realistic attacks must satisfy; Apruzzese et al. [22] modeled realistic adversarial attacks against NIDS. Alhussien et al. [16] proposed constrained attack signatures for "zero-day adversarial attacks"—the paper notes that in that work "zero-day" refers to new evasion variants of known attacks, whereas this paper refers only to attack families absent from training.
Positioning of this paper
- The authors state that prior work typically measures only adversarial robustness or only generalization to unknown attacks; according to their search on OpenAlex and arXiv, no study measures both on the same models, data, and operating point and tests whether one predicts the other, and this paper fills that gap. This paper's LOAO protocol has a similar goal to cross-dataset testing but keeps the network environment unchanged, isolating the novelty of the attack family.
- Baselines and benchmarks: The comparison baselines are Isolation Forest, an autoencoder (benign-only anomaly detection), and a multiclass MSP open-set baseline; the benchmarks are the corrected CIC-IDS2017 and the improved CSE-CIC-IDS2018.
How does the paper address this problem?
Compare two regimes on the same data, models, and operating point: bounded perturbation robustness on known attacks vs held-out attack family (LOAO) detection.
Overall approach: train four binary detectors on the corrected CIC-IDS2017, and at a fixed 1% FPR and five seeds, separately measure constrained perturbation robustness to known attacks and LOAO detection rate on entire held-out attack families, then quantitatively compare the gap and ranking agreement between the two.
Data and preprocessing
- Use Liu et al.'s [9] improved CIC-IDS2017 (based on Engelen et al.'s [8] corrections); "Attempted" labels are changed to benign as recommended by the dataset authors; after dropping identifier/leakage fields, 82 numerical flow features remain.
- After removing rows with missing/infinite values, 2,099,971 flows remain; after further removing exact duplicate and label-conflicting flows, 384,774 in total, 1,715,197 remain (Table I).
- Attacks are grouped into six families: DoS, DDoS, PortScan, BruteForce, Botnet, WebAttack; Infiltration (36 flows) and Heartbleed (11 flows) are excluded from all experiments due to being too few.
Sampling, splits, and detectors
- Per seed, a 70/30 split per family; sample at most 100,000 benign training flows (20% as validation set, used only to set the threshold), 40,000 benign test flows, and at most 15,000 training / 5,000 test flows per family; scaling statistics are fitted only on training samples.
- Detectors: Random Forest (100 trees), XGBoost (300 trees, depth 8), 1D-CNN, FT-Transformer, all binary; the threshold is set to the 99th percentile of benign validation scores (target FPR 1%).
- Reference baselines: Isolation Forest and an autoencoder, trained only on benign training flows and thresholded the same way, to answer whether held-out families are already detectable in this feature space under a 1% alert budget.
Threat model and six perturbation procedures
- Perturbations act only on 42 attacker-controllable features (the full list is in the appendix), with L∞ bound ϵ∈{0.05,0.1,0.2,0.5}; the authors give original-unit conversions: at ϵ=0.2 the median multiplier across the 42 features is 1.9, and at ϵ=0.5 it is 5.0; ϵ ≤ 0.2 is treated as a realistic attacker, and ϵ=0.5 is only a stress test and does not enter the robustness scores compared with LOAO.
- Six procedures: random-sign control; FGSM and 10-step PGD (computed on an independently trained MLP surrogate and transferred to each target); white-box PGD against the two neural targets; SimBA-style score-based black-box coordinate search (two passes, with a five-pass variant as a convergence check); tree-aware coordinate search against RF/XGBoost (using split thresholds, at most 24 candidates per feature per flow, three passes).
- Additionally, following Kantchelian et al. [11], solve an exact mixed-integer program (MILP) evasion for the tree ensembles to verify that the coordinate search did not miss joint evasions.
- Cross-family mixing (mixup-inspired): convex combinations λxa + (1−λ)xb of test flows from two families, λ ∼ U(0.3, 0.7), as a second synthetic proxy.
LOAO protocol and statistics
- For each family f, all detectors are retrained on benign traffic plus the other five families, the threshold is reset, and the detection rate on the unseen family f is measured; the authors state that LOAO keeps the network environment and feature extraction unchanged and only changes whether the attack family appeared, making it a controlled proxy for zero-day attacks.
- Each configuration is run with five seeds (0–4), reporting the mean and 95% Student-t confidence interval; changes in detection before and after perturbation are tested with exact McNemar tests (360 tests, Holm-corrected overall).
- Two comparison questions: (1) whether robustness overestimates zero-day detection—per seed and per model, compare the minimum detection rate across all attacks at ϵ ≤ 0.2 (worst-case robustness, including tree-aware search; the authors note this is the worst case over the attacks run, not a certified bound) with the average LOAO detection rate, using paired t-tests (Holm-corrected across four models) and Wilcoxon signed-rank tests; (2) whether robustness predicts zero-day detection—compute the Spearman rank correlation across the four model means (exact permutation test). The primary metric is detection rate at a fixed 1% FPR; AUROC is only a secondary metric.
What experiments did the paper conduct?
At ϵ ≤ 0.2, robustness is 90.9%–99.7%, LOAO detection only 22.8%–76.2%, a gap of 24–72 points supported by statistical tests; the direction is the same on the second dataset.
Experimental Setup
- Models evaluated: four binary detectors—Random Forest, XGBoost, 1D-CNN, FT-Transformer; reference baselines are Isolation Forest and an autoencoder (benign-only training), plus multiclass MSP open-set variants of RF/XGBoost.
- Datasets: corrected CIC-IDS2017 (1,715,197 flows after cleaning, six attack families); improved CSE-CIC-IDS2018 (1,440,158 flows after uniform sampling).
- Metrics: detection rate at fixed 1% FPR (primary metric), worst-case robustness (minimum detection rate across all attack processes at ϵ ≤ 0.2), average LOAO detection rate, AUROC and F1 (secondary).
- Review method: no LLM or human review; detection is determined by threshold, statistics use McNemar, paired t-test (Holm correction), Wilcoxon, Spearman exact permutation test.
- Samples and repetitions: main experiments use five seeds (0–4); number of flows per attack for perturbation experiments is given in Table IV (e.g., random sign/FGSM/PGD 14,642 per seed, SimBA 2,253, tree-aware search 1,032); CSE-CIC-IDS2018 uses 3 seeds and 3 models (FT-Transformer not run due to CPU-only runtime).
- Environment: Google Colab (T4 GPU), one full run (five seeds, all scenarios) takes 76 minutes.
Main Results
According to Table IV, Table V, Table VIII (CIC-IDS2017, 1% FPR, mean over five seeds):
Swipe horizontally to read the table
Model Known-attack detection rate (Table II) worst-case robustness ϵ ≤ 0.2 Average LOAO detection rate Gap (percentage points) RF 100.0% 99.7% 76.2% 23.5 XGBoost 100.0% 99.7% 40.2% 59.5 1D-CNN 99.9% 90.9% 25.8% 65.0 FT-Transformer 99.9% 94.6% 22.8% 71.8 - The authors report: the gap is positive for all four models and all p ≤ 0.00096 after Holm correction in paired t-tests (effect size dz 3.9–11.0); the Wilcoxon test across 20 model-seed pairs reaches the minimum attainable value p = 1.9 × 10⁻⁶.
- The authors report: robustness agrees with LOAO only in coarse ranking—Spearman ρ = 0.60 for the four-model mean (exact permutation p = 0.21), ρ = 0.69 when permuting whole models (p = 0.04); the correlation is carried by "tree ensembles above neural models," and within trees XGBoost and RF have identical robustness (99.7%) but LOAO about half (40.2% vs 76.2%).
- The authors state: under the ϵ = 0.5 stress test, white-box PGD lowers 1D-CNN detection to 22.0% and FT-Transformer to 82.4%, and SimBA to 18.7% and 66.7%; transfer attacks are weaker (75.8% and 97.4%), and the random-sign control changes only a few points, from which the authors conclude the degradation comes from attack direction rather than noise.
Exact Evasion and Robustness Verification of Tree Ensembles
- What was tested: exact MILP evasion for RF/XGBoost within the same ϵ box (at most 200 flows per family per seed, 5 seeds, ϵ ∈ {0.2, 0.5}).
- Results: at ϵ = 0.2 the certified detection rate is at least 99.8% (RF) and 100.0% (XGBoost); at ϵ = 0.5 at least 98.8% and 99.3%; across all runs only 55 verified evasions and 49 undecided (Table source is main text V-B).
- Authors' interpretation: within this threat model the tree ensembles' robustness is exact, and the gap is not an artifact of weak attacks; the authors offer an unverified conjecture—that many splits use backward and flag features that the threat model does not allow to be changed.
Benign-only and Open-set Baselines
- Anomaly detection baselines (Table VI): Isolation Forest detects on average 10.5% of unseen families, autoencoder 4.6% (AUROC 0.878 and 0.901 respectively); only PortScan stands out (61.0% and 17.9%); under SimBA ϵ = 0.5 the two drop to 0.5% and 2.9%. The authors state that under a 1% alert budget, benign-only detectors must rank attacks outside the most anomalous 1% of benign flows, and benign traffic has a long tail.
- Open-set baselines (Table VII): multiclass RF/XGBoost with MSP rejection detect on average 67.0% (RF) and 52.7% (XGBoost) of held-out families, versus 76.2% and 40.2% for binary (−9.2 and +12.5 points); PortScan remains below 27% and WebAttack below 28%. The authors state that such simple open-set rejection cannot close the gap, but do not claim it is the best open-set method.
Other Ablations and Analyses
- Temporal split (Table III, 5 seeds, FT-Transformer not included): the gap remains—28.9 (RF), 61.0 (XGBoost), 62.1 (1D-CNN) points, versus 23.6, 59.5, 65.0 for the random split; the authors read this as a robustness check rather than a second estimate.
- Feature-consistency repair (Table IX): 74%–93% of perturbed/mixed flows violate derived-feature identities; after forced repair, ϵ ≤ 0.2 worst-case is 99.8% (RF), 99.8% (XGBoost), 94.3% (1D-CNN), 93.2% (FT-Transformer), and the gap of 23.6–70.4 points remains all positive (p ≤ 0.0011); the authors state the conclusion is unchanged.
- Family-averaged robustness: after family weighting the gap is 23.4–65.6 points, and the smallest single model-seed gap is 19.3 points (p ≤ 0.00092).
- Only the four large families / weighted by flow count (Table VIII): gaps are 24–66 points and 15–57 points respectively, and all 20 model-seed differences remain positive.
- AUROC comparison: under LOAO, RF/XGBoost average AUROC 0.963/0.966, but 1% FPR detection rate is only 76.2%/40.2%; the authors state that threshold-independent metrics overestimate unseen-family performance, and LOAO should be reported at fixed FPR.
- Second dataset (Table X, CSE-CIC-IDS2018, 3 seeds): known-attack detection 99.9%–100.0%, worst-case robustness 99.8%/99.1%/96.3%, average LOAO 83.3%/71.0%/28.5%, gaps 16.5 (RF), 28.1 (XGBoost), 67.9 (1D-CNN) points, positive in 3/3 seeds (p = 0.0087, 0.001, 0.0035); the authors state the direction replicates on the independently collected second dataset.
- All-or-nothing across seeds: FT-Transformer detects unseen Botnet at 88.2% in one seed and 0.0% in the other four; RF detects unseen PortScan at 80.8%–85.1% in two seeds and 22.9%–25.9% in the other three; the Botnet and WebAttack rows have only 221 and 32 test flows per seed, and the authors state they draw no family-level conclusions about them.
What are some points that can be further explored?
The authors list limitations including feature-space perturbation, heuristic attacks, split method, and untested defenses; experiments cover two corrected datasets, four detectors, and five seeds.
Limitations and Future Directions Noted by the Authors
- Feature-space perturbation (Section VI): enforcing the eight derived-feature identities still does not guarantee that every perturbed flow corresponds to a real packet sequence; the authors state that problem-space attack generation is a stronger test and list it as one of the future directions.
- Controllable feature set is on the strong side (Section VI): the controllable set includes some flow-level aggregates that depend on victim responses; the authors state that restricting to forward-only features would weaken attacks, which would only raise robustness scores and widen the gap, so this choice is conservative for their conclusion.
- Attack side remains heuristic (Section VI): exact MILP covers only tree ensembles (5 seeds, at most 200 flows per family), and gradient and SimBA attacks on neural detectors remain heuristic, so their robustness may be overestimated.
- Split method (Section VI): the temporal-split experiment does not include FT-Transformer, and session-level splits have not been done.
- Small-family test sets (Section VI): WebAttack and Botnet have only 32 and 221 test flows per seed, LOAO results vary widely across seeds, and the authors draw no family-level conclusions about them.
- Unevaluated defenses and follow-up questions (Sections VI, VII): adversarial training, domain adaptation, or open-set methods were not evaluated; the authors state that "whether the two close the gap is open and also the most useful next question," and plan to replicate the protocol with more datasets and problem-space attack generation. Model capacity and training budget are moderate, and stronger neural models may behave differently (Section VI).
Scope of Experimental Coverage
- There are 4 detectors evaluated (RF, XGBoost, 1D-CNN, FT-Transformer), plus 2 benign-only anomaly baselines and 2 multiclass MSP open-set variants (Sections III-C, V-C).
- Datasets are corrected CIC-IDS2017 (5 seeds) and improved CSE-CIC-IDS2018 (3 seeds, 3 models, uniform sampling); the authors note that conclusions are limited to these two corrected datasets (Section VII).
- Attacks cover six perturbation processes plus exact MILP (tree ensembles only) and cross-family mixup; ϵ is at most 0.5, and the robustness scores compared with LOAO use only ϵ ≤ 0.2 (Sections III-D, III-G).
- All detectors are binary (benign vs attack); open-set variants cover only RF and XGBoost (Table VII).
- The paper reports no human evaluation or LLM review (decisions rely entirely on thresholds and statistical tests); the temporal-split and CSE-CIC-IDS2018 experiments did not run FT-Transformer (Sections V-D, V-G).
Summarize the main content of the paper
At the same operating point, the four NIDS maintain 90.9%–99.7% detection on known-attack perturbations, yet detect only 22.8%–76.2% of unseen attack families; the authors state that the two scores should be reported separately.
An NIDS evaluation methodology paper that tests whether "robust to adversarial perturbations of known attacks" can serve as evidence that a detector "can detect zero-day attacks."
- Problem: Zero-day traffic is scarce, and the field commonly uses perturbations or generated samples of known attacks as proxies; the authors state that this inference has rarely been tested.
- Method: On a corrected version of CIC-IDS2017, train RF, XGBoost, 1D-CNN, and FT-Transformer, fix 1% FPR and five seeds, and compare worst-case robustness under constrained perturbations (42 controllable features, L∞ bound, six attack procedures plus exact MILP for tree ensembles) against leave-one-attack-family-out (LOAO) detection rates.
- Main results: At ϵ ≤ 0.2, robustness is 99.7% (RF), 99.7% (XGBoost), 90.9% (1D-CNN), and 94.6% (FT-Transformer), while average LOAO detection rates fall to 76.2%, 40.2%, 25.8%, and 22.8%, a gap of 23.5–71.8 percentage points (p ≤ 0.00096 after Holm correction, Table VIII).
- Supporting evidence: Exact MILP confirms that the tree ensembles' certified detection rate at ϵ = 0.2 is at least 99.8%/100.0%, so the gap is not an artifact of weak attacks; benign-only anomaly baselines detect on average only 10.5%/4.6%, and the MSP open-set baseline also does not close the gap; the direction is the same under temporal splits and on CSE-CIC-IDS2018 (gap 16.5–67.9 points).
- Ranking: Robustness and LOAO agree only on the coarse ranking that "tree ensembles outperform neural models" (Spearman ρ = 0.60, permutation p = 0.21); the equally robust RF and XGBoost differ in LOAO by nearly a factor of two.
- Authors' conclusion: Under this benchmark and threat model, robustness scores should not be read as zero-day scores, and the two should be reported separately; LOAO should be reported at a fixed realistic FPR with per-seed values; the authors consider the most useful next step to be testing whether adversarial training, open-set, and domain adaptation methods can narrow the gap.