Accelerating Classification For Iot Attack Detection Using Decision Tree Model With Gini Impurity Tree-Based Feature Selection Technique
DOI:
https://doi.org/10.52436/1.jutif.2025.6.5.3817Keywords:
Decision Tree, Feature Selection, Internet of Things, IoT AttackAbstract
The Internet of Things (IoT) continues to expand rapidly, with the number of connected devices expected to reach billions in the near future. However, it makes IoT devices prime target for cyber-attack. Therefore, an effective Intrusion Detection System (IDS) is required to detect these attacks swiftly and accurately. This study aims to build a machine learning-based IDS to effectively detect attack on IoT network using the CIC IoT 2023 dataset. The dataset contains over 46 million data rows with 48 features, covering 33 attack types and 1 benign class. To address the dataset's complexity and enhance processing efficiency, feature selection technique was applied. Six feature selection techniques from three categories – Filter-based, Wrapper-based, and Hybrid methods – were evaluated to produce the best feature subset. Each subset was tested using a Decision Tree algorithm. Then, the model performance calculated based on accuracy, computational time, as well as macro-precision, -recall, and -F1-score. The results demonstrate that the three best feature selection from each category – Mutual Information, Genetic Algorithm, and Gini Impurity Tree-based – improved training time by average different 55 seconds from 148 seconds, which speed up by 63.06% without sacrificing accuracy. The Gini Impurity Tree-based algorithm proved to be the most efficient, producing the smallest feature subset, which is 10 features, faster processing times, which is 40 seconds, and shallower tree’s depth, which is 64 level from 73 level. In conclusion, feature selection not only enhances computational efficiency but also simplifies tree’s shape without sacrificing the accuracy of detection.
Downloads
References
A. K. M. Al-Qurabat, “A Lightweight Huffman-based Differential Encoding Lossless Compression Technique in IoT for Smart Agriculture,” International Journal of Computing and Digital Systems, vol. 11, no. 1, pp. 117–127, Jan. 2022, doi: 10.12785/ijcds/110109.
M. Selvaraj and G. Uddin, “A Large-Scale Study of IoT Security Weaknesses and Vulnerabilities in the Wild,” Aug. 2023.
S. Rode, R. Saraf, J. Veigas, N. Shetty, and S. Shardul, “Design and Fabrication of IoT based Agricultural Automation system,” in 2023 5th Biennial International Conference on Nascent Technologies in Engineering (ICNTE), IEEE, Jan. 2023, pp. 1–6. doi: 10.1109/ICNTE56631.2023.10146721.
M. Servetnyk and R. Servetnyk, “Emerging applications, technologies, and services in wireless communications: 5G to 6G evolution,” Journal of Scientific Papers “Social development and Security,” vol. 11, no. 2, Apr. 2021, doi: 10.33445/sds.2021.11.2.1.
“Apa itu Sistem Deteksi Intrusi (IDS)? | IBM.” Accessed: Sep. 22, 2024. [Online]. Available: https://www.ibm.com/id-id/topics/intrusion-detection-system
“Intrusion Detection Systems (IDS): Definition, Types, Purpose | Splunk.” Accessed: Sep. 24, 2024. [Online]. Available: https://www.splunk.com/en_us/blog/learn/ids-intrusion-detection-systems.html
S. Sadhwani, B. Manibalan, R. Muthalagu, and P. Pawar, “A Lightweight Model for DDoS Attack Detection Using Machine Learning Techniques,” Applied Sciences 2023, Vol. 13, Page 9937, vol. 13, no. 17, p. 9937, Sep. 2023, doi: 10.3390/APP13179937.
M. S. Mazhar et al., “Forensic Analysis on Internet of Things (IoT) Device Using Machine-to-Machine (M2M) Framework,” Electronics 2022, Vol. 11, Page 1126, vol. 11, no. 7, p. 1126, Apr. 2022, doi: 10.3390/ELECTRONICS11071126.
A. R. Gad, A. A. Nashat, and T. M. Barkat, “Intrusion Detection System Using Machine Learning for Vehicular Ad Hoc Networks Based on ToN-IoT Dataset,” IEEE Access, vol. 9, pp. 142206–142217, 2021, doi: 10.1109/ACCESS.2021.3120626.
U. S. Musa, M. Chhabra, A. Ali, and M. Kaur, “Intrusion Detection System using Machine Learning Techniques: A Review,” Proceedings - International Conference on Smart Electronics and Communication, ICOSEC 2020, pp. 149–155, Sep. 2020, doi: 10.1109/ICOSEC49089.2020.9215333.
G. Rathod, V. Sabnis, and J. K. Jain, “Improving IoT Botnet Attack Detection using Machine Learning: Comparative Analysis of Feature Selection Methods and Classifiers in Intrusion Detection Systems,” 2024 3rd International Conference for Innovation in Technology, INOCON 2024, 2024, doi: 10.1109/INOCON60754.2024.10511883.
F. De Keersmaeker, Y. Cao, G. K. Ndonda, and R. Sadre, “A Survey of Public IoT Datasets for Network Security Research,” IEEE Communications Surveys and Tutorials, vol. 25, no. 3, pp. 1808–1840, 2023, doi: 10.1109/COMST.2023.3288942.
A. Fatani, M. A. Elaziz, A. Dahou, M. A. A. Al-Qaness, and S. Lu, “IoT Intrusion Detection System Using Deep Learning and Enhanced Transient Search Optimization,” IEEE Access, vol. 9, pp. 123448–123464, 2021, doi: 10.1109/ACCESS.2021.3109081.
“IoT Dataset 2023 | Datasets | Research | Canadian Institute for Cybersecurity | UNB.” Accessed: Sep. 22, 2024. [Online]. Available: https://www.unb.ca/cic/datasets/iotdataset-2023.html
M. Naeem et al., “Trends and Future Perspective Challenges in Big Data,” Smart Innovation, Systems and Technologies, vol. 253, pp. 309–325, 2022, doi: 10.1007/978-981-16-5036-9_30.
N. Sahllal and E. M. Souidi, “A Comparative Analysis of Sampling Techniques for Click-Through Rate Prediction in Native Advertising,” IEEE Access, vol. 11, pp. 24511–24526, 2023, doi: 10.1109/ACCESS.2023.3255983.
Z. Wang, H. Chen, S. Yang, X. Luo, D. Li, and J. Wang, “A lightweight intrusion detection method for IoT based on deep learning and dynamic quantization,” PeerJ Comput Sci, vol. 9, p. e1569, Sep. 2023, doi: 10.7717/PEERJ-CS.1569/SUPP-1.
S. Gavel, A. S. Raghuvanshi, and S. Tiwari, “Distributed intrusion detection scheme using dual-axis dimensionality reduction for Internet of things (IoT),” Journal of Supercomputing, vol. 77, no. 9, pp. 10488–10511, Sep. 2021, doi: 10.1007/S11227-021-03697-5/TABLES/10.
M. Tomaszewski and J. Osuchowski, “Effectiveness of Data Resampling in Mitigating Class Imbalance for Object Detection,” 2020.
S. Bagui and K. Li, “Resampling imbalanced data for network intrusion detection datasets,” J Big Data, vol. 8, no. 1, p. 6, Dec. 2021, doi: 10.1186/s40537-020-00390-x.
S. Jain, S. Bihani, S. Jaiswal, and A. Arora, “Impact of Feature Selection Algorithms on Network Intrusion Detection,” IEEE Symposium on Wireless Technology and Applications, ISWTA, vol. 2023-August, pp. 66–71, 2023, doi: 10.1109/ISWTA58588.2023.10250134.
J. Azimjonov and T. Kim, “Designing accurate lightweight intrusion detection systems for IoT networks using fine-tuned linear SVM and feature selectors,” Comput Secur, vol. 137, p. 103598, Feb. 2024, doi: 10.1016/J.COSE.2023.103598.
V. Senthilkumar and B. V. Kumar, “A Survey on Feature Selection Method for Product Review,” 2021 International Conference on Advancements in Electrical, Electronics, Communication, Computing and Automation, ICAECA 2021, 2021, doi: 10.1109/ICAECA52838.2021.9675726.
“1.1. Linear Models — scikit-learn 1.5.2 documentation.” Accessed: Sep. 22, 2024. [Online]. Available: https://scikit-learn.org/stable/modules/linear_model.html#lasso
“6.3. Preprocessing data — scikit-learn 1.5.2 documentation.” Accessed: Sep. 22, 2024. [Online]. Available: https://scikit-learn.org/stable/modules/preprocessing.html#preprocessing-scaler
“1.10. Decision Trees — scikit-learn 1.5.2 documentation.” Accessed: Sep. 22, 2024. [Online]. Available: https://scikit-learn.org/stable/modules/tree.html#decision-trees
J. Yang and H. Wang, “Interpretability Analysis of Academic Achievement Prediction Based on Machine Learning,” Proceedings - 11th International Conference on Information Technology in Medicine and Education, ITME 2021, pp. 475–479, 2021, doi: 10.1109/ITME53901.2021.00101.
E. C. P. Neto, S. Dadkhah, R. Ferreira, A. Zohourian, R. Lu, and A. A. Ghorbani, “CICIoT2023: A Real-Time Dataset and Benchmark for Large-Scale Attacks in IoT Environment,” Sensors 2023, Vol. 23, Page 5941, vol. 23, no. 13, p. 5941, Jun. 2023, doi: 10.3390/S23135941.
N. D. Primadya, A. Nugraha, A. Luthfiarta, and S. Y. Fahrezi, “Optimasi Logistic Regression untuk Deteksi Serangan DoS pada Keamanan IoT,” Jurnal Eksplora Informatika, vol. 13, no. 2, pp. 245–252, Mar. 2024, doi: 10.30864/EKSPLORA.V13I2.1065.
A. I. Jony and A. K. B. Arnob, “A long short-term memory based approach for detecting cyber attacks in IoT using CIC-IoT2023 dataset,” Journal of Edge Computing, vol. 3, no. 1, pp. 28–42, May 2024, doi: 10.55056/jec.648.
D. Setiawan, A. Nugraha, and A. Luthfiarta, “Komparasi Teknik Feature Selection Dalam Klasifikasi Serangan IoT Menggunakan Algoritma Decision Tree,” JURNAL MEDIA INFORMATIKA BUDIDARMA, vol. 8, no. 1, pp. 83–93, Jan. 2024, doi: 10.30865/mib.v8i1.6987.
Additional Files
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Muhammad Hafizh Dzaki, Adhitya Nugraha, Ardytha Luthfiarta, Azizu Ahmad Rozaki Riyanto, Yohanes Deny Novandian

This work is licensed under a Creative Commons Attribution 4.0 International License.
 
						
 
  
 




 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 