A globally optimal causal explanation method and system for deep knowledge tracing
By constructing a causal attribution measurement framework and reinforcement learning algorithm, the global optimal interpretable subsequence of the deep knowledge tracking model is generated, which solves the problem of poor interpretability of existing models and achieves the improvement of causal explanation and learning strategy support.
Patent Information
- Application Number
- CN202311231385.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-09-21
AI Technical Summary
The existing deep learning knowledge tracking model cannot understand the model decision mechanism and is difficult to make in-depth attribution in the case of learners and teachers, and the existing interpretation methods cannot effectively explore the causal relationship between input and output, resulting in poor interpretability and difficulty in generating globally optimal interpretable results.
A causal attribution measurement framework is constructed, and the causal relationship between the input sequence and the output of the knowledge tracking model is determined through reinforcement learning algorithms. The strategy network is used to generate action distribution probability for sampling decisions. The reward mechanism and backpropagation are used to update the gradient training policy network to generate the globally optimal interpretable subsequence.
It realizes the global optimal interpretability of the deep knowledge tracking model, can analyze students' cognitive modeling process from the perspective of causal relationship, provides better learning strategy support and resource recommendations, and improves the interpretability and readability of the model.
Smart Images

Figure CN117236445B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of knowledge tracing, and more specifically, relates to a globally optimal causal explanation method and system for deep knowledge tracing. Background Art
[0002] Knowledge tracing (KT) aims to assess learners' knowledge and understanding during the learning process and to tailor learning plans based on their responses. It can be used in online education, personalized learning, adaptive learning, and other fields. In recent years, with the rapid development of deep learning technology, deep learning-based knowledge tracing (DLKT) has been widely used. However, it is deeply affected by the black-box nature of deep learning. Learners and teachers cannot understand the decision-making mechanisms behind the model, making it difficult to make in-depth attributions about the learning process. This hinders students' learning efficiency and the development of effective feedback and personalized guidance for teachers. Therefore, there is an urgent need to interpret DLKT models. However, most current work on interpreting DLKT models is based on gradients or attention scores. These interpretation methods cannot be applied to other DLKT models, and the causal relationship between model inputs and outputs has not been explored, which may lead to spurious correlations. Some other causal interpretability methods evaluate the contribution of input features through perturbation or greedy strategies, but these methods cannot fully consider the interaction effects between features, which are particularly evident in the field of knowledge tracking. At the same time, these interpretability methods calculate the contribution of each feature and then subjectively select a number of features with larger contributions as explanations for the prediction results, making it difficult to obtain a globally optimal interpretable result. Summary of the Invention
[0003] In response to the shortcomings of the existing technology, the purpose of the present invention is to provide a globally optimal causal explanation method and system for deep knowledge tracing, aiming to solve the problem that the existing knowledge tracing model has poor interpretability and is difficult to further analyze students' cognitive modeling process.
[0004] To achieve the above objectives, in a first aspect, the present invention provides a globally optimal causal explanation method for deep knowledge tracing, comprising:
[0005] Construct a causal attribution measurement framework to determine the causal relationship between the input sequence of the knowledge tracking model and the information of the question to be predicted, and explain the output results of the knowledge tracking model; the input sequence includes multiple historical question-answer interaction pairs;
[0006] Sequentially traverse each question-answering interaction pair and input it into the policy network to generate an action distribution probability for sampling decision-making, and add the question-answering interaction pairs retained by the decision indication to a candidate explanation subsequence; the candidate explanation subsequence includes at least one question-answering interaction pair in the input sequence; the action distribution probability is used to represent the importance of the question-answering interaction pair relative to the predicted question;
[0007] The reward value of each answer interaction pair is determined based on the corresponding causal effect value before and after each answer interaction pair is added to the candidate explanation subsequence. The discounted return of the candidate explanation subsequence is then determined based on the reward of each answer interaction pair in the candidate explanation subsequence. The causal effect value reflects the contribution of the candidate explanation subsequence to the output of the knowledge tracking module.
[0008] The reward value and the discounted return are removed from their absolute values, and then the corresponding policy network is back-propagated to update the gradient to train the policy network, so that the policy network sequentially traverses all the question-answering interaction pairs in the input sequence and then updates the candidate explanation subsequences, and the final candidate explanation subsequence is used as the explanation subsequence of the output result.
[0009] In an optional example, the causal attribution measurement framework is used to determine the causal effect value corresponding to each candidate explanation subsequence; the causal effect value is determined by the following steps:
[0010] Inputting the input sequence into the knowledge tracking model to obtain a first prediction output result of the knowledge tracking model for the prediction question; the prediction output result is used to indicate the probability of the prediction question being answered correctly or incorrectly;
[0011] The candidate explanation subsequence is deleted from the input sequence and then input into the knowledge tracking model to obtain the second prediction output result of the knowledge tracking model for the prediction question;
[0012] The causal effect value of the candidate explanation subsequence is determined based on the two prediction output results.
[0013] In an optional example, the policy network determines the action distribution probability of each question-answering interaction pair through the following steps:
[0014] Receive historically traversed question-answer interaction pairs and their corresponding decision actions; the action refers to whether to add the question-answer interaction pair to the candidate explanation subsequence;
[0015] The historical answer interaction pairs and their corresponding action information are fused, and then a long short-term memory network is used to represent the current state based on the fused information to determine the action of the next answer interaction pair;
[0016] The action representation of the next question-answering interaction pair, the state representation at the current moment, and the representation of the question to be predicted are integrated to obtain the action distribution probability of the next question-answering interaction pair; the action representation of the next question-answering interaction pair is the representation of the next question-answering interaction pair.
[0017] In an optional example, the question-answering interaction pair is input into the policy network to generate an action probability, and then the action is sampled and executed, and a reward value for the action is calculated. The reward value is the causal effect value of the candidate explanation subsequence obtained by executing the action at the current moment minus the causal effect value of the candidate explanation subsequence at the previous moment;
[0018] The reward value of each action at each moment is accumulated through the discount factor to obtain the discounted return after the strategy network traverses the entire question-answering interaction pair and makes a decision.
[0019] In an optional example, the reward value R(s t-1 , a t )for:
[0020] R(s t-1 , a t )=ICE(E t )-ICE(E t-1 )
[0021] Among them, E t and E t-1 They refer to the candidate explanation subsequences corresponding to step t and step t-1, ICE() represents the corresponding causal effect value, and step t corresponds to the answer question interaction pair x t Make action decisions, step t-1 corresponds to the interactive pair x t-1 Make action decisions; a t Represents the interactive pair x t Action, s t-1 Indicates the state at time t-1;
[0022] The discounted return U(s t-1 , a t )for:
[0023]
[0024] Here, γ is the discount factor and T represents the total number of steps.
[0025] In an optional example, the causal attribution metric framework constructs an explanation subsequence of the output result by maximizing the attribution metric function Specifically:
[0026]
[0027]
[0028] Among them, A(E k |y t , f θ ) is the attribution metric function used to measure each candidate explanation subsequence E k For the output result y t Contribution of θ represents the parameters of the knowledge tracking model to be explained; ICE(E k ) is a subsequence E k The causal effect value; do(·) is the intervention operation, do(E k ) means to delete the input sequence E k The subsequent sequence is input into the knowledge tracking model; Indicates that the input sequence is input into the knowledge tracking model, Y(do(E k )) refers to deleting E in the input sequence k The output of the post-knowledge tracking model, It is the model output result obtained without any intervention on the input sequence; E represents the original input sequence.
[0029] In an optional example, the absolute values of the reward value and the discounted return are removed, and then the corresponding policy network is back-propagated to update the gradient to maximize the discounted return, specifically:
[0030] The reward value is processed to remove the absolute value, and the corresponding two strategy networks are trained, one for maximizing the positive effect reward R + , and the other one is used to maximize the negative effect reward R - ,in:
[0031] R + (s t-1 , a t )=Y(do(E t ))-Y(do(E t-1 ))
[0032] R - (s t-1 , a t )=Y(do(E t-1 ))-Y(do(E t ))
[0033] Among them, Y(do(E t )) and Y(do(E t-1 ) refers to deleting E in the input sequence t and E t-1 Output of the post-knowledge tracing model;
[0034] The corresponding positive discounted return U+ (s t-1 , a t ) and negative discounted return U - (s t-1 , a t ) are:
[0035]
[0036]
[0037] The two objective functions that need to be optimized by the two policy networks are:
[0038]
[0039]
[0040] Based on the above two objective functions, the future maximized reward for each action with positive and negative effects is determined, and then the answer interaction pairs whose causal effect values exceed the threshold are found by completing the absolute values to construct the final explanation subsequence; the future maximized reward refers to maximizing the discounted return.
[0041] In an optional example, the action distribution probability P φ (a t )for:
[0042]
[0043]
[0044]
[0045] Among them, ReLU() represents the activation function, SOFTMAX represents the normalized exponential function, MLP1 and MLP2 represent different multi-layer perceptrons. represents all action candidates, φ represents all parameters in MLP1 and MLP2, represents the action representation of the next question-answering interaction pair, Represents the state representation of the current moment, represents the representation of the question to be predicted, Indicates splicing, and represent intermediate variables respectively.
[0046] In a second aspect, the present invention provides a globally optimal causal explanation system for deep knowledge tracing, comprising:
[0047] An attribution measurement framework determination unit is used to construct a causal attribution measurement framework to determine the causal relationship between the input sequence of the knowledge tracking model and the information of the question to be predicted, and to explain the output results of the knowledge tracking model; the input sequence includes multiple historical question-answer interaction pairs;
[0048] An explanation subsequence update unit is configured to sequentially traverse each question-answering interaction pair and input it into the policy network to generate an action distribution probability for sampling decision making, and to add the question-answering interaction pairs indicated as retained by the decision to a candidate explanation subsequence; the candidate explanation subsequence includes at least one question-answering interaction pair in the input sequence; the action distribution probability is used to represent the importance of the question-answering interaction pair relative to the predicted question;
[0049] A reward and return determination unit is configured to determine the reward value of each answer interaction pair based on the corresponding causal effect value before and after each answer interaction pair is added to the candidate explanation subsequence, and then determine the discounted return of the candidate explanation subsequence based on the reward of each answer interaction pair in the candidate explanation subsequence; the causal effect value reflects the contribution of the candidate explanation subsequence to the output of the knowledge tracking module;
[0050] The explanation subsequence output unit is used to remove the absolute value of the reward value and the discounted return, and then backpropagate the gradient of the corresponding policy network to train the policy network so that the policy network sequentially traverses all the question-answering interaction pairs in the input sequence and then updates the candidate explanation subsequence, and uses the final candidate explanation subsequence as the explanation subsequence of the output result.
[0051] In a third aspect, the present invention provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory, wherein when the programs stored in the memory are executed, the processor is used to execute the method described in the first aspect or any optional example of the first aspect.
[0052] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when the computer program runs on a processor, enables the processor to execute the method described in the first aspect or any optional example of the first aspect.
[0053] In a fifth aspect, the present invention provides a computer program product, which, when executed on a processor, enables the processor to execute the method described in the first aspect or any optional example of the first aspect.
[0054] In general, the above technical solutions conceived by the present invention have the following beneficial effects compared with the prior art:
[0055] This invention provides a globally optimal causal explanation method and system for deep knowledge tracing. Using reinforcement learning algorithms at the model input and output levels, the explainability problem can be transformed into a discrete search problem for optimal subsequences, solved by reinforcement algorithms. An attribution metric framework is designed from the perspective of causality to evaluate explainable subsequences. Furthermore, a policy network suitable for the knowledge tracing problem domain is designed. This policy network uses sequential traversal to obtain a globally optimal explainable result in one go. Furthermore, to address the non-smooth nature of the objective function, the invention optimizes the policy network using a dual optimization approach, thereby better guiding the agent in selecting subsequences. Experiments have demonstrated that the explanation method described in this invention achieves excellent results under multiple comparison methods and indicators. This explanation method not only enables attribution analysis of model predictions but also enables the exploration of potential educational laws through explainable results, as well as comparison and review between models. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a flow chart of a globally optimal causal explanation method for deep knowledge tracing provided by an embodiment of the present invention;
[0057] Figure 2 An architecture diagram of the RCKTE policy network provided by an embodiment of the present invention;
[0058] Figure 3 A schematic diagram of the sequential decision process for generating interpretable subsequences using the RCKTE algorithm provided in an embodiment of the present invention;
[0059] Figure 4 The embodiment of the present invention provides Figure 3 Schematic diagram of the decision-making process in a single step corresponding to step 3;
[0060] Figure 5 Schematic diagram of the convergence curves of RCKTE-S and RCKTE on the training set provided by an embodiment of the present invention;
[0061] Figure 6 This is a diagram of the architecture of a globally optimal causal explanation system for deep knowledge tracking provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0063] In response to the shortcomings of the existing technology, the purpose of the present invention is to provide a globally optimal causal explanation method and system for deep knowledge tracing, aiming to solve the problems of poor interpretability of existing knowledge tracing models and difficulty in further analyzing students' cognitive modeling process, thereby providing better learning strategy support and learning resource recommendations for knowledge tracing models.
[0064] The present invention provides a globally optimal causal explanation method and system for deep knowledge tracking, the method comprising: constructing a causal attribution measurement framework, starting from discovering the causal relationship between the model input and output, and for each explainable instance task, constructing the attribution of the input sequence from a causal perspective; inputting the interaction pairs to be screened, inputting the interaction pairs that need to be screened at present into the policy network, and then making a sampling decision to determine whether the interaction pairs need to be retained through the action distribution probability generated by the policy network; the policy network generates the action distribution probability, and the policy network generates the action distribution probability through the input interaction pairs to be screened and the state information of the previous moment, that is, whether to retain or not retain the currently input interaction pairs to be screened; generating the action distribution probability, inputting the state information representation into the policy network, and the policy network will generate the action distribution probability of whether to retain the interaction pairs according to the state information; sampling decision, and generating the action distribution probability through the policy network The action distribution probability is sampled and decided to obtain the final decision result, that is, whether to retain or not retain the interaction pair. If retained, it is added to the interpretable candidate subsequence; the final interpretable subsequence is generated and the reward is calculated. After completing a round of traversal decision, the final screened interpretable candidate subsequence is obtained as the final interpretable subsequence, and the reward of each decision and its corresponding discounted return are calculated and combined with the action distribution probability; policy gradient training is performed, and the policy network is back-propagated to update the gradient to better adjust and guide the decision of the policy network; the present invention combines the causal attribution framework and constructs an explanation method based on reinforcement learning. The explanation method defines the interpretable task of knowledge tracking as a process of sequentially traversing all input features and performing causal screening to obtain the final interpretable subsequence. It can well quantify the marginal contribution of each feature to the prediction, thereby obtaining a faithful and concise global optimal interpretable result.
[0065] Based on the defects of existing deep knowledge tracing interpretable methods such as sacrificing model performance, false correlation, low versatility and difficulty in generating a globally optimal interpretable result, the present invention proposes a DKLT model interpretation method based on post-interpretability, which mainly explores the causal relationship between model input and output, and proposes a measurement method for causal attribution of input unit importance, which can avoid the influence of false correlation and can realize the interpretation of various DLKT models. This interpretable method is a universal, model-independent interpretable method that can be applied to the interpretation of any DLKT model.
[0066] At the same time, the essence of the interpretation method described in the present invention is to find the optimal input subsequence, which is an NP hard problem. However, most of the methods for solving such problems are heuristic algorithms based on random or greedy strategies, which are difficult to achieve global optimality. The performance of some other methods, such as meta-heuristic algorithms, is highly dependent on the heuristic rules of learning. If the rules are not accurate enough or the training is not sufficient, the performance of the algorithm will be reduced. Reinforcement learning has the advantages of autonomous decision-making and learning capabilities, the ability to handle complex problem spaces, and dynamic and uncertain situations. Therefore, reinforcement learning is introduced in the present invention to solve the problem of optimal interpretable subsequence screening. At the same time, a special strategy network and reward mechanism are designed in the reinforcement learning algorithm to solve the problem of obvious interaction effects between features in the knowledge tracking task, and a globally optimal interpretable result is obtained. As far as we know, the present invention is the first to apply reinforcement learning to the post-interpretation method of deep knowledge tracking models to achieve efficient, accurate and faithful post-interpretation of DLKT models.
[0067] Figure 1 This is a flowchart of a globally optimal causal interpretation method for deep knowledge tracing provided by an embodiment of the present invention, which is named RKCTE and can define the screening process of interpretable subsequences as a Markov decision process, including the following steps:
[0068] S101, constructing a causal attribution measurement framework to determine the causal relationship between the input sequence of the knowledge tracking model and the information of the question to be predicted, and interpreting the output results of the knowledge tracking model; the input sequence includes multiple historical question-answer interaction pairs;
[0069] Specifically, a causal attribution measurement framework is constructed to determine the causal relationship between the input sequence of the knowledge tracking model and the information of the topic to be predicted, and to explain the output results of the model; it constructs an explanation subsequence of the output result by maximizing the attribution measurement function; the attribution measurement function is used to measure the contribution of each candidate explanation subsequence to the model output result, wherein the candidate explanation subsequence is generated from the input sequence.
[0070] It should be noted that the causal attribution metric framework only measures the quality of interpretable subsequences; its output is the causal effect value. This invention, through a subsequently designed reinforcement learning algorithm, uses the output causal effect value as part of the reinforcement learning algorithm's reward design to better guide the policy network to generate higher-quality interpretable results.
[0071] Specifically, the interpretable subsequence screening process can be briefly described as starting from the first interaction pair in the input sequence and exploring whether the current interaction pair needs to be added to the set of candidate subsequences to be intervened, until the entire input sequence is traversed to obtain the final candidate subsequence. Definition in is the set of states of abstract interaction pairs and their corresponding actions taken during exploration, is an action set that chooses to add or not add the interaction pair corresponding to the current step to the current candidate subsequence at each step. Under the Markov property, P(s t |s t-1 , a t ) is in the previous state s t-1 Execute a t The new state set s after the action t State transition. R(s t-1 , a t ) is in the state s from the previous state t-1 Start executing action a t Then the reward is quantized. Therefore, the trajectory (s0, a1, r1, s1, ..., a T , r T , s T ) naturally describes the screening process of candidate subsequences, where the step-by-step reward r T reflects a T The causal effect of and the joint effect with the candidate subsequences constituted by the previously added interaction pairs.
[0072] Specifically, the input sequence of the knowledge tracking model is the historical question-answering interaction pairs and the next question to be answered by the user, and the output result is the predicted probability of answering the next question correctly; the input sequence of the causal attribution measurement framework includes the explainable sub-column and the information of the question to be predicted, and the output is the causal effect value of the explainable sub-column for the predicted question.
[0073] From a causal perspective, we propose an attribution metric framework to discover the causal relationship between model input and output. First, for each interpretable instance task, we construct the attribution of the input sequence from a causal perspective. Formally, we can construct an explanation subsequence by maximizing the attribution metric A(·)
[0074]
[0075] Among them, A(E k |y t , f θ ) is used to measure each candidate explanation subsequence E k For the output result y t Contribution of θ represents the parameters of the knowledge tracking model to be explained; ICE(E k ) is a subsequence E k The causal effect value of , that is, universality. E represents the original input sequence.
[0076] Specifically, the indicator A measures the k Predict the target y t For causal interpretability, the metric A quantifies the contribution of E k The causal effects of . Changes in model predictions can be investigated by directly manipulating the values of the input sequence. This manipulation is an intervention in causal inference, built on the do(.) calculus. It severs all input variables and forces them to have a specific value that is no longer affected by their causal parents. Through intervention, the individual causal effect (ICE) is specified in the attribution function and is defined as follows:
[0077]
[0078] Specifically, the interaction of whether the input sequence is deleted or not is considered as a control variable and two interventions are performed: do(E k )and do(E k ) indicates that the original input sequence has been processed (that is, the deleted sequence is input into the knowledge tracking model) and the control (The original sequence that has not been deleted is input into the knowledge tracking model), where Y is the predictor variable, Y(do(E k )) means deleting E in the original sequence k The predicted value obtained by inputting it into the model is It is the model prediction value obtained without any intervention operation on the original sequence. ICE is the difference between the results under intervention and control. The larger the difference, the higher the S k For y t The greater the causal effect.
[0079] S102, sequentially traverse each question-answering interaction pair and input it into the policy network to generate an action distribution probability for sampling decision, and add the question-answering interaction pairs retained by the decision indication to the candidate explanation subsequence; the candidate explanation subsequence includes at least one question-answering interaction pair in the input sequence; the action distribution probability is used to represent the importance of the question-answering interaction pair relative to the predicted question.
[0080] Specifically, the interaction pairs to be screened are input, and the interaction pairs that need to be screened are input into the policy network. The action distribution probability generated by the policy network is then sampled and decided to determine whether the interaction pair needs to be retained. The policy network generates the action distribution probability. The policy network uses the input interaction pairs to be screened and the state information at the previous moment to generate the action distribution probability, that is, to retain or not retain the currently input interaction pairs to be screened.
[0081] Specifically, the policy network q φ The design of Figure 2Specifically, it constructs a set of historically explored interaction pairs {x1, x2, .., x t-1} and its corresponding action information {a1, a2, ..., a t-1} as input, aiming to determine the next action a t , that is, whether to candidate subsequence E t-1 Add interaction pair x t :
[0082]
[0083] Where φ represents the training parameters of the policy network, and the output a t Represents the interaction pair x corresponding to the t-th step t is added to the current candidate subsequence E t-1 The model design of the policy network mainly includes the following contents:
[0084] (1) Action representation: In the scenario of the present invention, the representation of candidate actions is relatively simple, that is, the interaction pair x to be added is t The feature representation is consistent with Note that the policy network will directly use the interaction pair representations from the previously trained DLKT model. And during the training process of the policy network, the parameters of the interaction pair representation layer are frozen, prohibiting it from learning and updating the parameters.
[0085] (2) State representation: After establishing the representation of candidate actions, the goal of the present invention is to select an action from the space and execute it. The policy network needs to determine the importance of the current action based on the previous state, that is, based on the information such as each previous interaction pair and whether it has been added to the candidate subsequence, combined with the predicted question information to be explained. Therefore, it is also necessary to learn the representation of the state. In order to fully model this sequence information in the decision-making process, the present invention uses a long short-term memory network (LSTM) to learn the representation of the state. First, it is necessary to fuse the interaction pair x t and decision result a t The specific fusion formula is as follows:
[0086]
[0087] Represents the splicing operation, characterizing the interaction pairs and zero vector 0 = (0, 0, 0, ..., 0) ∈ R 2d concatenate to obtain a combined input representation The final representation of the state is then learned through LSTM
[0088]
[0089] where θ s are the parameters of LSTM.
[0090] (3) Output action distribution probability: After establishing the representation of candidate actions and current state, the goal of this invention is to output the action distribution probability from the space and select an action to perform it. In order to determine which action is more important for the prediction result, it is necessary to further integrate the candidate action representation State representation and the predicted question representation to be explained To determine, the specific formula is as follows:
[0091]
[0092]
[0093]
[0094] Among them, ReLU() represents the ReLu function, (5d, 2d) represents the input dimension is 5d, the output dimension is 2d, and after the MLP fusion dimensionality reduction, all action candidates are Apply the SOFTMAX function to convert its importance score into a probability distribution, where φ contains all the parameters in MLP1 and MLP2.
[0095] Specifically, the sampling decision is made through the action distribution probability generated by the policy network to obtain the final decision result, that is, whether to retain or not retain the interaction pair. If retained, an explainable candidate subsequence is added.
[0096] S103, determine the reward value of each question-answering interaction pair based on the corresponding causal effect value before and after each question-answering interaction pair is added to the candidate explanation subsequence, and then determine the discounted return of the candidate explanation subsequence based on the reward of each question-answering interaction pair in the candidate explanation subsequence; the causal effect value reflects the contribution of the candidate explanation subsequence to the output result of the knowledge tracking module.
[0097] Specifically, the final interpretable subsequence is generated and the reward is calculated. After completing a round of traversal decision-making, the final screened interpretable candidate subsequence is obtained as the final interpretable subsequence. The reward of each decision and its corresponding discounted return are calculated and combined with the action distribution probability.
[0098] To measure the action a in step t t The quality of and guides further exploration, in the reward design by performing action a t Post-candidate subsequence E tThe corresponding ICE value is used to measure the quality of the action. If the retention or removal of the interaction pair makes a unique and positive contribution to the explanation, that is, it can not only serve as a credible causal determinant of target prediction, but also serve as an effective alliance with the previous s t-1 On the contrary, if the reward value of the action is close to zero or a negative reward is obtained, it means that the candidate subsequence formed by the current interaction pair and the previous interaction pair is redundant or cannot explain the target prediction. The specific calculation formula is as follows:
[0099] R(s t-1 , a t )=ICE(E t )-ICE(E t-1 )
[0100] In order to further consider the interaction effect between features, the reinforcement learning agent maximizes the possible future rewards in the process of screening candidate subsequences. After completing a round of screening of candidate subsequences, the trajectory (s0, a1, r1, s1, ..., a T , r T , s T ), through this trajectory, each action a can be calculated t The future cumulative reward u t , and its specific calculation formula is as follows:
[0101]
[0102] Wherein, γ is a discount factor. Since the target task of the present invention is not a long-term cumulative reward, the present invention sets the discount factor to a smaller value γ=0.995.
[0103] S104, remove the absolute values of the reward value and the discounted return, and then backpropagate the gradient of the corresponding policy network to train the policy network, so that the policy network sequentially traverses all the question-answering interaction pairs in the input sequence and then updates the candidate explanation subsequence, and uses the final candidate explanation subsequence as the explanation subsequence of the output result.
[0104] Specifically, policy gradient training backpropagates the policy network to update the gradient to better adjust and guide the decision of the policy network.
[0105] However, the stochastic gradient descent method cannot be used directly for optimization because discrete sampling within the policy network prevents gradients. To solve this problem, the present invention uses a policy gradient-based training framework, reinforcement learning REINFORCE, to optimize the policy network. According to the design of the reward, the objective function optimized by REINFORCE is a function with a non-smooth property with an absolute value. Due to the discontinuous nature of this function, the gradient is discontinuous or non-existent at a certain point, which will cause the variance of the gradient estimate to be large, and thus cause the algorithm to converge slowly and be unstable, which we have confirmed in experiments. Therefore, the present invention removes the absolute value of the reward function. The present invention will train two policy networks, one for maximizing the positive effect reward R + , and the other is used to maximize the negative effect reward R - , these two rewards can be rewritten as:
[0106] R + (s t-1 , a t )=Y(do(E t ))-Y(do(E t-1 ))
[0107] R - (s t-1 , a t )=Y(do(E t-1 ))-Y(do(E t ))
[0108] Therefore, the discounted return can be rewritten as:
[0109]
[0110]
[0111] Therefore, the two objective functions that need to be optimized in the present invention are as follows:
[0112]
[0113]
[0114] Under the REINFORCE framework, RCKTE can obtain the future maximized reward for each action with positive and negative effects, and then find interaction pairs with significant causal attribution in sequence by completing the absolute values to construct the final explanation subsequence.
[0115] The overall algorithm framework of RCKTE is shown in the figure below: Figure 3 and Figure 4 shown.
[0116] In order to verify the effectiveness of the method proposed in the present invention, six methods were selected as comparison methods. Table 1 shows the detailed description of these six methods, among which Gradient is a classical time-interpretable method based on gradient, and SV is an interpretable method based on game interaction theory. DeepSHAP is an interpretable method that combines gradient and interactive game theory, CXplain is an interpretation method that uses perturbation to evaluate the importance of features based on causal relationships, and RC-Explainer is a graph neural network interpreter based on reinforcement learning, which is introduced as the most advanced reinforcement learning interpretable method (since there is no concept of edges in knowledge tracking, the edge sequence screening is changed to the sequence screening of interaction pairs in the reproduction of this interpreter, and the other contents remain consistent with the original interpreter).
[0117] Table 1 Six selected comparison methods and their introduction
[0118]
[0119] At the same time, in order to comprehensively evaluate the interpreter described in this invention and other interpretable methods, each interpretable method is evaluated based on three indicators: unit ICE interpretation length, ICE value, and Log Odds.
[0120] First, the length of the explanation subsequence is an important indicator of interpreter readability. The shorter the explanation length, the better the readability. In order to eliminate the influence of sample bias on explanation length, the unit explanation length is introduced to measure interpreter readability.
[0121] Unit Explanation Length, which measures the final generated subsequence Length:
[0122]
[0123] Secondly, the ICE value of the generated explanation subsequence is measured. The higher the ICE value, the better the method is under this indicator.
[0124] ICE Value, the optimal subsequence generated by the evaluation algorithm ICE value:
[0125]
[0126] Finally, following the work of most previous authors, we introduce a universal metric, the log-odds, to evaluate the performance of all interpretability methods. The key idea is to measure the change in confidence in the classification model by calculating the log-odds difference between the original sequence and the generated optimal subsequence. The higher the log-odds, the better the interpretability method.
[0127] Log Odds, which measures the optimal subsequence generated The degree of change in model confidence relative to the original sequence:
[0128]
[0129] in, p E is the predicted output value of the model under the given input sequence E.
[0130] To ensure experimental fairness, we selected input sequences of length 20 and 30 for the experiment. For the explanation methods that require training, CXplain, RC-Explainer, and RCKTE, we stopped training after 1000 epochs and used them for subsequent testing and evaluation. At the same time, because the RC-Explainer method must specify a selection ratio for training, we selected the interpretable subsequences with the same selection ratio as RCKET as the final experimental results.
[0131] The specific comparison results are shown in Table 2 and Table 3:
[0132] Table 2 ICE value comparison experimental results
[0133]
[0134]
[0135] Table 3 Log Odds comparison test results
[0136]
[0137] We use the ICE and Log Odds metrics to evaluate the accuracy of various interpretability methods. Tables 2 and 3 report the experimental comparison results of ICE and Log Odds, respectively. We draw the following conclusions:
[0138] 1) Random, Gradient, and SV methods perform poorly under our ICE and Log Odds evaluation metrics, likely because they do not fully consider causal relationships. Our method, on the other hand, can better distinguish causal relationships from spurious correlations between input features and model outputs, thus encouraging causal rather than statistical interpretation.
[0139] 2) RCKTE outperforms RC-Explainer on both models and datasets, indicating that RCKTE's policy network is more suitable for our scenario. Furthermore, in the sequential decision-making process, whether for graphs or sequences, we do not care about the order of the objects being screened. Therefore, our designed policy network does not need to be restricted to achieving the termination condition by specifying the selection ratio. We can directly obtain a globally optimal and explainable result through sequential screening.
[0140] 3) From Tables 2 and 3, we can conclude that the RCKTE of the policy network optimized by maximizing future cumulative rewards with discounted returns is higher than the final ICE value and Log Odds value obtained by greedily maximizing the reward at each step. This indicates that in our scenario, the combination of optimal interaction pairs obtained at each step cannot form an optimal interpretable subsequence, so maximizing future cumulative rewards is a better approach.
[0141] Table 4 Comparative experimental results of Unit Explanation Length
[0142]
[0143] The present invention evaluates the readability of each interpretable method by the Unit Explanation Length indicator. Table 4 shows the experimental comparison results of Unit Explanation Length. It can be seen from the figure that the RCKTE method we proposed achieved the best results in most cases, that is, the generated interpretable results are more readable, and RCKTE did not explicitly introduce relevant designs in the implementation process of the policy network and rewards to improve the readability of the interpretable results. This may be related to RCKTE maximizing future rewards. By maximizing future rewards, it can fully distinguish and select more streamlined and faithful interpretable sub-columns. In addition, it is worth noting that although Gradient's ICE value is far inferior to RCKTE in most cases, its Unit Explanation Length is very short, and even in some settings it performs better than RCKTE. We speculate that the Gradient method may only focus on interaction pairs that have relevant knowledge points or consistent results with the predicted questions in most cases, so the sequences it focuses on may be shorter.
[0144] Table 5 ICE value ablation experiment results
[0145]
[0146] At the same time, in order to explore the effectiveness of each innovative component of RCKTE, we conducted three sets of ablation experiments on the three proposed innovative designs. RCKTE-G is an interpreter that maximizes rewards based on the greedy principle, RCKTE-S is an interpreter that optimizes the policy network using a single optimizer, and RCKTE-M is an interpreter that uses a simple MLP as the policy network. The experimental results of the ICE value are shown in Table 5. The convergence curves of the discounted returns obtained by training with a single optimizer and a dual optimizer are shown in Figure 5 As shown, Figure 5 The convergence curves of RCKTE-S and RCKTE on the training set (where single, positive, and negative are the maximized absolute value effect, positive effect, and negative effect, respectively. EdNet-DKT-30 represents the setting parameters, that is, the dataset is EdNet, the model is DKT, and the input sequence length is 30.
[0147] Combine Figure 5 The following conclusions can be drawn:
[0148] (1) Regardless of the model and dataset, RCKTE exhibits relatively high ICE values in most cases. This indicates that the comprehensive design of RCKTE has certain advantages and achieves better performance in various situations.
[0149] (2) The RCKTE-G interpreter using the greedy principle performs close to the RCKTE interpreter in most cases, but its performance is significantly worse than that of RCKTE in the setting of the SAKT model EdNet dataset. This may indicate that in this experimental setting, the original prediction model focuses on the interaction effect between features, and the greedy interpreter cannot solve this problem well.
[0150] (3) The RCKTE-S interpreter using a single optimizer is very likely to fall into a local optimal state in the early and late stages of training, while the RCKTE interpreter using a dual optimizer does not experience this situation. This shows that the dual optimization we proposed solves the local optimal problem to a certain extent.
[0151] (4) The performance of the RCKTE-M interpreter constructed with a simple MLP network is not as good as the RCKTE interpreter, which shows that the strategy network we designed is effective to a certain extent and can improve the performance of the interpreter.
[0152] Figure 6 The architecture diagram of the globally optimal causal explanation system for deep knowledge tracing provided by an embodiment of the present invention includes:
[0153] An attribution measurement framework determination unit 610 is configured to construct a causal attribution measurement framework to determine the causal relationship between the input sequence of the knowledge tracking model and the information of the question to be predicted, and to interpret the output of the knowledge tracking model; the input sequence includes multiple historical question-answer interaction pairs;
[0154] The explanation subsequence updating unit 620 is configured to sequentially traverse each question-answering interaction pair and input it into the policy network to generate an action distribution probability for sampling decision making, and to add the question-answering interaction pairs indicated as retained by the decision to a candidate explanation subsequence; the candidate explanation subsequence includes at least one question-answering interaction pair in the input sequence; the action distribution probability is used to represent the importance of the question-answering interaction pair relative to the predicted question;
[0155] The reward and return determination unit 630 is configured to determine the reward value for each answering interaction pair based on the corresponding causal effect value before and after each answering interaction pair is added to the candidate explanation subsequence, and then determine the discounted return of the candidate explanation subsequence based on the reward of each answering interaction pair in the candidate explanation subsequence; the causal effect value reflects the contribution of the candidate explanation subsequence to the output of the knowledge tracking module;
[0156] The explanation subsequence output unit 640 is used to remove the absolute values of the reward value and the discounted return, and then backpropagate the corresponding policy network to update the gradient to train the policy network, so that the policy network sequentially traverses all the question-answering interaction pairs in the input sequence and then updates the candidate explanation subsequences, and uses the final candidate explanation subsequence as the explanation subsequence of the output result.
[0157] It should be understood that the above-mentioned system is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program unit in the system are similar to those described in the above-mentioned method. The working process of the system can refer to the corresponding process in the above-mentioned method and will not be repeated here.
[0158] Based on the methods described in the above embodiments, embodiments of the present invention provide an electronic device. The device may include at least one memory for storing programs and at least one processor for executing the programs stored in the memory. When the programs stored in the memory are executed, the processor is configured to execute the methods described in the above embodiments.
[0159] Based on the method in the above embodiment, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.
[0160] Based on the method in the above embodiment, an embodiment of the present invention provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0161] It is understood that the processor in the embodiments of the present invention may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0162] The method steps in the embodiments of the present invention can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC.
[0163] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0164] It should be understood that the various numerical numbers involved in the embodiments of the present invention are only used for the convenience of description and are not intended to limit the scope of the embodiments of the present invention.
[0165] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A globally optimal causal explanation method for deep knowledge tracing, characterized by: include: Construct a causal attribution measurement framework to determine the causal relationship between the input sequence of the knowledge tracking model and the information of the question to be predicted, and explain the output results of the knowledge tracking model; the input sequence includes multiple historical question-answer interaction pairs; Sequentially traverse each question-answering interaction pair and input it into the policy network to generate an action distribution probability for sampling decision-making, and add the question-answering interaction pairs retained by the decision indication to a candidate explanation subsequence; the candidate explanation subsequence includes at least one question-answering interaction pair in the input sequence; the action distribution probability is used to represent the importance of the question-answering interaction pair relative to the predicted question; The reward value of each answer interaction pair is determined based on the corresponding causal effect value before and after each answer interaction pair is added to the candidate explanation subsequence. The discounted return of the candidate explanation subsequence is then determined based on the reward of each answer interaction pair in the candidate explanation subsequence. The causal effect value reflects the contribution of the candidate explanation subsequence to the output of the knowledge tracking module. The reward value and the discounted return are removed from their absolute values, and then the corresponding policy network is back-propagated to update the gradient to train the policy network, so that the policy network sequentially traverses all the question-answering interaction pairs in the input sequence and then updates the candidate explanation subsequence, and the final candidate explanation subsequence is used as the explanation subsequence of the output result; The causal attribution measurement framework is used to determine the causal effect value corresponding to each candidate explanation subsequence; the causal effect value is determined by the following steps: Inputting the input sequence into the knowledge tracking model to obtain a first prediction output result of the knowledge tracking model for the prediction question; the prediction output result is used to indicate the probability of the prediction question being answered correctly or incorrectly; The candidate explanation subsequence is deleted from the input sequence and then input into the knowledge tracking model to obtain the second prediction output result of the knowledge tracking model for the prediction question; Determine the causal effect value of the candidate explanation subsequence based on the two prediction output results; The policy network determines the action distribution probability of each question-answering interaction pair through the following steps: Receive historically traversed question-answering interaction pairs and their corresponding decision actions; the action refers to whether to add the question-answering interaction pair to the candidate explanation subsequence; The historical answer interaction pairs and their corresponding action information are fused, and then a long short-term memory network is used to represent the current state based on the fused information to determine the action of the next answer interaction pair; The action representation of the next question-answering interaction pair, the state representation at the current moment, and the representation of the question to be predicted are integrated to obtain the action distribution probability of the next question-answering interaction pair; the action representation of the next question-answering interaction pair is the representation of the next question-answering interaction pair.
2. The method according to claim 1, characterized in that After inputting the question-answering interaction pair into the policy network to generate the action probability, the action is sampled and executed, and the reward value of the action is calculated. The reward value is the causal effect value of the candidate explanation subsequence obtained by executing the action at the current moment minus the causal effect value of the candidate explanation subsequence at the previous moment; The reward value of each action at each moment is accumulated through the discount factor to obtain the discounted return after the strategy network traverses the entire question-answering interaction pair and makes a decision.
3. The method according to claim 2, characterized in that The reward value for: in, and Refers to the candidate interpretation subsequences corresponding to step t and step t-1 respectively () represents the corresponding causal effect value, step t Interactive answer pair Make action decision, step t-1 Interactive answer pair Make action decisions; Indicates the interactive pair of answering questions action, Indicates the state at time t-1; The discount return for: in, is the discount factor and T is the total number of steps.
4. The method according to claim 3, characterized in that The causal attribution metric framework constructs an explanation subsequence of the output results by maximizing the attribution metric function , specifically: )=ICE( )= |Y(do( ))-Y(do( ))| in, is the attribution metric function used to measure each candidate explanation subsequence Output results contribution; represents the parameters of the knowledge tracking model to be explained; ICE( ) is a subsequence The causal effect value of To intervene, do( ) means to delete the input sequence The sequence after is input into the knowledge tracking model; do( ) indicates that the input sequence is input into the knowledge tracking model, Y(do( )) refers to deleting The output of the post-knowledge tracking model, Y(do( )) is the model output result obtained without any intervention on the input sequence; E represents the original input sequence.
5. The method according to claim 4, characterized in that Remove the absolute values of the reward value and the discounted return, and then backpropagate the gradient of the corresponding policy network to maximize the discounted return, specifically: The reward value is processed to remove the absolute value, and the corresponding two strategy networks are trained, one for maximizing the positive effect reward , and another one to maximize the negative effect reward in: Y(do( ))- Y(do( )) Y(do( ))- Y(do( )) in, Y(do( ) refers to deleting and Output of the post-knowledge tracing model; The corresponding positive discounted return and negatively discounted returns They are: The two objective functions that need to be optimized by the two policy networks are: Based on the above two objective functions, the future maximized reward for each action with positive and negative effects is determined, and then the answer interaction pairs whose causal effect values exceed the threshold are found by completing the absolute values to construct the final explanation subsequence; the future maximized reward refers to maximizing the discounted return.
6. The method according to claim 1, characterized in that The action distribution probability for: in, represents the activation function, represents the normalized exponential function, , Represents different multilayer perceptrons, represents all action candidates, express , All parameters in represents the action representation of the next question-answering interaction pair, Represents the state representation of the current moment, represents the representation of the question to be predicted, Indicates splicing, and represent intermediate variables respectively.
7. A globally optimal causal explanation system for deep knowledge tracking, characterized by: include: An attribution measurement framework determination unit is used to construct a causal attribution measurement framework to determine the causal relationship between the input sequence of the knowledge tracking model and the information of the question to be predicted, and to explain the output results of the knowledge tracking model; the input sequence includes multiple historical question-answer interaction pairs; An explanation subsequence update unit is configured to sequentially traverse each question-answering interaction pair and input it into the policy network to generate an action distribution probability for sampling decision making, and to add the question-answering interaction pairs indicated as retained by the decision to a candidate explanation subsequence; the candidate explanation subsequence includes at least one question-answering interaction pair in the input sequence; the action distribution probability is used to represent the importance of the question-answering interaction pair relative to the predicted question; A reward value and return determination unit, configured to determine the reward value of each answer interaction pair based on the corresponding causal effect value before and after each answer interaction pair is added to the candidate explanation subsequence, and then determine the discounted return of the candidate explanation subsequence based on the reward of each answer interaction pair in the candidate explanation subsequence; The causal effect value reflects the contribution of the candidate explanation subsequence to the output result of the knowledge tracking module; An explanation subsequence output unit is used to remove the absolute values of the reward value and the discounted return, and then back-propagate the gradient of the corresponding policy network to train the policy network so that the policy network sequentially traverses all the question-answering interaction pairs in the input sequence and then updates the candidate explanation subsequence, and uses the final candidate explanation subsequence as the explanation subsequence of the output result; The causal attribution measurement framework is used to determine the causal effect value corresponding to each candidate explanation subsequence; the causal effect value is determined by the following steps: Inputting the input sequence into the knowledge tracking model to obtain a first prediction output result of the knowledge tracking model for the prediction question; the prediction output result is used to indicate the probability of the prediction question being answered correctly or incorrectly; The candidate explanation subsequence is deleted from the input sequence and then input into the knowledge tracking model to obtain the second prediction output result of the knowledge tracking model for the prediction question; Determine the causal effect value of the candidate explanation subsequence based on the two prediction output results; The policy network determines the action distribution probability of each question-answering interaction pair through the following steps: Receive historically traversed question-answering interaction pairs and their corresponding decision actions; the action refers to whether to add the question-answering interaction pair to the candidate explanation subsequence; The historical answer interaction pairs and their corresponding action information are fused, and then a long short-term memory network is used to represent the current state based on the fused information to determine the action of the next answer interaction pair; The action representation of the next question-answering interaction pair, the state representation at the current moment, and the representation of the question to be predicted are integrated to obtain the action distribution probability of the next question-answering interaction pair; the action representation of the next question-answering interaction pair is the representation of the next question-answering interaction pair.
8. An electronic device, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Visual dialogue generation method and device based on anti-fact common sense causal reasoning
CN116739056A
Attention-based explanations for artificial intelligence behavior
US20190370587A1