# Research on Fault Diagnosis of Rotating Parts Based on Transformer Deep Learning Model
## 1 Introduction
There is still insufficient interaction between local and global information, and it has not effectively addressed issues such as fault feature extraction from both global and local information. Furthermore, interpretability is a crucial challenge for deep learning models, and existing fault diagnosis models based on the transformer architecture lack interpretability and visual analysis [18]. Considering the limitations of existing fault diagnosis models in extracting both global and local fault feature information, this study focuses on the fault diagnosis problem of rotating parts in large and complex equipment. With the research objective of designing a new network architecture to accurately extract global and local key fault features, a new fault diagnosis network model combining Transformer and multi-head, multi-scale dilated convolution is proposed, which can significantly enhance the accuracy and robustness of fault diagnosis under different working conditions. Furthermore, the decision-making process of the diagnostic model is visualized through feature heat maps, thereby enhancing the interpretability and credibility of the model. This research offers significant technical support for the field of fault diagnosis in the intelligent maintenance of complex equipment and addresses the bottleneck issue that current fault diagnosis methods face in effectively processing both local and global fault information simultaneously. The main contributions of this study are summarized as follows. 1. Combining the multi-head mechanism with convolution, a multi-head, multi-scale dilated convolution module is designed. Through the multi-head mechanism, the convolution can pay attention to the local feature information in different subspaces of the input data. It is a pioneering work to study multi-head convolution for fault diagnosis. 2. The multi-head self-attention and the above multi-head dilated convolution are connected in series, and the two advantages complement each other. Therefore, a MultiDilatedFormer fault diagnosis model is proposed to extract global and local fault features from fault data. This method is an important supplement to the current fault diagnosis theory based on Transformer. 3. The traditional ViT classification model uses an additional class token vector for classification output. In this paper, the sequence feature fusion module based on global average pooling is used to replace the class token vector, which effectively integrates the feature information of each sequence. This approach establishes a new output pathway for end-to-end input-output transformer classification models. 4. Comparative experiments on two publicly available fault diagnosis datasets verified the superiority of the proposed MultiDilatedFormer model, achieving a maximum accuracy of 97.95%, representing a maximum improvement of 10.97% compared to other models. Additionally, this model was applied to actual fault data from an injection molding machine, achieving a diagnostic accuracy of 97.5%. 5. Based on the experiments, this study conducted a visual analysis of the entire decision-making process from model input to output, validating the effectiveness and interpretability of the proposed model. This provides a reference for the rare research on interpretability in fault diagnosis based on transformer models. The remaining structure of this paper is as follows. The first section introduces background and related work. The second section presents the proposed methodology. The third section discusses the experimental comparison results and analysis. Finally, the fourth section concludes this study.