Self-rationalization interpretation method and device for strengthening causal signal guidance

Through the method of strengthening causal signal guidance, combined with generator, predictor, causal attribution and reinforcement learning modules, the degeneration accumulation problem in the self-rationalized interpretation method is solved, and the model is higher interpretation ability and the credibility of the prediction results are achieved.

CN119089999APending Publication Date: 2024-12-06SHANXI UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411051396.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing self-rationalization interpretation methods are prone to degeneration accumulation problems, resulting in learning biases in the model during training, and the inability to effectively identify and correct meaningless or defective interpretation information generated by the generator.

Method used

Using the method of strengthening causal signal guidance, the generator module, predictor module, causal attribution module and reinforcement learning module work together, combined with Markov decision-making process and pre-training technology, refine the training process of interpreting information, quantify and correct it. Learn bias, generate guidance signals to optimize training of generators and predictors.

Benefits of technology

It effectively alleviates the problem of degeneration accumulation, improves the model's interpretation ability and the credibility of the prediction results, reduces learning bias, and bridges the generation, prediction, attribution and reinforcement learning links of self-rationalized interpretation models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089999A_ABST
    Figure CN119089999A_ABST
Patent Text Reader

Abstract

The invention discloses a self-rationalization interpretation method and device for strengthening causal signal guidance, and belongs to the technical field of artificial intelligence and natural language processing. Aiming at the problem that the existing method for improving the interpretable ability of the model is easy to generate degradation accumulation, the invention provides a device which comprises a generator module, a predictor module, a causal attribution module, a reinforcement learning module and a signal generation module. The method is a self-interpretation mechanism based on collaborative game optimization, and a generator and a predictor of the self-interpretation mechanism obtain a final prediction label through collaborative optimization. Meanwhile, the inherent causal effect in the training process is quantitatively explained by introducing a causal stem budget in model training, and the learning deviation of the inherent causal effect is refined by utilizing a reinforcement learning process. And finally, under the enhanced causal environment, constructing a guidance signal to guide the next training actions of the generator and the predictor in the model, and finally relieving the problem of model degradation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of artificial intelligence and natural language processing, and specifically relates to a self-rationalization interpretation method and device guided by enhanced causal signals. Background Art

[0002] Self-explaining Rationalization, as a technology to improve the self-explanatory ability of models, is an important research task in the field of artificial intelligence (AI) and plays an important role in research directions such as natural language processing and computer vision.

[0003] In recent years, with the development of deep learning technology (such as pre-trained language models such as GPT and Llama), artificial intelligence models have made unprecedented breakthroughs in natural language processing, computer vision and other research. However, the black box problem of these models has become increasingly prominent. Since the model is difficult to explain, the credibility of the prediction results is reduced to a certain extent, making it difficult to understand and verify. In order to improve the interpretability of the model, the self-rationalization explanation paradigm has been widely studied, which aims to select a small and human-understandable subset (i.e., explanation or evidence) from the input information to support and explain these results when giving prediction results.

[0004] The existing mainstream research methods mainly include two categories: 1) sampling-based methods; 2) external component-based methods. These methods mainly focus on directly improving sampling or adjusting information other than explanations to improve the performance of self-rationalized explanation models. However, these methods are prone to degradation accumulation problems, which refers to the phenomenon that the generator produces wrong or meaningless explanations, and the predictor then overfits this information during the training process. This is because these methods are usually unable to identify whether the generator has produced some meaningless or defective explanations during the training process. On the contrary, even if the generator generates bad explanations, they will directly pass them to the predictor.

[0005] Due to the problem of degradation accumulation, the above self-rationalization explanation method will cause the model to produce certain learning biases during the training process when its predictor receives a degraded explanation, which will cause the model to be trained in an undesirable direction. Summary of the invention

[0006] In view of the fact that current methods for improving the interpretability of models are prone to degradation accumulation problems, the present invention provides a self-rationalization interpretation method and device with enhanced causal signal guidance.

[0007] In order to achieve the above object, the present invention adopts the following technical solutions:

[0008] A self-rationalization explanation device guided by reinforced causal signals, comprising a generator module, a predictor module, a causal attribution module, a reinforcement learning module, and a signal generation module;

[0009] The generator module is used to encode the input information of the model and generate explanation information for predicting labels in combination with probability distribution;

[0010] The predictor module performs label prediction based on the explanation information given by the generator module;

[0011] The causal attribution module is used to attribute and quantify the causal effect of the explanation information based on the input information;

[0012] The reinforcement learning module is used to model the collaborative game between the generator module and the predictor module as a Markov decision process, and to explain the learning deviation in the information training process in detail;

[0013] The signal generation module is used to provide a good guiding signal for the game optimization direction of the generator and the predictor in combination with the pre-training technology.

[0014] A self-rationalization explanation method guided by the reinforced causal signal based on the above device comprises the following steps:

[0015] Step 1: Encode the model’s input information through the generator module and generate explanation information for predicting labels based on the probability distribution;

[0016] Step 2: Based on the explanation information given by the generator module, the predictor module is used to make label predictions;

[0017] Step 3: attribute and quantify the causal effect of the explanatory information based on the input information of the model;

[0018] Step 4: Use the reinforcement learning module to model the collaborative game between the generator and the predictor as a Markov decision process, and refine the learning bias of the information in the collaborative game process;

[0019] Step 5: Provide a good guidance signal for the game optimization direction of the generator and predictor through the signal generation module combined with pre-training technology.

[0020] Furthermore, the specific operation of step 1 is: through the generator f G (·) Encode the input information X and generate the explanation information Z for predicting the label by combining the probability distribution; Considering the text classification problem, the generator and predictor are denoted as f G (·) and f P (·); will contain tokenx i The input text is recorded as X = [x1, x2, ..., xl ](1≤i≤l), where l is the number of tokens in the text sequence; the label of X is a one-hot encoded vector Y∈{0,1} c , where c is the number of category labels;

[0021] Generator f G (·) First, use GRU (Gated Recurrent Unit) to encode the input information X; then, use the binary mask matrix M = [m1,m2,...,m l ]∈{0,1}, select the fragment with the richest information from X; based on the binary mask matrix M, the explanation information Z is obtained as follows:

[0022] Z=M⊙X=[m1x1,m2x2,...,m l x l ]

[0023] Among them, the amount of information in Z is lost by negative information entropy Take measurement.

[0024] Further, the specific operations of step 2 are:

[0025] Based on the generator f G (·) gives the explanation information, using the predictor f P (·) Perform label prediction, where Z = f G (X), the specific formula is as follows:

[0026]

[0027] Among them, θ G represents the parameters of the generator; θ P represents the parameters of the predictor; st represents satisfying a certain condition, which here means optimizing the parameters of the generator and predictor so that the model satisfies

[0028] Z is constrained by the regularization terms of sparsity and coherence, and the specific formula is as follows:

[0029]

[0030] Where Ω(M) represents the constraints of the binary mask matrix M, which includes two constraints: sparsity constraint and coherence constraint. λ1 represents the hyperparameter of the sparsity constraint; λ2 represents the hyperparameter of the coherence constraint. m t Represents the tth token in M.

[0031] Further, the specific operations of step 3 are:

[0032] Explanation attribution process: Based on the input information X of the model, the explanation information Z is selected from a sequence containing l tokens. The specific formula is as follows:

[0033]

[0034] in, represents the Kth explanation information predicted by the model, represents the target prediction of the model, K is the number of selected explanation information; A(·) aims to measure the impact of each candidate explanation on the target prediction.

[0035] Causal Quantification Process: Introduce the causal interference factor do(·), including do(Z=Z K )and Therefore, the above explanation is attributed to to Z K The process is formalized into the following formula:

[0036]

[0037] Where I(·) represents the calculation of mutual information.

[0038] Further, the specific operations of step 4 are:

[0039] The reinforcement learning module is used to model the collaborative game between the generator and the predictor as a Markov decision process, and the learning bias of the information in the collaborative game process is refined and explained.

[0040] Step 3 gives the to Z K The process of training explanation information, but it may generate degraded explanation information at the i-th step (0<i<K); therefore, in order to refine the training deviation at each step, Z i to Z i+1 The difference between them needs to be further quantified, and the specific formula is as follows:

[0041]

[0042] So we can get Z i to Z i+1 The causal effect between

[0043]

[0044] Further deduction, the above formula is converted into a probability distribution expression as follows:

[0045]

[0046] in, represents conditional entropy; the probability distribution of the above formula can be explained based on the previous one Z i Quantized Z i+1 The degree of influence on the predicted label;

[0047] Due to the cooperative game optimization mechanism between the generator and the predictor, its training process is modeled as a Markov decision process M = {S, A, P, R}, where S = {s i} represents the set of states that optimize the explanation process during training, and A = {a i} represents a set of actions; in particular, P = P(s i+1 |s i ,a i+1 ) represents the state transition probability, which specifies how to take action a i+1 From the previous state i Update state to state s i+1 ; R = R (s i ,a i+1 ) is used to quantify the previous state s i Take action a i+1 The reward obtained after the above cooperative game training is described as a sequence process (s0, a1, r1, s1, ..., a K ,r K ,s K ), where state s i By the ith update s i =Z i Represents; s0 = Z0 by generator f G (·) Initialize;

[0048] In order to reduce the learning bias of the training process, the above sequence process is reformulated as in Indicates that in the i-th update, from state s i arrive The conversion process;

[0049] According to the action conversion law of the above reinforcement process, given a state s i =Z i , then there is available action space: Then the search action space can be formalized as:

[0050]

[0051] in, Represents candidate actions in the action space; based on the action State transitions are represented as merges to Z i ,Right now,

[0052]

[0053] Based on this, action is generated Use reward function to alleviate the impact of model learning bias The formal representation is as follows:

[0054]

[0055] Further, the specific operations of step 5 are:

[0056] Step 5.1, pre-training signal; first, define a classifier f A To generate the guidance signal A,

[0057] fA→A

[0058] Then, use the input information X and label Y to perform supervised learning to pre-train the classifier f A , as follows:

[0059]

[0060] Among them, θ A Represents the classifier f A learnable parameters, and represents the optimal solution;

[0061] Step 5.2, theoretical analysis; assume that X, Z, Y and A are random variables in the training process of the rational explanation model, representing the variables of input information, explanation information, label and guidance signal respectively;

[0062] Lemma: Given X, Z, Y, There exists a guiding signal A that makes the predictor f P (·) achieve better predictions; that is, achieve a better prediction, instructing that a solution to signal A exists, and X is a solution to A;

[0063] Proof: Given random variables X, Z, Y, and A, where A is the probability distribution from X; according to the above formula, in order to get a good predictor, we need

[0064]

[0065] Where Z = f G (X); that is, we need to minimize H(Y,Z) to reduce the uncertainty of pointing to label Y; assuming that there is a variable A that can reduce the uncertainty of learning Y, that is,

[0066] H(Y,A)≤H(Y,Z)

[0067] According to the mutual information formula, we get:

[0068] H(Y)-H(Y,A)≥H(Y)-H(Y,Z)

[0069] Therefore, I(Y,A)≥I(Y,Z);

[0070] Since X = {Z, X\Z}, where X\Z represents explanatory information from X that is irrelevant to the prediction, we get:

[0071] I(Y;X)=I(Y;{Z,X\Z})=I(Y;Z)+I(Y;X\Z|Z)

[0072] According to the non-negativity of mutual information, we can obtain I(Y;X\Z|Z)≥0, so I(Y;X)≥I(Y;Z);

[0073] Further, assume that I(Y,X)=σ0≥σ1≥I(Y,Z)≥σ2, where σ1 and σ2 represent the upper and lower bounds of I(Y,Z), respectively; therefore, it can be deduced that when A=X, the equation I(Y,A)=σ0≥σ1≥I(Y,Z)≥σ2 holds; that is, a solution of the guidance signal A exists, and X is a solution of A; the lemma is proved.

[0074] An electronic device comprises 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 a self-rationalization interpretation method guided by enhanced causal signals are implemented as described in any one of claims 2 to 7.

[0075] A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a self-rationalization interpretation method guided by enhanced causal signals as described in any one of claims 2 to 7.

[0076] Compared with the prior art, the present invention has the following advantages:

[0077] (1) The present invention proposes a self-rationalization explanation method and device that combines causal attribution and reinforcement learning, wherein causal attribution enables the causal effect of the model input on the explanation information to be quantified and attributed; reinforcement learning models the process of collaborative game between the generator and the predictor as a Markov decision process, which can refine the learning bias in the process of explanatory information training.

[0078] (2) The present invention can guide the next training action of the model generator and the predictor by constructing a guidance signal, thereby reducing the learning bias in the model training process.

[0079] (3) The present invention constructs guidance signals in a reinforced causal environment, which can bridge the various links of self-rationalization explanation model generation, prediction, attribution, and reinforcement, quantify model learning deviations, and thus effectively alleviate the degradation accumulation problem existing in existing methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 An overall architecture diagram of a self-rationalization interpretation method guided by enhanced causal signals provided by an embodiment of the present invention;

[0081] Figure 2 Data samples used in the present invention;

[0082] Figure 3 A structural diagram of a collaborative optimization generator and a predictor of the present invention;

[0083] Figure 4 The explanation attribution structure diagram of the present invention;

[0084] Figure 5 A modeling diagram for the reinforcement learning process of the present invention;

[0085] Figure 6 A schematic diagram of the structure of a self-rationalization interpretation device for strengthening causal signal guidance provided by an embodiment of the present invention;

[0086] Figure 7 A schematic diagram of the overall structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0087] In order to gain a deeper understanding of the present invention, we will provide a comprehensive and detailed description of the present invention. However, the present invention has multiple implementations and is not limited to the specific examples listed herein. The presentation of these examples is intended to deepen the comprehensive understanding of the disclosure of the present invention.

[0088] Example 1

[0089] Figure 1 The overall architecture diagram of a self-rationalization interpretation method guided by enhanced causal signals provided by an embodiment of the present invention mainly includes a generator module, a predictor module, a causal attribution module, a reinforcement learning module, and a signal generation module. The input information is passed through the generator module to obtain the original interpretation information Z, and then the interpretation information Z is transmitted to the signal generation module in combination with the causal attribution module and the reinforcement learning module, and then the signal generation module corrects the original interpretation information by signal guidance. The degraded content in the The explanation information that will be corrected at the end Transmitted to the predictor module for prediction of label Y, the final model is based on the corrected explanation information Explain the predicted behavior of label Y. The specific contents of each module are as follows:

[0090] The generator module encodes the input information of the model and generates explanatory information for predicting labels in combination with probability distribution. The predictor module predicts labels based on the explanatory information given by the generator, which is mainly composed of gated recurrent units and linear layer networks.

[0091] The causal attribution module aims to quantify and attribute the causal effect of the explanation information based on the input information. Specifically, the causal interference factor do(·) is first introduced in the model training to quantify the inherent causal effect in the explanation training process, and then the difference between two consecutive update states of the generator and the predictor is quantified.

[0092] The reinforcement learning module models the collaborative game between the generator and the predictor as a Markov decision process, and uses the Markov decision process to refine their learning biases.

[0093] Finally, the signal generation module constructs guidance signals through pre-training embedding technology in this enhanced causal environment to guide the next training actions of the generator and predictor in the model.

[0094] Example 2

[0095] Figure 2 This is a sample example of the aspect-level sentiment classification dataset BeerAdvocate, which is constructed from the corpus of a beer rating website. The sample comes from a real case. Given the "appearance" aspect and a piece of beer review text, the model is required to be able to give a predicted label while also giving a textual explanation of the appearance aspect. At the same time, the fidelity of the model needs to be guaranteed, that is, the predicted label given by the model is the final prediction made entirely based on the selected appearance aspect text. Figure 3 Diagram of the structure of the co-optimization generator and predictor.

[0096] A self-rationalization explanation method guided by the reinforced causal signal based on the above device comprises the following steps:

[0097] Step 1: Encode the model’s input information through the generator module and generate explanation information for predicting labels based on the probability distribution;

[0098] Step 2: Based on the explanation information given by the generator module, the predictor module is used to make label predictions;

[0099] Step 3: attribute and quantify the causal effect of the explanatory information based on the input information of the model;

[0100] Step 4: Use the reinforcement learning module to model the collaborative game between the generator and the predictor as a Markov decision process, and refine the learning bias of the information in the collaborative game process;

[0101] Step 5: Provide a good guidance signal for the game optimization direction of the generator and predictor through the signal generation module combined with pre-training technology.

[0102] Furthermore, the specific operation of step 1 is: through the generator f G (·) Encode the input information X and generate the explanation information Z for predicting the label by combining the probability distribution; Considering the text classification problem, the generator and predictor are denoted as f G (·) and f P (·); will contain tokenx i The input text is recorded as X = [x1, x2, ..., x l ](1≤i≤l), where l is the number of tokens in the text sequence; the label of X is a one-hot encoded vector Y∈{0,1} c , where c is the number of category labels;

[0103] Generator f G (·) First, the input information X is encoded using a gated recurrent unit (GRU); then, the binary mask matrix M = [m1, m2, ..., m l ]∈{0,1}, select the fragment with the richest information from X; based on the binary mask matrix M, the explanation information Z is obtained as follows:

[0104] Z=M⊙X=[m1x1,m2x2,...,m l x l ]

[0105] Among them, the amount of information in Z is lost by negative information entropy Take measurement.

[0106] Further, the specific operations of step 2 are:

[0107] Based on the generator f G (·) gives the explanation information, using the predictor f P (·) Perform label prediction, where Z = f G (X), the specific formula is as follows:

[0108]

[0109] Among them, θ G represents the parameters of the generator; θ Prepresents the parameters of the predictor; st represents satisfying a certain condition, which here means optimizing the parameters of the generator and predictor so that the model satisfies

[0110] Z is constrained by the regularization terms of sparsity and coherence, and the specific formula is as follows:

[0111]

[0112] Where Ω(M) represents the constraints of the binary mask matrix M, which includes two constraints: sparsity constraint and coherence constraint. λ1 represents the hyperparameter of the sparsity constraint; λ2 represents the hyperparameter of the coherence constraint. m t Represents the tth token in M.

[0113] Further, the specific operations of step 3 are:

[0114] Explanation attribution process: Based on the input information X of the model, the explanation information Z is selected from a sequence containing l tokens. The specific formula is as follows:

[0115]

[0116] in, represents the Kth explanation information predicted by the model, represents the target prediction of the model, K is the number of selected explanation information; A(·) aims to measure the impact of each candidate explanation on the target prediction.

[0117] Causal Quantification Process: Introduce the causal interference factor do(·), including do(Z=Z K )and Therefore, the above explanation is attributed to to Z K The process is formalized into the following formula:

[0118]

[0119] Where I(·) represents the calculation of mutual information.

[0120] Further, the specific operations of step 4 are:

[0121] The reinforcement learning module is used to model the collaborative game between the generator and the predictor as a Markov decision process, and the learning bias of the information in the collaborative game process is refined and explained.

[0122] Step 3 gives the to Z KThe process of training explanation information, but it may generate degraded explanation information at the i-th step (0<i<K). Therefore, in order to refine the training deviation at each step, Z i to Z i+1 The difference between them needs to be further quantified, and the specific formula is as follows:

[0123]

[0124] So we can get Z i to Z i+1 The causal effect between

[0125]

[0126] Further deduction, the above formula is converted into a probability distribution expression as follows:

[0127]

[0128] in, represents conditional entropy; the probability distribution in the above formula can be explained based on the previous Z i Quantized Z i+1 The degree of influence on the predicted label;

[0129] Due to the cooperative game optimization mechanism between the generator and the predictor, its training process is modeled as a Markov decision process M = {S, A, P, R}, where S = {s i} represents the set of states that optimize the explanation process during training, and A = {a i} represents a set of actions; in particular, P = P(s i+1 |s i ,a i+1 ) represents the state transition probability, which specifies how to take action a i+1 From the previous state i Update state to state s i+1 ; R = R (s i ,a i+1 ) is used to quantify the previous state s i Take action a i+1 The reward obtained after the above cooperative game training is described as a sequence process (s0, a1, r1, s1, ..., a K ,r K ,s K ), where state s i By the ith update s i =Z i Represents; s0 = Z0 by generator f G (·) Initialize;

[0130] In order to reduce the learning bias of the training process, the above sequence process is reformulated as in Indicates that in the i-th update, from state s i arrive The conversion process;

[0131] According to the action conversion law of the above reinforcement process, given a state s i =Z i , then there is available action space: Then the search action space can be formalized as:

[0132]

[0133] in, Represents candidate actions in the action space; based on the action State transitions are represented as merges to Z i ,Right now,

[0134]

[0135] Based on this, action is generated Use reward function to alleviate the impact of model learning bias The formal representation is as follows:

[0136]

[0137] Further, the specific operations of step 5 are:

[0138] Step 5.1, pre-training signal; first, define a classifier f A To generate the guidance signal A,

[0139] f A →A

[0140] Then, use the input information X and label Y to perform supervised learning to pre-train the classifier f A , as follows:

[0141]

[0142] Among them, θ A Represents the classifier f A learnable parameters, and represents the optimal solution;

[0143] Step 5.2, theoretical analysis; assume that X, Z, Y and A are random variables in the training process of the rational explanation model, representing the variables of input information, explanation information, label and guidance signal respectively;

[0144] Lemma: Given X, Z, Y, There exists a guiding signal A that makes the predictor f P (·) achieve better predictions; that is, achieve a better prediction, instructing that a solution to signal A exists, and X is a solution to A;

[0145] Proof: Given random variables X, Z, Y, and A, where A is the probability distribution from X; according to the above formula, in order to get a good predictor, we need

[0146]

[0147] Where Z = f G (X); that is, we need to minimize H(Y,Z) to reduce the uncertainty of pointing to label Y; assuming that there is a variable A that can reduce the uncertainty of learning Y, that is,

[0148] H(Y,A)≤H(Y,Z)

[0149] According to the mutual information formula, we get:

[0150] H(Y)-H(Y,A)≥H(Y)-H(Y,Z)

[0151] Therefore, I(Y,A)≥I(Y,Z);

[0152] Since X = {Z, X\Z}, where X\Z represents explanatory information from X that is irrelevant to the prediction, we get:

[0153] I(Y;X)=I(Y;{Z,X\Z})=I(Y;Z)+I(Y;X\Z|Z)

[0154] According to the non-negativity of mutual information, we can obtain I(Y;X\Z|Z)≥0, so I(Y;X)≥I(Y;Z);

[0155] Further, assume that I(Y,X)=σ0≥σ1≥I(Y,Z)≥σ2, where σ1 and σ2 represent the upper and lower bounds of I(Y,Z), respectively; therefore, it can be deduced that when A=X, the equation I(Y,A)=σ0≥σ1≥I(Y,Z)≥σ2 holds; that is, a solution to the guidance signal A exists, and X is a solution to A.

[0156] Table 1 Comparison results between the key technologies proposed in this invention and the most advanced technologies

[0157]

[0158] The degree of model degradation is further reflected in the quality of the explanatory information provided by the model. In order to further verify the advancement and effectiveness of the technology proposed in the present invention, the present invention compares the proposed technology with the most advanced rationalized explanatory model on the three sub-datasets of appearance, smell, and taste of the public benchmark data (beer review classification) to observe the performance of providing explanatory information. Each subset of aspects is trained separately, and the sparse rate of the explanatory information is taken as 20% for the experiment. The specific comparison results are shown in Table 1.

[0159] It can be seen from the comparison results in Table 1 that the technical solution of the present invention can achieve the best interpretation result when performing rational interpretation compared with the most advanced technology currently.

[0160] Furthermore, in order to verify the robustness of the proposed key technology, the present invention conducted comparative experiments with the four most advanced models at different sparsity rates. The specific results are shown in Table 2:

[0161] Table 2 Comparison results of the key technology proposed in this invention and the four most advanced technologies at different sparsity rates

[0162]

[0163] From the comparison results in Table 2, it can be seen that the present invention also achieves the best results under different sparsity rates (10%, 20% and 30%). This further demonstrates the good robustness of the key technology proposed by the present invention, and further reflects the effectiveness of the present invention in improving the model degradation problem compared with the previous technology.

[0164] Example 3

[0165] Figure 6 A schematic diagram of the structure of a self-rationalization interpretation device for strengthening causal signal guidance provided by an embodiment of the present invention. Figure 6 As shown, the self-rationalization explanation device includes: mainly including a generator module, a predictor module, a causal attribution module, a reinforcement learning module, and a signal generation module. Among them:

[0166] The generator module encodes the input information of the model and generates explanatory information for predicting labels in combination with probability distribution. The predictor module predicts labels based on the explanatory information given by the generator, which is mainly composed of gated recurrent units and linear layer networks.

[0167] The causal attribution module aims to quantify and attribute the causal effect of the explanation information based on the input information. The causal interference factor do(·) is introduced in the model training to quantify the inherent causal effect in the explanation training process, and then the difference between two consecutive update states of the generator and the predictor is quantified.

[0168] The reinforcement learning module models the collaborative game between the generator and the predictor as a Markov decision process, and uses the Markov decision process to refine their learning biases.

[0169] Finally, the signal generation module constructs guidance signals through pre-training embedding technology in this enhanced causal environment to guide the next training actions of the generator and predictor in the model.

[0170] An embodiment of the present invention provides a self-rationalization interpretation device guided by enhanced causal signals, which specifically executes the above-mentioned embodiment process of a self-rationalization interpretation method guided by enhanced causal signals. For details, please refer to the contents of the above-mentioned embodiment of a self-rationalization interpretation method guided by enhanced causal signals, which will not be repeated here.

[0171] This embodiment provides an electronic device, Figure 7 The overall structural diagram of the electronic device provided by the embodiment of the present invention includes: a processor, a memory, a communication bus and a communication interface; wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the methods provided by the above-mentioned method embodiments, for example, including: encoding the input information of the model through the generator module, and generating explanatory information for predicting labels in combination with probability distribution; based on the explanatory information given by the generator, using the predictor module to predict labels; attributing and quantifying the causal effect of the explanatory information according to the input information of the model; using the reinforcement learning module to model the process of the collaborative game between the generator and the predictor as a Markov decision process, and refining the learning deviation of the explanatory information in the collaborative game process; using the signal generation module combined with the pre-training technology to provide a good guidance signal for the optimization direction of the game between the generator and the predictor.

[0172] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device 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) and other media that can store program codes.

[0173] The present embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the methods provided by the above-mentioned method embodiments, for example, including: encoding the input information of the model through a generator module, and generating explanatory information for predicting labels in combination with probability distribution; using a predictor module to perform label prediction based on the explanatory information provided by the generator; attributing and quantifying the causal effects of the explanatory information according to the input information of the model; using a reinforcement learning module to model the process of collaborative game between the generator and the predictor as a Markov decision process, and refining the learning bias of the explanatory information in the collaborative game process; using a signal generation module in combination with pre-training technology to provide a good guidance signal for the game optimization direction of the generator and the predictor.

[0174] The contents not described in detail in the specification of the present invention belong to the prior art known to the professional and technical personnel in the field. Although the illustrative specific embodiments of the present invention are described above to facilitate the understanding of the present invention by the technical personnel in the field, it should be clear that the present invention is not limited to the scope of the specific embodiments. For the ordinary technical personnel in the field, as long as various changes are within the spirit and scope of the present invention defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.

Claims

1. A self-rationalization explanation device for strengthening causal signal guidance, characterized in that: It includes generator module, predictor module, causal attribution module, reinforcement learning module and signal generation module; The generator module is used to encode the input information of the model and generate explanation information for predicting labels in combination with probability distribution; The predictor module performs label prediction based on the explanation information given by the generator module; The causal attribution module is used to attribute and quantify the causal effect of the explanation information based on the input information; The reinforcement learning module is used to model the collaborative game between the generator module and the predictor module as a Markov decision process, and to explain the learning deviation in the information training process in detail; The signal generation module is used to provide a good guiding signal for the game optimization direction of the generator and the predictor in combination with the pre-training technology.

2. A self-rationalization interpretation method guided by enhanced causal signals based on the device of claim 1, characterized in that: The following steps are involved: Step 1: Encode the model’s input information through the generator module and generate explanation information for predicting labels based on the probability distribution; Step 2: Based on the explanation information given by the generator module, the predictor module is used to make label predictions; Step 3: attribute and quantify the causal effect of the explanatory information based on the input information of the model; Step 4: Use the reinforcement learning module to model the collaborative game between the generator and the predictor as a Markov decision process, and refine the learning bias of the information in the collaborative game process; Step 5: Provide a good guidance signal for the game optimization direction of the generator and predictor through the signal generation module combined with pre-training technology.

3. The self-rationalization explanation method guided by enhanced causal signals according to claim 2 is characterized by: The specific operation of step 1 is: through the generator f G (·) Encode the input information X and generate the explanation information Z for predicting the label by combining the probability distribution; Considering the text classification problem, the generator and predictor are denoted as f G (·) and f P (·); will contain token x i The input text is recorded as X = [x1, x2, ..., x l ](1≤i≤l), where l is the number of tokens in the text sequence; the label of X is a one-hot encoded vector Y∈{0,1} c , where c is the number of category labels; Generator f G (·) First, use GRU to encode the input information X; Then, through the binary mask matrix M = [m1,m2,...,m l ]∈{0,1}, select the fragment with the richest information from X; based on the binary mask matrix M, the explanation information Z is obtained as follows: Z=M⊙X=[m1x1,m2x2,...,m l x l ] Among them, the information amount of Z is lost by negative information entropy Take measurement.

4. The self-rationalization explanation method guided by enhanced causal signals according to claim 2 is characterized by: The specific operations of step 2 are: Based on the generator f G (·) gives the explanation information, using the predictor f P (·) Perform label prediction, where Z = f G (X), the specific formula is as follows: Among them, θ G represents the parameters of the generator; θ P represents the parameters of the predictor; st represents satisfying a certain condition, which here means optimizing the parameters of the generator and predictor so that the model satisfies Z is constrained by the regularization terms of sparsity and coherence, and the specific formula is as follows: Where Ω(M) represents the constraints of the binary mask matrix M, which includes two constraints: sparsity constraint and coherence constraint; λ1 represents the hyperparameter of the sparsity constraint; λ2 represents the hyperparameter of the coherence constraint; m t Represents the tth token in M.

5. The self-rationalization explanation method guided by enhanced causal signals according to claim 2 is characterized by: The specific operations of step 3 are: Explanation attribution process: Based on the input information X of the model, the explanation information Z is selected from a sequence containing l tokens. The specific formula is as follows: in, represents the Kth explanation information predicted by the model, represents the target prediction of the model, K is the number of selected explanation information; A(·) aims to measure the impact of each candidate explanation on the target prediction; Causal Quantification Process: Introduce the causal interference factor do(·), including do(Z=Z K )and Therefore, the above explanation is attributed to to Z K The process is formalized into the following formula: Where I(·) represents the calculation of mutual information.

6. The self-rationalization explanation method guided by enhanced causal signals according to claim 2 is characterized by: The specific operations of step 4 are: In order to refine the training deviation at each step, Z i to Z i+1 The difference between them needs to be further quantified, and the specific formula is as follows: Get Z i to Z i+1 The causal effect between Converted into probability distribution: in, represents conditional entropy; the probability distribution of the above formula can be explained based on the previous one Z i Quantized Z i+1 The degree of influence on the predicted label; Due to the cooperative game optimization mechanism between the generator and the predictor, its training process is modeled as a Markov decision process M = {S, A, P, R}, where S = {s i } represents the set of states that optimize the explanation process during training, and A = {a i } represents a set of actions; in particular, P = P(s i+1 |s i ,a i+1 ) represents the state transition probability, which specifies how to take action a i+1 From the previous state i Update state to state s i+1 ; R = R (s i ,a i+1 ) is used to quantify the previous state s i Take action a i+1 The reward obtained after the game is completed; the training of the above cooperative game is described as a sequence process (s0, a1, r1, s1, ..., a K ,r K ,s K ), where state s i By the ith update s i =Z i Represents; s0 = Z0 by generator f G (·) Initialize; In order to reduce the learning bias of the training process, the above sequence process is reformulated as in Indicates that in the i-th update, from state s i arrive The conversion process; Given a state s i =Z i , then there is available action space: Then the search action space can be formalized as: in, Represents candidate actions in the action space; based on the action State transitions are represented as merges to Z i ,Right now, Based on this, action is generated Use reward function to alleviate the impact of model learning bias The formal representation is as follows:

7. The self-rationalization explanation method guided by enhanced causal signals according to claim 2 is characterized by: The specific operations of step 5 are: Step 5.1, pre-training signal; first, define a classifier f A To generate the guidance signal A, f A →A Then, use the input information X and label Y to perform supervised learning to pre-train the classifier f A , as follows: Among them, θ A Represents the classifier f A learnable parameters, and represents the optimal solution; Step 5.2, theoretical analysis; assume that X, Z, Y and A are random variables in the training process of the rational explanation model, representing the variables of input information, explanation information, label and guidance signal respectively; Lemma: Given X, Z, Y, There exists a guiding signal A that makes the predictor f P (·) achieve better predictions; that is, achieve a better prediction, instructing that a solution to signal A exists, and X is a solution to A; Proof: Given random variables X, Z, Y, and A, where A is the probability distribution from X; according to the above formula, in order to get a good predictor, we need Where Z = f G (X); that is, we need to minimize H(Y,Z) to reduce the uncertainty of pointing to label Y; assuming that there is a variable A that can reduce the uncertainty of learning Y, that is, H(Y,A)≤H(Y,Z) According to the mutual information formula, we get: H(Y)-H(Y,A)≥H(Y)-H(Y,Z) Therefore, I(Y,A)≥I(Y,Z); Since X = {Z, X\Z}, where X\Z represents explanatory information from X that is irrelevant to the prediction, we get: I(Y;X)=I(Y;{Z,X\Z})=I(Y;Z)+I(Y;X\Z|Z) According to the non-negativity of mutual information, we can obtain I(Y;X\Z|Z)≥0, so I(Y;X)≥I(Y;Z); Further, assume that I(Y,X)=σ0≥σ1≥I(Y,Z)≥σ2, where σ1 and σ2 represent the upper and lower bounds of I(Y,Z), respectively; therefore, it can be deduced that when A=X, the equation I(Y,A)=σ0≥σ1≥I(Y,Z)≥σ2 holds; that is, a solution of the guidance signal A exists, and X is a solution of A; the lemma is proved.

8. 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 a self-rationalization interpretation method guided by enhanced causal signals are implemented as described in any one of claims 2 to 7.

9. 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 a self-rationalization interpretation method guided by enhanced causal signals are implemented as described in any one of claims 2 to 7.

Citation Information

Cited By

  • Inplanatable node classification prediction method based on adversarial causal graph learning

    CN120524163A