Hyperparameter Optimization and Evaluation Metrics for Unsupervised Anomaly-Based Cyberattack Detection in Imbalanced Smart Home Datasets
Open Access
- 12 September 2025
- journal article
- research article
- Published by Springer Nature in Journal of Network and Systems Management
- Vol. 33 (4) , 1-37
Abstract
In the rapidly progressing field of smart home technology, safeguarding the security of interconnected devices and systems is critical. Unsupervised anomaly detection is a recognized solution; however, its effectiveness heavily depends on the hyperparameter optimization process. In this work, we hypothesize that metrics tailored for imbalanced data, such as the Matthews correlation coefficient (MCC), can guide the development of more robust and generalizable unsupervised anomaly detection models. To test this hypothesis, we systematically evaluate the impact of optimizing seven distinct metrics (e.g., MCC, BACC, AUC-PR) across four widely used smart home datasets (N-BaIoT, IoTID20, Bot-IoT, and ToN-IoT). Our results show that MCC optimized models achieve an average normalized MCC of 0.801, outperforming those optimized for accuracy (0.781) and AUC-ROC (0.733), and reducing the cumulative distance to ideal performance by 66% compared to conventional metric optimization. These findings underscore the importance of metric selection in unsupervised settings, offering a foundation for building more reliable and generalizable security models for smart home environments. To our knowledge, this is the first work to systematically assess the effects of optimizing distinct evaluation metrics across multiple smart home datasets.Keywords
Funding Information
- Universitat Oberta de Catalunya
This publication has 40 references indexed in Scilit:
- Enhancing unsupervised anomaly-based cyberattacks detection in smart homes through hyperparameter optimizationInternational Journal of Information Security, 2024
- Enhancing anomaly detection accuracy and interpretability in low-quality and class imbalanced data: A comprehensive approachApplied Energy, 2023
- A survey on learning from imbalanced data streams: taxonomy, challenges, empirical study, and reproducible experimental frameworkMachine Learning, 2023
- A new two-phase intrusion detection system with Naïve Bayes machine learning for data classification and elliptic envelop method for anomaly detectionDecision Analytics Journal, 2023
- AutoML: state of the art with a focus on anomaly detection, challenges, and research directionsInternational Journal of Data Science and Analytics, 2022
- Towards Model Generalization for Intrusion Detection: Unsupervised Machine Learning TechniquesJournal of Network and Systems Management, 2021
- A Scheme for Generating a Dataset for Anomalous Activity Detection in IoT Networks2020
- Data imbalance in classification: Experimental evaluationInformation Sciences, 2020
- Towards the development of realistic botnet dataset in the Internet of Things for network forensic analytics: Bot-IoT datasetFuture Generation Computer Systems, 2019
- Toward a more practical unsupervised anomaly detection systemInformation Sciences, 2013