Fault Detection of Cyber-Physical Systems Using a Transfer Learning Method Based on Pre-Trained Transformers - Pooya Sajjadi; Fateme Dinmohammadi; Mahmood Shafiee (Sensors, 2025)
As industries become increasingly dependent on cyber-physical systems (CPSs), failures within these systems can cause significant operational disruptions, underscoring the critical need for effective Prognostics and Health Management (PHM). The large volume of data generated by CPSs has made deep learning (DL) methods an attractive solution; however, imbalanced datasets and the limited availability of fault-labeled data continue to hinder their effective deployment in real-world applications. To address these challenges, this paper proposes a transfer learning approach using a pre-trained transformer architecture to enhance fault detection performance in CPSs. A streamlined transformer model is first pre-trained on a large-scale source dataset and then fine-tuned end-to-end on a smaller dataset with a differing data distribution. This approach enables the transfer of diagnostic knowledge from controlled laboratory environments to real-world operational settings, effectively addressing the domain shift challenge commonly encountered in industrial CPSs. To evaluate the effectiveness of the proposed method, extensive experiments are conducted on publicly available datasets generated from a laboratory-scale replica of a modern industrial water purification facility. The results show that the model achieves an average F1-score of 93.38% under K-fold cross-validation, outperforming baseline models such as CNN and LSTM architectures, and demonstrating the practicality of applying transformer-based transfer learning in industrial settings with limited fault data. To enhance transparency and better understand the model’s decision process, SHAP is applied for explainable AI (XAI).