A GCU-SAM Enhanced Transformer for Fault Diagnosis of Rotating Machinery
Abstract
1. Introduction
Contributions
- Construction of a dual-path temporal feature learning framework that integrates “local fine-grained perception and global association modeling,” effectively compensating for the standard Transformer’s shortcomings in local feature extraction for non-stationary vibration signals.
- Introduction of a lightweight local feature extraction module based on a gating mechanism—the Gated Convolutional Unit (GCU). By using reset and update gates to adaptively regulate information transfer within the local receptive field, it precisely captures and enhances high-frequency local impact responses and fine-grained degradation features in time-series signals.
- Combination of positional encoding with a multi-head self-attention mechanism to deeply mine and decouple global long-range dependencies of the enhanced local feature sequence. While preserving long-term evolutionary pattern modeling, this framework significantly improves the model’s sensitivity to local abnormal impact signals, offering a novel perspective and a feasible technical solution for high-precision fault diagnosis of rotating machinery under practical engineering applications.
2. Related Work
3. Problem Formulation
4. Methods
4.1. General Architecture of the Proposed Model
4.2. Gated Convolutional Unit (GCU) for Local Feature Extraction
4.3. Global Temporal Modeling via Multi-Head Self-Attention
4.4. Position-Wise Feed-Forward Network and Model Optimization
5. Experimental Validation and Analysis
5.1. Experimental Setup and Data Preprocessing
5.1.1. CWRU Bearing Dataset
5.1.2. SEU Gearbox Dataset
5.1.3. Data Preprocessing and Dataset Partitioning
- Sliding window segmentation
- 2.
- Z-score Normalization
5.2. Baseline Models and Evaluation Metrics
5.2.1. Baseline Model Setup
- (1)
- 1D-CNN: Represents the classical feature extraction architecture based on a local receptive field.
- (2)
- BiLSTM: Represents the traditional network for modeling bidirectional temporal dynamic evolution.
- (3)
- 1D-ResNet: Represents the high-order feature abstraction network equipped with deep residual connections.
- (4)
- Standard Transformer: The native pure self-attention encoder without the introduction of the proposed GCU module. It is utilized to directly conduct an ablation study, thereby demonstrating the value of incorporating the local inductive bias mechanism.
5.2.2. Comprehensive Evaluation Metrics
5.2.3. Results and Discussion
5.2.4. Robustness Analysis Under Noisy Environments
5.3. Comprehensive Ablation Study of the GCU Module
6. Conclusions and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Zhao, R.; Yan, R.; Chen, Z.; Mao, K.; Wang, P.; Gao, R.X. Deep learning and its applications to machine health monitoring. Mech. Syst. Signal Process. 2019, 115, 213–237. [Google Scholar] [CrossRef]
- Lei, Y.; Yang, B.; Jiang, X.; Jia, F.; Li, N.; Nandi, A.K. Applications of machine learning to machine fault diagnosis: A review and roadmap. Mech. Syst. Signal Process. 2020, 138, 106587. [Google Scholar] [CrossRef]
- Zhang, S.; Zhang, S.; Wang, B.; Habetler, T.E. Machine Learning and Deep Learning Algorithms for Bearing Fault Diagnostics—A Comprehensive Review. Sensors 2020, 20, 2985. [Google Scholar]
- Smith, W.A.; Randall, R.B. Rolling element bearing diagnostics using the Case Western Reserve University data: A benchmark study. Mech. Syst. Signal Process. 2015, 64–65, 100–131. [Google Scholar] [CrossRef]
- Zaidi, S.H.H.; Shenfield, A.; Zhang, H.; Ikpehai, A. A Systematic Review of Anomaly and Fault Detection Using Machine Learning for Industrial Machinery. Algorithms 2026, 19, 108. [Google Scholar] [CrossRef]
- Li, C.; Sanchez, R.V.; Zurita, G.; Cerrada, M.; Cabrera, D. Deep learning for fault diagnosis of planetary gearboxes. IEEE Trans. Ind. Electron. 2018, 65, 2720–2731. [Google Scholar]
- Zhang, W.; Li, C.; Peng, G.; Chen, Y.; Zhang, Z. A deep convolutional neural network with new training methods for bearing fault diagnosis under noisy environment. Mech. Syst. Signal Process. 2018, 100, 439–453. [Google Scholar] [CrossRef]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. In Proceedings of the International Conference on Learning Representations (ICLR), Online, 3–7 May 2021. [Google Scholar]
- Xiong, R.; Yang, Y.; He, D.; Zheng, K.; Zheng, S.; Xing, C.; Zhang, H.; Lan, Y.; Wang, L.; Liu, T. On Layer Normalization in the Transformer Architecture. In Proceedings of the International Conference on Machine Learning (ICML), Online, 13–18 July 2020; ML Research Press: Cambridge, MA, USA, 2020; pp. 10524–10533. [Google Scholar]
- Rezazadeh, N.; Perfetto, D.; de Oliveira, M.; De Luca, A.; Lamanna, G. A fine-tuning deep learning framework to palliate data distribution shift effects in rotary machine fault detection. Struct. Health Monit. 2026, 25, 661–683. [Google Scholar]
- Lei, Y.; Lin, J.; Zuo, M.J.; He, Z. Condition monitoring and fault diagnosis of planetary gearboxes: A review. Measurement 2014, 48, 292–305. [Google Scholar] [CrossRef]
- Jia, F.; Lei, Y.; Lin, J.; Zhou, X.; Lu, N. Deep neural networks: A promising tool for fault characteristic mining and intelligent diagnosis of rotating machinery. Mech. Syst. Signal Process. 2016, 72, 303–315. [Google Scholar] [CrossRef]
- Liu, R.; Yang, B.; Zio, E.; Chen, X. Artificial intelligence for fault diagnosis of rotating machinery: A review. Mech. Syst. Signal Process. 2018, 108, 33–47. [Google Scholar] [CrossRef]
- Yin, S.; Li, X.; Gao, H.; Kaynak, O. Data-based techniques focused on robust fault diagnosis and fault-tolerant control. IEEE Trans. Ind. Electron. 2015, 62, 3262–3271. [Google Scholar] [CrossRef]
- Hoang, D.T.; Kang, H.J. A survey on Deep Learning based bearing fault diagnosis. Neurocomputing 2019, 335, 346–356. [Google Scholar] [CrossRef]
- Eren, L.; Ince, T.; Kiranyaz, S. A generic intelligent bearing fault diagnosis system using compact adaptive 1D CNN classifier. J. Signal Process. Syst. 2019, 91, 179–189. [Google Scholar] [CrossRef]
- Zhao, M.; Zhong, S.; Fu, X.; Tang, B.; Pecht, M. Deep residual shrinkage networks for fault diagnosis. IEEE Trans. Ind. Inform. 2020, 16, 4681–4690. [Google Scholar] [CrossRef]
- Yang, D.; Zhang, Y.; Li, R.; Long, H.; Huang, C. Enhanced diagnosis of planetary gear train faults based on bispectrum and attention mechanism deep convolutional generative adversarial networks. Sci. Rep. 2025, 15, 22501. [Google Scholar] [CrossRef] [PubMed]
- Chen, Q.; Chen, L.; Li, Q.; Zhou, W. Multi-Branch Joint Time-Frequency Transformer for Domain Generalization Fault Diagnosis of Rotating Machinery. In Proceedings of the PHM Society Asia-Pacific Conference, Singapore, 8–11 December 2025. [Google Scholar]
- Zhang, S.; Zhou, J.; Ma, X.; Pirttikangas, S. TSViT: A Time Series Vision Transformer for Fault Diagnosis of Rotating Machinery. Appl. Sci. 2024, 14, 10781. [Google Scholar] [CrossRef]
- Sun, W.; Yan, R.; Jin, R.; Xu, J.; Yang, Y.; Chen, Z. LiteFormer: A Lightweight and Efficient Transformer for Rotating Machine Fault Diagnosis. IEEE Trans. Reliab. 2024, 73, 1258–1269. [Google Scholar] [CrossRef]
- Hogea, E.; Onchis, D.M.; Yan, R.; Zhou, Z. Rule guided transformers for dynamic knowledge adaptation in rotating machinery fault diagnosis. Adv. Eng. Inform. 2026, 72, 104444. [Google Scholar] [CrossRef]
- Sun, W.; Wang, H.; Xu, J.; Yan, R. Effective convolutional transformer for highly accurate planetary gearbox fault diagnosis. IEEE Open J. Instrum. Meas. 2022, 1, 1–9. [Google Scholar] [CrossRef]
- Jie, Z.; Chen, M. A Lightweight 1D-CNN-Transformer for Bearing Fault Diagnosis Under Limited Data and AWGN Interference. Sensors 2026, 26, 2574. [Google Scholar]
- Cao, X.; Gao, Z.; Lu, H.; Tang, J.; Yao, Y.; Liu, L. WCFormer: A wavelet-enhanced CNN-transformer hybrid network for bearing fault diagnosis using multi-sensor signal fusion. J. Comput. Des. Eng. 2025, 12, 9. [Google Scholar] [CrossRef]
- Zhou, Y.; Chen, J.; Zhang, J.; Chen, J.; Hu, K.; Zhang, Y. Rolling bearing fault diagnosis based on EMD-CNN-Transformer. Measurement 2025, 208, 112461. [Google Scholar]
- Xu, C.; Wang, Z.; Jin, Y.; Nong, W. An adaptive industrial large language model for mechanical fault diagnosis under variable operating conditions. Adv. Eng. Inform. 2026, 74, 104821. [Google Scholar] [CrossRef]
- Peng, C.; Peng, J.; Wang, Z.; Wang, Z.; Chen, J.; Xuan, J.; Shi, T. Adaptive fault diagnosis of railway vehicle on-board controller with large language models. Appl. Soft Comput. 2025, 185, 113919. [Google Scholar] [CrossRef]









| Tag | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| Health Condition | NO | B | B | B | IR | IR | IR | OR | OR | OR |
| Fault Size | 0 | 0.007 | 0.014 | 0.021 | 0.007 | 0.014 | 0.021 | 0.007 | 0.014 | 0.021 |
| Sample Number | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
| Tag | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Health Condition | NO | MT | RC | SW | CT |
| Sample Number | 500 | 500 | 500 | 500 | 500 |
| Model | D1 | D2 | D3 | D4 | Scenario I | Scenario II | Mean |
|---|---|---|---|---|---|---|---|
| 1DCNN | 97.42 | 97.85 | 96.90 | 95.30 | 93.06 | 94.12 | 95.78 |
| BiLSTM | 90.25 | 91.80 | 92.75 | 94.32 | 85.35 | 86.41 | 90.15 |
| ResNet | 98.65 | 98.92 | 98.15 | 97.63 | 95.63 | 97.12 | 97.68 |
| Transformer | 95.80 | 96.15 | 95.20 | 96.01 | 92.30 | 94.10 | 94.93 |
| GCU-Transformer | 99.68 | 99.85 | 99.45 | 99.15 | 97.63 | 98.32 | 99.01 |
| Model Variant | Description | Mean F1-Score (%) |
|---|---|---|
| 1DCNN-Transformer | 1DCNN replacing GCU | 96.81 |
| Gated CNN | Standard Gated CNN w/o SAM | 94.64 |
| GRU-Transformer | GRU replacing GCU | 94.26 |
| Local-Attention Trans | Local attention replacing GCU | 96.37 |
| GCU-only | Proposed GCU w/o SAM | 95.70 |
| SAM-only | Standard Transformer (w/o GCU) | 96.01 |
| No Positional Encoding | Complete model w/o PE | 98.24 |
| Reset-gate-only | GCU w/o update gate | 97.82 |
| Update-gate-only | GCU w/o reset gate | 97.45 |
| Proposed GCU-SAM | Complete architecture | 99.15 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Li, J.; Hu, L.; Luo, P. A GCU-SAM Enhanced Transformer for Fault Diagnosis of Rotating Machinery. Sensors 2026, 26, 4771. https://doi.org/10.3390/s26154771
Li J, Hu L, Luo P. A GCU-SAM Enhanced Transformer for Fault Diagnosis of Rotating Machinery. Sensors. 2026; 26(15):4771. https://doi.org/10.3390/s26154771
Chicago/Turabian StyleLi, Jing, Lei Hu, and Peng Luo. 2026. "A GCU-SAM Enhanced Transformer for Fault Diagnosis of Rotating Machinery" Sensors 26, no. 15: 4771. https://doi.org/10.3390/s26154771
APA StyleLi, J., Hu, L., & Luo, P. (2026). A GCU-SAM Enhanced Transformer for Fault Diagnosis of Rotating Machinery. Sensors, 26(15), 4771. https://doi.org/10.3390/s26154771

