The growing integration of the Internet of Medical Things (IoMT) in critical infrastructure demands efficient and accurate Intrusion Detection Systems (IDS) tailored to their resource-constrained environments. In this work, we propose the Optimized Preprocessing Framework (OPF): A novel pre-processing methodology to develop a computationally optimized and robust against extreme class imbalance Artificial Intelligence-based IDS. Our methodology operates in two stages: First, a fully balanced dataset is created using Random Undersampling of the majority classes, and a Gini feature-based prioritization method is employed to efficiently reduce the feature space. Then, a Random Forest model is trained on a nearly balanced version of the dataset, generated using a hybrid resampling technique via logarithmic interpolation that employs SMOTE-based oversampling of minority classes and Random Undersampling of majority classes. This process preserves relative class order while compressing extreme disparities. Moreover, it significantly reduces the feature space and computational overhead. We validate the proposed approach on multiple real-world datasets, including CICIoMT2024, IoMT-TrafficData, and CICIoT2023. Results show that our method improves the F1-score metric, while reducing model complexity by 31.11%, 31.39%, and 78.16% in each dataset respectively, thereby making it suitable for deployment in practical IoMT environments.
Doménech et al. (2026) studied this question.