Deep learning interpretable method and device, storage medium and program product

The importance of each pixel in the image is obtained through the deep learning method, which solves the problem of the LIME method ignoring associated features and complex preprocessing, and improves the accuracy and efficiency of image interpretation.

CN114170485BActive Publication Date: 2024-09-10BEIHANG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111395480.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-23
Publication Date
2024-09-10
Estimated Expiration
2041-11-23

AI Technical Summary

Technical Problem

The existing LIME method ignores the correlation features between superpixel blocks in image interpretation, and the preprocessing algorithm of the superpixel block segmentation method is complex, resulting in low interpretation accuracy and serious time consumption.

Method used

By developing a deep learning interpretable method, we obtain the average gain after adding noise to each pixel in the image to be explained, determine the target pixel, and determine the interpretation result based on the degree of deep learning. We use multiple rounds of noise addition and deep learning models to improve Explain precision and efficiency.

Benefits of technology

It realizes the exploration and determination of the importance of each pixel in the image, improves the precision and accuracy of image category interpretation, and reduces the time cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114170485B
    Figure CN114170485B
Patent Text Reader

Abstract

The present invention provides a deep learning interpretable method and device, a storage medium and a program product, wherein the deep learning interpretable method first determines the category to be interpreted in the image to be interpreted for the acquired image to be interpreted, and then determines the interpretation result of the category to be interpreted based on a preset deep learning interpretable model. Since the preset deep learning interpretable model includes first obtaining the average gain of each pixel point in the image to be interpreted after adding noise, then determining the target pixel point for the category to be interpreted based on the average gain, and then determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel point, the purpose of determining the target pixel point for interpreting the category in the image is achieved by developing and exploring the importance of each pixel point, which not only has low time cost, but also improves the interpretation precision and accuracy of the category in the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a deep learning explainable method and device, a storage medium and a program product. Background Art

[0002] At present, the interpretation methods for images, natural languages ​​and structured data usually include model-related model interpretation methods and model-independent local interpretability (Local Interpretable ModelagnosticExplanations, LIME) methods. In addition, the LIME method has the characteristics of simple and intuitive sampling method because it adopts feature random sampling method in the local sampling process and randomly extracts features during sampling.

[0003] In the related art, when the LIME method is used to interpret an image, the image is first divided into multiple super-pixel blocks, and then each super-pixel block is masked separately, and then the masked output result is further used to interpret the features in the image.

[0004] However, the LIME method in related technologies only focuses on pixels with high-level semantic information within superpixel blocks and ignores pixels with associated features between superpixel blocks. In addition, the preprocessing algorithm used in the superpixel block segmentation method is relatively complex, which results in low accuracy in interpreting images using the LIME method and serious time consumption. Summary of the invention

[0005] The present invention provides a deep learning interpretable method and device, a storage medium and a program product, which are used to solve the defects in the prior art that the LIME method only focuses on the pixels with high-level semantic information in the superpixel block, ignores the pixels with associated features between the superpixel blocks, and the preprocessing algorithm used in the superpixel block segmentation method is relatively complex, resulting in the low accuracy of the LIME method in interpreting the image and serious time consumption, and achieves the purpose of determining the target pixel points for interpreting the image with low time cost by developing and exploring the importance of each pixel point.

[0006] The present invention provides a deep learning interpretable method, comprising:

[0007] Acquire an image to be interpreted, and determine a category to be interpreted in the image to be interpreted;

[0008] Based on a preset deep learning interpretable model, the interpretation result of the category to be interpreted is determined; wherein the preset deep learning interpretable model includes first obtaining the average gain of each pixel point in the image to be interpreted after adding noise, then determining the target pixel point for the category to be interpreted based on the average gain, and finally determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel point.

[0009] According to a deep learning interpretable method provided by the present invention, when the preset deep learning interpretable model includes a first preset learning model and a second preset learning model, determining the interpretation result of the to-be-explained category based on the preset deep learning interpretable model includes:

[0010] Inputting the image to be interpreted into the first preset learning model to obtain an average gain after adding noise to each pixel in the image to be interpreted;

[0011] The first preset learning model is used to first add a first noise to each pixel in the image to be interpreted, and then determine the average benefit according to the image to be interpreted after adding the first noise;

[0012] Inputting the average gain and the image to be interpreted after adding the first noise into the second preset learning model to obtain an interpretation result of the category to be interpreted;

[0013] Among them, the second preset learning model includes first determining the initial important pixels obtained by adding the first noise and the second noise to each pixel in the image to be interpreted according to the average benefit, then updating the initial important pixels according to the benefits after adding the first noise and the second noise to each pixel to obtain the target pixels used to explain the category to be interpreted, and then determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixels.

[0014] According to a deep learning interpretable method provided by the present invention, the step of inputting the image to be interpreted into the first preset learning model to obtain an average gain after adding noise to each pixel in the image to be interpreted includes:

[0015] After the image to be interpreted is input into the first preset learning model for N1 rounds of adding the first noise operation and deep learning, the average gain of each pixel in the image to be interpreted after adding noise is obtained; wherein N1 is an integer greater than 0.

[0016] According to a deep learning interpretable method provided by the present invention, the average gain and the image to be interpreted after adding the first noise are input into the second preset learning model to obtain the interpretation result of the category to be interpreted, including:

[0017] After inputting the average gain and the image to be interpreted after adding the first noise into the second preset learning model for N-N1 rounds of deep learning, an interpretation result of the category to be interpreted is obtained;

[0018] Wherein, N is an integer greater than 0 and N>N1; the average benefit is used to perform the N1+1th round of adding the second noise operation and deep learning on the image to be interpreted after adding the first noise.

[0019] According to a deep learning interpretable method provided by the present invention, the image to be interpreted is input into the first preset learning model for N1 rounds of adding a first noise operation and deep learning, and then an average gain of each pixel in the image to be interpreted after adding noise is obtained, including:

[0020] The image to be interpreted is input into the first preset learning model to perform the first to N1th rounds of first noise adding operations and deep learning for each pixel in the image to be interpreted, and the average gain after noise addition for each pixel in the image to be interpreted is determined based on the gain of each pixel after the first N1 rounds of first noise adding operations and deep learning.

[0021] According to a deep learning interpretable method provided by the present invention, the average return and the image to be interpreted after adding the first noise are input into the second preset learning model for N-N1 rounds of deep learning to obtain the interpretation result of the category to be interpreted, including:

[0022] Determine K initial important pixel points of the N1th round based on the w*h noisy images obtained after adding the first noise in the N1th round and the average return;

[0023] Add the second noise to the K initial important pixels selected in the m-1th round respectively, and obtain the w*h second noisy images of the mth round; wherein m=N1+1, N1+2, ..., N;

[0024] Based on the w*h noisy images of the m-th round, determining w*h confidence upper bounds of the m-th round;

[0025] Determine the K initial important pixel points selected in the mth round according to the w*h confidence upper bounds of the mth round;

[0026] Let the value of m be increased by 1, and repeat the step of adding the second noise to the K initial important pixels selected in the m-1th round respectively to obtain the w*h second noisy images of the mth round;

[0027] The deep learning is stopped until K initial important pixel points selected in the Nth round are obtained, and the K initial important pixel points selected in the Nth round are determined as target pixel points for explaining the category to be explained, and then the explanation result of the category to be explained is determined based on the deep learning degree of the target pixel points.

[0028] According to a deep learning interpretable method provided by the present invention, after the step of determining the interpretation result of the category to be interpreted based on a preset deep learning interpretable model, the method further includes:

[0029] According to the number of times each pixel in the image to be interpreted is selected to add noise in a preset deep learning interpretable model, a visualization operation is performed on the image to be interpreted to obtain a visualized saliency image.

[0030] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described deep learning interpretable methods are implemented.

[0031] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the deep learning interpretable methods described above.

[0032] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the above-described deep learning interpretable methods.

[0033] The deep learning interpretable method and device, storage medium and program product provided by the present invention, wherein the deep learning interpretable method first determines the category to be interpreted in the image to be interpreted for the acquired image to be interpreted, and then determines the interpretation result of the category to be interpreted based on the preset deep learning interpretable model. Since the preset deep learning interpretable model includes first obtaining the average gain of each pixel point in the image to be interpreted after adding noise, then determining the target pixel point for the category to be interpreted based on the average gain, and then determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel point, the purpose of determining the target pixel point for interpreting the category in the image is achieved by developing and exploring the importance of each pixel point, which not only has low time cost, but also improves the interpretation precision and accuracy of the category in the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the present invention or 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 It is one of the flowcharts of the deep learning interpretable method provided by the present invention;

[0036] Figure 2 This is the second flowchart of the deep learning interpretable method provided by the present invention;

[0037] Figure 3 This is the third flowchart of the deep learning interpretable method provided by the present invention;

[0038] Figure 4 It is a structural schematic diagram of the deep learning interpretable device provided by the present invention;

[0039] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.

[0041] For complex deep neural network models, many scholars have proposed three model-specific explanation methods. The first is the self-explanatory method, which mainly includes self-explanatory models with clear decision processes and easy to understand, such as linear regression, logistic regression, decision tree, and naive Bayes; the second is the specific model explanation method, which obtains explanations by examining the parameters or structures such as activation values ​​and gradient values ​​inside a neural network with a specific structure, including CAM, GradCAM and other methods; the third is the model-agnostic explanation method, which regards the model to be explained as a black box and obtains explanations by analyzing the input and output of the model to be explained, including other methods such as LIME. The LIME method obtains the output result by dividing the image into superpixel blocks and occluding the superpixel blocks, and examines the output result.

[0042] However, the LIME method has the following limitations using superpixel blocks: 1) The superpixel block preprocessing algorithm will consume a lot of time as the number of images increases; 2) Directly occluding superpixel blocks causes the model to only focus on features with high-level semantic information inside the superpixel blocks, such as dog's eyes, cat's tail, etc., while the associations between superpixel blocks may be ignored by the model; and, since the model does not know whether the area under investigation has high-level semantic information during the prediction process and only makes predictions based on the RGB pixel values ​​of the image, the use of superpixel blocks introduces prior information, making the superpixel segmentation method redundant in many cases; 3) The LIME method itself samples and fits a linear model within the local range of the image sample. The boundary obtained by linear fitting cannot accurately approximate the nonlinear boundary of the deep neural network, resulting in inaccurate interpretation results; 4) The LIME method is only suitable for classification task interpretation, not for detection tasks.

[0043] Based on the above problems, the present invention provides a deep learning interpretable method, the executor of which can be a deep learning interpretable device, which can be implemented as part or all of a terminal device through software, hardware, or a combination of software and hardware. Optionally, the terminal device can be a personal computer (PC), a portable device, a laptop, a smart phone, a tablet computer, a portable wearable device, or other electronic devices, such as a tablet computer, a mobile phone, etc. The present invention does not limit the specific form of the terminal device.

[0044] It should be noted that the execution subject of the following method embodiment may be part or all of the above terminal device. The following method embodiment is described by taking the execution subject as the terminal device as an example.

[0045] Figure 1 One of the flowcharts of the deep learning interpretable method provided by the present invention is as follows: Figure 1 As shown, the deep learning interpretable method includes the following steps:

[0046] Step 110: Acquire an image to be interpreted, and determine a category to be interpreted in the image to be interpreted.

[0047] Specifically, the terminal device can receive an image interpretation request instruction, and based on the image interpretation requirements carried in the image interpretation request instruction, it can select an image to be interpreted that matches the image interpretation requirements from the image data set stored in its own storage, or it can obtain an image to be interpreted that matches the image interpretation requirements from big data based on the image interpretation requirements; and, when the image interpretation instruction carries an image, the image can be directly determined as the image to be interpreted.

[0048] Then, the terminal device determines the category to be interpreted in the image to be interpreted based on the image interpretation requirement. For example, when the image interpretation request carried in the image interpretation request instruction received by the terminal device is "explain magpie", the image to be interpreted containing magpie can be obtained first, and then the magpie in the image to be interpreted can be further classified as the category to be interpreted.

[0049] Step 120: Determine the interpretation result of the category to be interpreted based on a preset deep learning interpretable model.

[0050] Among them, the preset deep learning interpretable model includes first obtaining the average gain of each pixel point in the image to be interpreted after adding noise, then determining the target pixel point for the category to be interpreted based on the average gain, and finally determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel point.

[0051] Specifically, in order to achieve the accuracy and precision of the interpretation of the category to be interpreted, the terminal device inputs the image to be interpreted into a preset deep learning interpretable model. The preset deep learning interpretable model can first obtain the average gain of each pixel after adding noise by adding noise to each pixel in the image to be interpreted, and then determine the initial important pixels for the category to be interpreted according to the average gain of each pixel after adding noise, and then update the initial important pixels by the gain of the initial important pixels obtained after adding noise to the initial important pixels and the gain of the remaining pixels, so as to obtain the target pixels for the category to be interpreted, and finally determine the interpretation result of the category to be interpreted based on the deep learning degree of the target pixels. In this way, each pixel in the image to be interpreted has the opportunity to be selected as the target pixel. Finally, the interpretation result of the category to be interpreted is determined according to the deep learning degree of the target pixel. For example, the more times the noise is added with a certain pixel as the center, the more important the pixel is for the category to be interpreted, and the more accurate it is for explaining the category to be interpreted.

[0052] The deep learning interpretable method provided by the present invention first determines the category to be interpreted in the image to be interpreted for the acquired image to be interpreted, and then determines the interpretation result of the category to be interpreted based on the preset deep learning interpretable model. Since the preset deep learning interpretable model includes first obtaining the average gain of each pixel point in the image to be interpreted after adding noise, then determining the target pixel point for the category to be interpreted based on the average gain, and then determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel point, the purpose of determining the target pixel point for interpreting the category in the image is achieved by developing and exploring the importance of each pixel point, which not only has low time cost, but also improves the interpretation precision and accuracy of the category in the image.

[0053] Optionally, when the preset deep learning interpretable model includes a first preset learning model and a second preset learning model, the process of step 120 may include:

[0054] First, the image to be interpreted is input into the first preset learning model to obtain the average gain of each pixel in the image to be interpreted after adding noise; wherein the first preset learning model is used to first add the first noise to each pixel in the image to be interpreted, and then determine the average gain according to the image to be interpreted after adding the first noise;

[0055] Then, the average gain and the image to be interpreted after adding the first noise are input into the second preset learning model to obtain the interpretation result of the category to be interpreted; wherein, the second preset learning model comprises first determining the initial important pixels obtained after adding the first noise and the second noise to each pixel in the image to be interpreted according to the average gain, then updating the initial important pixels according to the gain after adding the first noise and the second noise to each pixel to obtain the target pixels used to explain the category to be interpreted, and finally determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixels.

[0056] Specifically, the terminal device inputs the image to be interpreted into the first preset learning model, and the first preset learning model can add the first noise with each pixel in the image to be interpreted as the center, so as to obtain the image to be interpreted after adding the first noise; when the image to be interpreted includes w*h pixels, after adding the first noise, w*h images to be interpreted after adding the first noise can be obtained, and then the average benefit of each noisy pixel in each image to be interpreted after adding the first noise is calculated. When the number of images to be interpreted after adding the first noise is w*h and there are w*h noisy pixels in each image to be interpreted after adding the first noise, it can be considered that each noisy pixel has w*h average benefits; the first noise can be Gaussian noise that satisfies the two-dimensional normal distribution.

[0057] Furthermore, the average gain and the image to be interpreted after adding the first noise are input into a second preset learning model. The second preset learning model first determines the initial important pixels obtained by adding the first noise and the second noise with each pixel in the image to be interpreted as the center according to the w*h average gains of each noisy pixel, and then updates the initial important pixels according to the gains after adding the first noise and the second noise to each pixel, so as to obtain the target pixels used to explain the category to be interpreted, and then determines the interpretation result of the category to be interpreted based on the deep learning degree of the target pixels; the second noise can be Gaussian noise that satisfies the two-dimensional normal distribution.

[0058] It should be noted that the reason why Gaussian noise that satisfies the two-dimensional normal distribution is added to each pixel is that the Gaussian noise has the largest middle peak and the curve characteristics of symmetrical and uniform decline on both sides. At this time, when the initial important pixels are updated with the benefits of adding multiple Gaussian noises with each pixel as the center, each pixel will have the opportunity to be selected as an important pixel. At this time, it can be called adding soft interference to the image to be interpreted, so that the softened pixel-level disturbance does not need to introduce any prior information or have clear boundaries (unlike the superpixel blocks that must have clear boundaries). Therefore, the information interaction between the regions can be retained, thereby making the positioning of important areas in the image to be interpreted more accurate.

[0059] The deep learning interpretable method provided by the present invention inputs the image to be interpreted into a first preset learning model to obtain the average gain of each pixel in the image to be interpreted after adding noise, and further inputs the average gain and the image to be interpreted after adding the first noise into a second preset learning model to obtain the interpretation result of the category to be interpreted. In this way, the target pixel that can be used to explain the category to be interpreted is determined by obtaining the gain of each pixel in the image to be interpreted after adding the first noise and the second noise, so that each pixel has the opportunity to be analyzed as an important pixel, which greatly improves the analysis accuracy of the category to be interpreted.

[0060] Optionally, inputting the image to be interpreted into the first preset learning model to obtain an average gain after adding noise to each pixel in the image to be interpreted includes:

[0061] After the image to be interpreted is input into the first preset learning model for N1 rounds of adding the first noise operation and deep learning, the average gain of each pixel in the image to be interpreted after adding noise is obtained; wherein N1 is an integer greater than 0.

[0062] Specifically, the image to be interpreted is input into the first preset learning model, so as to perform the first noise adding operation and deep learning from the first round to the N1 round for each pixel in the image to be interpreted, and according to the gain of each pixel after the first N1 rounds of adding the first noise operation and deep learning, the average gain of each pixel in the image to be interpreted after noise addition is determined.

[0063] In the actual processing process, the terminal device inputs the image to be interpreted into the first preset learning model and can perform the following steps: Figure 2 The first preset learning process shown includes the following sub-steps:

[0064] 2.1 Initialization: Set the size of the image to be interpreted to w*h and include w*h pixels, let i represent the i-th pixel in the image to be interpreted and i=1, 2, 3, ..., w*h, let n represent the n-th round of adding the first noise and deep learning, n=1, 2, 3, ..., N1.

[0065] 2.2 Perform the first noise addition operation of the nth round on the i-th pixel in the image to be interpreted as the center, and obtain the first noise-added image of the i-th pixel in the nth round

[0066] 2.3 Determine the first noisy image of the i-th pixel in the n-th round The confidence score of the category to be explained after passing the classification model

[0067] 2.4 Calculate the revenue r of the i-th pixel in the n-th round i n ,

[0068] Specifically, the revenue r of the i-th pixel in the n-th round is i n Specifically, it is the gain in the nth round of the pixel point i corresponding to the i-th noisy image in the w*h first noisy images of the nth round.

[0069] 2.5 Calculate the average revenue of the i-th pixel in the first n rounds

[0070] 2.6 Determine whether the value of n is greater than N1. When the value of n is less than or equal to N1, add 1 to the value of n and return to 2.2. Otherwise, execute step 2.7 when the value of n is greater than N1.

[0071] 2.7 Now we get the average revenue of the i-th pixel in the first N1 rounds is the first noisy image of the i-th pixel in the N1th round The confidence score of the category to be explained after passing the classification model, is the profit of the i-th pixel in the N1th round.

[0072] 2.8 Determine whether the value of i is greater than w*h. When the value of i is less than or equal to w*h, add 1 to the value of i and return to 2.2. Otherwise, when the value of i is greater than w*h, execute 2.9.

[0073] 2.9 When the value of i is greater than w*h, the average gain of each pixel in the image to be interpreted in the first N1 rounds is obtained, thereby obtaining the average gain of each pixel in the image to be interpreted after adding noise.

[0074] It should be noted that the purpose of inputting the image to be interpreted into the first preset learning model may be to perform N1 rounds of first noise addition operations and deep learning on all pixels in the image to be interpreted. Each round in the N1 rounds adds the first noise centered on each pixel in the image to be interpreted. Therefore, when the N1 rounds of first noise addition operations and deep learning are completed, the N1th round of w*h first noisy images and the average gain of each pixel in the image to be interpreted in the previous N1 rounds can be obtained.

[0075] The deep learning interpretable method provided by the present invention achieves the purpose of determining the average benefit of each pixel point for the category to be interpreted by performing N1 rounds of adding the first noise and deep learning method on each pixel point in the image to be interpreted, thereby providing a strong basis for the subsequent determination of the initial important pixels, thereby improving the reliability and accuracy of determining the target pixels.

[0076] Optionally, inputting the average gain and the image to be interpreted after adding the first noise into the second preset learning model to obtain the interpretation result of the category to be interpreted includes:

[0077] After inputting the average benefit and the image to be interpreted after adding the first noise into the second preset learning model for N-N1 rounds of deep learning, the interpretation result of the category to be interpreted is obtained; wherein N1 and N are both integers greater than 0 and N>N1; the average benefit is used for the image to be interpreted after adding the first noise to perform the N1+1th round of adding the second noise operation and deep learning.

[0078] Specifically, the terminal device first determines K initial important pixel points in the N1th round based on the w*h noisy images obtained after adding the first noise in the N1th round and the average gain;

[0079] Then, the second noise is added to the K initial important pixels selected in the m-1th round respectively, so as to obtain the w*h second noisy images of the mth round; wherein m=N1+1, N1+2, ..., N;

[0080] Thirdly, based on the w*h noisy images of the mth round, w*h confidence upper bounds of the mth round are determined;

[0081] Further, according to the w*h confidence upper bounds of the m-th round, the K initial important pixel points selected in the m-th round are determined;

[0082] Let the value of m be increased by 1, and repeat the step of adding the second noise to the K initial important pixels selected in the m-1th round respectively to obtain the w*h second noisy images of the mth round;

[0083] The deep learning is stopped until K initial important pixel points selected in the Nth round are obtained, and the K initial important pixel points selected in the Nth round are determined as target pixel points for explaining the category to be explained, and then the explanation result of the category to be explained is determined based on the deep learning degree of the target pixel points.

[0084] In the actual processing process, the terminal device inputs the average gain and the image to be interpreted after adding the first noise into the second preset learning model to perform the following steps: Figure 3 The second preset learning process shown includes the following sub-steps:

[0085] 3.1 Initialization: Set the size of the image to be interpreted to be w*h and include w*h pixels, let m represent the mth round of adding the second noise and deep learning, m = N1+1, N1+2, N1+3, ..., N, j = 1, 2, 3, ..., w*h. Preferably, the value of N can be set to 200 and the value of N1 can be set to 50.

[0086] 3.2 Based on the w*h noisy images obtained after adding the first noise in the N1th round, determine the K initial important pixels selected in the N1th round.

[0087] Specifically, for the w*h noisy images obtained after adding the first noise in the N1th round, each noisy image is obtained by adding noise to a corresponding pixel in the image to be interpreted. Therefore, after each pixel in the image to be interpreted passes through the classification model for the first noisy image in the N1th round, the confidence score of the category to be interpreted is w*h, the profit in the N1th round is w*h, and the average profit in the previous N1 rounds is also w*h. The w*h average profits are sorted from large to small, and the K noisy noise points corresponding to the top K high average profits are selected from the sorted w*h average profits as the K initial important pixel points selected in the N1th round.

[0088] 3.3 After adding the second noise with each of the K initial important pixels selected in the m-1th round as the center, the w*h second noisy images of the mth round are obtained.

[0089] Among the w*h second noisy images in the mth round, K second noisy images are obtained by adding the second noise to the K initial important pixels selected in the m-1th round, and the remaining w*hK second noisy images use the noisy images in the m-1th round.

[0090] 3.4 Based on the w*h second noisy image of the mth round, determine the gain of pixel j in the mth round

[0091] in, is the confidence score of the category to be explained obtained by the j-th pixel in the second noisy image of the m-th round after passing through the classification model; and the gain of pixel j in the m-th round Specifically, it is the gain in the mth round of the pixel point j corresponding to the jth second noisy image in the w*h second noisy images of the mth round.

[0092] Specifically, when m=N1+1, the image to be interpreted after the second noise is added in the N1th round is subjected to the N1+1th round of the second noise addition operation, which can be performed with each pixel in the image to be interpreted as the center, and then the first round of the second noise addition operation is performed, so as to obtain the w*h second noise-added images of the N1+1th round, and then the confidence scores of the categories to be interpreted are obtained after the w*h second noise-added images of the N1+1th round are respectively passed through the classification model, so as to calculate the benefit of the pixel point j in the N1+1th round. When m=N1+x, only the selected K initial important pixels are subjected to the second noise addition, and the remaining w*hK pixels do not need to be added with the second noise, 1<x<N-N1.

[0093] 3.5 Based on the income of pixel j in the mth round Calculate the average revenue of the jth pixel in the first m rounds Then calculate the length of the confidence interval of the jth pixel in the first m rounds l mj is the cumulative number of times the j-th pixel point is selected for noise addition in the first m rounds (that is, the cumulative number of times the first noise and the second noise are selected for addition).

[0094] 3.6 Calculate the upper bound of the confidence of the j-th pixel in the m-th round

[0095] It should be noted that the present invention adopts the idea of ​​ensuring the utilization of the potential power of each slot machine by detecting historical information. Each pixel point in the image to be interpreted can be regarded as a slot machine, so l mj It can represent the number of times the jth slot machine is selected in the mth round, according to the formula It can be seen that the more times a slot machine is selected, the narrower its confidence intervals are, and the upper limit is more likely to be exceeded by other levers that are not fully developed, realizing the on-demand allocation of exploration resources and ultimately falling on the optimal choice (each lever becomes narrower and narrower, and the final upper limit only reflects the average return.

[0096] 3.7 Determine whether the value of j is greater than w*h. When the value of j is less than or equal to w*h, add 1 to the value of j and return to step 3.4. Otherwise, execute 3.8 when the value of j is greater than w*h.

[0097] 3.8 When the value of j is greater than w*h, the confidence upper bound of each pixel point in the mth round is obtained, and the confidence upper bound of each pixel point in the mth round is determined to be the w*h confidence upper bounds of the mth round.

[0098] 3.9 Determine the K initial important pixels selected in the mth round from the w*h confidence upper bounds of the mth round.

[0099] In the actual processing process, the process of determining the K initial important pixels of the image to be interpreted in the mth round is as follows: for the w*h second noisy images in the mth round, each second noisy image corresponds to a noisy pixel in the image to be interpreted. Therefore, the confidence scores of the categories to be interpreted obtained after the w*h second noisy images in the mth round are respectively passed through the classification model are w*h. The benefits of the w*h noisy pixels in the image to be interpreted in the mth round are w*h, the average benefits in the previous m rounds are w*h, the confidence intervals in the previous m rounds are w*h, and the confidence upper bounds in the mth round are w*h. Therefore, the w*h confidence upper bounds are sorted from large to small, and the K noise points corresponding to the first K high confidence upper bounds are selected from the sorted w*h confidence upper bounds as the K initial important pixels selected in the mth round of the image to be interpreted. This can not only avoid the influence of the randomness of the interference variance on the mean benefit, but also save overhead and improve algorithm efficiency.

[0100] It should be noted that according to the formula It can be seen that when the number of times a pixel in the image to be interpreted is selected for noise addition in the first m rounds increases, the length of the confidence interval corresponding to the pixel becomes longer. It will also become smaller, so that other pixels in the image to be interpreted that have been selected for noise addition a small number of times in the first m rounds will also have the opportunity to have noise added in the (m+1)th round, so that each pixel in the image to be interpreted has the opportunity to be selected as the initial important pixel.

[0101] 3.10 determines whether the value of m is greater than N. When the value of m is less than or equal to N, add 1 to the value of m and initialize the value of j to 1, and return to 3.3; otherwise, when the value of m is greater than N, execute 3.11.

[0102] 3.11 When it is determined that the K initial important pixel points selected in the Nth round are obtained, the deep learning is stopped, and the K initial important pixel points selected in the Nth round are determined as the target pixel points for explaining the category to be explained, and then the explanation result of the category to be explained is determined based on the deep learning degree of the target pixel points.

[0103] It should be noted that even if noise is added with a certain pixel as the center, other pixels can also be covered by the noise to a greater or lesser extent, so that after each round of noise addition, the upper bound of the confidence of each pixel can be analyzed and the currently selected K initial pixels are all the top K pixels with the largest confidence. Moreover, the analysis of any pixel in the image to be interpreted will not be ignored during each round of noise addition and learning. That is, the most important pixels for the category to be interpreted are continuously developed and explored, so that at the end of the second preset learning, the K target pixels that can best explain the category to be interpreted are obtained, which not only has high interpretation accuracy but also saves time cost.

[0104] The deep learning interpretable method provided by the present invention achieves the purpose of continuously developing and exploring target pixels that can be used to explain the category to be interpreted for each pixel in the image to be interpreted, by performing N-N1 rounds of second noise adding operations and deep learning on each pixel in the image to be interpreted after adding the first noise. It not only effectively retains the linear features and nonlinear features in the image to be interpreted, but can also be applied to models of any depth without accessing any other internal structures of the model. It effectively reflects the model's attention and information distribution to the category to be interpreted, thereby improving the interpretation precision and accuracy for the category to be interpreted, and also greatly reducing time consumption.

[0105] Optionally, after step 120, the method may further include:

[0106] According to the number of times each pixel in the image to be interpreted is selected to add noise in a preset deep learning interpretable model, a visualization operation is performed on the image to be interpreted to obtain a visualized saliency image.

[0107] Specifically, the terminal device can add the first noise and the second noise to each pixel in the image to be interpreted in N rounds of deep learning, and color each pixel in the image to be interpreted with different colors, such as red for important pixels, yellow for less important pixels, and blue for unimportant pixels. The redder a pixel is, the more times the pixel has been selected for noise addition, which means that the pixel is more important to the category to be interpreted. Conversely, the bluer the pixel is, the weaker its importance to the category to be interpreted. For example, when the category to be identified is a ship, the color of the pixel where the hull is located is redder; when the category to be identified is an egg, the color of the pixel where the yolk is located is also redder; when the category to be identified is a monkey, the color of the pixel where the monkey's mouth, nose, etc. are located is also redder.

[0108] The deep learning interpretable method provided by the present invention determines a visualized saliency image for interpreting the category to be interpreted according to the number of times each pixel in the image to be interpreted is selected to add noise in a preset deep learning interpretable model, thereby achieving the purpose of more accurately reflecting the various identifiable features of the category to be identified through the visualized saliency image, thereby achieving an accurate and visual interpretation of the category to be interpreted.

[0109] Optionally, the deep learning interpretable method provided by the present invention is called a deep model interpretable (BICS) method based on an upper confidence bound (UCB) selection. The BICS method first obtains the average gain of each pixel in the image to be interpreted after adding noise through steps 2.1 to 2.9, and then obtains the interpretation result of the category to be interpreted through steps 3.1 to 3.11. Finally, according to the number of times each pixel in the image to be interpreted is selected to add noise in a preset deep learning interpretable model, the image to be interpreted is visualized, so as to estimate the importance of each pixel through continuous development and exploration. Finally, according to the cumulative number of times the pixel is selected to add noise, a saliency map or super pixel block mask for visualization is generated. This method not only effectively retains the nonlinear characteristics of the model, but can also be inserted in any deep model architecture without accessing any internal structure, thereby effectively reflecting the model's attention to the target and information distribution advantages.

[0110] It should be noted that, in the BICS method provided by the present invention, a pixel-level softening perturbation is introduced based on statistics to replace the direct superpixel occlusion of the Lime method. Specifically, the height and width of the image to be interpreted are set to w and h, and each pixel axis is regarded as an arm. In each round of experiments, a pixel point is randomly selected to add noise, so that interference may appear anywhere in the image to be interpreted. Due to the large number of pixels in the image to be interpreted, in order to improve the efficiency of the algorithm, the pixels can be sampled using a grid distribution in w×h pixels. This does not affect the pixel-level properties of the BICS method. The finer the division, the more important features can be selected. The position of each arm is given by (i x ,i y ) is given. According to the principle of the multi-armed bandit problem, in the game with a set total number of rounds, each slot machine has the opportunity to be selected multiple times to add Gaussian noise with a two-dimensional normal distribution that conforms to the following formula. The first noise and the second noise mentioned in the present invention are also Gaussian noise with a two-dimensional normal distribution that conforms to the following formula, and the formula is as follows:

[0111]

[0112] In the above formula, σ i1represents the variance value of the Gaussian distribution along the corresponding noise image in the horizontal direction, σ i2 represents the variance value of the Gaussian distribution along the vertical direction of the corresponding noise image, (i x ,i y ) represents the position of the i-th pixel in the corresponding noise image; σ i1 =σ i2 , but with each pixel selection, the variance value will continue to change to ensure that the noise distribution is different each time and the degree of impact on the image is different. It can also be called soft interference. By adding Gaussian noise, the randomness of the experiment is increased, making the positioning of important areas more accurate. In addition, the softened pixel-level perturbation does not introduce any prior information to the model or have clear boundaries (unlike the clear boundaries between superpixels), so the information interaction between regions can be preserved.

[0113] The deep learning interpretable device provided by the present invention is described below. The deep learning interpretable device described below and the deep learning interpretable method described above can be referenced to each other.

[0114] Figure 4 An example of a deep learning interpretable device is shown below. Figure 4 As shown, the deep learning interpretable device 400 includes: an acquisition module 410, used to acquire the image to be interpreted and determine the category to be interpreted in the image to be interpreted; a determination module 420, used to determine the interpretation result of the category to be interpreted based on a preset deep learning interpretable model; wherein the preset deep learning interpretable model includes first obtaining the average gain of each pixel point in the image to be interpreted after adding noise, then determining the target pixel point for the category to be interpreted based on the average gain, and finally determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel point.

[0115] Optionally, the determination module 420 may be specifically used to input the image to be interpreted into the first preset learning model to obtain an average gain after adding noise to each pixel in the image to be interpreted; wherein the first preset learning model is used to first add a first noise to each pixel in the image to be interpreted, and then determine the average gain based on the image to be interpreted after adding the first noise;

[0116] The average benefit and the image to be interpreted after adding the first noise are input into the second preset learning model to obtain the interpretation result of the category to be interpreted; wherein the second preset learning model includes first determining the initial important pixels obtained after adding the first noise and the second noise to each pixel in the image to be interpreted according to the average benefit, then updating the initial important pixels according to the benefits after adding the first noise and the second noise to each pixel to obtain the target pixels used to explain the category to be interpreted, and then determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixels.

[0117] Optionally, the determination module 420 can also be specifically used to input the image to be interpreted into the first preset learning model to perform N1 rounds of adding first noise operation and deep learning, and obtain the average gain of each pixel point in the image to be interpreted after adding noise; wherein N1 is an integer greater than 0.

[0118] Optionally, the determination module 420 can also be specifically used to input the average gain and the image to be interpreted after adding the first noise into the second preset learning model for N-N1 rounds of deep learning to obtain the interpretation result of the category to be interpreted; wherein N is an integer greater than 0 and N>N1; the average gain is used for the image to be interpreted after adding the first noise to perform the N1+1th round of adding the second noise operation and deep learning.

[0119] Optionally, the determination module 420 can also be used to input the image to be interpreted into the first preset learning model, so as to perform the first to N1 rounds of first noise adding operations and deep learning for each pixel in the image to be interpreted, and determine the average gain after noise addition for each pixel in the image to be interpreted based on the gain of each pixel after the first N1 rounds of first noise adding operations and deep learning.

[0120] Optionally, the determination module 420 may be specifically configured to determine K initial important pixels of the N1th round based on the w*h noisy images obtained after adding the first noise in the N1th round and the average gain;

[0121] Add the second noise to the K initial important pixels selected in the m-1th round respectively, and obtain the w*h second noisy images of the mth round; wherein m=N1+1, N1+2, ..., N;

[0122] Based on the w*h noisy images of the m-th round, determining w*h confidence upper bounds of the m-th round;

[0123] Determine the K initial important pixel points selected in the mth round according to the w*h confidence upper bounds of the mth round;

[0124] Let the value of m be increased by 1, and repeat the step of adding the second noise to the K initial important pixels selected in the m-1th round respectively to obtain the w*h second noisy images of the mth round;

[0125] The deep learning is stopped until K initial important pixel points selected in the Nth round are obtained, and the K initial important pixel points selected in the Nth round are determined as target pixel points for explaining the category to be explained, and then the explanation result of the category to be explained is determined based on the deep learning degree of the target pixel points.

[0126] Optionally, the device also includes a visualization module, which is used to perform visualization operations on the image to be interpreted according to the number of times each pixel in the image to be interpreted is selected to add noise in a preset deep learning interpretable model, so as to obtain a visualized saliency image.

[0127] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device 500 may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the deep learning interpretable method, which includes:

[0128] Acquire an image to be interpreted, and determine a category to be interpreted in the image to be interpreted;

[0129] Based on a preset deep learning interpretable model, the interpretation result of the category to be interpreted is determined; wherein the preset deep learning interpretable model includes first obtaining the average gain of each pixel point in the image to be interpreted after adding noise, then determining the target pixel point for the category to be interpreted based on the average gain, and finally determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel point.

[0130] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of 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 method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0131] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the deep learning interpretable method provided by the above methods, the method comprising:

[0132] Acquire an image to be interpreted, and determine a category to be interpreted in the image to be interpreted;

[0133] Based on a preset deep learning interpretable model, the interpretation result of the category to be interpreted is determined; wherein the preset deep learning interpretable model includes first obtaining the average gain of each pixel point in the image to be interpreted after adding noise, then determining the target pixel point for the category to be interpreted based on the average gain, and finally determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel point.

[0134] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the deep learning interpretable method provided by the above methods, the method comprising:

[0135] Acquire an image to be interpreted, and determine a category to be interpreted in the image to be interpreted;

[0136] Based on a preset deep learning interpretable model, the interpretation result of the category to be interpreted is determined; wherein the preset deep learning interpretable model includes first obtaining the average gain of each pixel point in the image to be interpreted after adding noise, then determining the target pixel point for the category to be interpreted based on the average gain, and finally determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel point.

[0137] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A deep learning interpretable method, characterized in that: include: Acquire an image to be interpreted, and determine a category to be interpreted in the image to be interpreted; Based on a preset deep learning interpretable model, determine the interpretation result of the category to be interpreted; wherein the preset deep learning interpretable model includes first obtaining the average gain of each pixel in the image to be interpreted after adding noise, then determining the target pixel for the category to be interpreted based on the average gain, and then determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixel; In a case where the preset deep learning interpretable model includes a first preset learning model and a second preset learning model, determining the interpretation result of the to-be-explained category based on the preset deep learning interpretable model includes: Inputting the image to be interpreted into the first preset learning model to obtain an average gain after adding noise to each pixel in the image to be interpreted; The first preset learning model is used to first add a first noise to each pixel in the image to be interpreted, and then determine the average benefit according to the image to be interpreted after adding the first noise; Inputting the average gain and the image to be interpreted after adding the first noise into the second preset learning model to obtain an interpretation result of the category to be interpreted; Among them, the second preset learning model includes first determining the initial important pixels obtained by adding the first noise and the second noise to each pixel in the image to be interpreted according to the average benefit, then updating the initial important pixels according to the benefits after adding the first noise and the second noise to each pixel to obtain the target pixels used to explain the category to be interpreted, and then determining the interpretation result of the category to be interpreted based on the deep learning degree of the target pixels, and the deep learning depth is used to characterize the number of times noise addition and learning are performed with the target pixel as the center.

2. The deep learning interpretable method according to claim 1, characterized in that: The step of inputting the image to be interpreted into the first preset learning model to obtain an average gain of each pixel in the image to be interpreted after adding noise includes: After the image to be interpreted is input into the first preset learning model for N1 rounds of adding the first noise operation and deep learning, the average gain of each pixel in the image to be interpreted after adding noise is obtained; wherein N1 is an integer greater than 0.

3. The deep learning interpretable method according to claim 2, characterized in that: The step of inputting the average gain and the image to be interpreted after adding the first noise into the second preset learning model to obtain an interpretation result of the category to be interpreted includes: After inputting the average gain and the image to be interpreted after adding the first noise into the second preset learning model for N-N1 rounds of deep learning, an interpretation result of the category to be interpreted is obtained; Wherein, N is an integer greater than 0 and N>N1; the average benefit is used to perform the N1+1th round of adding the second noise operation and deep learning on the image to be interpreted after adding the first noise.

4. The deep learning interpretable method according to claim 2, characterized in that: After inputting the image to be interpreted into the first preset learning model to perform N1 rounds of first noise addition operation and deep learning, an average gain after noise addition for each pixel in the image to be interpreted is obtained, including: The image to be interpreted is input into the first preset learning model to perform the first to N1th rounds of first noise adding operations and deep learning for each pixel in the image to be interpreted, and the average gain after noise addition for each pixel in the image to be interpreted is determined based on the gain of each pixel after the first N1 rounds of first noise adding operations and deep learning.

5. The deep learning interpretable method according to claim 3, characterized in that: After inputting the average gain and the image to be interpreted after adding the first noise into the second preset learning model for N-N1 rounds of deep learning, an interpretation result of the category to be interpreted is obtained, including: Based on the w*h noisy images obtained after adding the first noise in the N1th round and the average gain, determining the K initial important pixels of the N1th round; wherein w*h represents the size of the image to be interpreted or the number of pixels included in the image to be interpreted; Add the second noise to the K initial important pixels selected in the m-1th round respectively, and obtain the w*h second noisy images of the mth round; wherein m=N1+1, N1+2, ..., N; Based on the w*h noisy images of the m-th round, determining w*h confidence upper bounds of the m-th round; Determine the K initial important pixel points selected in the mth round according to the w*h confidence upper bounds of the mth round; Let the value of m be increased by 1, and repeat the step of adding the second noise to the K initial important pixels selected in the m-1th round respectively to obtain the w*h second noisy images of the mth round; The deep learning is stopped until K initial important pixel points selected in the Nth round are obtained, and the K initial important pixel points selected in the Nth round are determined as the target pixel points for explaining the category to be explained, and then the explanation result of the category to be explained is determined based on the deep learning degree of the target pixel points.

6. The deep learning interpretable method according to claim 1, characterized in that: After the step of determining the explanation result of the category to be explained based on the preset deep learning interpretable model, the method further includes: According to the number of times each pixel in the image to be interpreted is selected to add noise in a preset deep learning interpretable model, a visualization operation is performed on the image to be interpreted to obtain a visualized saliency image.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the deep learning interpretable method as described in any one of claims 1 to 6 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the deep learning interpretable method as claimed in any one of claims 1 to 6 are implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the deep learning interpretable method as claimed in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Deep neural network interpretation method and device, terminal and storage medium

    CN111832707A

  • Interpretability parameter acquisition method and device of deep learning model

    CN112052957A

  • Machine learning interpretable method and device and storage medium

    CN112561074A

  • Visual interpretation method and system for deep neural network model.

    CN112861933A

  • Generating trained neural networks with increased robustness against adversarial attacks

    US20200234110A1