Shallow ReLU NIDS with fewer features resist gradient attacks better than deeper models
Shallower networks with reduced feature sets and ReLU activation are less vulnerable to FGSM, PGD, and BIM attacks and outperform deeper adversarially trained NIDS models
AI/ML arXiv 18 May 2026 Defense Simulation evidence
Published as “A No-Defense Defense Against Gradient-Based Adversarial Attacks on ML-NIDS: Is Less More?”
Why it matters
Deploying a simple shallow ReLU NIDS yields faster training and better robustness to gradient-based evasion, reducing the need for costly adversarial training.
Summary
Shallow, reduced-feature, ReLU-based NIDS models achieve lower adversarial success rates than deeper, fully-featured models even when those deep models are adversarially trained. Across ~2,200 configurations on the CSE-CIC-IDS2018 benchmark, the best shallow model (one hidden layer, ~30 features, ReLU) keeps ASR below 0.3 at ε=0.5, while adversarially trained deep models exceed 0.5. The evidence is strong but limited to white-box gradient attacks and a single dataset.
What they found 2
- Shallower networks, reduced feature sets, and ReLU activation each lower adversarial vulnerability.
“shallower networks, reduced feature sets, and ReLU activation consistently and jointly reduce adversarial vulnerability.”
- The shallow baseline outperforms adversarially trained deep models under strong attacks.
“at a severe perturbation budget of ε = 0.5, the undefended shallow baseline successfully restricts the ASR to below 0.3. Conversely, the deeper models, despite being adversarially trained, suffer ASR spikes exceeding 0.5 and 0.6.”
Caveats 3
- the 12-feature models actually show a higher ASR than the 30-feature models, before the expected upward trend resumes.
- the relationship is not monotonic, and blindly minimizing every design dimension can backfire.
- it does not nullify the attacks, though neither do most explicit defenses.
What’s new here 4
- A large-scale empirical study jointly varying depth, feature dimensionality, activation function, and dropout for NIDS robustness.
- Shows that an inherently robust model can be built without any explicit defense, outperforming adversarially trained deep models.
- Identifies a concrete recipe (shallow network, ~30 features, ReLU) for a “no-defense defense”.
- Demonstrates that dropout has negligible impact on adversarial robustness in this setting.