Trusted interpretable early fault identification method for power distribution network

By constructing a CNN neural network based on spatial attention mechanism and a HiSHAP module, interpretable heatmaps are generated, solving the problems of real-time processing and physical interpretability in early fault identification of distribution networks, and realizing real-time interpretable processing and accurate identification of high-resolution waveform data.

CN121578034APending Publication Date: 2026-02-27CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511682627.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing early fault identification technologies for power distribution networks struggle to combine real-time processing capabilities with physical interpretability. Black-box models cannot verify the basis of model decisions, and traditional XAI methods are computationally complex and cannot intervene in the training process.

Method used

A CNN neural network based on spatial attention mechanism is pre-trained using a HiSHAP module. The HiSHAP module calculates the Shapley value of the electrical waveform to generate an interpretable heatmap. The spatial attention weight matrix and the fault mechanism matrix are fused to form the interpretable-guided attention mechanism module EAIFnet.

Benefits of technology

It achieves efficient and interpretable early fault waveform analysis, reduces computational burden, breaks through the computational bottleneck of kilohertz sampling signals, meets the needs of online monitoring of distribution networks, and improves the accuracy and reliability of fault identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121578034A_ABST
    Figure CN121578034A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power distribution network early-stage fault identification, and particularly relates to a credible interpretable power distribution network early-stage fault identification method, which comprises the following steps of S1, constructing an early-stage fault identifier; s2, dividing the electrical oscillogram into x rows and x columns of blocks with the same size; the HiSHAP module calculates a Shapley value of each block to an early fault result based on a game theory principle; s3, in a pre-trained early fault identifier, fusing the fault mechanism matrix obtained by the HiSHAP module in the S2 with an original spatial attention weight matrix to obtain an interpretable guided attention weight matrix MEAIF, and forming an interpretable guided attention mechanism module EA; s4, integrating the steps S1 to S3 to form an EAIFnet model; after the EAIFnet model inputs the electrical oscillogram, outputting an early fault identification result and an interpretable thermodynamic diagram; and S5, carrying out early fault processing by a worker. When the method is used for early fault identification of the power distribution network, the real-time processing capability and the physical interpretability can be realized at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of early fault identification of power distribution network, and particularly relates to a credible and interpretable early fault identification method of power distribution network. BACKGROUND

[0002] The core task of power distribution network is to provide high-quality electric energy to end users, but its operating environment is facing increasingly complex challenges, including high-density urban load, multi-level voltage structure, and infrastructure aging problems. In such harsh scenarios, early fault detection plays a decisive role in preventing equipment damage, improving power supply continuity, and reducing operation and maintenance costs, which has made active incipient fault (IFs) detection technology of power distribution network cable a research hotspot.

[0003] IFs refers to the small abnormalities or deterioration process before permanent faults such as insulation cracking and partial discharge occur. Unlike transient overvoltage or DC fault rapid transient rise phenomenon, IFs does not immediately cause power grid operation interruption, and the early stage is often difficult to detect. For example, intermittent arc discharge may only cause weak waveform distortion, which is difficult to capture and analyze. However, under harsh working conditions, such faults may evolve into serious breakdown accidents, which not only threatens safety but also causes high maintenance costs. Therefore, reliable IFs identification technology is the key to realize the state maintenance and long-term resilience of power distribution network. Due to the concealment of its early behavior, effective detection needs to have the ability to identify weak but physically meaningful fault features, which promotes the exploration of advanced data-driven methods.

[0004] Recent studies have shown that machine learning can directly detect IFs from raw waveforms or transformed signal data. Such data-driven models learn feature patterns directly from data, avoiding the tediousness of manual feature engineering, while showing excellent generalization ability and scalability. Specifically, fast Fourier transform, wavelet-LSTM hybrid model, and CNN-based image representation method have been widely studied. However, these black-box models (BB) generally have the problem of insufficient interpretability, and engineers are difficult to verify whether the model prediction is based on physically meaningful fault features or from signal noise or false correlation such as alignment artifacts.

[0005] Explainable artificial intelligence (XAI) has become an important research direction to solve the contradiction between accuracy and explainability in IFs detection. By revealing the decision basis of the model, XAI technology can enable engineers to verify the reasoning process, debug prediction errors, and enhance the trust in practical applications. Existing XAI methods include fault location based on class activation mapping (CAM), waveform feature visualization for transformer diagnosis, and architecture-specific explanation method for power quality classification. Among them, Shapley-hadditive explanations (SHAP) is particularly prominent due to its model-independent characteristics and theoretical basis of cooperative game theory, and has been successfully applied to critical margin time prediction, stability boundary analysis, and other scenarios. However, when applied to high-frequency waveform data, this method faces two major challenges: first, the computational complexity of SHAP increases exponentially (O(2 M )) with the number of input features, making it difficult to analyze high-resolution signals at kilohertz sampling rates; second, the pixel-level heat map generated by SHAP and its derivative methods (such as GradSHAP) is difficult to establish a direct connection with physical fault features such as waveform peaks and oscillation zones. More importantly, as a post-hoc explanation tool, SHAP cannot intervene in the model training process, so the learned representation may still be disturbed by spurious correlations. Therefore, although SHAP can provide effective post-hoc explanations, it cannot guarantee that the model forms the correct reasoning mechanism during the learning phase.

[0006] Therefore, how to achieve real-time processing capability and physical explainability in early fault identification of distribution networks has become a problem to be solved. SUMMARY

[0007] To overcome the shortcomings of the prior art, the present application provides a trusted and explainable early fault identification method for distribution networks, which can achieve real-time processing capability and physical explainability in early fault identification of distribution networks.

[0008] To solve the above technical problems, the present application adopts the following technical solutions:

[0009] A trusted and explainable early fault identification method for distribution networks, comprising the following steps:

[0010] S1, a CNN neural network based on a space attention mechanism is constructed as an early fault identifier, and a meta-learning strategy is used for pre-training;

[0011] S2, the electrical waveform diagram is divided into x rows and x columns of equal-sized blocks; the HiSHAP module calculates the Shapley value of each block to the early fault result based on the game theory principle, i.e. the marginal contribution of each block to the IFs identification result; wherein the HiSHAP reduces the computational overhead through hierarchical calculation path; the calculation formula of the Shapley value of the i-th block is:

[0012]

[0013] N={x1,x2,…,x i ,…,x n};

[0014] In the formula, Xi represents the Shapley value of the i th block; x i represents the i th block; N represents a block set to be explained; S represents any subset of N not containing x i ; m i (S) represents the marginal benefit generated by adding x i to the subset S;

[0015] A failure mechanism matrix for explaining the importance of each block is formed using the Shapley value of each block; and the Shapley value of each block is visualized on an electrical waveform diagram by color, to obtain an explainability heat map;

[0016] S3, in the pre-trained early fault recognizer, the failure mechanism matrix obtained by the HiSHAP module in S2 is fused with the original spatial attention weight matrix, to obtain an explainability-guided attention weight matrix MEAIF, and an explainability-guided attention mechanism module EA is formed, so that the mechanism of early failure is integrated into the training process of the data-driven IFs recognizer;

[0017] S4, S1-S3 are integrated to form an EAIFnet model; after the EAIFnet model inputs an electrical waveform diagram, an early fault recognition result and an explainability heat map are output;

[0018] S5, based on the early fault recognition result and the explainability heat map, a worker performs early fault processing.

[0019] The HiSHAP module, i.e., the Hierarchy SHAP module, is in English.

[0020] Compared with the prior art, the present application has the following beneficial effects:

[0021] 1. Efficient explainable analysis of early fault waveforms is realized. The HiSHAP module calculates the Shapley value of the block of the electrical waveform diagram, which greatly reduces the calculation burden compared with the traditional SHAP which calculates the Shapley value with a single pixel feature. Compared with directly applying SHAP to a kilohertz sampling signal, the calculation bottleneck is broken, real-time explainable processing of high-resolution waveform data is realized, and the online monitoring demand of the power distribution network is met.

[0022] 2、Establish a physical mechanism-driven fault explanation mechanism. The interpretable heat map generated by HiSHAP visualizes the Shapley value of each block on the electrical waveform diagram through color, which can highlight the physical characteristics of important blocks (such as waveform oscillation and mutation), and technicians can quickly verify whether the model has made decisions based on real fault characteristics.

[0023] 3、Realize the accurate identification of multi-source information fusion. The EA module fuses the spatial attention weight matrix and the fault mechanism matrix, so that the classifier can utilize both data-driven learning ability and electrical domain knowledge to realize fault identification. Compared with pure data-driven models or simple addition of explanation modules, the feature fusion mechanism improves the discovery and learning ability of the identification model for fault mechanisms and improves the reliability of the identification model for electrical engineers.

[0024] In summary, the method can have real-time processing capability and physical interpretability when identifying early faults in distribution networks. It effectively solves the contradiction between the unverifiable decision of traditional black box models and the disconnection of XAI methods from practical applications.

[0025] Preferably, the process of pre-training with a meta-learning strategy comprises:

[0026] A fault image database is constructed as a training set, and its data distribution is denoted as D train (T); After dividing the training set into support set S and query set Q, the fault identification task T i ~ D(T) is constructed, and the parameters ω of the CNN are updated according to the following formula:

[0027]

[0028] In the formula, η ml is the current task T i ~ D(T) of the support set S in the meta-learning process, which is used to represent the learning rate of model updating; represents the cross-entropy loss function The gradient with respect to the variable ω, the cross-entropy loss function is used to measure the performance of the model; T i spt represents the support set; x i , y i represent the fault image sample and the corresponding label, respectively; f ω (x i ) represents the prediction result of the model for x i ;

[0029] Then, the cross-entropy loss is calculated based on the query set Q, and the performance of ω is evaluated and updated through gradient descent method, obtaining the pre-trained CNN parameter ω * ;

[0030]

[0031] where T i qry denotes the query set; T i ~ d(T i ) denotes the distribution of all data used in the pre-training phase based on meta-learning.

[0032] Such a setting, the meta-learning pre-training scheme builds a feature extraction base with strong adaptability and outstanding anti-interference ability for CNN neural network through task-driven double gradient update mechanism, thereby laying a core foundation for the real-time performance, robustness and physical consistency of the whole reliable and interpretable system.

[0033] Preferably, in S3, the generation process of the spatial attention weight matrix comprises:

[0034] First, the sample image is characteristic extraction and transformation using a CNN shallow network to generate an intermediate feature map where C, H and W represent the number of channels, height and width, respectively;

[0035] Subsequently, based on the global max pooling F mp (·) and average pooling F ap (·), the maximum vector and the average vector

[0036] v ma = F mp (x′);

[0037] v avg = F ap (x′);

[0038] Then, based on the global context information captured thereby, a spatial attention weight matrix

[0039] M ea = Sigmoid(W2·Conv(W1·concat[v avg ,v max ]));

[0040] where W1 and W2 are two learnable weight matrices, and their parameters are iteratively optimized based on the learning rate η and the loss function weight gradient :

[0041]

[0042] Preferably, in S3, before fusing the fault mechanism matrix obtained from the HiSHAP module in S2 with the original spatial attention weight matrix, a bilinear interpolation algorithm for tensor interpolation is applied to the fault mechanism matrix to align the fault mechanism matrix with the spatial attention weight matrix.

[0043] Preferably, in S3, the spatial attention weight matrix M is fused using a weighted average method. ea and the fault mechanism matrix M if The calculation formula is:

[0044] M eaif =w if M if +w ea M ea ;

[0045] Among them, w if and w ea M is the spatial attention weight matrix if and the fault mechanism matrix M ea The weight.

[0046] With this setup, the weighted fusion mechanism, through a physical-data dual-drive architecture with a fixed ratio, ensures real-time performance while building a deep collaboration between physical interpretation and data representation. This provides a feature fusion paradigm for early fault identification in distribution networks that combines high accuracy, strong interpretability, and engineering feasibility.

[0047] Preferably, w if =0.3,w ea =0.7.

[0048] Preferably, in S2, when visualizing the Shapley value of each block on the electrical waveform diagram by color, red indicates a positive contribution and blue indicates a negative contribution. Attached Figure Description

[0049] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0050] Figure 1 This is a schematic diagram of typical IFs waveforms in the embodiment;

[0051] Figure 2 This is a flowchart of the method;

[0052] Figure 3 This is a schematic diagram of the framework of the interpretable fault identification model in this method;

[0053] Figure 4 This is a schematic diagram of the block merging hierarchy in Example 1;

[0054] Figure 5 This is a schematic diagram of the hierarchical structure of the HiSHAP merging feature in Example 1;

[0055] Figure 6 The interpretability heatmaps for the four different methods in Example 2 are shown.

[0056] Figure 7 This is a comparison chart showing the interpretation effects of HiSHAP and GradSHAP in Example 2;

[0057] Figure 8 This is a schematic diagram illustrating the visualization results of EAIFnet in early fault identification in Example 2;

[0058] Figure 9 This is a comparison chart of the early fault identification performance of the module with and without explainable guided attention mechanism in Example 2;

[0059] Figure 10 This is a comparison chart of the accuracy curve and interpretability heatmap changes during the fine-tuning process of the early fault identification model with and without an interpretable guided attention mechanism module in Example 2.

[0060] Figure 11 This is an interpretability heatmap of EAIFnet in Example 2 when facing opportunistic behavior in early fault identification. Detailed Implementation

[0061] The following detailed explanation illustrates the specific implementation methods:

[0062] Example 1

[0063] Early faults in distribution networks typically originate from insulation degradation processes, including moisture intrusion, chemical contamination, or overheating. If not addressed promptly, these faults will worsen over time, eventually leading to complete insulation breakdown, potentially causing short-circuit faults and resulting in significant safety hazards such as power outages and fires. Despite varying causes, early faults (IFs) generally exhibit several common characteristics: their fault current and voltage display short-duration, high-amplitude oscillations, and waveform abrupt changes often begin near signal peaks, such as… Figure 1 As shown. These typical characteristics form the basis of many white-box and gray-box detection methods—methods often identify and analyze such signal variations through frequency domain analysis or statistical comparison.

[0064] like Figure 2 , Figure 3 As shown, based on the characteristics of the aforementioned IFs, this embodiment provides a reliable and explainable method for identifying early faults in distribution networks, including the following steps:

[0065] S1. Construct a CNN neural network with spatial attention mechanism as an early fault identifier and pre-train it using a meta-learning strategy.

[0066] Because early cipient faults (IFs) have complex causes, effective identification using fixed formulas or methods is difficult; therefore, selecting a suitable base algorithm is crucial. This method uses a convolutional neural network (CNN) as the base learner due to its combination of spatial feature mining capabilities and ease of engineering implementation. Addressing the common small sample size characteristic of IF data, a meta-learning strategy is employed to train the CNN model—its core idea being to enable the model to "learn how to learn." Figure 3 As shown on the left, a CNN with parameter ω is first pre-trained using an image database containing multiple fault types to obtain ω* parameters with good initialization characteristics, so that it can quickly adapt to IFs image features through gradient descent during the fine-tuning stage.

[0067] In practice, the pre-training process using meta-learning strategies includes:

[0068] Construct a fault image database as a training set, and denote its data distribution as D. train (T); After dividing the training set into a support set S and a query set Q, a fault identification task T is constructed. i ~D(T), and update the CNN parameters ω according to the following formula:

[0069]

[0070] In the formula, η ml The current task T of the support set S during meta-learning process i The step size of ~D(T) is used to represent the learning rate for model updates; Represents the cross-entropy loss function The gradient with respect to the variable ω, and the cross-entropy loss function. Used to measure model performance; T i spt The support set refers to the training data used in the pre-training phase based on meta-learning; x i y i These represent fault image samples and their corresponding labels, respectively; f ω (x i ) indicates that the model applies to x i The prediction results;

[0071] Then, the cross-entropy loss is calculated based on the query set Q, and the performance of ω is evaluated and updated using gradient descent to obtain the pre-trained CNN parameters ω. * ;

[0072]

[0073] Among them, T i qry T represents the query set, i.e., the test data used in the pre-training phase based on meta-learning; i ~d(T i ) represents the distribution of all data used in the pre-training phase based on meta-learning.

[0074] The meta-learning pre-training scheme constructs a highly adaptive and anti-interference feature extraction base for the IFs recognizer through a task-driven dual gradient update mechanism, thereby laying the core foundation for the real-time performance, robustness, and physical consistency of the entire trustworthy and interpretable system.

[0075] S2. Divide the electrical waveform diagram into x rows and x columns of equal-sized blocks; the Hierarchy SHAP (HiSHAP) module calculates the Shapley value of each block for early fault results based on game theory principles, i.e., the marginal contribution of each block to the IFs identification results; HiSHAP reduces computational overhead through a hierarchical calculation path; the formula for calculating the Shapley value of the i-th block is:

[0076]

[0077] N = {x1, x2, ..., x} i ,…,x n};

[0078] In the formula, Represents the Shapley value of the i-th block; x i Let x represent the i-th block; N represents the set of blocks to be interpreted; S represents that N does not contain x. i any subset; m i (S) indicates that x i The marginal benefit of adding subset S;

[0079] A fault mechanism matrix explaining the importance of each block is formed using the Shapley values ​​of each block; and the Shapley values ​​of each block are visualized by color on the electrical waveform diagram to obtain an interpretability heatmap. When visualizing the Shapley values ​​of each block by color on the electrical waveform diagram, red indicates a positive contribution and blue indicates a negative contribution.

[0080] To better understand the effect of the HiSHAP module in this method, the following explanation is provided.

[0081] A well-trained IF (Inertial Vibration) recognition model can output diagnostic results from electrical waveform images. However, a single judgment often leaves engineers in a dilemma about whether to accept the model's decision. The solution lies in simultaneously outputting the diagnostic results and their judgment criteria, i.e., model interpretability. Given that the recognizer contains tens of thousands of neurons and complex connections, a complete analysis of its operation is not feasible. Therefore, interpretation is instead based on waveform images: intuitively, the key to classifying a waveform as an IF lies in the regions of the image whose content matches the characteristics of IFs. Specifically, by evaluating the degree of influence of each pixel on the diagnostic result, the recognizer's decision criteria can be explained.

[0082] For image data, pixels are features. Since features interact with each other, directly quantifying the contribution of a single feature to the result is challenging. Therefore, game theory is introduced to calculate the degree of influence based on the marginal contribution of each feature. Given a model f and electrical waveform image samples, the set of features to be interpreted can be represented as follows: Conventional SHAP methods identify early faults by systematically evaluating and aggregating various image features. The contribution of a single feature x is explained. i The contribution is defined as:

[0083]

[0084] Where S represents the absence of feature x i Any feature subset; m i (S) is to make x i The marginal benefit of adding subset S is used to quantify the incremental contribution of features under a specific combination.

[0085] However, the sampling frequency of the measurement data used in power system fault analysis can reach 10kHz or even higher, with a single waveform period containing at least 200 sampling points. The corresponding image resolution is extremely high, such as the 256×256 image data used in this embodiment. Interpreting such images using the classic SHAP method has a computational complexity of up to [insert value here]. The calculation is impractical in real-world scenarios. To improve computational efficiency and interpretability, researchers proposed GradSHAP, a gradient-based method for calculating pixel feature contributions. However, pixel-level interpretation remains insufficiently intuitive for electrical engineers because human vision cannot effectively observe image features at this granularity.

[0086] Therefore, in this method, dividing the image into blocks and calculating the contribution of each block is equivalent to using the blocks as pixels in the conventional SHAP calculation method. Thus, in this method, x... iLet represent the i-th block. The motivation behind this is that an IFs image is essentially a time process, where features are primarily reflected near the waveform. Interpreting every pixel equally would impose a huge computational burden and could lead to unreasonable interpretations. Specifically, the process first divides the image into x rows and x columns of small blocks. These blocks are then merged based on their similarity, and this process is iterated until all blocks are merged into a single image, such as... Figure 4 As shown. This constructs a hierarchical structure for interpretable computation and integrates it into the computation of Shapley values, thus developing a hierarchical SHAP, or HiSHAP.

[0087] Compared to the traditional SHAP method, which uses an exhaustive search approach with O(2^3) time complexity, this method achieves a much faster time complexity. M The HiSHAP method significantly reduces the computational burden by using a gas stratification structure, thus mitigating the exponential time complexity of traditional methods. Its complexity is... Where n represents the number of features at each level. When a balanced binary tree structure is used (n=2), the complexity can be simplified to O(M). 2 This method achieves a significant efficiency improvement compared to the traditional SHAP method. For example... Figure 5 The IFs image sample shown is used to aggregate spatially adjacent features "A" and "B", "C" and "D" in pairs to form a hierarchical structure. The four features are merged to form three levels, and the final computational complexity is reduced from 24 times to 8 times.

[0088] S3. In the pre-trained early fault identifier, the fault mechanism matrix obtained from the HiSHAP module in S2 is fused with the original spatial attention weight matrix to obtain the interpretable guided attention weight matrix MEAIF, forming the interpretable guided attention mechanism module EA, thereby realizing the integration of the mechanism of early faults into the data-driven IFs identifier training process.

[0089] In specific implementation, the generation process of the original spatial attention weight matrix includes:

[0090] First, a shallow CNN network is used to process the sample images. Feature extraction and transformation are performed to generate intermediate feature maps. Wherein, C, H, and W represent the number of channels, height, and width, respectively;

[0091] Subsequently, based on global max pooling F mp (·) and average pooling F ap (·), calculate the maximum value vector of each channel of x′ respectively. with average vector

[0092] v max =F mp (x′);

[0093] v avg =F ap (x′);

[0094] Then, based on the global context information it captures, the spatial attention weight matrix is ​​obtained.

[0095] M ea =Sigmoid(W2·Conv(W1·concat[v avg ,v max ]));

[0096] In the formula, W1 and W2 are two learnable weight matrices, whose parameters are obtained by gradient descent based on the learning rate η and the weight gradient of the loss function. Perform iterative optimization:

[0097]

[0098] In practice, before merging the fault mechanism matrix obtained from the HiSHAP module in S2 with the original spatial attention weight matrix, a bilinear interpolation algorithm for tensor interpolation is applied to the fault mechanism matrix to align it with the spatial attention weight matrix.

[0099] The spatial attention weight matrix M is fused using a weighted average method. ea and the fault mechanism matrix M if The calculation formula is:

[0100] M eaif =w if M if +w ea M ea ;

[0101] Among them, w if and w ea M is the spatial attention weight matrix if and the fault mechanism matrix M ea The weighting. In specific implementation, w if =0.3,w ea =0.7. In actual use, those skilled in the art can adjust the specific value of the weight according to the actual situation, which will not be elaborated here.

[0102] S4, combined with S1-S3, constitutes the EAIFnet model; after inputting the electrical waveform diagram, the EAIFnet model outputs early fault identification results and interpretable heatmaps.

[0103] S5. Staff members handle early faults based on early fault identification results and interpretable heat maps.

[0104] Compared to existing technologies, this method achieves efficient and interpretable analysis of early fault waveforms. The HiSHAP module calculates the Shapley values ​​of blocks in the electrical waveform diagram, significantly reducing the computational burden compared to traditional SHAP which calculates Shapley values ​​based on individual pixel features. Compared to directly applying SHAP to kilohertz sampling signals, it overcomes computational bottlenecks, enabling real-time interpretable processing of high-resolution waveform data and meeting the needs of online monitoring in distribution networks. Furthermore, the interpretable heatmap generated by HiSHAP visualizes the Shapley values ​​of each block on the electrical waveform diagram using color, highlighting the physical characteristics of important blocks (such as waveform oscillations and abrupt changes). Technicians can quickly verify whether the model makes decisions based on real fault characteristics. Moreover, it achieves accurate identification through multi-source information fusion. The EA module integrates the spatial attention weight matrix (data-driven features) and the fault mechanism matrix, enabling the classifier to simultaneously utilize data-driven learning capabilities and electrical domain knowledge to achieve fault identification. Compared to purely data-driven models or solutions that simply add explanation modules, the feature fusion mechanism enhances the identification model's ability to discover and learn fault mechanisms, thereby improving the model's reliability for electrical engineers.

[0105] In addition, the EA module of this method integrates the interpretability results of the fault identification model's identification process into the model training process, and iteratively optimizes the model based on its own generated interpretations, thereby ensuring that the learning process conforms to physically meaningful fault characteristics. This architecture enables EAIFnet to have both high identification accuracy and interpretability, and its decisions are based on correct physical mechanisms rather than simply fitting data patterns.

[0106] In summary, this method combines real-time processing capabilities with physical interpretability for early-stage fault identification in distribution networks. It effectively resolves the contradiction between the unverifiable decision-making of traditional black-box models and the practical detachment of the XAI method.

[0107] Example 2

[0108] To better illustrate the effectiveness of this method, the following experimental verification was conducted.

[0109] Experimental data were obtained from actual measurements collected by power quality monitoring meters. Accuracy, precision, recall, and F1 score were used as evaluation metrics for the IFs identification task. The code was implemented using the torch library, and all experiments were performed on an RTX4080 GPU. The waveform images used were 256×256 pixels in size.

[0110] 1. The EAIFnet model provides accurate early fault identification and interpretable analysis.

[0111] Comparative experiments were conducted to verify the accuracy and reliability advantages of EAIFnet in early fault identification. The experiments covered two benchmarks: interpretable methods (Linear Regression (LR), Support Vector Machines (SVM), and EAIFnet) and non-interpretable methods (ResNet, HLCL, IF-PTM, and PTAFedIF). As shown in Table 1, EAIFnet comprehensively outperformed existing state-of-the-art methods with an accuracy of 0.9920, precision of 0.9930, recall of 0.9917, and F1 score of 0.9920. The results demonstrate that EAIFnet significantly outperforms existing state-of-the-art methods in all performance metrics. Specifically, compared with the HLCL method, EAIFnet improved accuracy, precision, recall and F1 score by 3.06%, 6.74%, 6.67% and 3.51%, respectively; compared with the IF-PTM method, its performance improvement reached 6.05%, 2.31%, 2.71% and 2.66%; compared with SMART-IFP

[37] and PTAFedIF methods, EAIFnet also achieved performance improvements of 3.52%, 2.14%, 2.01%, 2.04% and 2.59%, 2.06%, 2.55%, 2.69%, respectively. These data fully demonstrate the significant advantage of EAIFnet in early fault identification accuracy.

[0112] Table 1. Accuracy of early fault identification using different methods

[0113]

[0114] also, Figure 6 The heatmaps provide a visual comparison of the early fault identification mechanisms of different methods, offering crucial information for power engineers to assess model reliability. The heatmaps generated by EAIFnet clearly demonstrate its focus on key physical features such as waveform peaks and oscillation regions, a stark contrast to the distraction patterns produced by traditional black-box models (such as ResNet). This physical mechanism-based visualization allows engineers to quickly verify whether model decisions are based on meaningful fault characteristics, rather than data noise or other spurious correlations.

[0115] Figure 6In the diagram, red indicates that the feature blocks contribute positively to determining whether a sample belongs to that category, while blue corresponds to a negative contribution. For the same early fault sample image, the proposed EAIFnet method uses significant red marking to highlight short-term high-frequency oscillations and abrupt changes in the sample waveform. This highly aligns with industry-recognized characteristics of early faults, confirming the reliability of this method in fault identification. In contrast, CNN methods only use light red to generically mark waveform areas, failing to provide effective decision support for power engineers. This stems from their lack of an interpretable guided attention module (EA), which fails to strengthen the focus on the fault mechanism. Similar issues exist in the SMART-IFP method, causing it to fail to focus more prominently on early fault feature regions. Furthermore, the PTAFedIF method, in addition to marking fault feature regions, overemphasizes the waveformless regions at the top of the image, which is considered a manifestation of model overfitting. In summary, EAIFnet achieves the optimal balance between accuracy and reliability in early fault identification.

[0116] 2. Advantages of the HiSHAP interpretability method in terms of computational efficiency and visualization

[0117] Computational complexity comparison experiments verified the computational efficiency advantage of the proposed HiSHAP method compared to traditional SHAP and GradSHAP methods. Test data in Table 2 shows that HiSHAP completes the computation task in just 5.6933 seconds, less than 50% of the time taken by the GradSHAP method (12.5118 seconds), achieving a computational efficiency improvement of 54.5%. This result fully demonstrates the significant performance optimization brought about by the hierarchical feature aggregation of the HiSHAP method.

[0118] Table 2 Computational efficiency of different interpretability methods

[0119]

[0120] Interpretability effects, for example Figure 7 As shown, the early fault sample interpretation heatmap generated by HiSHAP exhibits significant observability: Figure 7 The red area in the middle clearly marks the abnormal process of the phase current signal when the fault occurs, and the rightmost red block particularly highlights the critical transition phenomenon between the termination of abnormal oscillation and the recovery of the normal signal. In contrast, the pixel-by-pixel interpretation results output by GradSHAP are less readable and fail to provide power engineers with intuitive and clear decision support. Engineering applications show that EAIFnet can simultaneously output fault identification results and visual heatmap interpretations within approximately 5 seconds, achieving reliable and accurate early fault diagnosis.

[0121] also, Figure 8A multi-class classification task was used to demonstrate EAIFnet's identification results and interpretation heatmaps for different samples. This task included three categories of samples: normal state, disturbance state, and early fault state. For each sample, EAIFnet generated three sets of heatmaps (arranged from left to right) corresponding to the probability-based potential classification results. Notably, the method prominently marked industry-recognized early fault characteristics such as short-term oscillations and peak abrupt changes in red, while blank areas without waveform coverage were uniformly marked in blue. These results confirm that EAIFnet can not only achieve accurate identification based on reasonable features, but also allows power engineers to intuitively understand the internal processes and principles of fault diagnosis.

[0122] 3. The interpretability-guided attention module improves the accuracy of IFs recognition.

[0123] The interpretable guided attention module aims to focus the model's attention weights on the correct regions in the image, a design that significantly improves the accuracy of early fault detection. For example... Figure 9 As shown, comparing the experimental results of EAIFnet (with an interpretable guided attention mechanism module) and IFnet (without an interpretable guided attention mechanism module) reveals that EAIFnet outperforms IFnet by 4.09%, 3.18%, 4.17%, and 4.09% in accuracy, precision, recall, and F1 score, respectively. These data strongly demonstrate that an interpretable guided attention mechanism can effectively improve early fault identification performance.

[0124] To further analyze the impact of interpretability-guided attention mechanisms on early fault identification, Figure 10 A comparison of the heatmaps of EAIFnet and IFnet reveals their differences. First, during the fine-tuning phase, EAIFnet's red accuracy curve consistently outperforms IFnet's blue curve, demonstrating the significant improvement in fault identification achieved by the interpretable guidance attention module. Further analysis of the heatmap features reveals that in the EAIFnet heatmap (normalized for easier comparison), the red markers in the right-hand block (indicated by the black arrow) gradually intensify as fine-tuning progresses, indicating that the EA module continuously strengthens the model's focus on typical fault feature regions during training. Notably, this block corresponds to the typical feature of abrupt changes near waveform peaks in early fault samples, confirming that EAIFnet effectively improves identification accuracy by incorporating the physical mechanism of the fault. In contrast, IFnet's heatmap shows that its fine-tuning process failed to guide the model to focus on specific feature regions, instead diverting attention to the image center (the area of ​​uncertainty in model attention is marked with a question mark in the figure). This indicates that models lacking interpretable guidance mechanisms can only rely on coarse waveform features for identification and cannot learn key fault feature information.

[0125] Experimental results show that the interpretable guided attention module in EAIFnet effectively improves recognition accuracy by enhancing the model's attention to and learning of early fault features.

[0126] 4. EAIFnet reveals the opportunistic behavior of IFs identification models.

[0127] When a model correctly identifies faults based on non-fault mechanism characteristics (such as exogenous noise accompanying early faults), this behavior is considered an "opportunistic decision-making" tactic. Early fault identifiers exhibiting this characteristic cannot guarantee accuracy and reliability under varying operating conditions, easily leading to distribution network safety accidents. Therefore, revealing and suppressing opportunistic decision-making behavior is crucial for improving the engineering reliability of fault identifiers. To evaluate EAIFnet's ability to reveal such opportunistic decision-making behavior, a set of subtle noises was injected into the early fault data: a fixed-pattern oscillating waveform was added to the initial segment of the A-phase voltage in the fault sample as a test condition to trigger opportunistic decision-making in the model. Figure 11 The heatmap results show the interpretability of the method in identifying early faults, with the red-marked areas clearly demonstrating the model's ability to distinguish between implanted noise (black dashed boxes) and true fault features (solid boxes). Experiments show that EAIFnet can effectively identify and label: 1) the model's dependence on non-mechanistic features (added noise); and 2) decision weights based on the true fault mechanism (waveform abrupt change region), providing engineers with reliable fault diagnosis basis.

[0128] Experimental results show that in all correctly identified early fault samples, EAIFnet displayed significant red markings in the region near the added noise. This indicates that under such specific operating conditions, the model's correct identification is based on artificially added noise waveforms, confirming the existence of opportunistic decision-making behavior. Clearly, the HiSHAP module in EAIFnet can keenly capture this behavior and provide power engineers with intuitive evidence through visualized heatmaps, offering reliable fault identification and decision support.

[0129] in conclusion

[0130] The proposed EAIFnet, an interpretable guided framework for identifying early faults (IFs) in distribution network cables, is innovative in the following ways: (1) It integrates the hierarchical SHAP method (HiSHAP) with an interpretable attention mechanism, ensuring that the model learns physically meaningful fault modes while maintaining a 99.2% recognition accuracy (currently the best); (2) Experiments based on real waveform data show that the generated heatmap can accurately match known fault characteristics (such as waveform oscillation regions and abrupt change points), providing engineers with actionable decision-making basis; (3) HiSHAP reduces the computational complexity of interpretation from exponential to polynomial level, enabling real-time fault analysis in distribution networks; (4) It can effectively identify speculative behavior in models and improve the reliability of smart grids under varying operating conditions. This framework solves the trade-off between accuracy and interpretability in traditional methods through mechanism-guided deep learning.

[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.

Claims

1. A reliable and explainable method for early fault identification in distribution networks, characterized in that, Includes the following steps: S1. Construct a CNN neural network with spatial attention mechanism as an early fault identifier and pre-train it using a meta-learning strategy. S2. Divide the electrical waveform diagram into x rows and x columns of equal-sized blocks; the HiSHAP module calculates the Shapley value of each block for the early fault outcome based on game theory principles, i.e., the marginal contribution of each block to the IFs identification result; HiSHAP reduces computational overhead through a hierarchical calculation path; the formula for calculating the Shapley value of the i-th block is: N={x1,x2,…,x i ,…,x n }; In the formula, Represents the Shapley value of the i-th block; x i Let x represent the i-th block; N represents the set of blocks to be interpreted; S represents that N does not contain x. i any subset; m i (S) indicates that x i The marginal benefit of adding subset S; The Shapley values ​​of each block are used to form a failure mechanism matrix that explains the importance of each block; The Shapley values ​​of each block are visualized by color on the electrical waveform diagram to obtain an interpretable heatmap; S3. In the pre-trained early fault identifier, the fault mechanism matrix obtained from the HiSHAP module in S2 is fused with the original spatial attention weight matrix to obtain the interpretable guided attention weight matrix MEAIF, forming the interpretable guided attention mechanism module EA, thereby realizing the integration of the mechanism of early faults into the data-driven IFs identifier training process. S4, combined with S1-S3, constitutes the EAIFnet model; after inputting the electrical waveform diagram, the EAIFnet model outputs early fault identification results and interpretable heatmaps. S5. Staff members handle early faults based on early fault identification results and interpretable heat maps.

2. The reliable and explainable early fault identification method for distribution networks as described in claim 1, characterized in that: In S1, the pre-training process using the meta-learning strategy includes: Construct a fault image database as a training set, and denote its data distribution as D. train (T); After dividing the training set into a support set S and a query set Q, a fault identification task T is constructed. i ~D(T), and update the CNN parameters ω according to the following formula: In the formula, η ml The current task T of the support set S during meta-learning process i The step size of ~D(T) is used to represent the learning rate for model updates; Represents the cross-entropy loss function The gradient with respect to the variable ω, and the cross-entropy loss function. Used to measure model performance; Indicates the support set; x i y i These represent fault image samples and their corresponding labels, respectively; f ω (x i ) indicates that the model applies to x i The prediction results; Then, the cross-entropy loss is calculated based on the query set Q, and the performance of ω is evaluated and updated using gradient descent to obtain the pre-trained CNN parameters ω. * ; in, T represents a query set; i ~d(T i ) represents the distribution of all data used in the pre-training phase based on meta-learning.

3. The reliable and explainable early fault identification method for distribution networks as described in claim 2, characterized in that: In S3, the process of generating the original spatial attention weight matrix includes: First, a shallow CNN network is used to process the sample images. Feature extraction and transformation are performed to generate intermediate feature maps. Wherein, C, H, and W represent the number of channels, height, and width, respectively; Subsequently, based on global max pooling F mp (·) and average pooling F ap (·), calculate the maximum value vector of each channel of x′ respectively. with average vector v max =F mp (x′); v avg =F ap (x′); Then, based on the global context information it captures, the spatial attention weight matrix is ​​obtained. M ea =Sigmoid(W2·Conv(W1·concat[v avg ,v max ])); In the formula, W1 and W2 are two learnable weight matrices, whose parameters are obtained by gradient descent based on the learning rate η and the weight gradient of the loss function. Perform iterative optimization:

4. The reliable and explainable early fault identification method for distribution networks as described in claim 1, characterized in that: In S3, before merging the fault mechanism matrix obtained from the HiSHAP module in S2 with the original spatial attention weight matrix, a bilinear interpolation algorithm for tensor interpolation is applied to the fault mechanism matrix to align the fault mechanism matrix with the spatial attention weight matrix.

5. The reliable and explainable early fault identification method for distribution networks as described in claim 4, characterized in that: In S3, the spatial attention weight matrix M is fused using a weighted average method. ea and the fault mechanism matrix M if The calculation formula is: M eaif =w if M if +w ea M ea ; Among them, w if and w ea M is the spatial attention weight matrix if and the fault mechanism matrix M ea The weight.

6. The reliable and explainable early fault identification method for distribution networks as described in claim 5, characterized in that: In if =0.3,w ea =0.7。 7. The reliable and explainable early fault identification method for distribution networks as described in claim 1, characterized in that: In S2, when visualizing the Shapley values ​​of each block on the electrical waveform diagram using color, red indicates a positive contribution and blue indicates a negative contribution.