Automated Hyperparameter Optimization for Cyberattack Detection Based on Machine Learning in IoT Systems
Open Access
- 20 November 2025
- journal article
- research article
- Published by MDPI AG in Informatics
- Vol. 12 (4) , 126
Abstract
The growing sophistication of cyberattacks in Internet of Things (IoT) environments demands proactive and efficient solutions. We present an automated hyperparameter optimization (HPO) method for detecting cyberattacks in IoT that explicitly addresses class imbalance. The approach combines a Random Forest surrogate, a UCB acquisition function with controlled exploration, and an objective function that maximizes weighted F1 and MCC; it also integrates stratified validation and a compact selection of descriptors by metaheuristic consensus. Five models (RandomForest, AdaBoost, DecisionTree, XGBoost, and MLP) were evaluated on CICIoT2023 and CIC-DDoS2019. The results show systematic improvements over default configurations and competitiveness compared to Hyperopt and GridSearch. For RandomForest, marked increases were observed in CIC-DDoS2019 (F1-Score from 0.9469 to 0.9995; MCC from 0.9284 to 0.9986) and consistent improvements in CICIoT2023 (F1-Score from 0.9947 to 0.9954; MCC from 0.9885 to 0.9896), while maintaining low inference times. These results demonstrate that the proposed HPO offers a solid balance between performance, computational cost, and traceability, and constitutes a reproducible alternative for strengthening cybersecurity mechanisms in IoT environments with limited resources.Keywords
Funding Information
- multidisciplinary project “New methods based on machine learning for the detection of cyber-attacks in IoT environments,” (098-2025-R-UPNW)
This publication has 39 references indexed in Scilit:
- Dynamic oversampling-driven Kolmogorov–Arnold networks for credit card fraud detection: An ensemble approach to robust financial securityEgyptian Informatics Journal, 2025
- A Robust DDoS Intrusion Detection System Using Convolutional Neural NetworkComputers and Electrical Engineering, 2024
- A systematic review of hyperparameter optimization techniques in Convolutional Neural NetworksDecision Analytics Journal, 2024
- Edge-HetIoT defense against DDoS attack using learning techniquesComputers & Security, 2023
- Hyperparameter optimization: Foundations, algorithms, best practices, and open challengesWIREs Data Mining and Knowledge Discovery, 2023
- A comprehensive study of DDoS attacks over IoT network and their countermeasuresComputers & Security, 2023
- A machine learning based data modeling for medical diagnosisBiomedical Signal Processing and Control, 2022
- Implementation of intrusion detection model for DDoS attacks in Lightweight IoT NetworksExpert Systems with Applications, 2022
- Sequential Model-Based Optimization for General Algorithm Configuration2011
- Worst-Case and Average-Case Approximations by Simple Randomized Search HeuristicsLecture Notes in Computer Science, 2005