mtjikuzu/adversarial-robustness-energy-efficient-ids
Adversarial Robustness vs Energy Efficiency in Network Intrusion Detection
Does Model Compression Compromise Cybersecurity? A Study on the Sustainability-Security Tradeoff
 ![Track]() 
๐ Key Finding
Model compression can INCREASE adversarial robustness while reducing energy consumption.
70% magnitude pruning improves FGSM(ฮต=0.1) accuracy from 70.3% โ 88.7% while cutting energy by ~48%. This contradicts the naive assumption that compressed models are more vulnerable.
๐ Results Summary
๐ฏ Overview
This research investigates a critical question at the intersection of cybersecurity and sustainability: When we compress deep learning IDS models for energy efficiency, do we inadvertently create security vulnerabilities?
We systematically evaluate:
- Magnitude-based pruning (30%, 50%, 70%, 90%)
- Post-training quantization (32-bit, 16-bit, 8-bit)
- Combined compression (pruning + quantization)
Against adversarial attacks:
- FGSM (Fast Gradient Sign Method) at ฮต = {0.01, 0.05, 0.1, 0.2, 0.3}
- PGD (Projected Gradient Descent) at ฮต = {0.01, 0.05, 0.1, 0.2}
๐ Repository Structure
โโโ README.md # This file
โโโ METHODOLOGY.md # Full experimental design
โโโ experiment.py # Complete working prototype
โโโ paper_draft.tex # Springer ACSAR formatted paper
โโโ requirements.txt # Dependencies
โโโ figures/
โ โโโ fig1_pruning_robustness.png
โ โโโ fig2_quantization_robustness.png
โ โโโ fig3_pareto_energy_robustness.png
โ โโโ fig4_fgsm_sweep.png
โโโ results/
โโโ full_results.csv๐ Quick Start
pip install torch scikit-learn datasets numpy pandas matplotlib
python experiment.pyThe experiment loads CICIDS-2017 from HuggingFace, trains a DNN IDS, then systematically evaluates compressed variants under adversarial attacks.
๐ Why Pruning Improves Robustness
Our results align with recent findings (PwoA, 2210.04311; MAD, 2204.02738):
- Pruning removes low-magnitude "noise" weights that adversarial perturbations exploit
- Compressed representations are inherently more robust to input perturbations
- The regularization effect of sparsity acts as an implicit defense
This creates a win-win for sustainability: compressed models are both greener AND more secure.
๐ Key References
- Goodfellow et al. "Explaining and Harnessing Adversarial Examples" (ICLR 2015)
- Madry et al. "Towards Deep Learning Models Resistant to Adversarial Attacks" (ICLR 2018)
- Bai et al. "Pruning Adversarially Robust Neural Networks without Adversarial Examples" (2022)
- Lee et al. "Masking Adversarial Damage: Finding Adversarial Saliency for Robust and Sparse Network" (CVPR 2022)
- Habib & Sharma. "Deep Learning in Advancing Proactive Cybersecurity for Smart Grid Networks" (2024)
๐ Conference
- Conference: ICISET 2026 โ Namibia University of Science and Technology
- Track: Infrastructure, Security and Governance โ Cybersecurity and Sustainability
- Deadline: July 27, 2026
<!-- ml-intern-provenance -->
Generated by ML Intern
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.
- Try ML Intern: https://smolagents-ml-intern.hf.space
- Source code: https://github.com/huggingface/ml-intern
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "mtjikuzu/adversarial-robustness-energy-efficient-ids"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)For non-causal architectures, replace AutoModelForCausalLM with the appropriate AutoModel class.
