## 2 Materials and Methods
### Methods  
#### 2.2.1 Overview  
The proposed method is schematically illustrated in Figure 3, providing a clear overview of its fundamental framework and operational flow. It highlights the key stages, including data preprocessing, feature extraction, and classification. By transforming time-series data into two-dimensional images, the method integrates deep learning models and feature fusion techniques, effectively improving fault classification accuracy and enhancing model robustness. The schematic illustration of the proposed method comprehensively demonstrates its fundamental framework and operational flow, presenting the key stages of data preprocessing, feature extraction, and classification in a clear and intuitive manner. By converting time-series data into two-dimensional images, the method leverages deep learning models and feature fusion techniques, significantly enhancing the accuracy and robustness of fault classification. The model first preprocesses the input raw time-series signals. Specifically, the signal values are normalized to the range [0, 1] and segmented using Piecewise Aggregate Approximation (PPA) for averaging, reducing the impact of redundant information. Then, the model uses the GAF method to convert the time-series data into a two-dimensional image representation, including Gramian Angular Summation Field(GASF) and Gramian Angular Difference Field (GADF) forms, to capture global features and patterns in the time-series data. The preprocessed data takes the form of multi-channel images, laying the foundation for subsequent feature extraction. The preprocessed image data are first input into a lightweight convolutional module for feature extraction. This module consists of depthwise separable convolution and multi-scale convolution kernels (\(3\times 3\) and \(5\times 5\)), which effectively reduce the number of parameters while extracting feature patterns at different receptive fields. Additionally, the H-swish activation function is used to enhance the model's nonlinear expression capability, as shown in Figure 4. After the convolutional module, the data are mapped to a high-dimensional linear feature space through the Patch Embedding module, and class embedding and position encoding are introduced to enable the model to perceive category information and spatial relationships. The embedded features then enter the feature learning stage, where a self-attention mechanism based on Rotary Positional Embedding is used to capture long-range dependencies between sequence blocks. Attention computes information interaction in different subspaces in parallel through a multi-head attention mechanism, with each attention head independently capturing interaction patterns between different features. Furthermore, dynamic weight adjustment is optimized through the ReZero mechanism, which automatically adjusts the focus on features at different stages, capturing important areas of the signal, thus enhancing the model's ability to extract key features. By combining the lightweight CNN and the improved ViT architecture, the model maintains low computational complexity while extracting deep features from time-series data. Experiments demonstrate that the proposed method not only significantly improves the accuracy of gearbox fault diagnosis but also provides an effective solution for the intelligent analysis of time-series signals. The model pseudocode is shown in Algorithm 1. Figure 2: Visualization diagram of the dataset. (**a**) MCC5 gearbox dataset of “health speed circulation”, “gear wear H speed circulation”, and “gear pitting H speed circulation”; (**b**) HSUT gearbox dataset of “Normal”, “Missing tooth”, and “Broken tooth”. ```
Input: a set of Dataset sample S = {(\(X_{1}\), \(label_{1}\), \(type_{1}\)), \(\ldots\), (\(X_{t}\), \(label_{n}\), \(type_{i}\))}, where \(X\) represented the features of the GAF images, label was the class label of the GAF images (which can either be 14 classes or 23 classes), and type represented the type of the image (with two possible types).