A knowledge tracking method based on causal invariance decoupling sequence
Through the knowledge tracking method of causal invariance decoupling sequence, the reaction sequence is decoupled into causal subsequences and trivial subsequences, and irrelevant information is identified and removed. This solves the problem of false association caused by data selection bias in the existing technology and improves the prediction accuracy and interpretability of knowledge tracking.
Patent Information
- Application Number
- CN202410961044.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-07-17
AI Technical Summary
Existing knowledge tracking methods ignore data selection bias, leading to spurious associations, affecting the adaptability and accuracy of the model when facing new patterns, and failing to effectively explore the causal relationship between response sequences and future performance.
A knowledge tracking method based on causal invariance decoupling sequence is adopted. Through causal attention mechanism and causal intervention operation, the response sequence is decoupled into causal sub-sequences and trivial sub-sequences, and the response sub-sequences that are causally related to the answer performance are identified. Redundant and irrelevant answers are removed, and multi-task learning is used to improve the accuracy and interpretability of the prediction task.
The accuracy and explainability of knowledge tracking predictions are improved, and causal analysis technology is used to accurately identify the answer sequence that affects future performance, reduce the impact of false correlations, and enhance the adaptability and stability of the model under the new model.
Smart Images

Figure CN118940796B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of educational data mining and knowledge tracking, and in particular to a method for dynamically tracking the evolution of a learner's knowledge state. Technical Background
[0002] Knowledge Tracing (KT) is a key method for achieving personalized learning. It predicts learners' future performance by analyzing their question-answering behavior, dynamically tracks the evolution of knowledge status throughout the learning process, provides support for learning resource recommendations and adaptive learning, and promotes the development of personalized education.
[0003] Deep Knowledge Tracing (DKT), proposed in 2015, is a groundbreaking work in the field of knowledge tracing. It pioneered the use of recurrent neural networks to encode response sequences to capture knowledge states. Following DKT, a series of classic works emerged, such as dynamic key-value memory networks and attentional knowledge tracing. The former utilizes memory networks to store and dynamically update knowledge states, while the latter leverages attention mechanisms to retrieve knowledge states from response sequences. In recent years, with the further development of deep learning, more outstanding knowledge tracing methods have emerged. On the one hand, researchers have continuously improved the feature extraction capabilities of neural networks, incorporating more advanced deep learning techniques such as heterogeneous graph neural networks, contrastive learning, and multi-task learning. On the other hand, researchers have continuously deepened their understanding of knowledge state evolution, incorporating more educational principles, such as modeling learning and forgetting patterns, the influence of temporal features in sequences, the relationship between question difficulty and answering performance, and the relationship between response speed and knowledge states.
[0004] However, while current knowledge tracking methods have made significant progress in understanding and assessing students' knowledge, they often overlook the impact of data selection bias. Specifically, models may over-rely on the statistical properties of test items, such as co-occurrence frequency, rather than their true impact on response outcomes, mistakenly assuming that certain test items are very important, leading to selection bias. This reliance on statistical properties essentially represents a shortcut learning strategy that, while improving predictive performance on test items with similar patterns, limits the model's adaptability and accuracy when faced with new patterns, leading to spurious correlations and inhibiting the exploration of causal relationships between response sequences and future performance.
[0005] Therefore, we use deep learning technology to model the response data of learners in answering test questions, explore a knowledge tracking method based on causal analysis technology, accurately identify the responses in the response sequence that truly affect future performance, and distinguish them from irrelevant parts, thereby revealing the causal relationship in the response sequence and improving the accuracy and interpretability of the model, which has important research significance and application value. Summary of the Invention
[0006] The purpose of this invention is to address the problem of false correlation caused by existing knowledge tracking methods ignoring data selection bias, and propose a knowledge tracking method based on causal invariance decoupling sequence. Through the causal attention mechanism and causal intervention operation designed by us, the response sequence is decoupled into causal subsequences and trivial subsequences, so as to discover the answer subsequences that are causally related to the answer performance, remove redundant and irrelevant answers, achieve improved accuracy of knowledge tracking prediction tasks, and improve the interpretability of the knowledge tracking method through causal analysis technology.
[0007] To achieve the purpose of the invention, the present invention adopts the following technical solution: a knowledge tracking method based on causal invariance decoupling sequence, comprising:
[0008] First, a knowledge tracking model based on causal invariance decoupled sequences is constructed and trained. The model includes a reaction sequence encoder, an attention-based causal identifier, a sequence causal intervener, and a future performance predictor. The total loss of the model is obtained using a multi-task learning method, and finally the trained model is used to implement knowledge tracking.
[0009] The response sequence encoder is used to obtain the response sequence and the test question sequence, and the long short-term memory network is used as the encoder to encode the response sequence and the test question sequence to obtain the representation of the response sequence and the test question sequence;
[0010] Among them, the learner at time t and a question q t The interaction of the two constitutes a reaction unit x t =(q t ,c t ,r t ), each unit contains question q t 、The knowledge concepts involved c t and the reaction result r t ,The reaction sequence is composed of multiple reaction units in the order of their responses;
[0011] The attention-based causal identifier is used to construct a question-concept graph using the response sequence and encode the question-concept graph through a graph convolutional network to obtain node representations of questions and concepts. The causal attention mechanism is used to identify the relationship between future questions and response sequences from the perspective of time and knowledge association, and the time association weight and knowledge association weight are obtained. Finally, the causal score and triviality score are calculated based on the time association weight and knowledge association weight.
[0012] The sequence causal intervener is used to decompose the original complete response sequence into two parts: a causal subsequence and a trivial subsequence using the causal score and the trivial score. The intervention sequence is generated by performing a causal intervention operation on the trivial subsequence and combining it with the causal subsequence. Finally, the encoder and pooling operations are used to obtain the intervention sequence representation and the trivial subsequence representation.
[0013] The future performance predictor is used to set the same future performance prediction task for different intervention sequence representations to discover the unchanging and stable causal relationships therein. For trivial subsequence representations, a problem difficulty prediction task is introduced to eliminate prediction shortcuts, and multi-task learning is used to balance and optimize the weights of the two tasks to achieve the prediction of the learner's future performance and the difficulty level of future problems.
[0014] Furthermore, the process of encoding the reaction sequence is as follows:
[0015] Feature embedding: Use random embedding technology to map the elements in the reaction unit into a high-dimensional vector space to obtain an embedded representation of the reaction sequence.
[0016] X T =[x1,x2,…,x t ,…,x T ],x t =q t +c t +r t
[0017] in represents the embedded representation of the reaction sequence, T represents the total length of the reaction sequence, and the embedded representations of the question, knowledge concept and reaction are denoted as q t ,c t , where d is the embedding dimension, represents the reaction unit representation at time t;
[0018] Response sequence encoding: Use a long short-term memory network as an encoder to model the knowledge acquisition and forgetting process in students' learning. It receives the embedded representation of the student's historical response sequence and encodes it to obtain the potential knowledge state representation;
[0019]
[0020] in represents the potential knowledge state of the reaction unit at time t, and Represents the cell state, which transmits information between different moments; represents the output gate, represents the forget gate, represents the input gate, represents the candidate cell state, and thus the overall characterization of the reaction sequence is as follows:
[0021] H T =LSTM X (X T )=[h1,h2,…,h t ,…,h T ]
[0022] in Each row in represents the potential knowledge state of the corresponding reaction unit at each moment, and the LSTM network for reaction sequence encoding is formally defined as LSTM X .
[0023] Furthermore, the process of encoding the test question sequence in step (1) is as follows:
[0024] The embedding representation of the test sequence is as follows:
[0025] O T+1 =Q T+1 +C T+1 =[(q1+c1),(q2+c2),…,(q t +c t ),…,(q T+1 +c T+1 )]
[0026] in represents the test question sequence embedding representation, and Representing questions and concept sequences respectively;
[0027] The embedded representation of the input test sequence is then encoded using the LSTM network as follows:
[0028] E T+1 =LSTM E (O T+1 )=[e1,e2,…,e t+1 ,…,e T+1 ]
[0029] in Each row in represents the representation of the test question to be answered. The LSTM for question sequence encoding corresponding to the question at time t+1 is denoted as LSTM E , whose structure is similar to LSTM X The same, but the parameters are not shared.
[0030] Furthermore, the problem concept graph constructed based on the reaction sequence in step (2) is represented as Node Set It consists of the questions and knowledge concepts involved in the reaction sequence. The same questions or concepts at different moments are regarded as different nodes. First, the graph node representation is initialized. Specifically, it is defined first:
[0031]
[0032] The edge set ε is bidirectional, including sequence relationship edges and question-concept edges. Sequence relationship edges are added between nodes of adjacent reactions, and question-concept edges are added between corresponding nodes through the correspondence between questions and knowledge concepts.
[0033] For graph network updates, GCN is used to aggregate v n The neighbor nodes of the next layer are represented by the following update formula:
[0034]
[0035] in represents the updated node representation of the nth node in the l+1th layer, in is the adjacency matrix A n The nth line in the table represents node v n Relationships with other nodes; represents the embedding matrix of all nodes in the lth layer, represents the weight matrix of the lth layer, Dropout represents regularization, and ReLu is the activation function; after encoding the question-concept graph, the output representation of each node is expressed as Where L is the number of stacked GCN layers.
[0036] Furthermore, the specific implementation method of obtaining the time association weight and knowledge association weight in step (2) is as follows;
[0037] First, from the perspective of time association, the test question at time t+1 is represented as e t+1 Set as the query vector, set the reaction unit representation containing time information as the key vector, use scaled dot product attention, and the weight between the unit at t+1 and η is calculated as follows:
[0038]
[0039] in, represents the representation of the future test question at time t+1, represents the reaction unit representation of time η, θ t+1,η Represents the time-related weight; weight matrix and Linear transformations used in attention mechanisms, is the scaling factor;
[0040] Secondly, from the perspective of knowledge association, the node representation after graph encoding is used to calculate the association between reaction units, and the problem representation at time t+1 is represented as and conceptual representation Set it as the query vector, set the representation of other units in the sequence as the key vector, and the weight is calculated as follows:
[0041]
[0042] where ω t+1,η represents the knowledge association weight between the test question at time t+1 in the future and other test questions at time η, ⊙ represents the Hadamard product, and multiplication is performed on the opposite elements; is the problem and concept representation after graph encoding, the weight matrix Used for linear transformations.
[0043] Furthermore, the specific implementation of obtaining the causal score and trivial score in step (2) is as follows;
[0044] The calculation formula of causal score is as follows:
[0045]
[0046] in represents the causal score between the test question at time t+1 and the response unit at time η, and They represent the time association weight and knowledge association weight used for causal score calculation respectively; It is a masking matrix used to implement timing masking, with the upper triangular elements set to -∞ and the rest set to 0. t+1,μ is the masking value corresponding to t+1 and μ;
[0047] The triviality score is calculated as follows:
[0048]
[0049] in represents a trivial fraction, denote the time association weight and knowledge association weight used for trivial score calculation, respectively, and σ(·) denotes the sigmoid activation function;
[0050] Furthermore, in order to completely decompose the reaction sequence into causal and trivial subsequences, the scores of continuous values are converted to discrete values. This is achieved using the gumbel-softmax function as follows:
[0051]
[0052] The gumbel-softmax function converts the continuous input vector into a discrete output vector while allowing the gradient to back propagate. In {0,1}, so
[0053] Finally, the discretized attention weights are again time-series masked to ensure that no information leakage will occur in the future. Specifically, for the test questions at the future time t+1, if η≥t+1, then Set to 0, so the attention score of the question at time t+1 in the entire sequence is as follows:
[0054]
[0055] in Represent the final causal score and trivial score of the entire sequence respectively; in addition, the sum of the causal score and trivial score matrices formed by all future test questions is a unit lower triangular matrix, in which all elements on the diagonal and below the diagonal are 1, and the other elements are 0, which is expressed as in
[0056] Furthermore, the causal score and trivial score are multiplied with the entire reaction sequence to extract the corresponding causal subsequence and trivial subsequence, as shown below:
[0057]
[0058] in Denote the causal subsequence and trivial subsequence corresponding to time t+1, respectively. Each row in the matrix represents the embedding of a reaction unit. The non-causal or non-trivial part is filled with a zero vector through the Hadamard product. Thus, the reaction sequence is decoupled into two parts, and there is no overlap between the two subsequences, that is,
[0059] will be After intervention t+1 The conditional probability is expressed as follows:
[0060]
[0061] in Represents Zt+1 The set of all possible values, do(·) represents the Do operator;
[0062] This is approximated by considering a set of operations applied to trivial subsequences, resulting in a fixed number of intervening sequences, which therefore translates to the following approximation:
[0063]
[0064] where c t+1 Represents a trivial subsequence After the operation, the A collection,containing causal subsequences with different contexts;
[0065] Next, for the trivial subsequence Perform specific intervention operations to obtain the intervention sequence set c t+1 as follows:
[0066]
[0067] in represents an intervention sequence, and oper(·) represents three different intervention operations, including removal (rem), replacement (repl), and inversion (inve);
[0068] (3-3) Intervention sequence representation
[0069] Finally, each intervention sequence is encoded to obtain the corresponding representation. By applying the LSTM encoder to each intervention sequence, the sequence dependency is captured and the sequence is encoded into a fixed-length representation. Subsequently, the overall representation of the sequence is obtained through the average pooling operation. The formula is as follows:
[0070]
[0071] in Represents an intervention sequence The average pooling representation of t+1 represents a set of representations; in particular, It can also be seen as a causal subsequence Representation; LSTM X represents the response sequence encoder;
[0072] The representation of a trivial subsequence is calculated as follows:
[0073]
[0074] in represents a trivial subsequence representation, and rem(·) represents a removal operation.
[0075] Furthermore, the future performance prediction task specifically includes:
[0076] Based on the causal subsequence, trivial subsequence, and future test question representation, the conditional probability of future performance is defined as follows:
[0077]
[0078] From this we can know the future performance t+1 is affected by the causal subsequence and the representation of future questions, while the trivial subsequence has no direct causal influence on prediction; therefore, different intervention sequences can be used for the same future performance prediction task, and their prediction results are roughly similar;
[0079]
[0080] in represents the predicted probability of the intervention sequence, and cat[·] represents the concatenation along the feature dimension. These are trainable parameters that are not shared across different operations.
[0081] Finally, the binary cross entropy loss function is used to measure the error between the predicted probability and the actual outcome. The loss for each intervention sequence is defined as follows:
[0082]
[0083] where r t+1 ∈{0,1} represents the actual response result at time t+1. For different intervention sequences, the loss is calculated separately. Enables the model to extract stable and invariant causal relationships from different sequences.
[0084] Furthermore, the difficulty prediction task specifically includes:
[0085] Discretize continuous values into difficulty levels and use question difficulty as the prediction target for trivial subsequences. Specifically, first calculate the average correct rate of questions using all answer records, then sort the correct rates and divide them into n and n difficulty levels, each level containing the same number of questions, calculated as follows:
[0086]
[0087] where d t+1 represents the difficulty level of the question to be answered at time t+1, f is the mapping function from accuracy to difficulty level, δ(·) is the indicator function, which returns 1 if the condition is true, otherwise it returns 0; q ij and r ij Represent a question and answer in all records respectively; then, use trivial subsequence representation To predict the difficulty level of future questions, as follows:
[0088]
[0089] in represents the predicted probability of the difficulty of the question, and is a trainable parameter, cat[·] represents the cascade operation along the feature dimension; finally, binary cross entropy is used to measure the error between the predicted probability and the actual difficulty level of the trivial subsequence:
[0090]
[0091] in is the loss value of the problem difficulty prediction task, I(d t+1 ) indicates difficulty d t+1 Whether it belongs to the corresponding difficulty category.
[0092] Furthermore, we combine the losses of the future performance prediction task and the problem difficulty prediction task to calculate the overall loss, which is defined as follows:
[0093]
[0094] where λ1, λ2, λ3, and λ4 are weighting coefficients used to balance the contribution of each loss term, correspond to the losses of deletion, substitution and reversal operations respectively, and is the predicted probability of the problem difficulty.
[0095] Compared with the prior art, the present invention has the following obvious outstanding substantive features and significant technological advancements:
[0096] (1) The present invention proposes a novel causal analysis method for reaction sequences in knowledge tracking. It uses an identifier to distinguish causal subsequences from trivial subsequences, uses an intervener to generate intervention sequences based on causal invariance, and sets multiple prediction targets in the predictor to discover stable and invariant causal relationships.
[0097] (2) The present invention proposes a causal attention mechanism that estimates the causal and trivial scores between future questions and each reaction unit representation by combining time and knowledge associations. The score calculation of this attention mechanism is more accurate and reasonable, and there is no overlap between the causal and trivial scores obtained.
[0098] (3) The present invention proposes three intervention operations applicable to reaction sequences. These intervention operations are guided by causal invariance, conform to the characteristics of reaction sequences and our common sense, and can be efficiently implemented through algorithms.
[0099] (4) The present invention proposes a knowledge tracking method based on causal invariance decoupling sequence, which is carried out from the perspective of causal analysis. By decoupling the sequence into causal subsequences and trivial subsequences, it realizes the simplification of redundant data in the sequence, improves the accuracy of the prediction task, and greatly improves the interpretability of the knowledge tracking method. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] Figure 1 This is a framework diagram of the knowledge tracking method based on causal invariance decoupling sequence.
[0101] Figure 2 This is the structural causal model diagram of CIKT. DETAILED DESCRIPTION
[0102] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0103] The theoretical basis for the implementation of the present invention is first described below:
[0104] First, let’s talk about the problem definition: In knowledge tracking, the learner is at time t and has a problem q t The interaction of the two constitutes a reaction unit x t =(q t ,c t ,r t ). Each unit contains question q t 、The knowledge concepts involved c t and the reaction result r t Questions and knowledge concepts are usually represented by indexes (i.e., numerical numbers), while results are represented by 0 and 1, representing incorrect and correct responses respectively. A response sequence is composed of multiple such response units in the order of answering. As of time t, the series of response units answered by the learner form a response sequence X. t ={(q1,c1,r1),(q2,c2,r2),...,(q t ,c t ,r t )}, accordingly, the question sequence and concept sequence can be expressed as Q t ={q1,q2,...,q t} and C t ={c1,c2,...,c t The goal of knowledge tracking is to infer the latent knowledge state based on the learner’s performance and to track the dynamic evolution of the knowledge state through the response sequence. The total number of response units for each student is T+1, and the KT prediction task is defined as: for each t∈[1,T], based on the corresponding response sequence X t={(q1,c1,r1),(q2,c2,r2),...,(q t ,c t ,r t )}, predict the learner’s t+1 and c t+1 The reaction on r t+1 , denoted as P(r t+1 =1|X t ,q t+1 ,c t+1 ).
[0105] Structural causal model analysis:
[0106] like Figure 2 As shown in the figure, a structural causal model for knowledge tracing is constructed. By analyzing the key elements of the KT task, it is found that the complete response sequence S consists of a causal subsequence C and a trivial subsequence T. The causal subsequence C is retrieved from S using a future question F. Therefore, the causal subsequence C is specific to the future question F, corresponds to it one-to-one, and has a causal relationship with the future performance Y. However, the trivial subsequence T is affected by data selection bias and has a spurious correlation with Y. In other words, given F and C, Y and T are independent, that is, Y ⊥ T | C, F. Based on causal invariance, as long as the causal subsequence C remains unchanged, the causal relationship between the entire sequence and the future performance Y should remain stable regardless of changes in the trivial subsequence T. Furthermore, it is found that the trivial subsequence T opens a backdoor path through the causal chain C←S→T→H→Y. Therefore, the most direct and effective approach is to change the prediction target of T, linking it to the problem difficulty D, thereby changing the impact of this path. Through the structural causal model, we analyzed the relationship between elements in knowledge tracking from a causal perspective, providing guidance for subsequent model design and step implementation.
[0107] This paper proposes a novel knowledge tracing method based on disentangling response sequences with causal invariance (CIKT). Figure 1As shown in the figure, the CIKT model consists of four modules: a reaction sequence encoder, a causal identifier based on an attention mechanism, a sequence causal intervener, and a future performance predictor. Specifically, when predicting the learner's future performance, the encoder first uses LSTM to obtain the representation of the historical reaction sequence and the future test question sequence; then, the causal identifier enhances the attention score calculation between the reaction sequence and the future question by combining time and knowledge association, thereby promoting the decomposition of the sequence into causal and trivial subsequences; subsequently, based on the principle of causal invariance, the intervener adopts intervention strategies including removal, replacement, and reversal to generate intervention sequences, and uses the reaction sequence encoder to obtain its corresponding representation; finally, the predictor sets two prediction targets for the intervention sequence, including future performance prediction and problem difficulty prediction, driving CIKT to explore the causal relationship between the reaction sequence and future performance. Specifically including:
[0108] First, a knowledge tracking model based on causal invariance decoupled sequences is constructed and trained. The model includes a reaction sequence encoder, an attention-based causal identifier, a sequence causal intervener, and a future performance predictor. The total loss of the model is obtained using a multi-task learning method, and finally the trained model is used to implement knowledge tracking.
[0109] The response sequence encoder is used to obtain the response sequence and the test question sequence, and the long short-term memory network is used as the encoder to encode the response sequence and the test question sequence to obtain the representation of the response sequence and the test question sequence;
[0110] The attention-based causal identifier is used to construct a question-concept graph using the response sequence and encode the question-concept graph through a graph convolutional network to obtain node representations of questions and concepts. The causal attention mechanism is used to identify the relationship between future questions and response sequences from the perspective of time and knowledge association, and the time association weight and knowledge association weight are obtained. Finally, the causal score and triviality score are calculated based on the time association weight and knowledge association weight.
[0111] The sequence causal intervener is used to decompose the original complete response sequence into two parts: a causal subsequence and a trivial subsequence using the causal score and the trivial score. The intervention sequence is generated by performing a causal intervention operation on the trivial subsequence and combining it with the causal subsequence. Finally, the encoder and pooling operations are used to obtain the intervention sequence representation and the trivial subsequence representation.
[0112] The future performance predictor is used to set the same future performance prediction task for different intervention sequence representations to discover the invariant and stable causal relationships therein. For trivial subsequence representations, a difficulty prediction task is introduced to eliminate prediction shortcuts, and multi-task learning is used to balance and optimize the weights of the two tasks to achieve the prediction of the learner's future performance and the difficulty level of future problems.
[0113] (1) Reaction sequence coding
[0114] To decouple the response sequence, we first need to obtain representations of the response sequence and the question sequence. For the encoder network architecture, we use a long short-term memory (LSTM) network for sequence encoding. This LSTM is widely used in sequence tasks and effectively captures the temporal information of response units. The steps involved include feature embedding, response sequence encoding, and question sequence encoding.
[0115] (1-1) Feature Embedding
[0116] In the previous problem definition, the learner's response unit at time t is represented by x t =(q t ,c t ,r t ). We use random embedding technology to map the elements in the reaction unit into a high-dimensional vector space. The embedding representations of questions, knowledge concepts, and reactions are denoted as q t ,c t , Where d is the embedding dimension. We get the embedding representation of each reaction unit by summing the corresponding reaction elements to form a reaction sequence as follows:
[0117] X T =[x1,x2,…,x t ,…,x T ],x t =q t +c t +r t
[0118] in represents the embedded representation of the reaction sequence, T represents the total length of the reaction sequence, represents the response unit representation at time t. The question sequence involves questions to be answered in the future, and its embedding representation is as follows:
[0119] O T+1 =Q T+1 +C T+1 =[(q1+c1),(q2+c2),…,(q t +c t ),…,(q T+1 +c T+1 )]
[0120] in represents the test question sequence embedding representation, Represent questions and concept sequences respectively.
[0121] (1-2) Reaction sequence coding
[0122] To predict future performance, we need to understand the student's past performance on the problem. Therefore, we set up a response sequence encoder to receive the student's historical response sequence and encode it into a latent knowledge state. The knowledge state at each moment is influenced by the previous state, so we use LSTM to model the knowledge acquisition and forgetting process during student learning. The knowledge state at each moment is calculated as follows:
[0123]
[0124] in represents the potential knowledge state of the reaction unit at time t, and Represents the cell state, which transmits information between different moments. represents the output gate, represents the forget gate, represents the input gate, represents the candidate cell state. Thus, the overall characterization of the reaction sequence is as follows:
[0125] H T =LSTM X (X T )=[h1,h2,…,h t ,…,h T ]
[0126] in Each row in represents the potential knowledge state of the corresponding reaction unit at each moment. We formally define the LSTM network for reaction sequence encoding as LSTM X .
[0127] (1-3) Question sequence coding
[0128] Future performance depends not only on past responses but also on future questions. Therefore, we use a second encoder to obtain representations of future questions. Similar to the response sequence encoder, we input the embedding representation of the question sequence and then encode it using an LSTM network as follows:
[0129] E T+1 =LSTM E (O T+1 )=[e1,e2,…,e t+1 ,…,e T+1 ]
[0130] in Each row in represents the representation of the test question to be answered. The question corresponding to time t+1. The LSTM used for question sequence encoding is denoted as LSTME , although its structure is similar to LSTM X Similar, but parameters are not shared.
[0131] (2) Score calculation based on causal attention
[0132] Existing KT methods typically use the entire response sequence to predict future performance. While this provides as much information as possible for prediction, the irrelevant information it contains can actually interfere with prediction to a certain extent, such as spurious relationships caused by data bias. The model may mistakenly attribute a significant impact on answer performance to a specific question based solely on surface statistical properties, thus failing to deeply explore causal relationships. Therefore, we intend to actively utilize the associations between questions in terms of knowledge concepts to help decompose the response sequence into causal and trivial subsequences. Specifically, we first use a graph convolutional network (GCN) to mine the associations between questions through a question-concept graph, and then incorporate knowledge associations into causal attention calculations to obtain causal scores and trivial scores for the response sequence. The specific steps include: question-concept graph encoding, causal attention calculation, and causal score calculation.
[0133] (2-1) Question-Concept Map Coding
[0134] In order to exploit the graph network structure to mine associations, we constructed a question concept graph G based on the reaction sequence. QC =(v,ε). The node set v consists of the questions and knowledge concepts involved in the sequence. The same questions or concepts at different moments are considered different nodes. We use the feature embedding module in (1-1) to initialize the graph node representation. Specifically, we define:
[0135]
[0136] The edge set ε is bidirectional, including sequence relationship edges and question-concept edges. Sequence relationship edges are added between nodes of adjacent reactions, such as {q1,q2}, {c1,c2}, {q1,c2}, {c1,q2}. Question-concept edges are added between corresponding nodes through the correspondence between questions and knowledge concepts. For example, if q1 and q5 examine the same knowledge concept, there are edge relations {q1,c1}, {q5,c5}, {q1,c5} and {c1,q5}. For graph network updates, we use GCN aggregation v n The neighbor nodes of the next layer are represented by the following update formula:
[0137]
[0138] in represents the updated node representation of the nth node in the l+1th layer, in is the adjacency matrix A n The nth line in the table represents node v n Relationships with other nodes. represents the embedding matrix of all nodes in the lth layer, Represents the weight matrix of the lth layer. Dropout is used for regularization to improve the generalization ability of the model. ReLu is a common activation function used for nonlinear transformation in neural networks. After encoding the problem-concept graph, the output representation of each node is represented as Where L is the number of stacked GCN layers.
[0139] (2-2) Causal Attention Computation
[0140] When predicting future performance, we use future test questions to search within the response sequence. To this end, we design a causal attention mechanism to identify the relationship between future questions and the response sequence from the perspective of time and knowledge association, obtaining causal and trivial scores for subsequent decoupling.
[0141] From the perspective of temporal association, learners’ performance on future test questions depends on their performance on past response units. Therefore, we represent the test question at time t+1 as e t+1 Set as the query vector, and set the reaction unit representation containing time information as the key vector. We use scaled dot product attention, and the weight between the unit at t+1 and η is calculated as follows:
[0142]
[0143] in, represents the representation of the future test question at time t+1, represents the reaction unit representation of time η, θ t+1,η Represents the time correlation weight between them. Weight matrix Linear transformations used in attention mechanisms, is the scaling factor.
[0144] From the perspective of knowledge association, reaction units that are closely connected in knowledge are more likely to show causal relationships. Therefore, we use the node representation after graph encoding to calculate the association between reaction units. We represent the problem at time t+1 as and conceptual representation Set it as the query vector and the representation of other units in the sequence as the key vector. The weight is calculated as follows:
[0145]
[0146] where ω t+1,η represents the knowledge association weight between the question at time t+1 and the other questions at time η. ⊙ represents the Hadamard product, which multiplies the opposite elements. It is the problem and concept representation after the graph encoding in step (2-1). Weight matrix Also used for linear transformations.
[0147] (2-3) Causal score calculation
[0148] We combine the weights obtained from the two perspectives to obtain the final causal score and trivial score. For the causal score, we expect that the more relevant the future test question is to the reaction unit in the sequence, the higher its score will be. The causal score is calculated as follows:
[0149]
[0150] in represents the causal score between the test question at time t+1 in the future and the response unit at time η. and Calculated by the two formulas in step (2-2), they respectively represent the time association weight and knowledge association weight used for causal score calculation. M is a masking matrix used to implement timing masking, with its upper triangular elements set to -∞ and the rest set to 0. t+1,η is the masked value corresponding to t+1 and η. On the contrary, for the trivial score, we want the response units with lower correlation to get higher trivial scores. Therefore, we use the negative sign and sigmoid function when calculating the trivial score, as shown below:
[0151]
[0152] in Represents a trivial fraction. The two formulas in step (2-2) are also used to calculate the time association weight and knowledge association weight for trivial score calculation, but different parameters W are used. Q and W K , these parameters are not shared. σ(·) represents the sigmoid activation function.
[0153] Furthermore, in order to fully decompose the reaction sequence into causal and trivial subsequences, we need to convert the scores of continuous values into discrete values. We use the gumbel-softmax function to achieve this as follows:
[0154]
[0155] The gumbel-softmax function can convert continuous input vectors into discrete output vectors while allowing gradient back propagation. and In {0,1}, so
[0156] Finally, we need to perform temporal masking on the discretized attention weights again to ensure that no information leakage will occur in the future. Specifically, for the test questions at time t+1 in the future, if η≥t+1, then Set to 0. Therefore, the attention score of the question at time t+1 in the entire sequence is as follows:
[0157]
[0158] in Represent the final causal score and trivial score of the entire sequence respectively. In addition, the sum of the causal score and trivial score matrices formed by all future test questions is a unit lower triangular matrix, in which all elements on the diagonal and below the diagonal are 1 and the other elements are 0, which is expressed as in In summary, through this step, we obtain the causal score and the trivial score, which will be used for subsequent sequence decoupling.
[0159] (3) Sequential Causal Intervention
[0160] In the KT task, we aim to predict students' future performance based on their past responses. However, not every past response is causally related to future performance. Due to data selection bias, some units may exhibit spurious correlations. Based on the principle of causal invariance, if a response unit has a stable causal relationship with future performance, this relationship should remain constant across different contexts. Therefore, for each future test question, CIKT first decomposes the response sequence into a causal subsequence and a trivial subsequence. Subsequently, CIKT performs intervention operations to delete, replace, and reverse elements in the trivial subsequence to change the context of the causal subsequence. These interventions generate a variety of intervention sequences, which can be used to discover causal relationships that are invariant across different contexts. The specific steps include sequence decoupling, causal intervention, and intervention sequence representation.
[0161] (3-1) Sequence Decoupling
[0162] At different moments in time, the question to be answered and the corresponding response sequence are different. Therefore, for each future question, there is a corresponding causal subsequence and a trivial subsequence. Each causal score and trivial score is 0 or 1, which actually acts as a masking function. We use these scores to determine which subsequence each response unit belongs to. Specifically, we multiply these scores with the entire response sequence to extract the corresponding subsequence, as follows:
[0163]
[0164]
[0165] in Denote the causal subsequence and trivial subsequence corresponding to time t+1, respectively. Each row in the matrix represents the embedding of a reaction unit, and the non-causal or non-trivial part is filled with zero vectors through the Hadamard product. Thus, the reaction sequence is decoupled into two parts, and there is no overlap between the two subsequences, that is,
[0166] (3-2) Causal Intervention
[0167] Our goal is to estimate the causal subsequence Future performance t+1 To avoid the confounding effect of responses that are unrelated to future performance, we adjust the trivial subsequence to change the environment of the causal subsequence. According to the backdoor adjustment theory, we will After intervention t+1 The conditional probability is expressed as follows:
[0168]
[0169] in Represents Z t+1 The set of all possible values of Z (i.e., irrelevant reactions that lead to confusion). do(·) represents the Do operator, which intervenes on the variable. This equation is derived from the backdoor adjustment formula, but in practice, due to computational limitations, it is usually not possible to consider Z in detail. t+1 all possible values of . We therefore approximate this value by considering a set of operations applied to trivial subsequences, generating a fixed number of intervening sequences. We thus transform this into the following approximation:
[0170]
[0171] where c t+1 Represents a trivial subsequence After the operation, the A collection of causal subsequences with different contexts.
[0172] Next, we have the trivial subsequence Perform specific intervention operations to generate multiple sequences. Specifically, considering the characteristics of the reaction sequence, we designed three types of intervention operations: removal (rem), replacement (repl), and inversion (inve). These operations are consistent with common sense cognition of reaction patterns and can be efficiently implemented through simple algorithms. The set of intervention sequences c t+1 as follows:
[0173]
[0174] in represents an intervention sequence, and oper(·) represents three different intervention operations. These three operations are described as follows:
[0175] Remove (rem). Since trivial subsequences have no causal relationship with future performance, discarding them will not change the causal relationship. Therefore, we directly remove trivial subsequences, making Contains only the cause and effect part
[0176] Replace (repl). Students tend to perform similarly on similar problems. For each problem q in the trivial subsequence t ,We find problems with the same knowledge concept, randomly select one with replacement, and then combine it with the causal subsequence.
[0177] If the reaction unit has no causal relationship with future performance, then it does not matter whether the result is correct. Therefore, we trivialize each reaction r in the subsequence. t Reversal: Reversing the correct and incorrect responses.
[0178] It is worth noting that since trivial subsequences have no causal relationship with future performance, although these operations will change the context around the causal subsequence, they will not affect the inherent causal relationship between the sequence as a whole and answer performance.
[0179] (3-3) Intervention sequence representation
[0180] Finally, we encode each intervention sequence to obtain the corresponding representation. By applying the LSTM encoder to each intervention sequence, we can capture the sequence dependencies and encode the sequence into a fixed-length representation, and then obtain the overall representation of the sequence through the average pooling operation. The formula is as follows:
[0181]
[0182] in Represents an intervention sequence The average pooling representation oft+1 represents a set of representations. In particular, It can also be seen as a causal subsequence Representation. LSTM X Shares parameters with the reaction sequence encoder described in steps (1-2).
[0183] In addition, to further promote the discovery of causal relationships and avoid prediction shortcuts, we also consider the case where the causal subsequence is deleted, leaving only the trivial subsequence. The representation of the trivial subsequence is calculated as follows:
[0184]
[0185] in represents a trivial subsequence representation, and rem(·) represents a removal operation.
[0186] In summary, in the Sequential Causal Intervener, we generate a set of intervention sequences and obtain their corresponding representations through different intervention operations. These sequences are then used in the next step to discover the invariant causal relationship between the sequences and future representations.
[0187] (4) Future performance forecast
[0188] In the Predictor module, our goal is to predict future performance based on the intervention sequence generated in the Causal Intervenor module. Specifically, we Set the same future performance prediction task to discover the invariant causal relationships and We set up a problem difficulty prediction task to eliminate prediction shortcuts. We then use multi-task learning to balance and optimize the weights of these tasks. The specific steps include: future performance prediction, problem difficulty prediction, and total loss calculation.
[0189] (4-1) Future Performance Forecast
[0190] For c t+1 In the intervention sequence, although the trivial subsequence is removed, replaced, or reversed, the core causal subsequence remains unchanged, thus preserving its causal relationship. Based on the causal subsequence, the trivial subsequence, and the future test representation, the conditional probability of future performance is defined as follows:
[0191]
[0192] Can discover future performance t+1 It is mainly affected by the causal subsequence and the representation of future test questions, while the trivial subsequence has no direct causal influence on the prediction. can be used for the same future performance prediction task, and their prediction results are roughly similar.
[0193]
[0194] in represents the predicted probability of the intervention sequence, and cat[·] represents the concatenation along the feature dimension. These are trainable parameters that are not shared across different operations.
[0195] Finally, the binary cross entropy loss function is used to measure the error between the predicted probability and the actual outcome. The loss for each intervention sequence is defined as follows:
[0196]
[0197] where r t+1 ∈{0,1} represents the actual response result at time t+1. For different intervention sequences, we calculate the loss separately Enables the model to extract stable and invariant causal relationships from different sequences.
[0198] (4-2) Question Difficulty Prediction
[0199] like Figure 2 As shown in , the trivial subsequence opens a backdoor path through the causal chain C←S→T→H→Y. Therefore, the most effective way to cut off the path to future performance P is to link the trivial subsequence to another prediction target. In addition, for the intervention sequence, if the model converts the trivial subsequence to Set to empty to intervene in the sequence will be the same as the original sequence. Then, Naturally, they can also be the same, allowing the model to easily achieve the prediction task through shortcuts. This goes against our original intention of changing the context of the causal subsequence.
[0200] Therefore, we need to introduce a new dynamic prediction target for trivial subsequences. Trivial subsequences contain response units that are irrelevant to future questions, which can be compared to a novice's first attempt at a new question. This response may tend to be towards the average accuracy of the group. In addition, since the accuracy is a discrete value, directly using it as a prediction target may lead to an imbalance between sample categories. Therefore, we discretize the continuous value into difficulty levels and use the problem difficulty as the prediction target for trivial subsequences. Specifically, we first use all the answer records to calculate the average accuracy of the question, then sort the accuracy and divide them into nd difficulty levels, each level containing the same number of questions. The calculation is as follows:
[0201]
[0202] where d t+1represents the difficulty level of the question to be answered at time t+1, f is the mapping function from accuracy to difficulty level, and δ(·) is an indicator function that returns 1 if the condition is true and 0 otherwise. ij and r ij Represent a question and answer in all records respectively. Then, we use the trivial subsequence representation To predict the difficulty level of future questions, as follows:
[0203]
[0204] in Indicates the predicted probability of the difficulty of the question. and is a trainable parameter. cat[·] represents the concatenation operation along the feature dimension. Finally, we use binary cross entropy to measure the error between the predicted probability and the actual difficulty level of trivial subsequences:
[0205]
[0206] in is the loss value of the problem difficulty prediction task, I(d t+1 ) indicates difficulty d t+1 Whether it belongs to the corresponding difficulty category. Unlike some existing practices, we do not use question difficulty as a feature or embedding input, but only as a target for predicting output. For example, if question difficulty is used to represent the test question, the model may find a shortcut for difficulty prediction (for example, in the difficulty prediction formula, the model can t+1 instead of ), the constraint on trivial subsequences is lost.
[0207] (4-3) Calculation of total losses
[0208] The overall loss is calculated by combining the losses of the future performance prediction task and the problem difficulty prediction task. The overall loss is defined as follows:
[0209]
[0210] where λ1, λ2, λ3, and λ4 are weighting coefficients used to balance the contribution of each loss term. correspond to the losses of deletion, substitution and reversal operations respectively, and is the loss of predicting trivial subsequences, i.e., the loss value of the problem difficulty prediction task.
[0211] We conducted experiments on three real-world public datasets, comparing CIKT with 10 baseline models. We used commonly used metrics in this field, such as area under the curve (AUC), accuracy (ACC), and root mean square error (RMSE), to evaluate the performance. The experimental results, shown in Table 1, show that CIKT achieves the best performance on all datasets, demonstrating that our method can effectively improve the accuracy of future performance prediction.
[0212] Table 1 Comparison of prediction accuracy with 10 baseline models on three public datasets
[0213]
[0214] Furthermore, we further validated the robustness of the model. Specifically, we created new training sets by selecting data from the original ASSIST2012 dataset in varying proportions, while keeping the test set unchanged. CIKT was then compared with two baseline models (DKT, one of the most classic knowledge tracing models, and FKT, one of the most advanced knowledge tracing models). The experimental results, shown in Table 2, show that CIKT achieves the best performance across training sets of varying sizes. In particular, when the training data is reduced to 1%, CIKT's advantage expands to 12.7% and 7.5%, respectively. This demonstrates CIKT's strong generalization capabilities, enabling it to achieve leading performance even with minimal training data.
[0215] Table 2 Comparison results of prediction accuracy with two baseline models on the ASSIST2012 dataset
[0216]
[0217] The contents not described in detail in this specification belong to the prior art known to those skilled in the art.
[0218] 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, improvements, etc. 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 knowledge tracking method based on causal invariance decoupling sequence, characterized by: include: First, a knowledge tracking model based on causal invariance decoupled sequences is constructed and trained. The model includes a reaction sequence encoder, an attention-based causal identifier, a sequence causal intervener, and a future performance predictor. The total loss of the model is obtained using a multi-task learning method, and finally the trained model is used to implement knowledge tracking. The response sequence encoder is used to obtain the response sequence and the test question sequence, and the long short-term memory network is used as the encoder to encode the response sequence and the test question sequence to obtain the representation of the response sequence and the test question sequence; Among them, the learner at time t and a question q t The interaction of the two constitutes a reaction unit x t =(q t ,c t ,r t ), each unit contains question q t 、The knowledge concepts involved c t and the reaction result r t ,The reaction sequence is composed of multiple reaction units in the order of their responses; The attention-based causal identifier is used to construct a question-concept graph using the response sequence and encode the question-concept graph through a graph convolutional network to obtain node representations of questions and concepts. The causal attention mechanism is used to identify the relationship between future questions and response sequences from the perspective of time and knowledge association, and the time association weight and knowledge association weight are obtained. Finally, the causal score and triviality score are calculated based on the time association weight and knowledge association weight. The sequence causal intervener is used to decompose the original complete response sequence into two parts: a causal subsequence and a trivial subsequence using the causal score and the trivial score. The intervention sequence is generated by performing a causal intervention operation on the trivial subsequence and combining it with the causal subsequence. Finally, the encoder and pooling operations are used to obtain the intervention sequence representation and the trivial subsequence representation. The future performance predictor is used to set the same future performance prediction task for different intervention sequence representations to discover the unchanging and stable causal relationships therein. For trivial subsequence representations, a problem difficulty prediction task is introduced to eliminate prediction shortcuts, and multi-task learning is used to balance and optimize the weights of the two tasks to achieve the prediction of the learner's future performance and the difficulty level of future problems.
2. The knowledge tracking method based on causal invariance decoupling sequence according to claim 1 is characterized by: The process of encoding the reaction sequence is as follows: Feature embedding: Use random embedding technology to map the elements in the reaction unit into a high-dimensional vector space to obtain an embedded representation of the reaction sequence. X T =[x1,x2,…,x t ,…,x T ],x t =q t +c t +r t in represents the embedded representation of the reaction sequence, T represents the total length of the reaction sequence, and the embedded representations of the question, knowledge concept and reaction are respectively expressed as where d is the embedding dimension, represents the reaction unit representation at time t; Response sequence encoding: Use a long short-term memory network as an encoder to model the knowledge acquisition and forgetting process in students' learning. It receives the embedded representation of the student's historical response sequence and encodes it to obtain the potential knowledge state representation; in represents the potential knowledge state of the reaction unit at time t, and Represents the cell state, which transmits information between different moments; represents the output gate, represents the forget gate, represents the input gate, represents the candidate cell state, and thus the overall characterization of the reaction sequence is as follows: H T =LSTM X (X T )=[h1,h2,...,h t ,...,h T ] in Each row in represents the potential knowledge state of the corresponding reaction unit at each moment. The LSTM network for reaction sequence encoding is formally defined as LSTM X .
3. The knowledge tracking method based on causal invariance decoupling sequence according to claim 1 is characterized by: The process of encoding the test question sequence in step (1) is as follows: The embedding representation of the test sequence is as follows: O T+1 =Q T+1 +C T+1 =[(q1+c1),(q2+c2),...,(q t +c t ),...,(q T+1 +c T+1 )] in represents the test question sequence embedding representation, and Representing questions and concept sequences respectively; The embedded representation of the input test sequence is then encoded using the LSTM network as follows: E T+1 =LSTM E (O T+1 )=[e1,e2,…,e t+1 ,…,e T+1 ] in Each row in represents the representation of the test question to be answered. The LSTM for question sequence encoding corresponding to the question at time t+1 is denoted as LSTM E , whose structure is similar to LSTM X The same, but the parameters are not shared.
4. The knowledge tracking method based on causal invariance decoupling sequence according to claim 1 is characterized by: The problem concept graph constructed based on the reaction sequence in step (2) is represented as Node Set It consists of the questions and knowledge concepts involved in the reaction sequence. The same questions or concepts at different moments are regarded as different nodes. First, the graph node representation is initialized. Specifically, it is first defined: The edge set ε is bidirectional, including sequence relationship edges and question-concept edges. Sequence relationship edges are added between nodes of adjacent reactions, and question-concept edges are added between corresponding nodes through the correspondence between questions and knowledge concepts. For graph network updates, GCN is used to aggregate v n The neighbor nodes of the next layer are represented by the following update formula: in represents the updated node representation of the nth node in the l+1th layer, in is the adjacency matrix A n The nth line in the table represents node v n Relationships with other nodes; represents the embedding matrix of all nodes in the lth layer, represents the weight matrix of the lth layer, Dropout represents regularization, and ReLu is the activation function; after encoding the question-concept graph, the output representation of each node is expressed as Where L is the number of stacked GCN layers.
5. The knowledge tracking method based on causal invariance decoupling sequence according to claim 1 is characterized by: The specific implementation method of obtaining the time association weight and knowledge association weight in step (2) is as follows: First, from the perspective of time association, the test question at time t+1 is represented as e t+1 Set as the query vector, set the reaction unit representation containing time information as the key vector, use scaled dot product attention, and the weight between the unit at t+1 and η is calculated as follows: in, represents the representation of the future test question at time t+1, represents the reaction unit representation of time η, θ t+1,η Represents the time-related weight; weight matrix and Linear transformations used in attention mechanisms, is the scaling factor; Secondly, from the perspective of knowledge association, the node representation after graph encoding is used to calculate the association between reaction units, and the problem representation at time t+1 is represented as and conceptual representation Set it as the query vector, set the representation of other units in the sequence as the key vector, and the weight is calculated as follows: where ω t+1,η represents the knowledge association weight between the test question at time t+1 in the future and other test questions at time η, ⊙ represents the Hadamard product, and multiplication is performed on the opposite elements; and is the problem and concept representation after graph encoding, the weight matrix and Used for linear transformations.
6. The knowledge tracking method based on causal invariance decoupling sequence according to claim 5 is characterized by: The specific implementation method of obtaining the causal score and trivial score in step (2) is as follows; The calculation formula of causal score is as follows: in represents the causal score between the test question at time t+1 and the response unit at time η, and They represent the time association weight and knowledge association weight used for causal score calculation respectively; It is a masking matrix used to implement timing masking, with the upper triangular elements set to -∞ and the rest set to 0. t+1,μ is the masking value corresponding to t+1 and μ; The triviality score is calculated as follows: in represents a trivial fraction, and denote the time association weight and knowledge association weight used for trivial score calculation, respectively, and σ(·) denotes the sigmoid activation function; Furthermore, in order to completely decompose the reaction sequence into causal and trivial subsequences, the scores of continuous values are converted to discrete values. This is achieved using the gumbel-softmax function as follows: The gumbel-softmax function converts the continuous input vector into a discrete output vector while allowing the gradient to back propagate. and In {0,1}, so Finally, the discretized attention weights are again time-series masked to ensure that no information leakage will occur in the future. Specifically, for the test questions at the future time t+1, if η≥t+1, then and Set to 0, so the attention score of the question at time t+1 in the entire sequence is as follows: in and Represent the final causal score and trivial score of the entire sequence respectively; in addition, the sum of the causal score and trivial score matrices formed by all future test questions is a unit lower triangular matrix, in which all elements on the diagonal and below the diagonal are 1, and the other elements are 0, which is expressed as in 7. The knowledge tracking method based on causal invariance decoupling sequence according to claim 6 is characterized by: The causal score and trivial score are multiplied with the entire reaction sequence to extract the corresponding causal subsequence and trivial subsequence as follows: in and Denote the causal subsequence and trivial subsequence corresponding to time t+1, respectively. Each row in the matrix represents the embedding of a reaction unit. The non-causal or non-trivial part is filled with a zero vector through the Hadamard product. Thus, the reaction sequence is decoupled into two parts, and there is no overlap between the two subsequences, that is, will be After intervention t+1 The conditional probability is expressed as follows: in Represents Z t+1 The set of all possible values, do(·) represents the Do operator; This is approximated by considering a set of operations applied to trivial subsequences, resulting in a fixed number of intervening sequences, which therefore translates to the following approximation: where χ t+1 Represents a trivial subsequence After the operation, the A collection,containing causal subsequences with different contexts; Next, for the trivial subsequence Perform specific intervention operations to obtain the intervention sequence set χ t+1 as follows: in represents the intervention sequence, oper(·) represents three different intervention operations, including removing rem, replacing repl, and inverting inve; (3-3) Intervention sequence representation Finally, each intervention sequence is encoded to obtain the corresponding representation. By applying the LSTM encoder to each intervention sequence, the sequence dependency is captured and the sequence is encoded into a fixed-length representation. Subsequently, the overall representation of the sequence is obtained through the average pooling operation. The formula is as follows: in Represents an intervention sequence The average pooling representation of t+1 Represents a collection of representations; As a causal subsequence Representation; LSTM X represents the response sequence encoder; The representation of a trivial subsequence is calculated as follows: in represents a trivial subsequence representation, and rem(·) represents a removal operation.
8. The knowledge tracking method based on causal invariance decoupling sequence according to claim 7 is characterized by: The future performance prediction task specifically includes: Based on the causal subsequence, trivial subsequence, and future test question representation, the conditional probability of future performance is defined as follows: From this we can know the future performance t+1 is affected by the causal subsequence and the representation of future questions, while the trivial subsequence has no direct causal influence on the prediction; therefore, different intervention sequences can be used for the same future performance prediction task, and their prediction results are roughly similar; in represents the predicted probability of the intervention sequence, and cat[·] represents the concatenation along the feature dimension; and These are trainable parameters that are not shared across different operations. Finally, the binary cross entropy loss function is used to measure the error between the predicted probability and the actual outcome. The loss for each intervention sequence is defined as follows: where r t+1 ∈{0,1} represents the actual response result at time t+1. For different intervention sequences, the loss is calculated separately. Enables the model to extract stable and invariant causal relationships from different sequences.
9. The knowledge tracking method based on causal invariance decoupling sequence according to claim 8 is characterized by: The problem difficulty prediction task specifically includes: Discretize continuous values into difficulty levels and use question difficulty as the prediction target for trivial subsequences. Specifically, first calculate the average correct rate of questions using all answer records, then sort the correct rates and divide them into n and n difficulty levels, each level containing the same number of questions, calculated as follows: where d t+1 represents the difficulty level of the question to be answered at time t+1, f is the mapping function from accuracy to difficulty level, δ(·) is the indicator function, which returns 1 if the condition is true, otherwise it returns 0; q ij and r ij Represent a question and answer in all records respectively; then, use trivial subsequence representation To predict the difficulty level of future questions, as follows: in represents the predicted probability of the difficulty of the question, and is a trainable parameter, cat[·] represents the cascade operation along the feature dimension; finally, binary cross entropy is used to measure the error between the predicted probability and the actual difficulty level of the trivial subsequence: in is the loss value of the problem difficulty prediction task, I(d t+1 ) indicates difficulty d t+1 Whether it belongs to the corresponding difficulty category.
10. The knowledge tracking method based on causal invariance decoupling sequence according to claim 9 is characterized in that: Combining the losses of the future performance prediction task and the problem difficulty prediction task, we calculate the overall loss, which is defined as follows: where λ1, λ2, λ3, and λ4 are weighting coefficients used to balance the contribution of each loss term, and correspond to the losses of deletion, substitution and reversal operations respectively, and is the predicted probability of the problem difficulty.
Citation Information
Patent Citations
Knowledge tracking method and system based on external attention mechanism
CN114861754A
Knowledge tracking method based on graph attention network
CN114911975A