Two-Stage Feature Selection Based on Random Forest Importance and Mutual Information for Multiclass IoT Attack Detection
Year: 2026
Type: conference-paper
Abstract: Internet of Things (IoT) gateways are required to classify high-dimensional network flows under stringent computational constraints, necessitating compact yet discriminative feature representations. This paper proposes a two-stage feature selection method for multiclass IoT attack detection that integrates an embedded and a filter criterion into a unified selection framework. In the first stage, the top-ranked features identified by Random Forest importance and by mutual information are merged into a deduplicated complementary pool that preserves discriminative signals from both perspectives. In the second stage, each pooled feature is re-ranked using the geometric mean of its min-max normalized importance and mutual information scores, and the optimal subset size is determined by maximizing validation macro-F1 through a LightGBM probe over a fixed candidate grid. Throughout the pipeline, class-balanced sample weights are employed during training, while the test partition retains the natural class distribution to ensure evaluation fidelity. Experimental results on the IoTID20 benchmark demonstrate that the proposed 15-feature subset achieves a macro-F1 of 0.9707 and a Matthews correlation coefficient of 0.9683, closely matching the full 79-feature model (0.9709 and 0.9685) while reducing training time by approximately half. Controlled comparisons against mutual-information-only and importance-only baselines evaluated at the identical feature count confirm that the fused ranking captures complementary information not recoverable by any single criterion. Post-hoc SHAP analysis further validates the operational interpretability of the selected feature set.
Authors: Luqing Wang, Xuming Qin, Kunlin Jia, Nan Lin, Di Wu
Institution: Huizhou Engineering Vocational College
Language: English
Subfield: Computer Networks and Communications
Field: Computer Science
Domain: Physical Sciences
Open Access status: hybrid
OpenAlex ID: W7204178459
