Evolutionary Computation for Feature Optimization and Image-Based Dimensionality Reduction in IoT Intrusion Detection
Hessah A. Alsalamah, Walaa Nagy Ismail · Mathematics · 2025
The exponential growth of the Internet of Things (IoT) has made it increasingly vulnerable to cyberattacks, where malicious manipulation of network and sensor data can lead to incorrect data classification. IoT data are inherently heterogeneous, comprising sensor readings, network flow records, and device metadata that differ significantly in scale and structure. This diversity motivates transforming tabular IoT data into image-based representations to facilitate the recognition of intrusion patterns and the analysis of spatial correlations. Many deep learning models offer robust detection performance, including CNNs, LSTMs, CNN–LSTM hybrids, and Transformer-based networks, but many of these architectures are computationally intensive and require significant training resources. To address this challenge, this study introduces an evolutionary-driven framework that mathematically formalizes the transformation of tabular IoT data into image-encoded matrices and optimizes feature selection through metaheuristic algorithms. Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Variable Neighborhood Search (VNS) are employed to identify optimal feature subsets for Random Forest (RF) and Extreme Gradient Boosting (XGBoost) classifiers. The approach enhances discrimination by optimizing multi-objective criteria, including accuracy and sparsity, while maintaining low computational complexity suitable for edge deployment. Experimental results on benchmark IoT intrusion datasets demonstrate that VNS-XGBoost configurations performed better on the IDS2017 and IDS2018 benchmarks, achieving accuracies up to 0.99997 and a significant reduction in Type II errors (212 and 6 in tabular form, reduced to 4 and 1 using image-encoded representations). These results confirm that integrating evolutionary optimization with image-based feature modeling enables accurate, efficient, and robust intrusion detection across large-scale IoT systems.