A deep knowledge tracing causal interpretation method and device based on genetic algorithm
Through a causal interpretation method based on genetic algorithms, a causal attribution measurement framework is constructed and genetic encoding operations are performed, which solves the poor interpretability problem of deep knowledge tracking models, achieves efficient, flexible and readable interpretation effects, and improves the credibility and learning support capabilities of the model.
Patent Information
- Application Number
- CN202310697419.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-06-12
AI Technical Summary
Existing deep knowledge tracing models lack interpretability, resulting in users being unable to trust their high-quality learning support and resource recommendations.
A deep knowledge tracing causal explanation method based on genetic algorithm is adopted. By constructing a causal attribution measurement framework and genetic encoding operation, combined with multiple initialization strategies and adaptive crossover mutation technology, the optimal explanation subsequence is generated to improve the interpretability and trustworthiness of the model.
It achieves flexible, efficient, accurate and readable post-interpretability of the deep knowledge tracing model, and improves the model's credibility and learning strategy support capabilities.
Smart Images

Figure CN116776992B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent learning guidance analysis, and more specifically, relates to a deep knowledge tracing causal interpretation method and device based on genetic algorithm. Background Art
[0002] Knowledge tracing (KT) is a core module of intelligent tutoring systems (ITS). Its primary function is to build a model of a learner's cognitive development based on historical sequential data. This model can accurately predict a learner's learning performance, providing a foundation for decision-making in adaptive learning techniques such as learning strategy adjustment and learning resource recommendation. In recent years, with the introduction of deep learning technology, deep knowledge tracing models have gradually replaced traditional models due to their superior predictive performance. However, the "black box" nature of deep neural networks has weakened their credibility and limited their wider application. Therefore, many scholars have begun to study the interpretability of neural networks and attempted to decipher their "black box" through various methods. Similarly, the deep knowledge tracing (DLKT) model is also affected by the fact that the neural network's decision-making process remains a "black box," making it impossible for users to understand the decision-making process. To achieve high-quality modeling of the student's learning process and improve the performance of the model's predictions, the present invention aims to improve the interpretability of the DLKT model. Clarifying the reasons why the DLKT model makes specific predictions will help analyze the student's cognitive modeling process, thereby providing better learning strategy support and learning resource recommendations for intelligent learning and teaching systems.
[0003] Research on the interpretability of deep neural networks is primarily categorized into post-hoc explanation and ex-ante explanation. The former is a model-agnostic approach, while the latter studies neural networks with interpretability as a learning objective. Most previous work on the interpretability of DLKT models has focused on self-interpretation—that is, the models themselves are designed to be interpretable, but this sacrifices performance to some extent. A major advantage of post-hoc explanation methods is that, since prediction and interpretation are independent processes that do not interfere with each other, there is no need to compromise interpretability for predictive performance. In contrast, research on the post-hoc interpretability of DLKT models is relatively limited. Existing research primarily computes backpropagated gradients within the model to determine feature importance, thereby providing a basis for decision-making in the DLKT model. However, all of these methods are based on correlations, and the resulting interpretable results may be affected by spurious correlations between the data. Summary of the Invention
[0004] In response to the shortcomings of the existing technology, the purpose of the present invention is to provide a deep knowledge tracing causal interpretation method and device based on genetic algorithm, aiming to solve the problem that the existing knowledge tracing model has poor interpretability, resulting in low credibility and users cannot trust the knowledge tracing model to complete high-quality learning.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a deep knowledge tracing causal interpretation method based on a genetic algorithm, comprising the following steps:
[0006] Step 1: 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 topic to be predicted, and to explain the output of the model. This framework constructs an explanation subsequence of the output by maximizing an attribution measurement function. The attribution measurement function is used to measure the contribution of each candidate explanation subsequence to the model output, where the candidate explanation subsequence is generated from the input sequence.
[0007] It should be noted that the causal attribution measurement framework only measures the quality of the explainable subsequences, and its output is the causal effect value. The present invention uses a subsequent genetic algorithm to iteratively solve the causal attribution measurement framework and output the explainable subsequence with the maximum causal effect value.
[0008] Step 2: Gene encoding operation is performed on the input sequence in combination with the causal attribution measurement framework;
[0009] Step 3: Generate an initialization population from the input sequence based on multiple initialization strategies; the multiple initialization strategies include sequential greedy strategy, right-or-wrong-related strategy, skill-orientated strategy, and random strategy. The right-or-wrong-related strategy and skill-orientated strategy are designed based on prior knowledge in the field of knowledge tracking.
[0010] Step 4: Evaluate the universality of each individual in the population; the universality is the causal effect value between the individual and the problem to be predicted, and the causal effect value corresponds to the difference in model prediction output between the subsequence after deleting the interaction pairs of individual genes with preset values in the original input sequence and the original input sequence;
[0011] Step 5: Based on the universality of each individual, individuals are selected from the population to iteratively generate offspring through adaptive crossover and adaptive mutation; wherein a penalty term is introduced in the individual selection to generate sparser offspring; the individual crossover probability of the adaptive crossover is dynamically adjusted according to the universality of the individual and the current number of iterations of the population, so that the crossover probability between individuals with relatively low universality is high in the early stages of the iteration and low in the later stages of the iteration; in the adaptive mutation, the probability of mutation increases with the later the iteration number, the probability of gene mutation increases with the later the gene position, the higher the causal correlation provided by the experience matrix, and the greater the probability of individual mutation; the experience matrix is used to record the causal effect value between the explainable subsequence and the problem to be predicted;
[0012] Step 6: Execute step 4, then add individuals in the offspring whose universality exceeds the threshold to the elite set, and eliminate individuals in the elite set whose universality is below the threshold;
[0013] Step 7: Determine whether the current iteration has reached the termination condition. If not, execute steps 5 and 6. If so, decode the final offspring to obtain the optimal explanation subsequence and the corresponding causal effect value.
[0014] In one possible implementation, 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;
[0015] The input sequence of the causal attribution measurement framework includes the explainable sub-sequence and the information of the topic to be predicted, and the output is the causal effect value of the explainable sub-sequence on the predicted topic;
[0016] The genetic encoding operation of the input sequence in combination with the causal attribution measurement framework refers to genetic encoding based on the intervention operation, the first preset value indicates the deletion of the answer interaction pair at the corresponding gene position, and the second preset value indicates the retention of the answer interaction pair at the corresponding gene position; wherein the gene positions are sorted in chronological order according to the answer time of the answer interaction pair.
[0017] In one possible implementation, the causal attribution metric framework constructs an explanation subsequence of the output result by maximizing the attribution metric function Specifically:
[0018]
[0019]
[0020] Among them, A(S k |y t ,f θ ) is used to measure each candidate explanation subsequence S k For the output result y t Contribution ofθ Represents the parameters of the knowledge tracking model to be explained; ICE(S k ) is a subsequence S k The causal effect value, that is, universality; do(·) is the intervention operation, do(S k ) means deleting S from the original input sequence k The subsequent sequence is input into the knowledge tracking model; Indicates that the original input sequence is input into the knowledge tracking model, Y(do(S k )) refers to deleting S in the original input sequence k The output of the post-knowledge tracking model, It is the model output result obtained without any intervention on the original input sequence.
[0021] In one possible implementation, the sequential greedy strategy is to change the genes of individuals encoded with all second preset values to the first preset values by sequential search. If the universality value obtained by the changed individual is higher than that before the change, the individual with the changed gene is retained, otherwise it is not retained; the right-wrong related strategy is to set the genes of individuals corresponding to the correct or incorrect interaction pairs in the input sequence to the first preset values, and all others are set to the second preset values; the skill-related strategy is to set the genes of individuals corresponding to the answer interaction pairs in the input sequence that are related to or unrelated to the final output result to the first preset values, and all others are set to the second preset values; the random strategy is used to randomly generate a remainder of individuals; the remainder is the remainder obtained after the preset population number is divided by the total number of individuals generated by the three strategies of the sequential greedy strategy, the right-wrong related strategy, and the skill-related strategy;
[0022] The method further comprises the steps of:
[0023] The individuals with the highest universality ranking in the initialized population are included in the initialized elite set.
[0024] In a possible implementation, the penalty term L introduced in the individual selection is:
[0025]
[0026] Among them, n is the length of the original input sequence, n1 is the number of genes containing the second preset value in the individual, P b It is the model prediction value corresponding to the original input sequence of the model, and abs() means taking the absolute value.
[0027] In one possible implementation, the individual crossover probability p c for:
[0028]
[0029]
[0030] Among them, g is the current iteration number, G is the total iteration number, p min is the preset minimum crossover probability, p max is the maximum crossover probability, f i is the individual universality, f A is the population average universality, f best is the highest universality of the population; the first preset value is greater than the second preset value, and the second preset value is greater than the third preset value, and the first preset value to the third preset value are all between 0 and 0.1.
[0031] In one possible implementation, the overall mutation probability p of the adaptive mutation is:
[0032]
[0033] Among them, w1, w2, and w3 are the weights of the three parts of the mutation probability, w1 is the weight of the mutation probability obtained based on the experience matrix, g is the current number of iterations, G is the total number of iterations, j is the position of the gene corresponding to the individual, Pop[i] is the i-th individual in the population, len() represents the calculation of the total length of the individual gene, C is the confidence factor, which increases with the increase of the number of iterations; B is the balance factor. When the confidence factor is relatively low, the balance factor is used to increase the mutation probability based on the number of iterations and the gene position.
[0034] In a second aspect, the present application 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. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect.
[0035] In a third aspect, the present application provides a computer-readable storage medium storing a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.
[0036] In a fourth aspect, the present application provides a computer program product. When the computer program product runs on a processor, it enables the processor to execute the method described in the first aspect or any possible implementation of the first aspect.
[0037] In general, the above technical solutions conceived by the present invention have the following beneficial effects compared with the prior art:
[0038] The present invention provides a deep knowledge tracing causal interpretation method and device based on genetic algorithms, constructs a causal attribution measurement framework, and designs a genetic encoding scheme for the knowledge tracing field, which can efficiently, flexibly, faithfully and concisely explain the decision-making basis of model predictions, improve the interpretability of the knowledge tracing model, and enhance the trustworthiness of the model. The present invention develops a causal interpreter based on a genetic algorithm and proposes a multi-strategy population initialization method based on priors, which can greatly improve the generalization ability of the initialized population. The present invention introduces a global experience matrix that can capture the causal correlation values between the inputs and instances of the knowledge tracing model, and uses them to guide the variation of individual genes. The present invention conducts extensive experiments on two representative knowledge tracing models to demonstrate the effectiveness of the interpreter of the present invention and show that the results generated by the interpreter of the present invention can reveal potential educational laws and tap into potential knowledge structures. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A flow chart of a deep knowledge tracking method based on a genetic algorithm provided by an embodiment of the present invention;
[0040] Figure 2 A schematic diagram of gene encoding and decoding based on intervention operations provided by an embodiment of the present invention;
[0041] Figure 3 A flowchart for updating the experience matrix provided by an embodiment of the present invention;
[0042] Figure 4 The overall framework diagram of the GCE algorithm provided by the embodiment of the present invention;
[0043] Figure 5 Comparison of the average convergence curves of four existing search algorithms and GCE in 300 cases provided by the embodiments of the present invention; (a)-(h) correspond to the convergence curves of two knowledge tracking models, DKT and SAKT, for different datasets, respectively;
[0044] Figure 6 The figure shows the average experimental results of the comparative methods provided in the embodiments of the present invention under the interpretation length index in 300 cases;
[0045] Figure 7 This is a diagram showing an example of attribution analysis of GCE provided by an embodiment of the present invention;
[0046] Figure 8 A schematic diagram showing the distribution of explanation lengths of interpretable results and the position distribution of interpretable subcolumns obtained through experiments using GCE provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] 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.
[0048] To address the shortcomings of existing deep knowledge tracing (DLKLT) explanation methods, such as sacrificing model performance, generating spurious correlations, and low generalizability, this paper proposes a post-hoc explanation method for deep knowledge tracing (DLKLT) models. This method, called the Genetic Causal Explainer (GCE), is based on a genetic algorithm and primarily explores the causal relationships between model inputs and outputs. This paper proposes a causal attribution metric framework for measuring the importance of input units, which can avoid the influence of spurious correlations and enable the explanation of various DLKLT models. This explanation method is universal and model-independent and can be applied to any DLKLT model. Furthermore, the essence of the present explanation method is to find the optimal input subsequence, which is an NP-hard discrete search problem. However, most search algorithms used to solve this problem are heuristic methods based on randomized or greedy strategies, which struggle to achieve global optimality. Alternative methods, such as machine learning, suffer from poor transferability and flexibility, require long and expensive training cycles, and typically require pre-trained search models. This is not particularly advantageous in domains where data requires frequent updates, as retraining is necessary whenever the data changes or the model requires an update. Therefore, the present invention introduces genetic algorithm (GA) as an out-of-the-box method to solve the optimal subsequence search problem. To the best of the present invention's knowledge, the present invention is the first to propose a deep knowledge tracing model interpretation method based on genetic algorithm to achieve flexible, efficient, accurate and readable post-interpretability of the deep knowledge tracing model.
[0049] The present invention provides a causal explanation method for deep knowledge tracing based on a genetic algorithm, including: 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. Gene encoding operation, converting the explainable problem of deep knowledge tracing into an optimal sub-sequence search problem for genetic algorithm to solve, and being able to input the student's historical answer interaction pair sequence to be explained and the predicted question information and then genetically encode it; initialization population operation, generating an initialized population based on the student's historical answer interaction pair sequence and combining a multi-strategy population initialization method; universality evaluation operation, performing universality evaluation on the encoded population to generate offspring and its corresponding individual causal effect value and storing them in the experience matrix; individual selection operation, performing individual selection on these generated offspring, introducing a sparsity penalty term in the selection process to generate more sparse offspring, and The individuals with higher individual causal effects in the generated offspring are added to the elite set, and the individuals with poor individual causal effects in the elite set are eliminated; adaptive crossover operation, the newly generated offspring will complete the adaptive crossover operation with the individuals in the elite set; adaptive mutation operation, based on the current number of iterations, the position of the basis and the causal correlation value of the experience matrix to guide the offspring to complete the adaptive mutation operation; determine whether the termination condition is met, if not, continue to perform universal evaluation operation on the offspring, if it has been met, output the final individual; gene decoding operation, decode the output final individual to generate the final optimal interpretable subsequence and its corresponding individual causal effect value.
[0050] The present invention combines the causal framework and adopts the out-of-the-box heuristic algorithm of genetic algorithm to achieve knowledge tracking with readability, efficiency, flexibility and fidelity and ex post explanation.
[0051] Figure 1 Flowchart of the deep knowledge tracking method based on genetic algorithm provided by the embodiment of the present invention; Figure 1 As shown, the following steps are included:
[0052] S101, build a causal attribution measurement framework for input unit importance, specifically:
[0053] 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(·)
[0054]
[0055] The indicator A measures the k Predict the target yt For causal interpretability, the metric A quantifies the contribution of S 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 cuts off all connections to the 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:
[0056]
[0057] Specifically, the interaction of whether the input sequence is deleted or not is considered as a control variable and two interventions are performed: do(S k )and do(S 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(S k )) refers to deleting S 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.
[0058] S102, the genetic encoding operation, can be combined with the causal attribution metric framework to transform the interpretable problem of deep knowledge tracking into an optimal sub-sequence search problem for genetic algorithm to solve. Specifically:
[0059] According to the foregoing, the goal of the present invention is to explore the causal effect of the input subsequence on the model prediction results, and to use the do operator to intervene in the input sequence. The intervention adopted by the present invention has only one form, that is, whether to delete a pair of interaction pairs in the input sequence, so the gene encoding and decoding can just correspond to the intervention operation with binary numbers. Therefore, the present invention only uses 01 encoding to represent individual information. After the do operation, for example, the gene encoding of do({x1,x2}) is [0,0,1,1,1,1], where 0 represents deleting the interaction pair on the corresponding position, and 1 represents retaining the interaction pair on the corresponding position. Therefore, the gene encoding represents deleting the first and second answer interaction pairs. The decoding operation is similar, and the subsequence after the do operation can be restored from the individual gene sequence. The specific schematic diagram is as follows Figure 2 shown.
[0060] S103, population initialization operation, proposes a population initialization method based on knowledge tracking domain prior for genetic algorithms. In the population initialization process, four initialization strategies are introduced to form the initialization population, namely sequential greedy strategy, right-or-wrong related strategy, skill-related strategy and random strategy. The introduction of random strategy is to prevent the local optimal problem caused by the exclusive use of the first three strategies. Specifically:
[0061] 1. Sequential greedy strategy: First, use a sequential search method to change the gene of the individuals coded with all 1s to 0. If the universality value of the individual after the change is higher than that before the change, the individual with the changed gene is retained, otherwise.
[0062] 2. Right / wrong correlation strategy: set the individual genes corresponding to the correct or incorrect interaction pairs in the input sequence to 0, and all others to 1.
[0063] 3. Skill-related strategy: Set the individual genes corresponding to the interaction pairs in the input sequence that are related or unrelated to the final predicted skill to 0, and all the others to 1, thus obtaining two individuals.
[0064] 4. Random strategy: Randomly generate m individuals, where popNum is the population size. Suppose the numbers of individuals generated by strategies 1-3 are m1, m2, and m3 respectively, and the value of m is the remainder after popNum is divided by (m1+m2+m3).
[0065] Individuals generated by strategies 1, 2, and 3 are replicated in multiples, and then combined with individuals generated by strategy 4 to generate a population of popNum individuals. The top m individuals in the population are selected to initialize the elite set. This results in a preliminarily optimized population and elite set.
[0066] S104, universality evaluation operation. As mentioned above, in the knowledge tracing interpretable task proposed by the present invention, the present invention uses the ICE value of the input subsequence to measure the importance of the subsequence to the prediction result. The ultimate goal of the task is to find the maximum ICE value, as shown in formula (2). Therefore, the present invention directly uses the ICE value as the universality of its corresponding individual.
[0067] S105, individual selection operation, uses the roulette wheel selection method to generate offspring. At the same time, in order to control the interpretation length of the final interpretable result as much as possible to improve the readability of the interpretable subsequence, the present invention adds a penalty term in the process of individual selection to reduce the selection of individuals with more genes with no or small causal effects to generate higher quality interpretable offspring. The specific formula is:
[0068]
[0069] In the formula, n is the length of the original input sequence, n1 is the number of genes containing 1 in the individual, and P b Predict output values for the model's original input sequence.
[0070] S106, adaptive crossover operation. In the genetic algorithm proposed in this invention, crossover operations all use corresponding position crossover between individuals, and use elite set crossover to accelerate population evolution. The elite set is stored in the form of a queue and sorted by universality. After each generation of evolution, if an individual better than the best individual in the elite set appears, the elite set will perform queue entry and exit operations, with the excellent individual entering the queue and the poor elite individual leaving the queue. In addition, the present invention dynamically adjusts the individual crossover probability based on the individual universality and the current number of evolutions of the population. The specific formula is:
[0071]
[0072]
[0073] In the formula, g is the current number of iterations, G is the total number of iterations, and p is the min is the manually set minimum crossover probability, f i is the individual universality, f A is the population average universality, f best It is the highest universality of the population. Simply put, the present invention hopes that individuals in the early stage of iteration and individuals with low universality can most likely evolve towards the elite set, so the crossover probability is high. The crossover probability of individuals in the late stage of iteration and individuals with low universality gradually decreases, which helps to speed up the convergence of the population.
[0074] S107, adaptive mutation operation. In the genetic algorithm proposed in the present invention, the common flip mutation operation is to set the gene from 0 to 1 or 1 to 0. The probability of the common mutation operator is composed of three parts:
[0075] 1) The current number of iterations. The later the iteration, the greater the probability of mutation. (This invention avoids the algorithm from falling into a local optimum by increasing the probability of mutation in the later iterations, while encouraging the generation of new individuals and maintaining individual diversity.)
[0076] 2) The position of the gene: the later the gene is located, the greater the probability of mutation (for knowledge tracking tasks, the influence of recent historical answers on the sequence and model prediction should be greater).
[0077] 3) The causal correlation provided by the experience matrix (EM) (the higher the causal correlation, the greater the probability of mutation, and vice versa).
[0078] EM mainly updates the causal correlation between the knowledge points behind the interaction between the individual gene position and the answer question and the knowledge points behind the question to be predicted based on the optimal individual and its corresponding ICE value obtained in each round of iteration. In addition, the individuals obtained during the iteration process, regardless of their individual ICE values, can be used as reliable information to update EM. The update flow chart is as follows: Figure 3 As shown, Figure 3 Where q is the question, s is the knowledge point, and r is the causal correlation. The present invention maintains two matrices for updating EM. The M1 matrix is used to record the number of times a knowledge point is updated, and the M2 matrix is used to accumulate the ICE value between two knowledge points each time it is updated. The accumulated ICE value is divided by the cumulative number of updates to obtain the causal correlation between the two knowledge points, and the final mutation probability is obtained after normalization.
[0079] The calculation formula of the entire adaptive mutation probability is as follows:
[0080]
[0081] In the formula, w1, w2, and w3 are the weights of the three common mutation components, with w1 being the weight of the EM mutation probability. Because the causal strength of the EM is unreliable in the early stages of GCE iterations, this paper introduces a confidence factor, C, which increases with the number of iterations. Furthermore, to ensure that the introduction of the EM does not affect the overall mutation probability, this paper introduces a balancing factor, B. This balancing factor increases the mutation probabilities of the other two components when the confidence factor is low.
[0082] S108, determine whether the termination condition has been met. If the final offspring has met the termination condition, the individuals of the offspring are decoded to obtain the final interpretable historical answer interaction pair sequence and its corresponding ICE value. If the termination condition has not been met, continue to execute step S104.
[0083] The overall algorithm framework of GCE is shown in the figure below. Figure 4 shown.
[0084] In order to verify the effectiveness of the method proposed in this invention, six methods were selected for comparative experiments on two data sets, ASSIST09 and EdNet, and two models, DKT and SAKT. The comparative methods are shown in Table 1.
[0085] Table 1 Six selected comparison methods and their introduction
[0086]
[0087] At the same time, the present invention selects four indicators to evaluate the pros and cons of each interpretation method, specifically:
[0088] (1) Explanation length (EL@t), which measures the final generated subsequence Length:
[0089]
[0090] Where t is the time complexity, that is, the explanatory power of the interpretation method under the time complexity t.
[0091] (2) ICE value (ICE@t), which measures the generation of the optimal subsequence ICE values:
[0092]
[0093] (3) Success rate (SR@t), which measures the ratio of successfully finding the optimal subsequence.
[0094] For input sequences of different lengths, the experiment of this invention selects different time complexities to solve the optimal interpretable subsequence. First, a recursive algorithm is used to generate 2 n An input sequence of length n is processed after deleting the question-answering interaction pairs, and then these sequences are input into the trained knowledge tracking model to obtain the final prediction value. The input subsequence with the largest causal effect is found as the standard interpretable subsequence (benchmark value), and then other comparison methods are compared with the benchmark value under the success rate indicator.
[0095] (4) Logarithmic probability (LO@t), which measures the optimal subsequence generated The degree of change in model confidence relative to the original sequence:
[0096]
[0097] in, p S is the predicted output value of the model under a given input sequence S, p represents the model prediction result, logodds() represents the logarithmic probability, and log() is the natural logarithm of the value in the brackets.
[0098] The specific comparison results are shown in Table 2 and Table 3:
[0099] Table 2 Comparison results of ICE values (average of five experimental results)
[0100]
[0101]
[0102] Table 3 Comparison results of success rate SR (average of five experimental results)
[0103]
[0104] In the comparative experiment, the present invention compares and analyzes the experimental results of six methods under four evaluation indicators. Figure 5 The average convergence curves of the four search algorithms and GCE in 300 cases are shown, where LEN30-ASSIST09-DKT represents the experimental results of the DKT model with a prediction length of 30 in the ASSIST09 dataset. Figure 6 The experimental results under the ICE value, logarithmic probability and explanation length indicators are shown. Table 3 shows the experimental results under the success rate indicator. Based on these results, the present invention can draw the following conclusions:
[0105] (1) Compared with all other methods, GCE can obtain interpretable subsequences with higher ICE values and log-odds. At the same time, compared with the other four search algorithms, GCE can obtain a population with a higher fitness value through population initialization, which reflects the advantages of the method of the present invention and also shows that the initialization strategy proposed in the present invention has played a role.
[0106] (2) Compared with the four search algorithms, GCE has a significant improvement in the success rate metric, which indicates that GCE can find the optimal subsequence faster and better in shorter sequences, and it can obtain shorter interpretable subsequences with the same ICE value. In other words, compared with the other algorithms, GCE can obtain interpretable subsequences with better readability.
[0107] (3) Compared with the other four search algorithms, GCE performs better on longer sequences. This may be because the other four search algorithms achieve good performance on short sequences under a given time complexity, but as the space complexity increases on longer sequences, the performance of the other four algorithms deteriorates.
[0108] (4) The two interpretation methods, SV and Gradient, performed poorly under the ICE value and log-odds index. This may be because they use non-causal methods and are prone to capturing spurious input-output relationships while ignoring causal relationships.
[0109] Secondly, in order to explore the effective application of various innovative points of GCE, the present invention conducted an ablation experiment. The results are shown in Table 4:
[0110] Table 4. Comparison results of ablation experiments (average of five experimental results)
[0111]
[0112]
[0113] Among them, GCE-B is the most original genetic algorithm, GCE-I is an algorithm that adds the initialization method of the invention by introducing four initialization strategies to jointly form the initialization population, and GCE-NG is an algorithm after removing the experience matrix EM on the complete GCE.
[0114] In order to explore the application prospects of the present invention, the present invention conducts research from three aspects: explainable attribution, potential knowledge structure mining and model comparison.
[0115] (1) Explainable Attribution
[0116] like Figure 7 Given a trained deep knowledge tracing model and a learner’s practice sequence as input, the input consists of 14 consecutive question interaction pairs, and the output y t The predicted result is 0.7741, which is the probability of correctly answering the next question. By using the proposed explanation method, we can finally determine that among the final skill prediction output and historical interaction pairs, questions 3-4 and 9-14 have the greatest causal effect. The subsequence of these interaction pairs is the explanation subsequence, which contributes the most to the prediction task. This example demonstrates meaningful explanation results using the proposed method, which can aid in educational analysis.
[0117] (2) Discovery of latent knowledge structure
[0118] The present invention can also help the present invention discover potential knowledge structures by using these interpretable results. Specifically, the present invention obtained the final interpretable subsequences in 2400 instances through GCE, and believed that if the predicted questions and knowledge points co-appear with the questions and knowledge points in the interpretation subsequence, it means that there is a certain relationship between them. Based on this, these data were sampled and a network diagram between questions and knowledge points was constructed. In the grid diagram, the node labels represent the ID and name of the corresponding questions or skills in the original data (because the grid diagram is too complex, it is not specifically shown in the accompanying drawings). These interesting results reflect that the interpretation method of the present invention can at least partially restore the internal knowledge-level relationships captured by the constructed DLKT model, and further research may be needed to explore its potential meaning from an educational perspective.
[0119] (3) Model comparison
[0120] Similarly, based on these interpretable results, the present invention analyzes the differences between the two deep knowledge tracking models SAKT and DKT from the distribution of interpretation length, the position distribution of interpretable sub-columns, and the distribution of ICE in the interpretable results of the same sequence length and the same dataset. Figure 8The left side shows the distribution of explained length. Since the ridge plot corresponding to the SAKT model has a larger area and height than the DKT model, it demonstrates that the SAKT model has a longer explained length than the DKT model, indicating that the model focuses on more and broader sequences. The right side shows the distribution of explained subsequences for the two models. Since the ridge plot corresponding to the DKT model leans more to the right, the more right-leaning the horizontal axis is, the closer the time of the corresponding answer is to the predicted answer. This indicates that the DKT model focuses more on historical interaction pairs close to the predicted answer, indicating that the DKT model pays more attention to students' recent answering performance.
[0121] At the same time, through comparative experiments and ablation experiments as shown in Tables 2 and 4, it was found that the ICE values captured by the method of the present invention have obvious differences in the two models, which explains that the ICE value obtained by the SAKT model is higher than that of the DKT model. To a certain extent, it shows that the SAKT model is more sensitive to the intervention measure of deleting some input-answer interaction pairs adopted by the present invention, and thus pays more attention to students' historical answering performance, while the DKT model is not so sensitive, indicating that the DKT model may pay more attention to predicting some information about the question itself, such as the difficulty of the question.
[0122] In summary, the GCE method proposed in the present invention has certain advantages in solving the explainability problem of knowledge tracing. The above description is only 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.
[0123] Based on the methods described in the above embodiments, embodiments of the present application 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.
[0124] Based on the method in the above embodiment, an embodiment of the present application 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.
[0125] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0126] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or 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.
[0127] The method steps in the embodiments of the present application 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 a component of the processor. The processor and the storage medium can be located in an ASIC.
[0128] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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, the process or function described in the embodiment of the present application is generated in whole or in part. 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 a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. 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)).
[0129] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.
[0130] 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 deep knowledge tracing causal explanation method based on genetic algorithm, characterized by: The following steps are involved: Step 1: 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 predicted topic, and explain the output results of the model; It constructs an explanation subsequence of the output result by maximizing an attribution metric function; the attribution metric 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; Step 2: Gene encoding operation is performed on the input sequence in combination with the causal attribution measurement framework; Step 3: Generate an initialization population from the input sequence based on multiple initialization strategies; the multiple initialization strategies include sequential greedy strategy, right-or-wrong-related strategy, skill-orientated strategy, and random strategy. The right-or-wrong-related strategy and skill-orientated strategy are designed based on prior knowledge in the field of knowledge tracking. Step 4: Evaluate the universality of each individual in the population; the universality is the causal effect value between the individual and the problem to be predicted, and the causal effect value corresponds to the difference in model prediction output between the subsequence after deleting the interaction pairs of individual genes with preset values in the original input sequence and the original input sequence; Step 5: Based on the universality of each individual, individuals are selected from the population to iteratively generate offspring through adaptive crossover and adaptive mutation; wherein a penalty term is introduced in the individual selection to generate sparser offspring; the individual crossover probability of the adaptive crossover is dynamically adjusted according to the universality of the individual and the current number of iterations of the population, so that the crossover probability between individuals with relatively low universality is high in the early stages of the iteration and low in the later stages of the iteration; in the adaptive mutation, the probability of mutation increases with the later the iteration number, the probability of gene mutation increases with the later the gene position, the higher the causal correlation provided by the experience matrix, and the greater the probability of individual mutation; the experience matrix is used to record the causal effect value between the explainable subsequence and the problem to be predicted; Step 6: Execute step 4, then add individuals in the offspring whose universality exceeds the threshold to the elite set, and eliminate individuals in the elite set whose universality is below the threshold; Step 7: Determine whether the current iteration has reached the termination condition. If not, execute steps 5 and 6. If so, decode the final offspring to obtain the optimal explanation subsequence and the corresponding causal effect value.
2. The method according to claim 1, characterized in that The input sequence of the knowledge tracking model is the historical answer interaction pair 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-sequence and the information of the topic to be predicted, and the output is the causal effect value of the explainable sub-sequence on the predicted topic; The genetic encoding operation of the input sequence in combination with the causal attribution measurement framework refers to genetic encoding based on the intervention operation, the first preset value indicates the deletion of the answer interaction pair at the corresponding gene position, and the second preset value indicates the retention of the answer interaction pair at the corresponding gene position; wherein the gene positions are sorted in chronological order according to the answer time of the answer interaction pair.
3. The method according to claim 1 or 2, characterized in that The causal attribution metric framework constructs an explanation subsequence of the output results by maximizing the attribution metric function Specifically: Among them, A(S k |y t ,f θ ) is used to measure each candidate explanation subsequence S k For the output result y t Contribution of θ Represents the parameters of the knowledge tracking model to be explained; ICE(S k ) is a subsequence S k The causal effect value, that is, universality; do(·) is the intervention operation, do(S k ) means deleting S from the original input sequence k The subsequent sequence is input into the knowledge tracking model; Indicates that the original input sequence is input into the knowledge tracking model, Y(do(S k )) refers to deleting S in the original input sequence k The output of the post-knowledge tracking model, It is the model output result obtained without any intervention on the original input sequence.
4. The method according to claim 2, characterized in that The sequential greedy strategy is to change the genes of individuals encoded with all second preset values to the first preset values by sequential search. If the universality value obtained by the changed individual is higher than that before the change, the individual with the changed gene is retained, otherwise it is not retained; the right-wrong related strategy is to set the individual genes corresponding to the correct or wrong interaction pairs in the input sequence to the first preset values, and set the rest to the second preset values; the skill-related strategy is to set the individual genes corresponding to the answer interaction pairs in the input sequence that are related or unrelated to the final output result to the first preset values, and set the rest to the second preset values; the random strategy is used to randomly generate a remainder of individuals; the remainder is the remainder obtained after the preset population number is divided by the total number of individuals generated by the three strategies of the sequential greedy strategy, the right-wrong related strategy, and the skill-related strategy; The method further comprises the steps of: The individuals with the highest universality ranking in the initialized population are included in the initialized elite set.
5. The method according to claim 1, wherein The penalty term L introduced in the individual selection is: Among them, n is the length of the original input sequence, n1 is the number of genes containing the second preset value in the individual, P b It is the model prediction value corresponding to the original input sequence of the model, and abs() means taking the absolute value.
6. The method according to claim 1, characterized in that The individual crossover probability p c for: Among them, g is the current iteration number, G is the total iteration number, p min is the preset minimum crossover probability, p max is the maximum crossover probability, f i is the individual universality, f A is the population average universality, f best is the highest universality of the population; the first preset value is greater than the second preset value, and the second preset value is greater than the third preset value, and the first preset value to the third preset value are all between 0 and 0.
1.
7. The method according to claim 1, characterized in that The overall mutation probability p of the adaptive mutation is: Among them, w1, w2, and w3 are the weights of the three parts of the mutation probability, w1 is the weight of the mutation probability obtained based on the experience matrix, g is the current number of iterations, G is the total number of iterations, j is the position of the gene corresponding to the individual, Pop[i] is the i-th individual in the population, len() represents the calculation of the total length of the individual gene, C is the confidence factor, which increases with the increase of the number of iterations; B is the balance factor. When the confidence factor is relatively low, the balance factor is used to increase the mutation probability based on the number of iterations and the gene position.
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 7.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed on a processor, the processor is caused to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is run on a processor, the processor is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Adaptive learning support device and method based on deep knowledge tracking
CN113610235A
Deep knowledge tracking method based on tree attention mechanism
CN114943276A