Comparative Analysis of SNN and CNN Models for Energy Efficient Intrusion Detection
Alina Fesu, Nathan Shone, Áine MacDermott, Bo Zhou, Mahmoud Hashem Eiza · 2025
Deep learning models like Convolutional Neural Networks (CNNs) are widely used in Intrusion Detection Systems (IDSs), but their high energy demands and complexity limit deployment in resource-constrained environments. This paper presents a feasibility study of a lightweight yet deep Spiking Neural Network (SNN) based on Leaky Integrate-and-Fire (LIF) dynamics for sustainable IDS applications. Evaluated on the NSLKDD dataset, the proposed SNN achieved comparable overall accuracy to a CNN, trained $\sim 3 \mathrm{x}$ faster ($\sim 2.14 \mathrm{~s} / \mathrm{epoch}$), and consumed up to 5x less energy. Despite a slightly lower macro F1 score (0.58 vs. 0.62), it outperformed the CNN on rare attacks (e.g., U2R F1: 0.82 vs. 0.42) and exhibited lower test loss, indicating better calibration. Local deployment estimates showed $\sim 65 \%$ lower CO2 emissions than cloud execution, challenging assumptions that offloading is inherently greener. Its low energy footprint, compact architecture, and fast inference latency ($\sim 0.014 \mathrm{~ms} /$ sample) make it well-suited for real-time traffic first line analysis in edge or IoT environments. These findings highlight SNNs as viable, sustainable alternatives for IDS and underscore the importance of evaluating carbon emissions, not just energy use, when designing AI systems for cyber security.