Explainable zero-day attack detection in IoMT using transformer-based time-series modeling

Securing Internet of Things (IoT) and Internet of Medical Things (IoMT) networks necessitates intrusion detection systems (IDS) robust against severe class imbalance, zero-day attacks, and deployment constraints. Prior methodologies often rely on heavy feature engineering, stacking ensembles, or data augmentation for rebalancing; yet they remain inherently closed-set and brittle across heterogeneous datasets, thereby limiting calibrated performance in real-world environments. To overcome these limitations, we propose a paradigm shift toward protocol-aware sequence modeling and principled open-set calibration. We introduce a Protocol State-Masked, Multi-scale Transformer that directly incorporates finite-state protocol constraints into the self-attention mechanism. This core architecture is augmented by two auxiliary heads (next-state prediction and violation scoring) and an energy-based open-set module calibrated using Extreme Value Theory. To rigorously verify generalization rather than simple memorization, we train the model on a heterogeneous IoMT benchmark (CICIoMT2024) and evaluate it on a completely held-out, independent testbed (WUSTL-EHMS-2020). On CICIoMT2024, the model achieves 99.62% accuracy and 99.30% macro-F1 (binary classification), and 98.90% accuracy with 98.40% macro-F1 (19-class classification). In zero-day settings, it attains an AUROC-OOD of 0.975 with an FPR@95%TPR of 7.8%. Crucially, on the unseen WUSTL-EHMS-2020 dataset, the model demonstrates strong cross-dataset transfer, reaching ≈ 99.6% overall accuracy with a balanced TPR/TNR of ≈ 99.6%. Ablation studies confirm that both the protocol masking and the auxiliary heads significantly sharpen decision boundaries, substantially reduce false alarms, and improve minority-class balance when compared to data-only Transformer variants and conventional ensembles. Our design effectively mitigates imbalance (via multi-resolution windows, class-aware objectives, and protocol-conditioned learning) and curbs overfitting (through structural supervision and calibrated open-set thresholds), delivering a calibrated, high-fidelity detection system that generalizes across diverse datasets while remaining practical for deployment.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-05-21
DOI
https://doi.org/10.1038/s41598-026-50813-7
Primary Topic
Network Security and Intrusion Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Explainable zero-day attack detection in IoMT using transformer-based time-series modeling

Arman Kavoosi Ghafi, Mahdee Jodayree, Sara Amiri, Puya Shaykholeslami
Scientific Reports
Network Security and Intrusion Detection
article

Explainable zero-day attack detection in IoMT using transformer-based time-series modeling

Arman Kavoosi Ghafi, Mahdee Jodayree, Sara Amiri, Puya Shaykholeslami
article en

Abstract

Securing Internet of Things (IoT) and Internet of Medical Things (IoMT) networks necessitates intrusion detection systems (IDS) robust against severe class imbalance, zero-day attacks, and deployment constraints. Prior methodologies often rely on heavy feature engineering, stacking ensembles, or data augmentation for rebalancing; yet they remain inherently closed-set and brittle across heterogeneous datasets, thereby limiting calibrated performance in real-world environments. To overcome these limitations, we propose a paradigm shift toward protocol-aware sequence modeling and principled open-set calibration. We introduce a Protocol State-Masked, Multi-scale Transformer that directly incorporates finite-state protocol constraints into the self-attention mechanism. This core architecture is augmented by two auxiliary heads (next-state prediction and violation scoring) and an energy-based open-set module calibrated using Extreme Value Theory. To rigorously verify generalization rather than simple memorization, we train the model on a heterogeneous IoMT benchmark (CICIoMT2024) and evaluate it on a completely held-out, independent testbed (WUSTL-EHMS-2020). On CICIoMT2024, the model achieves 99.62% accuracy and 99.30% macro-F1 (binary classification), and 98.90% accuracy with 98.40% macro-F1 (19-class classification). In zero-day settings, it attains an AUROC-OOD of 0.975 with an FPR@95%TPR of 7.8%. Crucially, on the unseen WUSTL-EHMS-2020 dataset, the model demonstrates strong cross-dataset transfer, reaching ≈ 99.6% overall accuracy with a balanced TPR/TNR of ≈ 99.6%. Ablation studies confirm that both the protocol masking and the auxiliary heads significantly sharpen decision boundaries, substantially reduce false alarms, and improve minority-class balance when compared to data-only Transformer variants and conventional ensembles. Our design effectively mitigates imbalance (via multi-resolution windows, class-aware objectives, and protocol-conditioned learning) and curbs overfitting (through structural supervision and calibrated open-set thresholds), delivering a calibrated, high-fidelity detection system that generalizes across diverse datasets while remaining practical for deployment.

Scientific Reports
University of Qom (IR), University of Tehran (IR), Islamic Azad University Boroujerd Branch (IR), McMaster University (CA)
Peace, Justice and strong institutions
Openalex Percentile: Top 4%
Network Security and Intrusion Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.