Evaluating Machine Learning-Driven Intrusion Detection Systems in IoT: Performance and Energy Consumption

Saeid Jamshidi, Kawser Wazed Nafi, Amin Nikanjam, Foutse KhomharXiv 2025 · DOI

TL;DR

This paper provides a comprehensive empirical evaluation of Machine Learning (ML)-based Intrusion Detection Systems (IDS) in resource-constrained IoT environments. By comparing traditional ML models with Deep Learning (DL) architectures across both standard and Software-Defined Networking (SDN) setups, the authors reveal a surprising truth: while traditional models like KNN and Decision Trees are highly accurate, they are significantly more resource-intensive than DL models during real-time cyberattacks.

What Problem Does This Paper Address?

The Internet of Things (IoT) is expanding rapidly, but its security remains a major hurdle. Most IoT devices are resource-constrained, possessing limited memory, processing power, and battery life. While ML-based IDS have become the gold standard for detecting threats, research has historically focused almost exclusively on detection accuracy.

The authors argue that accuracy is only half the story. In a real-world deployment at the "edge" (the gateway where IoT devices connect to the broader network), an IDS that catches every attack but consumes 90% of the CPU and drains the battery in hours is a failure. This paper addresses the lack of empirical data regarding the computational cost—CPU load, CPU usage, and energy consumption—of running these security models under the stress of real-time cyber threats.

Methods

The researchers built a physical testbed using two Raspberry Pi 4 Model B units acting as edge gateways. They evaluated seven different models:

  • Traditional ML: Decision Tree (DT), K-Nearest Neighbor (KNN), and Random Forest (RF).
  • Deep Learning (DL): Long Short-Term Memory (LSTM), Convolutional Neural Networks (CNN), a Hybrid LSTM+CNN model, and EIDM (a state-of-the-art DL model for IDS).

The study compared two architectural setups:

  1. Non-SDN: A standard edge gateway configuration.
  2. SDN-Enabled: Integrating the Ryu SDN controller and Mininet to simulate centralized traffic management and dynamic resource allocation.

To measure the impact, they used PowerTop for energy consumption and conducted statistical analysis using ANOVA to ensure their findings were significant.

Figure 1: IoT-edge testbed topology, illustrating non-SDN and SDN-enabled setups.

Datasets

The study utilized the CICIDS2017 dataset, a benchmark in cybersecurity research that includes a wide variety of benign traffic and common attacks like DDoS, DoS, Port Scans, and Brute Force. The distribution of these attacks is detailed in the paper's data analysis.

Table 1 Distribution of labeled IoT-SDN attacks in the dataset

Key Insights and Ideas

  • The DL Efficiency Paradox: Counter-intuitively, DL models (CNN, LSTM) were more efficient at the edge during inference than traditional ML models like KNN. While DL models are complex to train, their architecture allows for optimized, parallelized inference. In contrast, KNN requires calculating distances for every new data point, which becomes a massive bottleneck during high-traffic attacks.
  • SDN as a Resource Optimizer: Integrating Software-Defined Networking (SDN) acted as a force multiplier for efficiency. By centralizing control and optimizing how traffic flows are handled, SDN significantly reduced the CPU and energy overhead for all IDS models.
  • Self-Inflicted Denial of Service: The study found that under heavy attacks (like DDoS), the resource consumption of inefficient IDS models (like KNN) spiked so high that the security system itself could potentially crash the gateway, effectively completing the attacker's goal.

Key Results

The quantitative results highlight a clear trade-off between accuracy and resource efficiency:

  • Accuracy: Traditional models (DT, RF, KNN) achieved near-perfect accuracy (>99.6%). DL models were slightly lower but still robust, ranging from ~93.8% (LSTM) to ~99.5% (EIDM).
  • CPU Load: In non-SDN environments, KNN and DT exhibited significantly higher CPU loads during attacks compared to DL counterparts.
  • Energy Consumption: DL models like EIDM and LSTM were markedly more energy-efficient. For example, during a DDoS attack, traditional models consumed significantly more power due to their iterative, non-optimized inference paths.
  • SDN Impact: Integrating SDN led to a measurable reduction in energy consumption and CPU usage across the board, confirming its suitability for battery-powered edge gateways.
Table 3 Performance Comparison of ML-based IDS

Limitations and Future Work

The authors acknowledge that while their findings are robust for the edge gateway, the study was conducted on a relatively small-scale testbed. Future work should explore:

  • Scalability: Testing these models in larger, more complex network environments.
  • New Technologies: Evaluating the impact of 5G and more advanced edge computing architectures on IDS efficacy.
  • Optimization: Developing new threat detection models specifically designed to minimize system resource impact without sacrificing the high accuracy seen in traditional ML models.

Summary updated

BibTeX
@misc{jamshidi2025evaluating,
  author = {Saeid Jamshidi and Kawser Wazed Nafi and Amin Nikanjam and Foutse Khomh},
  title = {{Evaluating Machine Learning-Driven Intrusion Detection Systems in IoT: Performance and Energy Consumption}},
  year = {2025},
  eprint = {2504.09634},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.09634},
}
Figure