Explanatable mechanical fault diagnosis method based on graph local-global fusion network
By constructing a graph local-global fusion network, combining an adaptive self-attention network and a graph attention network, high-precision interpretable diagnosis of mechanical faults is achieved, and the problems of insufficient joint modeling of local-global information and poor interpretability in the existing technology are solved, improving the accuracy and transparency of fault diagnosis.
Patent Information
- Application Number
- CN202510601469.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-08
AI Technical Summary
The existing mechanical fault diagnosis method based on graph neural networks is insufficient in local-global information joint modeling and poor interpretability, resulting in insufficient prediction accuracy and unexplainable results.
The graph local-global fusion network is adopted, and the weighted fusion and interpretability diagnosis of local and global information are achieved by constructing KNN graphs, Radius graphs and Path graphs, combining adaptive self-attention networks (ASAN) and graph attention networks (GATs), and learningable weight parameters and GraphLIME technology are introduced.
It significantly improves the accuracy of fault diagnosis and provides the reasons behind fault prediction through GraphLIME, alleviating the black box characteristics of neural networks.
Smart Images

Figure CN120449047A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep learning and intelligent manufacturing technology, and specifically relates to an explainable mechanical fault diagnosis method. Background Art
[0002] Bearings, gears, and other core components of machinery directly impact the stability and safety of the equipment, and even have far-reaching impacts across various industries. In particular, with the increasingly interconnected nature of large-scale machinery, failure of a core component like a rolling bearing can trigger unpredictable chain reactions. At best, this can disrupt normal equipment operation, while at worst, it can halt the entire production line, potentially endangering workers' lives and leading to unforeseen economic losses. Therefore, condition monitoring and fault diagnosis of core mechanical components like rolling bearings are essential. Equipment health monitoring can help identify problems before they occur, preventing critical failures of core mechanical components. This reduces repair costs, ensures the safety of all personnel and equipment, and minimizes accidents.
[0003] Traditional deep learning-based intelligent fault diagnosis technologies are limited by their inability to fully model the inherent relationships between data. Fault diagnosis technologies based on graph neural networks have become cutting-edge technologies. Graph neural networks are highly efficient neural networks for processing graph data. Graph data is irregular data based on non-Euclidean space. Graph data, consisting of nodes and the edges connecting them, has a more comprehensive ability to express information. Existing graph neural networks primarily perform message passing within local subgraphs and fail to effectively consider information between long-distance graph nodes. This can lead to insufficient prediction accuracy. When graph neural network models provide prediction results, they often lack explanations for the underlying reasons, particularly failing to clearly identify which node attributes significantly influence the fault prediction results.
[0004] Therefore, how to break through the limitations of existing mechanical fault diagnosis technology based on graph neural networks and construct a mechanical fault diagnosis method that can effectively integrate local and global information, improve prediction accuracy, and have good interpretability has become a key technical problem that needs to be solved urgently in this field. Summary of the Invention
[0005] In response to the deficiencies in the prior art, the present invention provides an interpretable mechanical fault diagnosis method based on a graph local-global fusion network, which solves the problems of insufficient local-global information joint modeling and poor interpretability in the existing fault diagnosis methods based on graph neural networks.
[0006] The object of the present invention is achieved as follows: a method for interpretable mechanical fault diagnosis based on a graph local-global fusion network, comprising the following steps:
[0007] Step 1): Normalize the vibration signal collected from the mechanical component and split it into sub-samples of a specific length. Select a specific number of sub-samples in sequence to construct the KNN graph, Radius graph, and Path graph respectively.
[0008] Step 2): Construct an Adaptive Self-Attention Network (ASAN) with an adaptive node similarity decay strategy to model the global information in the constructed graph;
[0009] Step 3): Use the Graph Attention Network (GAT) to model the local information in the constructed graph;
[0010] Step 4): Introduce learnable weight parameters to perform weighted fusion of the adaptive self-attention network and the graph attention network to construct a graph neural network (GNN): Graph Local-Global Fusion Network (GLGFN);
[0011] Step 5): GraphLIME, a graph neural network interpretability technology, is used to explain the fault diagnosis results of the above constructed graph local-global fusion network model.
[0012] Furthermore, step 1) specifically includes: dividing the vibration signal of length L0, which can be regarded as a time series, into continuous subsamples of length d0 after normalization processing, and each subsample is assigned a corresponding label; after obtaining the subsample set, a specific number of subsamples are selected in sequence. subsamples, by considering the subsample as a node x i , their relationships are regarded as edges, and a graph G containing a total of N nodes is constructed. The node features of the constructed graph correspond to the vibration signals of the sub-samples.
[0013] Furthermore, the construction of KNN graph, Radius graph and Path graph is as follows:
[0014] KNN graph construction: For each node, the K nearest neighbors become its adjacent nodes, forming the edges of the graph; for each node x i , calculate its difference with the candidate neighbor x j The Euclidean distance between =[ x i +1, x i +2,..., x i +m], indicating a set of m nodes:
[0015]
[0016] According to the distance measurement results, the first K nodes with the smallest distance are selected to form a neighbor set;
[0017]
[0018] Where rank(·) represents the sorting ranking of the distance;
[0019] Use the Gaussian kernel function to calculate the edge weights:
[0020]
[0021] in, It is the bandwidth parameter of the kernel function, which is used to control the decay rate of similarity;
[0022] Radius graph construction: Based on cosine similarity; if the similarity between two samples is higher than a set threshold, an edge is created between them;
[0023] For each node x i , calculate it and the candidate set Each node x j Cosine similarity of:
[0024]
[0025] The value range of cosine similarity is [-1, 1]. The larger the value, the more similar the two samples are. The neighbor set is defined as:
[0026]
[0027] in is the similarity threshold;
[0028] Path graph construction: based on the time order or sampling order of samples; if two samples are adjacent in the sequence, an edge is established between them.
[0029] Furthermore, step 2) specifically includes:
[0030] 2-1) Calculate three learnable weight matrices: query matrix Q, key matrix K, and value matrix V. The calculation method is as follows:
[0031]
[0032]
[0033]
[0034] in, is the node feature matrix; BN represents the commonly used batch normalization operation; W q , W k , W v is a learnable linear transformation matrix used for query, key, and value generation, respectively. The three projection dimensions are set to be the same: d q = d k = d v ;
[0035] 2-2) Use cosine similarity to calculate the similarity between nodes:
[0036]
[0037] 2-3) Calculate the attenuation factor using Gaussian distribution. The formula is as follows:
[0038]
[0039] Where β is a learnable parameter used to control the degree of attenuation;
[0040] 2-4) Introduce a scaled attenuation factor to adjust the attention weights between different nodes; the final attention weight W is defined as follows:
[0041]
[0042] where ⊙ represents the Hadamard (element-wise) product;
[0043] 2-5) Introducing the Dropout mechanism to alleviate the risk of overfitting:
[0044]
[0045] 2-6) The output of the self-attention layer is:
[0046]
[0047] 2-7) Processing through a shallow neural network completes the construction of the adaptive self-attention network and obtains the final representation:
[0048]
[0049] where f o It is a shallow feed-forward neural network.
[0050] Furthermore, step 3) specifically includes:
[0051] 3-1) Given a graph G with N nodes and an edge set , where M is the number of edges; the node feature set is:
[0052]
[0053] Where d represents the feature dimension of each node;
[0054] 3-2) The new feature representation after updating through the graph attention network layer is recorded as:
[0055]
[0056] Represents a set of new features generated after the transformation of the graph attention network layer;
[0057] 3-3) Calculate the attention coefficient α of node i to its neighbor j in the graph attention network ij as follows:
[0058]
[0059] in: is the weight vector of a single-layer feedforward neural network; is a linear transformation matrix; ∥ represents a concatenation operation; represents the neighbor set of node i; LeakReLU(·) is a nonlinear activation function;
[0060] 3-4) Update node features:
[0061]
[0062] in It is an activation function, which adopts a single-head mechanism;
[0063] 3-5) The graph attention network processes graph data through a multi-layer structure. The process is as follows:
[0064]
[0065] Between the first and second graph attention network operations, GAT layer represents the graph attention network layer operation, BN represents batch normalization, and ReLU is the activation function;
[0066] After obtaining the node embeddings from the second graph attention network layer, these embeddings are converted into a higher-level representation through a fully connected layer; the above operation can be expressed as:
[0067]
[0068] 3-6) The transformed embedding is mapped to the desired output dimension through another fully connected layer FC1; the output of the graph attention network module is:
[0069] .
[0070] Furthermore, step 4) specifically includes:
[0071] 4-1) A learnable weight parameter α is introduced;
[0072] 4-2) The expression of fusion output is as follows:
[0073]
[0074] 4-3) An MLP layer is introduced;
[0075] 4-4) Input the fused features into an MLP layer:
[0076]
[0077] 4-5) After obtaining the final fusion features Finally, the cross entropy loss function is used to provide supervision information for full training.
[0078] Furthermore, in step 5), the graph neural network interpretability technology adopts the Hilbert-Schmidt independence criterion Lasso method.
[0079] 5-1) For the node to be explained , by sampling its Jump network neighbors to capture local information of nodes and build a sampling information matrix , which contains the node of Eigenvector of hop neighbors;
[0080] 5-2) Traversal Each eigenvector in , get the predicted value of each neighbor node , f is the GNN-based fault diagnosis model - graph local-global fusion network;
[0081] 5-3) According to ( ) to build a collection ;
[0082] 5-4) Use Train a nonlinear HSIC Lasso model to minimize the difference between f and g to find the explanatory model g.
[0083] 5-5) Coefficient vector obtained by HSIC Lasso optimization , based on the coefficient vector , select the top one with the highest contribution Features as nodes Explanation of the predictions.
[0084] Compared with the prior art, the present invention has the following beneficial effects:
[0085] The present invention proposes an interpretable mechanical fault diagnosis method based on a graph local-global fusion network, constructs an adaptive self-attention network to effectively model global information, and fuses it with the local information learned by the graph attention network to more comprehensively mine data features and significantly improve the accuracy of fault diagnosis.
[0086] A learnable weighting parameter is introduced. This parameter enables the model to adaptively adjust the contribution weights of the two mechanisms based on the characteristics of the input data. This adaptive mechanism gives the model flexibility, allowing it to accurately select the most effective information source in different contexts, thereby improving overall performance.
[0087] To effectively mitigate the black-box nature of neural network prediction results, we've introduced GraphLIME, an advanced interpretability technology for GNN models. GraphLIME uses the Hilbert-Schmidt Independence Criterion (HSIC) Lasso method to provide local interpretability for GNN models. Compared to other graph neural network (GNN) interpretability techniques, it offers significant advantages. GraphLIME enables users to gain deeper insights into the underlying causes of fault predictions, eliminating the need to rely solely on neural network results, effectively mitigating the black-box nature of neural network predictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0089] Figure 1 It is a flow chart of the present invention.
[0090] Figure 2 It is the framework of the network of the present invention.
[0091] Figure 3 This is the construction of three graph structures in the present invention.
[0092] Figure 4 It is the visualization of the vibration signal in the present invention.
[0093] Figure 5 It is the probability of the fault type predicted by the present invention.
[0094] Figure 6 It is an interpretable analysis diagram of the fault diagnosis result of the present invention. DETAILED DESCRIPTION
[0095] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0096] The overall process of the present invention is as follows Figure 1 shown. Figure 2 、 Figure 3 To invent the network framework and graph structure, its specific implementation is as follows Figure 4 、 Figure 5 、 Figure 6 As shown, the following is a detailed description with reference to each flow chart.
[0097] This paper uses a graph local-global fusion network to analyze mechanical vibration data. First, three graph construction methods are used to convert vibration signals into graph data, which serves as input for the subsequent GNN model. Graph features are then learned using an adaptive self-attention network (ASAN) and a graph attention network (GAT). The local features learned by the graph attention network and the global features learned by the ASAN are then subjected to a learnable weighted fusion. Diagnostic results are then obtained after mapping using a multi-layer perceptron (MLP). This means that the network can adaptively adjust the weight distribution of local and global features based on the actual data distribution and specific task requirements. Finally, the feature importance of each node attribute is evaluated using GraphLIME interpretability technology.
[0098] An interpretable mechanical fault diagnosis method based on a graph local-global fusion network includes the following steps:
[0099] Step 1: Build the graph structure
[0100] The vibration signal of length L0, which can be regarded as a time series, is divided into continuous subsamples of length d0 (no overlap), and each subsample is assigned a corresponding label. After obtaining the subsample set, a specific number of subsamples, in this embodiment is set to 10, by considering the subsample as node x i , treating their relationships as edges, and constructing a graph G containing a total of N nodes. The node features of the constructed graph correspond to the vibration signals of the subsamples. The specific details of the three graph construction methods are as follows:
[0101] KNN graph: For each node, its K nearest neighbors will become its adjacent nodes, forming the edges of the graph. i , calculate its difference with the candidate neighbor x j The Euclidean distance between =[ x i +1, x i +2,..., x i +m], indicating a set of m nodes:
[0102]
[0103] According to the distance measurement result, the first K nodes with the smallest distance are selected to form a neighbor set.
[0104]
[0105] Where rank(·) represents the distance ranking. In this embodiment, K is set to 5
[0106] The Gaussian kernel function is used to calculate the edge weights:
[0107]
[0108] in, It is the bandwidth parameter of the kernel function, which is used to control the decay rate of similarity.
[0109] Radius graph: Radius graph is constructed based on cosine similarity. If the similarity between two samples is higher than a set threshold, an edge is created between them.
[0110] For each node x i , calculate it and the candidate set Each node x j Cosine similarity of:
[0111]
[0112] The range of cosine similarity is [-1, 1]. The larger the value, the more similar the two samples are. The neighbor set is defined as:
[0113]
[0114] in is the similarity threshold, which is set to 0 in this embodiment.
[0115] Path graph: The construction of the path graph is based on the time sequence or sampling order of the samples. If two samples are adjacent in the sequence, an edge is established between them.
[0116] Step 2: Build an Adaptive Self-Attention Network (ASAN)
[0117] This paper proposes an Adaptive Self-Attention Network (ASAN), featuring an adaptive decay mechanism driven by node similarity. This network alleviates the problem of "over-globalization" while improving the effectiveness of modeling global information: by allocating less attention to nodes with lower similarity, it focuses more on important information. By integrating ASAN into the Graph Attention Network (GAT), higher-quality node representations can be learned, thereby improving the accuracy of fault diagnosis.
[0118] ASAN first calculates three learnable weight matrices: query matrix Q, key matrix K, and value matrix V. The calculation method is as follows:
[0119]
[0120]
[0121]
[0122] in, is the node feature matrix; BN represents the commonly used batch normalization operation; W q , W k , W v is a learnable linear transformation matrix used for query, key and value generation respectively. In this invention, the three projection dimensions are set to be the same: d q = d k = d v .
[0123] Use cosine similarity to calculate the similarity between nodes:
[0124]
[0125] Then the present invention uses Gaussian distribution to calculate the attenuation factor, and the formula is as follows:
[0126]
[0127] Where β is a learnable parameter that controls the degree of attenuation.
[0128] To further regulate the attention score, this paper introduces a scaled decay factor to adjust the attention weights between different nodes. The final attention weight W is defined as follows:
[0129]
[0130] where ⊙ represents the Hadamard (element-wise) product.
[0131] This paper further introduces the Dropout mechanism to alleviate the risk of overfitting:
[0132]
[0133] Finally, the output of the self-attention layer is:
[0134]
[0135] It is then processed through a shallow neural network to obtain the final representation:
[0136]
[0137] where f o It is a shallow feedforward neural network. In the present invention, it is specifically implemented as a linear transformation layer.
[0138] Step 3: Build a Graph Attention Network (GAT)
[0139] To model local information in the constructed graph, this paper uses the popular Graph Attention Network (GAT). While GAT can aggregate information from distant nodes to a certain extent (especially with increasing layers), it still faces two major problems:
[0140] 1. Over-smoothing Problem: As the number of layers increases, node representations tend to be similar, resulting in a decrease in the distinguishability of node features and the loss of unique node representations.
[0141] 2. Limited Global Information Aggregation: Since aggregation operations are usually performed only on local subgraphs, It is difficult to obtain global information beyond the scope of the subgraph because the information is only performed within the graph composed of subsamples.
[0142] The above problems can be alleviated by introducing the aforementioned adaptive self-attention network (ASAN).
[0143] GAT uses an attention-based structure to compute the hidden representation of each node in the graph by aggregating information by paying attention to its neighboring nodes.
[0144] Given a graph G with N nodes and an edge set , where M is the number of edges. The node feature set is:
[0145]
[0146] Where d represents the feature dimension of each node.
[0147] The new feature representation after updating through the GAT layer is recorded as:
[0148]
[0149] Represents a set of new features generated after transformation by the GAT layer.
[0150] The attention coefficient α of node i to its neighbor j in GAT ij The calculation of is as follows:
[0151]
[0152] in: is the weight vector of a single-layer feedforward neural network; is a linear transformation matrix; ∥ represents a concatenation operation; represents the neighbor set of node i; LeakReLU(·) is a nonlinear activation function.
[0153] Node features are updated as follows:
[0154]
[0155] in is the activation function. Although GAT can be extended to a multi-head attention mechanism, in order to be consistent with the PMHMGMNBenchmark benchmark, this paper adopts a single-head mechanism.
[0156] GAT processes graph data through a multi-layer structure. The process is as follows:
[0157]
[0158] Between the first and second GAT operations, GAT layer represents the GAT layer operation, BN represents batch normalization, and ReLU is the activation function.
[0159] After obtaining the node embeddings from the second GAT layer, these embeddings are converted into higher-level representations through a fully connected layer (FC). Dropout is also applied to enhance the generalization ability of the model and prevent overfitting. The above operation can be expressed as:
[0160]
[0161] Finally, another fully connected layer FC1 is used to map the transformed embedding to the desired output dimension. The output of the GAT module is:
[0162]
[0163] Step 4: Learnable weighted fusion mechanism
[0164] Traditional fixed-weight fusion methods cannot dynamically adjust weights according to the differences between different input samples, which limits the flexibility and expressiveness of the model.
[0165] Therefore, the present invention introduces a learnable weighting parameter α to ensure that the model can adaptively adjust the contribution weights of the two mechanisms based on the characteristics of the input data. This adaptive mechanism allows the model to flexibly select the most effective information source in different contexts, thereby improving overall performance.
[0166] Furthermore, to further enhance the model's expressive power, this paper introduces an MLP layer (Multi-Layer Perceptron) after fusion. This additional layer helps extract higher-quality information from the fused features, enabling the model to better capture complex patterns and relationships in the data.
[0167] The expression of the fusion output is as follows:
[0168]
[0169] Then, the fused features are input into an MLP layer:
[0170]
[0171] After obtaining the final fusion features Finally, the present invention uses the common cross-entropy loss function to provide supervised information for sufficient training, thereby ensuring that the model can accurately predict the fault type.
[0172] Step 5: Explainability Techniques
[0173] To mitigate the black-box nature of neural network predictions, this paper employs GraphLIME, a recently developed graph neural network interpretability technique, to explain the fault diagnosis results provided by this method. GraphLIME employs the Hilbert-Schmidt Independence Criterion (HSIC) Lasso method to provide local interpretability for GNN models.
[0174] Unlike other GNN interpretability techniques, GraphLIME has the following three key advantages:
[0175] 1. Provides nonlinear explanations that better fit the nonlinear nature of the GNN model and are more reasonable than other linear methods;
[0176] 2. The nonlinear interpretation provided by GraphLIME is mathematically guaranteed;
[0177] 3. GraphLIME is model-agnostic and can provide flexible and reliable local explanations for GNN-based models within the local graph.
[0178] For the node to be explained , by sampling its Jump network neighbors to capture local information of nodes and build a sampling information matrix , which contains the node of The feature vector of the hop neighbors. Each eigenvector in , get the predicted value of each neighbor node , f is the fault diagnosis model based on GNN - graph local-global fusion network, and then according to ( ) to build a collection , and finally use Train the nonlinear HSIC Lasso model to minimize the difference between f and g to find the explanatory model g. The coefficient vector obtained by HSIC Lasso optimization , based on the coefficient vector , select the top one with the highest contribution Features as nodes Explanation of the predictions.
[0179] In summary, this paper proposes a novel graph-based local-global fusion network architecture for fault diagnosis. This architecture is based on three graph construction methods: KNN graph, Radius graph, and Path graph. It integrates the popular Graph Attention Network (GAT), which captures local graph information, and the adaptive self-attention network (ASAN) designed in this paper to capture global information. Considering the diversity of inputs in practical application scenarios, this paper designs a learnable weighted fusion mechanism to ensure the model has excellent expressiveness and flexibility. To enhance the interpretability of diagnostic results, this paper incorporates GraphLIME technology, providing users with user-friendly and quantifiable explanations of neural network predictions. This solution addresses the shortcomings of existing graph neural network-based fault diagnosis methods, such as insufficient joint modeling of local-global information and poor interpretability. Experiments on multiple real-world mechanical fault diagnosis datasets validate the effectiveness of the proposed method.
[0180] The contributions of the present invention can be summarized into the following two points:
[0181] 1. Novel network architecture: A novel graph local-global fusion network. This neural network architecture consists of a graph attention network and an adaptive self-attention network, which are used to model local and global information, respectively. The features learned by the two networks are fused through a learnable weighted module to obtain a node representation rich in local-global information for fault diagnosis.
[0182] 2. Unique explainability technology: GraphLIME explainability technology is used to provide the importance of node attribute features in each fault prediction result, alleviating the black box unknowability of neural network prediction.
[0183] To demonstrate the superiority of the proposed method, we compared it with five benchmark methods: Support Vector Machine (SVM), Graph Convolutional Network (GCN), Graph Attention Network (GAT), Simplified Graph Convolutional Network (SGCN), and Graph Isomorphism Network (GIN). The accuracy results for three types of graph construction on four commonly used mechanical fault diagnosis datasets are as follows:
[0184] Table 1 Fault diagnosis accuracy based on KNN graph
[0185]
[0186] Table 2 Fault diagnosis accuracy based on Radius graph
[0187]
[0188] Table 3 Fault diagnosis accuracy based on Path graph
[0189]
[0190] Tables 1-3 show that on the CWRU dataset, the GLGFN method's accuracy is consistently higher than most baseline methods across various graphs. For example, in tests based on path graphs, GLGFN achieves 0.9056±0.0129, significantly exceeding GCN's 0.7140±0.0189. Similar trends are observed on other datasets, including PU, XJTUSpurgear, and SEU, where GLGFN exhibits a clear advantage in accuracy. The proposed GLGFN method demonstrates excellent performance on all four datasets, strongly validating its effectiveness and advancement in the field of mechanical fault diagnosis.
[0191] The above embodiments are only intended to help understand the method and core concept of the present invention. It should be noted that, without departing from the principles of the present invention, a number of improvements and modifications may be made to the present invention by those skilled in the art, and such improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. An interpretable mechanical fault diagnosis method based on graph local-global fusion network, characterized by: The following steps are involved: Step 1): Normalize the vibration signal collected from the mechanical component and split it into sub-samples of a specific length. Select a specific number of sub-samples in sequence to construct the KNN graph, Radius graph, and Path graph respectively. Step 2): Construct an adaptive self-attention network with an adaptive node similarity decay strategy to model the global information in the constructed graph; Step 3): Use graph attention network to model local information in the constructed graph; Step 4): Introduce learnable weight parameters, perform weighted fusion of the adaptive self-attention network and the graph attention network, and construct a graph neural network model: a graph local-global fusion network; Step 5): GraphLIME, a graph neural network interpretability technology, is used to explain the fault diagnosis results of the above constructed graph local-global fusion network model.
2. The interpretable mechanical fault diagnosis method based on graph local-global fusion network according to claim 1 is characterized in that: Step 1) specifically includes: normalizing the vibration signal of length L0, which can be regarded as a time series, and dividing it into continuous subsamples of length d0, each subsample is assigned a corresponding label; after obtaining the subsample set, a specific number of subsamples are selected in sequence. subsamples, by considering the subsample as a node x i , their relationships are regarded as edges, and a graph G containing a total of N nodes is constructed. The node features of the constructed graph correspond to the vibration signals of the sub-samples.
3. The interpretable mechanical fault diagnosis method based on graph local-global fusion network according to claim 2 is characterized in that: The specific steps for constructing KNN graph, Radius graph and Path graph are as follows: KNN graph construction: For each node, the K nearest neighbors become its adjacent nodes, forming the edges of the graph; for each node x i , calculate its difference with the candidate neighbor x j The Euclidean distance between =[ x i +1, x i +2,..., x i +m], indicating a set of m nodes: ; According to the distance measurement results, the first K nodes with the smallest distance are selected to form a neighbor set; ; Where rank(·) represents the sorting ranking of the distance; Use the Gaussian kernel function to calculate the edge weights: ; in, It is the bandwidth parameter of the kernel function, which is used to control the decay rate of similarity; Radius graph construction: Based on cosine similarity; if the similarity between two samples is higher than a set threshold, an edge is created between them; For each node x i , calculate it and the candidate set Each node x j Cosine similarity of: ; The value range of cosine similarity is [-1, 1]. The larger the value, the more similar the two samples are. The neighbor set is defined as: ; in is the similarity threshold; Path graph construction: based on the time order or sampling order of samples; if two samples are adjacent in the sequence, an edge is established between them.
4. The interpretable mechanical fault diagnosis method based on graph local-global fusion network according to claim 3 is characterized in that: Step 2) specifically includes: 2-1) Calculate three learnable weight matrices: query matrix Q, key matrix K, and value matrix V. The calculation method is as follows: ; ; ; in, is the node feature matrix; BN represents the commonly used batch normalization operation; W q , W k , W v is a learnable linear transformation matrix used for query, key, and value generation, respectively. The three projection dimensions are set to be the same: d q = d k = d v ; 2-2) Use cosine similarity to calculate the similarity between nodes: ; 2-3) Calculate the attenuation factor using Gaussian distribution. The formula is as follows: ; Where β is a learnable parameter used to control the degree of attenuation; 2-4) Introduce a scaled attenuation factor to adjust the attention weights between different nodes; the final attention weight W is defined as follows: ; where ⊙ represents the Hadamard (element-wise) product; 2-5) Introducing the Dropout mechanism to alleviate the risk of overfitting: ; 2-6) The output of the self-attention layer is: ; 2-7) Processing through a shallow neural network completes the construction of the adaptive self-attention network and obtains the final representation: ; where f o It is a shallow feed-forward neural network.
5. The interpretable mechanical fault diagnosis method based on graph local-global fusion network according to claim 4 is characterized in that: Step 3) specifically includes: 3-1) Given a graph G with N nodes and an edge set , where M is the number of edges; the node feature set is: ; Where d represents the feature dimension of each node; 3-2) The new feature representation after updating through the graph attention network layer is recorded as: ; Represents a set of new features generated after the transformation of the graph attention network layer; 3-3) Calculate the attention coefficient α of node i to its neighbor j in the graph attention network ij as follows: ; in: is the weight vector of a single-layer feedforward neural network; is a linear transformation matrix; ∥ represents a concatenation operation; represents the neighbor set of node i; LeakReLU(·) is a nonlinear activation function; 3-4) Update node features: ; in It is an activation function, which adopts a single-head mechanism; 3-5) The graph attention network processes graph data through a multi-layer structure. The process is as follows: ; Between the first and second graph attention network operations, GAT layer represents the graph attention network layer operation, BN represents batch normalization, and ReLU is the activation function; After obtaining the node embeddings from the second graph attention network layer, these embeddings are converted into a higher-level representation through a fully connected layer; the above operation can be expressed as: ; 3-6) The transformed embedding is mapped to the desired output dimension through another fully connected layer FC1; the output of the graph attention network module is: 。 6. The interpretable mechanical fault diagnosis method based on graph local-global fusion network according to claim 5 is characterized in that: Step 4) specifically includes: 4-1) A learnable weight parameter α is introduced; 4-2) The expression of fusion output is as follows: ; 4-3) An MLP layer is introduced; 4-4) Input the fused features into an MLP layer: ; 4-5) After obtaining the final fusion features Finally, the cross entropy loss function is used to provide supervision information for full training.
7. The interpretable mechanical fault diagnosis method based on graph local-global fusion network according to claim 6 is characterized in that: Step 5) The interpretability of the Chinese neural network technology uses the Hilbert-Schmidt independence criterion Lasso method: 5-1) For the node to be explained , by sampling its Jump network neighbors to capture local information of nodes and build a sampling information matrix , which contains the node of Eigenvector of hop neighbors; 5-2) Traversal Each eigenvector in , get the predicted value of each neighbor node , f is the GNN-based fault diagnosis model - graph local-global fusion network; 5-3) According to ( ) to build a collection ; 5-4) Use Train the nonlinear HSIC Lasso model to minimize the difference between f and g to find the explanatory model g; 5-5) Coefficient vector obtained by HSIC Lasso optimization , based on the coefficient vector , select the top one with the highest contribution Features as nodes Explanation of the predictions.