RC-PORT-IDS: Resource-constrained two-stage model-portfolio planning with observable-state recourse for edge intrusion detection
Fixed single-model deployment can be restrictive for edge intrusion detection when traffic conditions and available computational resources change after deployment. This study proposes RC-PORT-IDS, a two-stage model-portfolio planning framework with observable-state recourse. The first stage selects a constrained portfolio of heterogeneous intrusion-detection models before the operating state is observed. The second stage selects a feasible deployed model using observable traffic and resource states only. Seven tabular classifiers were evaluated. Canadian Institute for Cybersecurity Internet of Things 2023 dataset was used for development analysis, including duplicate-conflict control, observable-regime construction, resource benchmarking, and internal recourse-gain analysis. Canadian Institute for Cybersecurity Internet of Medical Things 2024 dataset was used for independent external replication with retraining, three-fold out-of-fold regime-complete calibration, policy freezing, and final test evaluation. Internal development produced positive recourse gain in 13 of 15 deployment cases, with a mean of 0.001512. In the external replication, the calibration-selected constrained static policy obtained a mean balanced accuracy of 0.697275, a constrained test-oracle static policy obtained 0.840868, and full traffic-plus-resource recourse obtained 0.888692. Full recourse therefore retained a mean advantage of 0.047825 over the test-oracle static policy. Traffic-only recourse reached 0.837476, while resource-only recourse remained at 0.697275. Sensitivity analyses over regime count, regime seed, and ±5% latency-threshold perturbations preserved positive recourse gain in 12 of 15 cases. The results show that a resource-constrained pre-deployed portfolio can support state-dependent model selection under controlled storage and latency constraints without using ground-truth attack-family information at runtime.

- Ahmad Z, Khan AS, Wai Shiang C, Abdullah J, Ahmad F. Network intrusion detection system: a systematic study of machine learning and deep learning approaches. Trans Emerg Telecommun Technol. 2021;32(1). https://doi.org/10.1002/ett.4150
- Gyamfi E, Jurcut A. Intrusion detection in Internet of Things systems: a review on design approaches leveraging multi-access edge computing, machine learning, and datasets. Sensors (Basel). 2022;22(10):3744. https://doi.org/10.3390/s22103744
- Alhomoud A. An optimized network intrusion detection system for attack detection based on supervised machine learning models in an Internet-of-Things environment. Int J Adv Soft Comput Appl. 2023;15(2):1-15. https://doi.org/10.15849/IJASCA.230720.01
- Neto ECP, Dadkhah S, Ferreira R, Zohourian A, Lu R, Ghorbani AA. CICIoT2023: a real-time dataset and benchmark for large-scale attacks in IoT environment. Sensors (Basel). 2023;23(13):5941. https://doi.org/10.3390/s23135941
- Farfoura ME, Mashal I, Alkhatib A, Batyha RM, Rosiyadi D. A novel lightweight machine learning framework for IoT malware classification based on matrix block mean downsampling. Ain Shams Eng J. 2025;16(1):103205. https://doi.org/10.1016/j.asej.2024.103205
- Tiwari RS, Lakshmi D, Das TK, Tripathy AK, Li KC. A lightweight optimized intrusion detection system using machine learning for edge-based IIoT security. Telecommun Syst. 2024;87(3):605-624. https://doi.org/10.1007/s11235-024-01200-y
- Al Rawajbeh M, Maria Soosai AJ, Ramasamy LK, Khan F. Trustworthy adaptive AI for real-time intrusion detection in industrial IoT security. IoT. 2025;6(3):53. https://doi.org/10.3390/iot6030053
- Shenify MA, Alghamdi AS, Alharthi AF. Hybrid supervised machine learning-based intrusion detection system of Internet of Things. Int J Adv Soft Comput Appl. 2024;16(2):68-84. https://doi.org/10.15849/IJASCA.240730.05
- Shaheen A, Alzyadat W, Alhroob A. LARO-IDS: family-leakage-aware robust multi-objective optimization for model selection in IoT intrusion detection. Int J Optim Control Theor Appl. 2026;16(5):026270147. https://doi.org/10.36922/IJOCTA026270147
- Birge JR, Louveaux F. Introduction to Stochastic Programming. 2nd ed. New York, NY: Springer; 2011. https://doi.org/10.1007/978-1-4614-0237-4
- Birge JR. The value of the stochastic solution in stochastic linear programs with fixed recourse. Math Program. 1982;24(1):314-325. https://doi.org/10.1007/BF01585113
- Hani A, El-Emam NN. Enhanced intrusion detection systems dataset synthesis using conditional generative adversarial networks with the adaptive whale optimization algorithm. Int J Adv Soft Comput Appl. 2026;18(1):263-285. https://doi.org/10.15849/ijasca.v18i1.71
- Dadkhah S, Neto ECP, Ferreira R, Molokwu RC, Sadeghi S, Ghorbani AA. CICIoMT2024: a benchmark dataset for multi-protocol security assessment in IoMT. Internet Things. 2024;28:101351. https://doi.org/10.1016/j.iot.2024.101351
- Ferrag MA, Friha O, Hamouda D, Maglaras L, Janicke H. Edge-IIoTset: a new comprehensive realistic cyber security dataset of IoT and IIoT applications for centralized and federated learning. IEEE Access. 2022;10:40281-40306. https://doi.org/10.1109/ACCESS.2022.3165809
- Alsaedi A, Moustafa N, Tari Z, Mahmood AN, Anwar A. TON_IoT telemetry dataset: a new generation dataset of IoT and IIoT for data-driven intrusion detection systems. IEEE Access. 2020;8:165130-165150. https://doi.org/10.1109/ACCESS.2020.3022862
- Meidan Y, Bohadana M, Mathov Y, Mirsky Y, Shabtai A, Breitenbacher D, Elovici Y. N-BaIoT: network-based detection of IoT botnet attacks using deep autoencoders. IEEE Pervasive Comput. 2018;17(3):12-22. https://doi.org/10.1109/MPRV.2018.03367731
- Shao Z, Yuan S, Wang Y. Adaptive online learning for IoT botnet detection. Inf Sci. 2021;574:84-95. https://doi.org/10.1016/j.ins.2021.05.076
- Alalhareth M, Hong SC. Enhancing the Internet of Medical Things (IoMT) security with meta-learning: a performance-driven approach for ensemble intrusion detection systems. Sensors (Basel). 2024;24(11):3519. https://doi.org/10.3390/s24113519
- Lin YD, Huang HX, Sudyana D, Lai YC. AI for AI-based intrusion detection as a service: reinforcement learning to configure models, tasks, and capacities. J Netw Comput Appl. 2024;229:103936. https://doi.org/10.1016/j.jnca.2024.103936
- Hasan MM, Islam R, Mamun Q, Islam MZ, Gao J. Ensemble-based adversarial defense with dynamic model selection for intrusion detection systems. Internet Things. 2026;38:101970. https://doi.org/10.1016/j.iot.2026.101970
- Forough J, Bhuyan M, Elmroth E. Reinforced model selection for resource efficient anomaly detection in edge clouds. Future Gener Comput Syst. 2026;176:108161. https://doi.org/10.1016/j.future.2025.108161
- Kadve G, Chowdhury A, Singh VK, Pal A. Engineering a multi model fallback system for edge devices. Results Eng. 2025;26:105165. https://doi.org/10.1016/j.rineng.2025.105165
- Chen X, Wang P, Yang Y, Liu M. Resource-constraint deep forest-based intrusion detection method in Internet of Things for consumer electronic. IEEE Trans Consum Electron. 2024;70(2):4976-4987. https://doi.org/10.1109/TCE.2024.3373126
- Alwaisi Z, Kumar T, Harjula E, Soderi S. Securing constrained IoT systems: a lightweight machine learning approach for anomaly detection and prevention. Internet Things. 2024;28:101398. https://doi.org/10.1016/j.iot.2024.101398
- Fatima M, Rehman O, Ali S, Niazi MF. ELIDS: ensemble feature selection for lightweight IDS against DDoS attacks in resource-constrained IoT environment. Future Gener Comput Syst. 2024;159:172-187. https://doi.org/10.1016/j.future.2024.05.013
- Almalawi A. A lightweight intrusion detection system for Internet of Things: clustering and Monte Carlo cross-entropy approach. Sensors (Basel). 2025;25(7):2235. https://doi.org/10.3390/s25072235
- Dash S, Acken JM. Intrusion detection latency: the neglected metric. Cybersecurity. 2026;9(1):144. https://doi.org/10.1186/s42400-026-00574-7
- King AJ, Wallace SW. Modeling with Stochastic Programming. 2nd ed. Cham, Switzerland: Springer Cham; 2024. https://doi.org/10.1007/978-3-031-54550-4
- Shapiro A, Dentcheva D, Ruszczyński A. Lectures on Stochastic Programming: Modeling and Theory. 2nd ed. Philadelphia, PA: SIAM; 2014. https://doi.org/10.1137/1.9781611973433
- Cao B, Wu T, Bai X. Stochastic programming based multi-arm bandit offloading strategy for Internet of Things. Digit Commun Netw. 2023;9(5):1200-1211. https://doi.org/10.1016/j.dcan.2022.03.018
- Zhang L, Cao B, Li Y, Peng M, Feng G. A multi-stage stochastic programming-based offloading policy for fog enabled IoT-eHealth. IEEE J Sel Areas Commun. 2021;39(2):411-425. https://doi.org/10.1109/JSAC.2020.3020659
- Sculley D. Web-scale k-means clustering. In: Proceedings of the 19th International Conference on World Wide Web. New York, NY: ACM; 2010:1177-1178. https://doi.org/10.1145/1772690.1772862
- Engel VJL, Angela D, Latif A, Kristyan SA. CICIoMT2024 cleaned dataset and EDA outputs. Zenodo. 2026. https://doi.org/10.5281/zenodo.19452870
- Fawcett T. An introduction to ROC analysis. Pattern Recognit Lett. 2006;27(8):861-874. https://doi.org/10.1016/j.patrec.2005.10.010
- Brodersen KH, Ong CS, Stephan KE, Buhmann JM. The balanced accuracy and its posterior distribution. In: 2010 20th International Conference on Pattern Recognition. Piscataway, NJ: IEEE; 2010:3121-3124. https://doi.org/10.1109/ICPR.2010.764
- Matthews BW. Comparison of the predicted and observed secondary structure of T4 phage lysozyme. Biochim Biophys Acta. 1975;405(2):442-451. https://doi.org/10.1016/0005-2795(75)90109-9
- Cantone M, Marrocco C, Bria A. Machine learning in network intrusion detection: a cross-dataset generalization study. IEEE Access. 2024;12:144489-144508. https://doi.org/10.1109/ACCESS.2024.3472907
- Eren KK, Küçük K, Saleh RAA, Konyar MZ, Hardy OM, Khan SA. Distributional drift in IoT intrusion detection systems: implications for cross-dataset generalisation. Electronics (Basel). 2026;15(11):2307. https://doi.org/10.3390/electronics15112307
- Bouke MA, Abdullah A. An empirical study of pattern leakage impact during data preprocessing on machine learning-based intrusion detection models reliability. Expert Syst Appl. 2023;230:120715. https://doi.org/10.1016/j.eswa.2023.120715
- Diab A, Chehade A, Ragusa E, Gastaldo P, Zunino R, Baghdadi A, Rizk M. Intrusion detection on resource-constrained IoT devices with hardware-aware ML and DL. In: 2025 IEEE International Conference on Emerging Trends in Engineering and Computing (ETECOM). Piscataway, NJ: IEEE; 2025:1-6. https://doi.org/10.1109/ETECOM66111.2025.11319100
- Heidari A, Khonsari A, Rastegar SH. An energy-efficient privacy-preserving framework for intrusion detection in the Internet of Vehicles. Comput Electr Eng. 2026;132:111003. https://doi.org/10.1016/j.compeleceng.2026.111003
- Heidari A, Rastegar SH, Khonsari A. Explainable edge-cloud federated intrusion detection system for electric vehicles using GRUs, DRL selection, and integrated gradients. J Big Data. 2026. https://doi.org/10.1186/s40537-026-01505-6
- Hamdouchi A, Idri A. Evaluating the performance of TinyML singular and ensemble techniques for intrusion detection in IoT networks. Microprocess Microsyst. 2025;117:105172. https://doi.org/10.1016/j.micpro.2025.105172
- Ieropoulos V, Anthi E, Spyridopoulos T, Burnap P, Mavromatis I, Khan A, Carnelli P. Collaborative intrusion detection in resource-constrained IoT environments: challenges, methods, and future directions: a review. J Inf Secur Appl. 2025;93:104127. https://doi.org/10.1016/j.jisa.2025.104127
- Rodríguez M, Mehavilla Martín L, Alesanco Á, García J. A rule-based label harmonization framework for cross-dataset IoT intrusion detection. Internet Things. 2026;39:102030. https://doi.org/10.1016/j.iot.2026.102030
