Model interpretation method and device, storage medium and computer program product

By combining the information of forward propagation and back propagation in the deep learning model, calculating the attention value and explaining the model decision-making process, the problem of opaqueness and low trust in model decision-making is solved, and the interpretability and trust of the model are improved. .

CN118798387APending Publication Date: 2024-10-18CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410650299.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The decision-making process of deep learning models is opaque, resulting in low trust in areas such as security, and it is difficult to improve the interpretability and trust of the model.

Method used

By determining the attention weight value and gradient value in the forward propagation and back propagation process of the model, calculating the attention value, using this information to explain the decision-making process of the model, and integrating the attention distribution information of the forward propagation and the back propagation information. Gradient information, learning deep feature information, and dynamically optimizing model training.

Benefits of technology

It significantly improves the transparency and trust of the model, enhances the interpretability of the model, allows the attention value to change with model training, captures dynamic information, and optimizes the model training process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798387A_ABST
    Figure CN118798387A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a model interpretation method and device, a storage medium and a computer program product. The model interpretation method comprises the steps of determining an attention weight value of first multimedia data in a forward propagation process of a first model; determining a gradient value of the first multimedia data in a back propagation process of the first model; the first multimedia data is any input data input into the first model; determining an attention value of the first multimedia data by using the attention weight value and the gradient value; and taking the attention value as interpretability information of the first multimedia data so as to interpret a decision process of the first model by using the interpretability information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a model interpretation method and device, a storage medium, and a computer program product. Background Art

[0002] With the development of deep learning, the performance of various models is getting better and better, and there have been breakthroughs in various fields. However, the decision-making process of most models is often difficult to understand, like a black box. When the model decision fails, it is impossible to understand the decision-making process of the model, and it is impossible to effectively adjust and improve it. This opacity can cause critical problems in certain fields such as security. However, with the development of the model, the structural complexity of the model and the diversity of feature interaction patterns have led to low interpretability of the model and low trust in the model. Summary of the invention

[0003] The embodiments of the present application provide a model interpretation method and device, a storage medium, and a computer program product, which can improve the interpretability and trustworthiness of the model.

[0004] The technical solution of this application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a model interpretation method, the method comprising:

[0006] Determine an attention weight value of the first multimedia data during the forward propagation process of the first model; determine a gradient value of the first multimedia data during the reverse propagation process of the first model; the first multimedia data is any input data input into the first model;

[0007] Determining an attention value of the first multimedia data using the attention weight value and the gradient value;

[0008] The attention value is used as interpretability information of the first multimedia data, so as to use the interpretability information to explain the decision-making process of the first model.

[0009] In a second aspect, an embodiment of the present application provides a model interpretation device, the device comprising:

[0010] A determination unit, configured to determine an attention weight value of first multimedia data during forward propagation of the first model; determine a gradient value of the first multimedia data during backward propagation of the first model; the first multimedia data is any input data input into the first model; and determine an attention value of the first multimedia data using the attention weight value and the gradient value;

[0011] An interpretation unit is used to use the attention value as interpretability information of the first multimedia data, so as to use the interpretability information to explain the decision-making process of the first model.

[0012] In a third aspect, an embodiment of the present application proposes a model interpretation device, which includes: a processor, a memory, and a communication bus; the processor implements the above-mentioned model interpretation method when executing a running program stored in the memory.

[0013] In a fourth aspect, an embodiment of the present application proposes a storage medium on which a computer program is stored, and the computer program implements the above-mentioned model interpretation method when executed by a processor.

[0014] In a fifth aspect, an embodiment of the present application proposes a computer program product, including a computer program, which implements the above-mentioned model interpretation method when executed by a processor.

[0015] The embodiment of the present application provides a model interpretation method and device, storage medium, and computer program product, the method comprising: determining the attention weight value of the first multimedia data in the process of forward propagation of the first model; determining the gradient value of the first multimedia data in the process of reverse propagation of the first model; the first multimedia data is any input data input into the first model; using the attention weight value and the gradient value to determine the attention value of the first multimedia data; using the attention value as the interpretability information of the first multimedia data, so as to use the interpretability information to interpret the decision process of the first model. The above implementation scheme is adopted to integrate the attention distribution information of the forward propagation and the gradient information of the reverse propagation, learn the influence of the deep feature information on the decision result of the model, provide a deeper understanding, can greatly enhance the transparency of the model, and improve the interpretability of the model. And the attention value is based on the gradient information in the reverse propagation process of the model, so that the attention value will change dynamically as the model training proceeds. Based on the attention value, the dynamic information in the model training process can be captured, and then the model training process can be optimized, thereby improving the trust of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A process of a model interpretation method provided in the embodiment of the present application Figure 1 ;

[0017] Figure 2 A process of a model interpretation method provided in the embodiment of the present application Figure 2 ;

[0018] Figure 3 A structural composition diagram of an exemplary model interpretation device provided in an embodiment of the present application;

[0019] Figure 4A schematic diagram of a model interpretation device provided in an embodiment of the present application Figure 1 ;

[0020] Figure 5 A schematic diagram of a model interpretation device provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0021] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0023] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. It should also be noted that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second\third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0024] The present application embodiment provides a model interpretation method, such as Figure 1 As shown, the method may include:

[0025] S101, determining the attention weight value of the first multimedia data during the forward propagation process of the first model; determining the gradient value of the first multimedia data during the backward propagation process of the first model; the first multimedia data is any input data input into the first model.

[0026] A model interpretation method proposed in the embodiment of the present application can be applied to the scenario where the Transformer model performs arbitrary software classification. Among them, the first model in the embodiment of the present application is not limited to the Transformer model, but can also be other deep learning models such as Convolutional Neural Networks (CNN), Deep Neural Network (DNN), Recurrent Neural Network (RNN), etc. The specific one can be selected according to the actual situation, and the embodiment of the present application does not make specific limitations; the scenario in the embodiment of the present application is not limited to malware classification, but can also be any other field such as imaging, voice, natural language processing, control, etc. The specific one can be selected according to the actual situation, and the embodiment of the present application does not make specific limitations.

[0027] In the embodiment of the present application, data preprocessing is first performed on the original multimedia data input into the first model to obtain multimedia data. Through data preprocessing, the original multimedia data is converted into an input format acceptable to the first model. This can provide preparation for the subsequent processing process of the first model and help improve the performance of the first model.

[0028] It should be noted that the multimedia data may be image data, audio data, text data, video data, etc., and may be specifically selected according to the application scenario corresponding to the first model, and the embodiments of the present application do not make any specific limitations.

[0029] In an embodiment of the present application, data preprocessing includes the following four key stages: data reading stage, data cleaning stage, feature extraction stage and feature representation stage.

[0030] In the data reading phase, the original multimedia data is read from the data source. This process involves different types of files, such as binary files, portable executable (PE) files, text files, etc. In order to handle different types of files, different data reading methods need to be used. For example, for binary files, their byte sequences are read directly; for PE files, specialized libraries (such as Python's Portable Executable format (PELile) library) are used to parse the file and extract metadata and section information.

[0031] In the data cleaning phase, the raw multimedia data is cleaned. This process includes removing unnecessary special characters, deleting blank lines, processing missing values, etc. The purpose of this step is to eliminate noise that may affect the performance of the model and convert the data into a format suitable for subsequent processing.

[0032] In the feature extraction stage, meaningful features are extracted from the cleaned multimedia data. For binary files, their byte frequency distribution is calculated as features; for PE files, their metadata (such as file size, number of sections, etc.) and section information (such as the size and permissions of each section, etc.) are extracted as features. In addition, some more advanced techniques, such as static analysis or dynamic analysis, can be used to extract more features (such as API call sequences).

[0033] In the feature representation stage, the extracted features are converted into vector form that the model can process. This process usually involves some encoding methods, such as one-hot encoding or term frequency-inverse document frequency (TF-IDF) encoding. For example, the application programming interface (API) call sequence is one-hot encoded and converted into a one-hot vector; or the byte frequency distribution is TF-IDF encoded and converted into a TF-IDF vector.

[0034] In an optional embodiment, the first model is a Transformer model, then the attention weight value of the first multimedia data at each layer of the Transformer model is determined; and the gradient value of the first multimedia data at each layer of the Transformer model is determined.

[0035] In the embodiment of the present application, for any input data input into the first model, the model is first forward propagated, and in the hth layer of each Transformer model, the attention weight matrix A is calculated. h ∈R n×n (Attention weight value of each layer of Transformer model), where n is the length of the first multimedia data X. Attention weight matrix A h Element A h (i,j) represents the attention weight of position i to position j in the hth layer.

[0036] In the embodiment of the present application, the model is then back-propagated to calculate the gradient value G of the hth layer of each Transformer model h . G h The size of reflects the degree to which the model updates the parameters of the h-th layer during the training process.

[0037] It should be noted that after determining the gradient value of the first multimedia data at each layer of the Transformer model, it is normalized. Specifically, firstly, the absolute value sum S of the gradients of all m layers of the Transformer model is calculated, see formula (1).

[0038]

[0039] Then the gradient G of each layer h Divide by S to get the normalized gradient value W h , see formula (2).

[0040]

[0041] S102: Determine the attention value of the first multimedia data using the attention weight value and the gradient value.

[0042] In an optional embodiment, the first model is a Transformer model, then the attention weight value of each layer and the gradient value of each layer are processed to obtain the attention value of each layer; the attention values ​​of each layer are accumulated to obtain the attention value of the first multimedia data.

[0043] In the embodiment of the present application, the gradient value of each layer is applied to the attention weight value of the corresponding layer, see formula (3), to obtain the attention value of each layer.

[0044] A′ h = A h ×W h (3)

[0045] Afterwards, A′ h Add together to obtain the attention value A of the first multimedia data, see formula (4).

[0046]

[0047] S103. Use the attention value as interpretability information of the first multimedia data to explain the decision-making process of the first model using the interpretability information.

[0048] It should be noted that the embodiments of the present application introduce a new perspective to understand and explain the behavior of the Transformer model, which combines the model's attention to the input multimedia data and the importance of each Transformer layer in the model training process.

[0049] It should be noted that after the attention value is used as the interpretability information of the first multimedia data, the interpretability information of the first multimedia data can also be displayed.

[0050] In an optional embodiment, based on the interpretability information, display parameter information of the first multimedia data is determined; based on the display parameter information, corresponding multimedia data is displayed.

[0051] In the embodiment of the present application, the display parameter information may be display font size, display font color, etc., which may be specifically selected according to actual conditions, and the embodiment of the present application does not make any specific limitation.

[0052] Taking the display font size as an example, the display font size is proportional to the interpretability information, that is, the larger the interpretability information is, the larger the font is displayed. In this way, it can be intuitively seen which multimedia data has a great impact on the output of the first model.

[0053] Taking the display font color as an example, the display font color is proportional to the interpretability information, that is, the greater the interpretability information, the darker the font color is displayed. In this way, it can be intuitively seen which multimedia data has a great impact on the output of the first model.

[0054] In an embodiment of the present application, a word cloud solution or a text heat map solution may be used to display the interpretability information of the first multimedia data.

[0055] In an embodiment of the present application, a word cloud solution is used for display. The first multimedia data may be words. The words and corresponding interpretability information may be used as input. A word cloud generation tool may be used to create a word cloud. In the word cloud, the display font size is proportional to the interpretability information.

[0056] It should be noted that the display font size can also be set to be inversely proportional to the interpretability information. The specific mapping relationship can be selected according to actual conditions, and the embodiments of the present application do not make specific limitations.

[0057] In another optional embodiment, based on the interpretability information, tag information of the first multimedia data is determined; the first multimedia data is tagged using the tag information to obtain the tagged first multimedia data; and the tagged first multimedia data is displayed.

[0058] In the embodiment of the present application, each first multimedia data is associated with its corresponding interpretability information. Specifically, the underline strength can be used as marking information to represent the interpretability information of each first multimedia data. For example, the greater the interpretability information, the thicker the underline is used to mark it. Finally, the marked first multimedia data is displayed, so that it can be intuitively seen which multimedia data has a great impact on the output of the first model based on the marking information.

[0059] It should be noted that, for all multimedia data input into the first model, the position of each multimedia data in all the multimedia data and the interpretability information of each multimedia data can be displayed.

[0060] It is understandable that the integration of the attention distribution information of the forward propagation and the gradient information of the back propagation, and the study of the impact of deep feature information on the decision results of the model, provide a deeper understanding, which can greatly enhance the transparency of the model and improve the interpretability of the model. And the attention value is based on the gradient information in the back propagation process of the model, so that the attention value will change dynamically as the model training progresses. Based on the attention value, the dynamic information in the model training process can be captured, and then the model training process can be optimized, thereby improving the trust of the model.

[0061] It should be noted that before S103, a model interpretation method for the global or feature level is also included. The embodiment of the present application uses Shapley Additive Explanations (SHAP) to perform interpretability analysis on the first model. On the basis of SHAP, the interaction effect of features is introduced to reveal the causal relationship behind the model prediction results, enhance the transparency of the model, and provide a basis for model optimization. Figure 2 , specifically including:

[0062] S201, respectively determine a first contribution value of the first multimedia data to the decision result data and a second contribution value of the second multimedia data to the decision result; the second multimedia data is multimedia data other than the first multimedia data; the decision result data is generated after the first model processes the first multimedia data and the second multimedia data.

[0063] In the embodiment of the present application, an interpreter is first constructed, which uses the SHAP method and quotes the Shapley value in game theory to interpret the model prediction. The Shapley value is a fair distribution solution that assigns a contribution value to each feature (first multimedia data), which represents the contribution of the feature to the decision result data. The interpreter also calculates the interaction effect between features, that is, how the features influence each other's contribution to the prediction result.

[0064] In the embodiment of the present application, the initialized interpreter is used to interpret the first multimedia data, and the contribution value φ of each multimedia data is calculated. i (v), see formula (5).

[0065]

[0066] Where v is a function of a feature set, S is a different feature set composed of different features, N is the total feature set, S is a subset of N, N\{i} is the set after removing element i from set N, |S| is the size of the feature set, and |N| is the size of the total feature set.

[0067] It should be noted that the calculation of the first contribution value of the first multimedia data and the calculation of the second contribution value of the second multimedia data can both be calculated by referring to formula (5), which will not be described in detail here.

[0068] S202: Determine a third contribution value of the first multimedia data under interaction with the second multimedia data based on the first contribution value and the second contribution value.

[0069] It should be noted that the interaction effect between multimedia data describes the mutual influence between features. It is obtained by calculating the difference in the SHAP value of one feature in the presence and absence of another feature. Specifically, if the interaction effect of the first multimedia data and the second multimedia data is positive, it means that when the first multimedia data and the second multimedia data exist at the same time, their common contribution to the decision result data is greater than the sum of their contributions when each exists separately. Conversely, if the interaction effect of the first multimedia data and the second multimedia data is negative, it means that when the first multimedia data and the second multimedia data exist at the same time, their common contribution to the decision result data is less than the sum of their contributions when each exists separately.

[0070] In the embodiment of the present application, the first contribution value and the second contribution value can be added to obtain a third contribution value of the first multimedia data under the interaction of the second multimedia data. It should be noted that addition is only an optional calculation method proposed in the embodiment of the present application, and the specific method can be selected according to the actual situation, and the embodiment of the present application does not make a specific limitation.

[0071] It is understandable that model interpretation methods targeting the global or feature level can provide a more comprehensive understanding of the dynamic interactions between features, thereby providing a deeper model interpretation, providing richer information for model optimization, and helping to improve the performance and accuracy of the model.

[0072] Correspondingly, on the premise that S201 - S202 are executed, the specific implementation process of S103 can refer to S203 .

[0073] S203: Fusing the third contribution value and the attention value to obtain interpretability information of the first multimedia data.

[0074] In an optional embodiment, for the Tranformer model, the third contribution value and the attention value are both in matrix form, and the matrix of the third contribution value and the matrix of the attention value can be added to achieve the fusion of the third contribution value and the attention value. The specific fusion method is not specifically limited in this application, and the fusion can be performed according to actual conditions.

[0075] It should be noted that the first contribution value and the third shared sum attention value may also be fused to obtain the interpretability information of the first multimedia data. The specific selection may be made according to the actual situation, and the embodiment of the present application does not make any specific limitation.

[0076] It should be noted that, for the interpretable information, the subsequent display process can still be performed. For details, please refer to the description of S103, which will not be repeated in the embodiment of the present application.

[0077] Based on the above embodiments, the present application embodiment proposes a processing device for an interpretability method for a malware classification model, see Figure 3 The device includes a data preprocessing module, a global / feature-level interpretable module, a local / attention mechanism interpretable module, and a fusion visualization module. The data preprocessing module sequentially performs data reading, data cleaning, feature extraction, and feature representation processes, the global / feature-level interpretable module sequentially performs interpreter initialization, feature SHAP value calculation, and feature interaction calculation processes, the local / attention mechanism interpretable module sequentially performs gradient value calculation under model forward propagation, gradient value calculation under model back propagation, normalization calculation, and multi-attention head fusion calculation processes, and the fusion visualization module can use a word cloud solution and / or a text heat map solution to display interpretable information.

[0078] The present application embodiment provides a model interpretation device 1. Figure 4 As shown, the model interpretation device 1 includes:

[0079] The determination unit 10 is used to determine the attention weight value of the first multimedia data during the forward propagation process of the first model; determine the gradient value of the first multimedia data during the reverse propagation process of the first model; the first multimedia data is any input data input into the first model; and determine the attention value of the first multimedia data using the attention weight value and the gradient value;

[0080] The interpretation unit 11 is used to use the attention value as the interpretability information of the first multimedia data, so as to use the interpretability information to explain the decision-making process of the first model.

[0081] Optionally, the device further comprises a fusion unit;

[0082] The determination unit 10 is further used to respectively determine a first contribution value of the first multimedia data to the decision result data and a second contribution value of the second multimedia data to the decision result; the second multimedia data is multimedia data other than the first multimedia data; the decision result data is generated after the first model processes the first multimedia data and the second multimedia data; based on the first contribution value and the second contribution value, determine a third contribution value of the first multimedia data under the interaction of the second multimedia data;

[0083] The fusion unit is used to fuse the third contribution value and the attention value to obtain interpretability information of the first multimedia data.

[0084] Optionally, the first model is a Transformer model.

[0085] The determination unit 10 is also used to determine the attention weight value of the first multimedia data at each layer of the Transformer model; determine the gradient value of the first multimedia data at each layer of the Transformer model; process the attention weight value of each layer and the gradient value of each layer to obtain the attention value of each layer; and accumulate the attention values ​​of each layer to obtain the attention value of the first multimedia data.

[0086] Optionally, the device further comprises: a display unit;

[0087] The display unit is used to display the interpretability information of the first multimedia data.

[0088] Optionally, the determining unit 10 is further configured to determine display parameter information of the first multimedia data based on the interpretability information;

[0089] The display unit is further used to display corresponding multimedia data based on the display parameter information.

[0090] Optionally, the determining unit 10 is further configured to determine tag information of the first multimedia data based on the interpretability information; and tag the first multimedia data using the tag information to obtain the tagged first multimedia data;

[0091] The display unit is further used to display the marked first multimedia data.

[0092] A model interpretation device provided in an embodiment of the present application determines the attention weight value of the first multimedia data during the forward propagation process of the first model; determines the gradient value of the first multimedia data during the reverse propagation process of the first model; the first multimedia data is any input data input into the first model; uses the attention weight value and the gradient value to determine the attention value of the first multimedia data; uses the attention value as the interpretability information of the first multimedia data to interpret the decision-making process of the first model using the interpretability information. It can be seen that the model interpretation device proposed in this embodiment integrates the attention distribution information of the forward propagation and the gradient information of the reverse propagation, learns the influence of the deep feature information on the decision results of the model, provides a deeper understanding, can greatly enhance the transparency of the model, and improves the interpretability of the model. And the attention value is based on the gradient information in the reverse propagation process of the model, so that the attention value will change dynamically as the model training progresses. Based on the attention value, the dynamic information in the model training process can be captured, and then the model training process can be optimized, thereby improving the trust of the model.

[0093] Figure 5 A schematic diagram of the structure of a model interpretation device 1 provided in an embodiment of the present application Figure 2 In practical applications, based on the same disclosure concept of the above embodiments, Figure 5 As shown, the model interpretation device 1 of this embodiment includes: a processor 12, a memory 13 and a communication bus 14.

[0094] The processor 12 may be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a CPU, a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the functions of the processor may also be other, which is not specifically limited in this embodiment.

[0095] In the embodiment of the present application, the communication bus 14 is used to realize the connection and communication between the processor 12 and the memory 13; when the processor 12 executes the running program stored in the memory 13, the following model interpretation method is implemented:

[0096] Determine an attention weight value of the first multimedia data during the forward propagation process of the first model; determine a gradient value of the first multimedia data during the backward propagation process of the first model; the first multimedia data is any input data input into the first model; use the attention weight value and the gradient value to determine the attention value of the first multimedia data; use the attention value as the interpretability information of the first multimedia data, so as to use the interpretability information to explain the decision-making process of the first model.

[0097] Furthermore, the above-mentioned processor 12 is also used to respectively determine a first contribution value of the first multimedia data to the decision result data and a second contribution value of the second multimedia data to the decision result; the second multimedia data is multimedia data other than the first multimedia data; the decision result data is generated after the first model processes the first multimedia data and the second multimedia data; based on the first contribution value and the second contribution value, determine the third contribution value of the first multimedia data under the interaction of the second multimedia data; and fuse the third contribution value and the attention value to obtain the interpretability information of the first multimedia data.

[0098] Furthermore, the first model is a Transformer model.

[0099] The above-mentioned processor 12 is also used to determine the attention weight value of the first multimedia data at each layer of the Transformer model; determine the gradient value of the first multimedia data at each layer of the Transformer model; process the attention weight value of each layer and the gradient value of each layer to obtain the attention value of each layer; accumulate the attention value of each layer to obtain the attention value of the first multimedia data.

[0100] Furthermore, the processor 12 is also used to display interpretability information of the first multimedia data.

[0101] Furthermore, the processor 12 is further configured to determine display parameter information of the first multimedia data based on the interpretability information; and display corresponding multimedia data based on the display parameter information.

[0102] Furthermore, the processor 12 is also used to determine tag information of the first multimedia data based on the interpretability information; tag the first multimedia data using the tag information to obtain the marked first multimedia data; and display the marked first multimedia data.

[0103] An embodiment of the present application provides a storage medium having a computer program stored thereon. The computer-readable storage medium stores one or more programs. The one or more programs can be executed by one or more processors and applied to a model interpretation device. The computer program implements the model interpretation method as described above.

[0104] Based on the above embodiments, an embodiment of the present application provides a computer program product, including a computer program, which can be executed by one or more processors, and the computer program implements the model interpretation method as described above.

[0105] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are 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 other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for enabling an image display device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present disclosure.

[0107] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A model interpretation method, characterized in that: The method comprises: Determine an attention weight value of the first multimedia data during the forward propagation process of the first model; determine a gradient value of the first multimedia data during the reverse propagation process of the first model; the first multimedia data is any input data input into the first model; Determining an attention value of the first multimedia data using the attention weight value and the gradient value; The attention value is used as interpretability information of the first multimedia data, so as to use the interpretability information to explain the decision-making process of the first model.

2. The method according to claim 1, characterized in that Before using the attention value as the interpretability information of the first multimedia data, the method further includes: respectively determining a first contribution value of the first multimedia data to the decision result data and a second contribution value of the second multimedia data to the decision result; the second multimedia data is multimedia data other than the first multimedia data; the decision result data is generated after the first model processes the first multimedia data and the second multimedia data; Determining, based on the first contribution value and the second contribution value, a third contribution value of the first multimedia data under interaction with the second multimedia data; The using the attention value as the interpretability information of the first multimedia data includes: The third contribution value and the attention value are merged to obtain interpretability information of the first multimedia data.

3. The method according to claim 1, characterized in that The first model is a Transformer model, and determining the attention weight value of the first multimedia data in a forward propagation process of the first model; Determining a gradient value of the first multimedia data during a back propagation process of the first model; comprising: Determine an attention weight value of the first multimedia data at each layer of the Transformer model; Determine a gradient value of the first multimedia data at each layer of the Transformer model; The step of determining the attention value of the first multimedia data by using the attention weight value and the gradient value comprises: Process the attention weight value of each layer and the gradient value of each layer to obtain the attention value of each layer; The attention value of each layer is accumulated to obtain the attention value of the first multimedia data.

4. The method according to claim 1, characterized in that: After using the attention value as the interpretability information of the first multimedia data, the method further includes: The interpretability information of the first multimedia data is displayed.

5. The method according to claim 4, characterized in that The displaying of the interpretability information of the first multimedia data includes: Based on the interpretability information, determining display parameter information of the first multimedia data; Based on the display parameter information, corresponding multimedia data is displayed.

6. The method according to claim 4, characterized in that The displaying of the interpretability information of the first multimedia data includes: Based on the interpretability information, determining tag information of the first multimedia data; Marking the first multimedia data using the marking information to obtain the marked first multimedia data; The marked first multimedia data is displayed.

7. A model interpretation device, characterized in that: The device comprises: A determination unit, configured to determine an attention weight value of first multimedia data during forward propagation of the first model; determine a gradient value of the first multimedia data during backward propagation of the first model; the first multimedia data is any input data input into the first model; and determine an attention value of the first multimedia data using the attention weight value and the gradient value; An interpretation unit is used to use the attention value as interpretability information of the first multimedia data, so as to use the interpretability information to explain the decision-making process of the first model.

8. A model interpretation device, characterized in that: The device comprises: a processor, a memory and a communication bus; when the processor executes the running program stored in the memory, the method according to any one of claims 1 to 6 is implemented.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Model interpretation method and apparatus, storage medium, and computer program product

    WO2025241718A1