Abstract
Industrial Control Systems (ICS) face escalating cyber threats as adversaries increasingly exploit artificial intelligence (AI) to evade conventional defenses. This paper introduces a Digital Twin-enhanced security framework in which a real-time, physics-consistent virtual replica of the controlled industrial process is synchronized with sensor and actuator telemetry from the physical plant and used to validate, suppress, or confirm anomaly scores produced by a deep-learning ensemble. The physical twin is the closed-loop ICS plant (water treatment, water distribution, or chemical process); the Digital Twin is a state-space process model coupled to an Extended Kalman Filter that predicts the next sensor measurement and emits a residual whenever the observation deviates from the physics-consistent prediction. The detection layer combines this Digital-Twin residual signal with a Long Short-Term Memory (LSTM) autoencoder, an attention-based transformer, and an Isolation Forest, fused through a calibrated weighted score that is gated by the residual, so that purely data-driven anomalies that do not violate physics are downweighted and stealthy attacks that violate physics are escalated. Evaluated on three benchmark datasets (Secure Water Treatment testbed [SWaT], Water Distribution [WADI], and Tennessee Eastman) comprising 56 attack scenarios, the framework achieves 97.6% precision, 96.2% recall, an F1-score of 96.9%, and sub-50 ms inference latency. This corresponds to a 3.2 percentage-point F1-score improvement over the strongest baseline (transformer at 93.7%) and a roughly 50% reduction in residual error. Interpretability is supported through attention visualization and Digital-Twin residual analysis, enabling operators to validate detection outcomes. With native Message Queuing Telemetry Transport (MQTT) and Open Platform Communications Unified Architecture (OPC UA) integration, Byzantine fault-tolerant consensus for distributed deployments, and formal verification of safety properties, the framework supports deployment-oriented protection for critical infrastructure aligned with International Electrotechnical Commission (IEC) 62443-4-2 requirements.
Similar content being viewed by others
Abbreviations
- AI:
-
Artificial Intelligence
- C&W:
-
Carlini & Wagner
- EKF:
-
Extended Kalman Filter
- FDI:
-
False Data Injection
- FGSM:
-
Fast Gradient Sign Method
- ICS:
-
Industrial Control Systems
- IEC:
-
International Electrotechnical Commission
- IoT:
-
Internet of Things
- LSTM:
-
Long Short-Term Memory
- MQTT:
-
Message Queuing Telemetry Transport
- NIST:
-
National Institute of Standards and Technology
- OPC UA:
-
Open Platform Communications Unified Architecture
- OT:
-
Operational Technology
- PAC:
-
Probably Approximately Correct
- PBFT:
-
Practical Byzantine Fault Tolerance
- PGD:
-
Projected Gradient Descent
- PLC:
-
Programmable Logic Controller
- RNN:
-
Recurrent Neural Network
- ROC:
-
Receiver Operating Characteristic
- SCADA:
-
Supervisory Control and Data Acquisition
- SEDT:
-
Security-Enhancing Digital Twin
- SNR:
-
Signal-to-Noise Ratio
- SWaT:
-
Secure Water Treatment
- TLS:
-
Transport Layer Security
- WADI:
-
Water Distribution
Acknowledgements
The authors extend their appreciation to Umm Al-Qura University, Saudi Arabia for funding this research work through grant number: 26UQU4340316GSSR01.
Funding
This research work was funded by Umm Al-Qura University, Saudi Arabia under grant number:26UQU4340316GSSR01.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Sayghe, A., Alahmadi, M.D. & Gharawi, A.A. A digital twin and deep-learning ensemble for cyber attack detection in industrial control systems at the IoT edge. Sci Rep (2026). https://doi.org/10.1038/s41598-026-53863-z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-026-53863-z


