Robustness evaluation method based on electrical equipment defect detection model

By building a comprehensive robustness evaluation framework, calculating the robustness evaluation index of the power equipment defect detection model and performing weight calculations, the problem of insufficient robustness evaluation of the power equipment defect detection model in the existing technology is solved, and the accuracy and reliability of the detection are significantly improved.

CN119691551APending Publication Date: 2025-03-25STATE GRID GANSU ELECTRIC POWER RESEARCH INSTITUTE +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411754828.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the prior art, the robustness evaluation of image classification models in the power equipment defect detection scenario is still insufficient. The existing framework has the problems of redundant indicators and lack of intuitive quantitative results. It is impossible to deeply analyze the robustness differences of different model structures under adversarial attacks, resulting in excessive errors.

Method used

By building a comprehensive robustness evaluation framework, the classification results of the original samples and adversarial samples of the power defect detection image are obtained, the robustness evaluation index of the model to be tested is calculated, and the weights of different evaluation indicators are calculated through the entropy weight method to obtain the robustness evaluation results of the power equipment defect detection model.

Benefits of technology

It significantly improves the accuracy and reliability of power equipment defect detection, deeply analyzes the robustness differences of different model structures, provides quantitative and intuitive evaluation results, and improves the performance and practicality of deep learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691551A_ABST
    Figure CN119691551A_ABST
Patent Text Reader

Abstract

The invention provides a robustness evaluation method based on a power equipment defect detection model, and relates to the technical field of power equipment defect detection, and the method comprises the steps: obtaining an original sample of a power defect detection image to build a training set and a test set; applying an adversarial attack algorithm to the test set to generate an adversarial sample; respectively inputting the training set and the confrontation sample into a to-be-tested power equipment defect detection model to obtain a classification result of the original sample and a classification result of the confrontation sample; calculating robustness evaluation indexes of the to-be-tested model according to classification results of the original samples and the adversarial samples; calculating weights of different evaluation indexes through an entropy weight method, and calculating a comprehensive score according to each weight to obtain an evaluation result; according to the method, the robustness difference of different models under adversarial attack is deeply analyzed, so that the accuracy and the reliability of defect detection of the power equipment are improved, the performance and the practicability of the deep learning model in a power defect detection scene are improved, and the method has wide application prospect and practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power equipment defect detection, and in particular to a robustness evaluation method based on a power equipment defect detection model. Background Art

[0002] With the rapid development of deep learning technology, image classification models have been widely used in the field of power equipment defect detection, significantly improving the efficiency of power equipment inspection. However, the problem of insufficient robustness of deep learning models under adversarial attacks has become increasingly prominent, especially in the scenario of power equipment defect detection, which requires high accuracy, and the requirements for model robustness are more stringent. In the existing technology, there is still a lack of systematic research and evaluation on the robustness of image classification models in power defect detection scenarios.

[0003] Although some robustness evaluation frameworks are available to evaluate the robustness of models, such as the existing robustness evaluation frameworks using robustness evaluation indicators such as ACAC, ACTC, CSR, and ENI, the existing frameworks still have the problem of scattered and redundant indicators and lack of intuitive quantitative results. At the same time, the existing frameworks provide more of a platform for conveniently calling different methods for evaluation, and do not optimize the model robustness optimization analysis in a targeted manner. It is impossible to deeply analyze the robustness differences of different model structures under adversarial attacks, resulting in excessive errors in the detection of defects in power equipment. Summary of the invention

[0004] The purpose of the present invention is to provide a robustness evaluation method based on a power equipment defect detection model, which can significantly improve the accuracy and reliability of power equipment defect detection and enhance the performance and practicality of deep learning models in power defect detection scenarios by constructing a comprehensive robustness evaluation framework and deeply analyzing the robustness differences of different model structures under adversarial attacks.

[0005] The technical solution of the present invention is:

[0006] In a first aspect, the present application provides a robustness evaluation method based on a power equipment defect detection model, which comprises the following steps:

[0007] S1, obtaining original samples of power defect detection images to establish training sets and test sets;

[0008] S2, apply the adversarial attack algorithm to the test set to generate adversarial samples;

[0009] S3, input the training set into the power equipment defect detection model to be tested, and obtain the classification result of the original sample through forward propagation;

[0010] S4. Input the adversarial sample into the model to be tested, and obtain the classification result of the adversarial sample through forward propagation;

[0011] S5. Calculate the robustness evaluation index of the model to be tested based on the classification results of the original samples and the adversarial samples;

[0012] S6. The weights of different evaluation indicators are calculated by the entropy weight method, and the comprehensive scores are calculated according to the weights to obtain the robustness evaluation results of the power equipment defect detection model.

[0013] Further, in step S2, the above-mentioned anti-attack algorithm includes FGSM algorithm, RFGSM algorithm and BIM algorithm;

[0014] Among them, the expression of FGSM algorithm is:

[0015]

[0016] The expression of RFGSM algorithm is:

[0017]

[0018] The expression of BIM algorithm is:

[0019]

[0020] Where θ is the parameter of the model, x is the input of the model, y is the label corresponding to the input, J(θ,x,y) is the corresponding loss calculated using the loss function, ∈ is the amplitude parameter of the disturbance, and η is the disturbance finally calculated by FGSM. is the gradient of x, x is the original sample, x′ is the sample after random perturbation, x adν is the final generated adversarial sample, α is the perturbation coefficient, represents Gaussian noise with zero mean and identity covariance, represents the gradient of the loss function with respect to the perturbation sample, is the initial sample, is the adversarial sample generated after n steps of iteration, and Clip(·) is the clipping function.

[0021] Furthermore, in step S5, the robustness evaluation indicators of the model to be tested include the average confidence of the error category, the average confidence of the correct category, the maximum noise tolerance, the stability of the noise, the average L-norm distortion, the empirical boundary distance, the accuracy after the adversarial attack and the accuracy of the pure sample, and the calculation formulas thereof include:

[0022]

[0023]

[0024]

[0025]

[0026] st‖x i -μ ij ‖ ∞ ≤ε

[0027]

[0028]

[0029]

[0030] Where ACAC is the average confidence of the wrong category, ACTC is the average confidence of the correct category, p is the adversarial attack parameter, f is the classifier, ∈ is the amplitude parameter of the perturbation, m is the number of adversarial examples of successful attack, To counter the attack function, is the data set of the original sample, i represents the current evaluation object, j represents the indicator, and x i is the i-th original sample, P is the prediction confidence of the classifier for the wrong category, is the classifier’s prediction confidence for the correct result, y i For the correct result, NTE is the maximum noise tolerance, is the prediction confidence of classifier f for the i-th original sample, P j is the prediction confidence of the classifier for the jth indicator, I f (ε) is the stability to noise within the constraint ε, N is the number of pure samples, M is the number of adversarial samples, and x i is a pure sample, μ ij is an adversarial sample, y i is the corresponding label, l f is the loss function of the model, ALDp is the average L-norm distortion, k is the number of all successful adversarial samples, || || ∞ is the infinite norm, ‖·|| p For L p norm, is the i-th adversarial sample, X i is the i-th original sample, EBD is the empirical boundary distance, d i is the RMS distance from each direction to the decision boundary, n is the number of instances used, φ i (V) is the root mean square distance from each direction in the set V of random orthogonal directions to the model decision boundary, r new is the accuracy retention rate after attack, r ACCis the normalized value of accuracy after adversarial attack, r CA is the normalized value of the pure sample accuracy.

[0031] Furthermore, in step S6, before calculating the weights of different evaluation indicators by the entropy weight method, the different evaluation indicators are also standardized; wherein the evaluation indicators include positive indicators and negative indicators, and the calculation formula is:

[0032] Positive indicators:

[0033]

[0034] Reverse indicators:

[0035]

[0036] In the formula, r ij is the standardized value, x ij is the original value of the i-th evaluation object at the j-th indicator, max(x j ) is the maximum value of all evaluation objects under the jth indicator, min(x j ) is the minimum value of all evaluation objects under the jth indicator.

[0037] Furthermore, the calculation process of calculating the weights of different evaluation indicators by the entropy weight method includes:

[0038] Calculate the entropy value:

[0039]

[0040]

[0041] Calculate the coefficient of variation of the indicator:

[0042] d j =1-e j

[0043] Calculate the weight of each indicator:

[0044]

[0045] In the formula, e j is the entropy value, n is the number of instances used, and p ij is the weight of the i-th evaluation object in the j-th indicator, r ij is the standardized value, d i is the root mean square distance from each direction to the decision boundary, w j is the weight of each metric and m is the number of adversarial examples for successful attacks.

[0046] Furthermore, in step S6, the calculation formula for calculating the comprehensive score includes:

[0047]

[0048] In the formula, S i is the comprehensive score of different evaluation indicators, r ij is the standardized value, w j is the weight of each metric and m is the number of adversarial examples for successful attacks.

[0049] In a second aspect, the present application provides an electronic device, including:

[0050] A memory for storing one or more programs;

[0051] processor;

[0052] When the one or more programs are executed by the processor, a robustness assessment method based on a power equipment defect detection model as described in any one of the first aspects is implemented.

[0053] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a robustness assessment method based on a power equipment defect detection model as described in any one of the first aspects above.

[0054] Compared with the prior art, the present invention has at least the following advantages or beneficial effects:

[0055] (1) The present invention provides a robustness evaluation method based on a power equipment defect detection model. Based on the power equipment defect detection model, a robustness evaluation framework is designed. The robustness evaluation index of the model to be tested is calculated by obtaining the classification results of the original samples and the adversarial samples. This significantly improves the accuracy and anti-attack capability of power equipment defect detection, and fills the gap in model robustness evaluation under power equipment defect detection data sets.

[0056] (2) The present invention calculates the weights of different evaluation indicators through the entropy weight method, and then calculates the comprehensive score according to the weights to obtain the robustness evaluation result of the power equipment defect detection model. It deeply analyzes the robustness differences of different model structures and provides quantitative and intuitive evaluation results. It can significantly improve the accuracy and reliability of power equipment defect detection, and enhance the performance and practicality of deep learning models in power defect detection scenarios. At the same time, it is suitable for the robustness evaluation of models in other fields, showing good versatility and extensibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0058] Figure 1 A step diagram of a robustness evaluation method based on a power equipment defect detection model according to the present invention;

[0059] Figure 2 This is a schematic diagram of the robustness evaluation index system for power equipment defect detection models;

[0060] Figure 3 This is a sample diagram of the data set;

[0061] Figure 4 The figure is a schematic structural block diagram of an electronic device.

[0062] Icon: 101, memory; 102, processor; 103, communication interface. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0064] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0065] It should be noted that, in this article, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprises..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0066] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0067] Example 1

[0068] See also Figure 1 , Figure 1 Shown is a step diagram of a robustness evaluation method based on a power equipment defect detection model provided in an embodiment of the present application.

[0069] The present application provides a robustness evaluation method based on a power equipment defect detection model, which comprises the following steps:

[0070] S1, obtaining original samples of power defect detection images to establish training sets and test sets;

[0071] S2, apply the adversarial attack algorithm to the test set to generate adversarial samples;

[0072] S3, input the training set into the power equipment defect detection model to be tested, and obtain the classification result of the original sample through forward propagation;

[0073] S4. Input the adversarial sample into the model to be tested, and obtain the classification result of the adversarial sample through forward propagation;

[0074] S5. Calculate the robustness evaluation index of the model to be tested based on the classification results of the original samples and the adversarial samples;

[0075] S6. The weights of different evaluation indicators are calculated by the entropy weight method, and the comprehensive scores are calculated according to the weights to obtain the robustness evaluation results of the power equipment defect detection model.

[0076] As a preferred implementation, in step S2, the anti-attack algorithm includes an FGSM algorithm, an RFGSM algorithm and a BIM algorithm;

[0077] Among them, the expression of FGSM algorithm is:

[0078]

[0079] The expression of RFGSM algorithm is:

[0080]

[0081] The expression of BIM algorithm is:

[0082]

[0083] Where θ is the parameter of the model, x is the input of the model, y is the label corresponding to the input, J(θ,x,y) is the corresponding loss calculated using the loss function, ∈ is the amplitude parameter of the disturbance, and η is the disturbance finally calculated by FGSM. is the gradient of x, x is the original sample, x′ is the sample after random perturbation, x adν is the final generated adversarial sample, α is the perturbation coefficient, represents Gaussian noise with zero mean and identity covariance, represents the gradient of the loss function with respect to the perturbation sample, is the initial sample, is the adversarial sample generated after n steps of iteration, and Clip(·) is the clipping function.

[0084] It should be noted that there may be multiple attack algorithms, and this embodiment adopts three of them.

[0085] As a preferred implementation, in step S5, the robustness evaluation index of the model to be tested includes the average confidence of the error category, the average confidence of the correct category, the maximum noise tolerance, the stability of the noise, the average L-norm distortion, the empirical boundary distance, the accuracy after the adversarial attack and the accuracy of the pure sample, and the calculation process includes:

[0086] (1) Calculate ACTC, ACAC and NTE using the saved confidence indicators:

[0087]

[0088]

[0089]

[0090] (2) Through back propagation, the difference between the loss function of the pure sample and the adversarial sample is calculated:

[0091]

[0092] st‖x i -μ ij ‖ ∞ ≤ε

[0093] (3) Compare the original sample and the adversarial sample and calculate ALDp:

[0094]

[0095] (4) Calculate the minimum distance EBD to the model boundary in a heuristic way:

[0096]

[0097] (5) Calculate the accuracy retention rate after attack through the original accuracy CA and classification accuracy ACC:

[0098]

[0099] Where ACAC is the average confidence of the wrong category, ACTC is the average confidence of the correct category, p is the adversarial attack parameter, f is the classifier, ∈ is the amplitude parameter of the perturbation, m is the number of adversarial examples of successful attack, To counter the attack function, is the data set of the original sample, i represents the current evaluation object, j represents the indicator, X i is the i-th original sample, P is the prediction confidence of the classifier for the wrong category, is the classifier’s prediction confidence for the correct result, y i For the correct result, NTE is the maximum noise tolerance, is the prediction confidence of classifier f for the i-th original sample, P j is the prediction confidence of the classifier for the jth indicator, I f (ε) is the stability to noise within the constraint ε, N is the number of pure samples, M is the number of adversarial samples, and x i is a pure sample, μ ij is an adversarial sample, y i is the corresponding label, l f is the loss function of the model, ALDp is the average L-norm distortion, k is the number of all successful adversarial samples, |||| ∝ is the infinite norm, ||·|| p For L p norm, is the i-th adversarial sample, X i is the i-th original sample, EBD is the empirical boundary distance, d i is the RMS distance from each direction to the decision boundary, n is the number of instances used, φ i (V) is the root mean square distance from each direction in the set V of random orthogonal directions to the model decision boundary, r new is the accuracy retention rate after attack, r ACC is the normalized value of accuracy after adversarial attack, r CA is the normalized value of the pure sample accuracy.

[0100] It should be noted that in addition to the above evaluation indicators, Figure 2 As shown in FIG. 1 , the evaluation index system of the robustness of the power equipment defect detection model also includes other indicators.

[0101] As a preferred implementation, in step S6, before calculating the weights of different evaluation indicators by the entropy weight method, the different evaluation indicators are also standardized; wherein the evaluation indicators include positive indicators and negative indicators, and the calculation formula is:

[0102] Positive indicators:

[0103]

[0104] Reverse indicators:

[0105]

[0106] In the formula, r ij is the standardized value, x ij is the original value of the i-th evaluation object at the j-th indicator, max(x j ) is the maximum value of all evaluation objects under the jth indicator, min(x j ) is the minimum value of all evaluation objects under the jth indicator.

[0107] As a preferred implementation, the process of calculating the weights of different evaluation indicators by the entropy weight method includes:

[0108] Calculate the entropy value:

[0109]

[0110]

[0111] Calculate the coefficient of variation of the indicator:

[0112] d j =1-e j

[0113] Calculate the weight of each indicator:

[0114]

[0115] In the formula, e j is the entropy value, n is the number of instances used, and p ij is the weight of the i-th evaluation object in the j-th indicator, r ij is the standardized value, d i is the root mean square distance from each direction to the decision boundary, w j is the weight of each metric and m is the number of adversarial examples for successful attacks.

[0116] As a preferred implementation, in step S6, the calculation formula for calculating the comprehensive score includes:

[0117]

[0118] In the formula, S i is the comprehensive score of different evaluation indicators, r ij is the standardized value, w j is the weight of each metric and m is the number of adversarial examples for successful attacks.

[0119] Example 2

[0120] In Example 2 of the present invention, a sample of a power defect detection image dataset is selected as an experimental basis, such as Figure 3 shown.

[0121] In terms of the selection of experimental models, five models, AlexNet, ResNet18, ViT, Swin-Transformer, and RepViT, were selected for training on the power equipment dataset and experiments were conducted on the adversarial robustness evaluation framework. These models were selected to cover everything from traditional convolutional neural networks to the latest visual Transformer architecture, as well as lightweight networks. During model training, the epoch was uniformly set to 50, the batch size was 32, and the learning rate was 1×10 -3 .

[0122] The experimental results are shown in Table 1-3:

[0123] Table 1. Evaluation of adversarial robustness of AlexNet

[0124]

[0125]

[0126] Table 2. Evaluation of ViT’s adversarial robustness

[0127]

[0128]

[0129] Table 3 Robustness evaluation results

[0130]

[0131]

[0132] Tables 1 and 2 are the robustness evaluation results of the AlexNet and ViT models. Each row corresponds to an adversarial attack algorithm, and each column corresponds to a robustness evaluation indicator. Table 3 is the final evaluation result obtained after weighted fusion, and the bold result is the optimal model for this indicator. From the various evaluations, it can be seen that the method of this application can evaluate the robustness of different models in many aspects, and the final score is consistent with the actual comprehensive robustness performance.

[0133] Example 3

[0134] See also Figure 4 , Figure 4 A schematic structural block diagram of an electronic device provided in an embodiment of the present application.

[0135] An electronic device includes a memory 101, a processor 102 and a communication interface 103, wherein the memory 101, the processor 102 and the communication interface 103 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used to communicate signaling or data with other node devices.

[0136] Among them, the memory 101 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.

[0137] The processor 102 may be an integrated circuit chip with signal processing capability. The processor 102 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0138] It is understood that the structure shown in the figure is only for illustration, and a robustness evaluation method based on a power equipment defect detection model may also include more or fewer components than those shown in the figure, or have a different configuration than that shown in the figure. Each component shown in the figure may be implemented by hardware, software, or a combination thereof.

[0139] In the embodiments provided in the present application, it should be understood that the disclosed method can also be implemented in other ways. The embodiments described above are merely schematic, for example, the flowchart or block diagram in the accompanying drawings shows the possible implementation architecture, functions and operations of the method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0140] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0141] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0142] To sum up, the robustness evaluation method based on the power equipment defect detection model provided in this application can comprehensively evaluate the robustness of different models in the power equipment defect detection task, provide a scientific basis for model selection and optimization, and effectively improve the accuracy and reliability of power equipment defect detection.

[0143] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0144] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A robustness evaluation method based on a power equipment defect detection model, characterized in that: The following steps are involved: S1, obtaining original samples of power defect detection images to establish training sets and test sets; S2, apply the adversarial attack algorithm to the test set to generate adversarial samples; S3, input the training set into the power equipment defect detection model to be tested, and obtain the classification result of the original sample through forward propagation; S4. Input the adversarial sample into the model to be tested, and obtain the classification result of the adversarial sample through forward propagation; S5. Calculate the robustness evaluation index of the model to be tested based on the classification results of the original samples and the adversarial samples; S6. The weights of different evaluation indicators are calculated by the entropy weight method, and the comprehensive scores are calculated according to the weights to obtain the robustness evaluation results of the power equipment defect detection model.

2. A robustness evaluation method based on a power equipment defect detection model as claimed in claim 1, characterized in that: In step S2, the anti-attack algorithm includes FGSM algorithm, RFGSM algorithm and BIM algorithm; Among them, the expression of FGSM algorithm is: The expression of RFGSM algorithm is: The expression of BIM algorithm is: Where θ is the parameter of the model, x is the input of the model, y is the label corresponding to the input, J(θ,x,y) is the corresponding loss calculated using the loss function, ∈ is the amplitude parameter of the disturbance, and η is the disturbance finally calculated by FGSM. is the gradient of x, x is the original sample, x′ is the sample after random perturbation, x adν is the final generated adversarial sample, α is the perturbation coefficient, represents Gaussian noise with zero mean and identity covariance, represents the gradient of the loss function with respect to the perturbation sample, is the initial sample, is the adversarial sample generated after n steps of iteration, and Clip(·) is the clipping function.

3. The robustness evaluation method based on the power equipment defect detection model according to claim 1, characterized in that: In step S5, the robustness evaluation indicators of the model to be tested include the average confidence of the error category, the average confidence of the correct category, the maximum noise tolerance, the stability of the noise, the average L-norm distortion, the empirical boundary distance, the accuracy after the adversarial attack and the accuracy of the pure sample, and the calculation formulas thereof include: s.t.‖x i -μ ij ‖ ∞ ≤ε Where ACAC is the average confidence of the wrong category, ACTC is the average confidence of the correct category, p is the adversarial attack parameter, f is the classifier, ∈ is the amplitude parameter of the perturbation, m is the number of adversarial examples of successful attack, To counter the attack function, is the data set of the original sample, i represents the current evaluation object, j represents the indicator, and x i is the i-th original sample, P is the prediction confidence of the classifier for the wrong category, is the classifier’s prediction confidence for the correct result, y i For the correct result, NTE is the maximum noise tolerance, is the prediction confidence of classifier f for the i-th original sample, P j is the prediction confidence of the classifier for the jth indicator, I f (ε) is the stability to noise within the constraint ε, N is the number of pure samples, M is the number of adversarial samples, and x i is a pure sample, μ ij is an adversarial sample, y i is the corresponding label, l f is the loss function of the model, ALDp is the average L-norm distortion, k is the number of all successful adversarial samples, || || ∞ is the infinite norm, ||·|| p For L p norm, is the i-th adversarial sample, X i is the i-th original sample, EBD is the empirical boundary distance, d i is the RMS distance from each direction to the decision boundary, n is the number of instances used, φ i (V) is the root mean square distance from each direction in the set V of random orthogonal directions to the model decision boundary, r new is the accuracy retention rate after attack, r ACC is the normalized value of accuracy after adversarial attack, r CA is the normalized value of the pure sample accuracy.

4. The robustness evaluation method based on the power equipment defect detection model according to claim 1, characterized in that: In step S6, before calculating the weights of different evaluation indicators by the entropy weight method, the different evaluation indicators are also standardized; wherein the evaluation indicators include positive indicators and negative indicators, and the calculation formula is: Positive indicators: Reverse indicators: In the formula, r ij is the standardized value, x ij is the original value of the i-th evaluation object at the j-th indicator, max(x j ) is the maximum value of all evaluation objects under the jth indicator, min(x j ) is the minimum value of all evaluation objects under the jth indicator.

5. A robustness evaluation method based on a power equipment defect detection model as claimed in claim 4, characterized in that: The calculation process of calculating the weights of different evaluation indicators by the entropy weight method includes: Calculate the entropy value: Calculate the coefficient of variation of the indicator: d j =1-e j Calculate the weight of each indicator: In the formula, e j is the entropy value, n is the number of instances used, and p ij is the weight of the i-th evaluation object in the j-th indicator, r ij is the standardized value, d i is the root mean square distance from each direction to the decision boundary, w j is the weight of each metric and m is the number of adversarial examples for successful attacks.

6. The robustness evaluation method based on the power equipment defect detection model according to claim 1, characterized in that: In step S6, the calculation formula for calculating the comprehensive score includes: In the formula, S i is the comprehensive score of different evaluation indicators, r ij is the standardized value, w j is the weight of each metric and m is the number of adversarial examples for successful attacks.

7. An electronic device, characterized in that: include: A memory for storing one or more programs; processor; When the one or more programs are executed by the processor, a robustness assessment method based on a power equipment defect detection model as described in any one of claims 1 to 6 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a robustness assessment method based on a power equipment defect detection model as described in any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Cable insulation damage adaptive detection method based on adversarial disturbance learning

    CN120611247A

  • A cable insulation damage self-adaptive detection method based on adversarial perturbation learning

    CN120611247B

  • Multi-dimensional evaluation method and device for insulator shackle corrosion detection model

    CN121682158A