A cold start cross-course knowledge tracking method and system
Patent Information
- Application Number
- CN202610882516.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2046-06-18
AI Technical Summary
[0025]与现有技术相比,本发明至少可实现如下有益效果之一:
Smart Images

Figure CN122415293B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge tracking technology, and in particular to a cold-start cross-course knowledge tracking method and system. Background Technology
[0002] Artificial intelligence-based intelligent teaching and tutoring systems have been widely applied in online education systems, continuously driving the intelligent development of online education. Knowledge tracing (KT), as one of the core technologies in intelligent teaching and tutoring systems, primarily aims to dynamically assess students' changing knowledge status—that is, their level of knowledge mastery—based on their historical answer sequences, and further predict their future learning performance. Knowledge tracing technology is widely used in personalized learning recommendations, adaptive exercise delivery, learning ability assessment, and intelligent tutoring.
[0003] In real-world educational scenarios, the "cold start across courses" problem is frequently encountered: a large amount of student interaction data exists for the source course (such as C programming), but the target course (such as data structures) lacks student answer data that can be used for model training. The goal is to transfer the knowledge tracking ability learned in the source course to the target course. This problem is of great significance in applications such as launching new courses on online education platforms, interdisciplinary learning for students, and rapid deployment of new teaching scenarios.
[0004] Existing cross-course knowledge tracking methods mainly include the following categories: (1) Cross-course knowledge tracing method based on shared representation space These methods achieve cross-course knowledge transfer by constructing a shared representation space between different courses. However, they typically require student interaction data from the target course for model training, domain adaptation, or parameter fine-tuning. Therefore, they still rely on supervised information from the target course and are difficult to apply to true cold-start scenarios where the target course lacks training data.
[0005] (2) Cross-course knowledge tracing method based on overlapping entities The basic idea behind this type of method is to use "overlapping entities" (i.e. students with learning records in both courses) between the source course and the target course to achieve cold start cross-course knowledge tracing.
[0006] These methods require a sufficient number of "overlapping students" (i.e., students with learning records in both courses) between the source and target courses. However, in real-world scenarios, especially between different grades and educational stages, overlapping students are often scarce or even nonexistent, which severely limits the applicability of the methods.
[0007] (3) Cold start method based on early students This method relies on the real answer records of "early students" in the target course to generate simulated data. If there are no early students (e.g., no students at the beginning of a new course launch), or if the number of early students is insufficient, this method cannot be applied. Furthermore, there is an unavoidable distributional difference between the generated simulated data and real student behavior, making its authenticity difficult to guarantee.
[0008] (4) Cross-course knowledge tracing method based on large language model This type of method utilizes the massive external knowledge and reasoning capabilities of Large Language Models (LLMs) to establish conceptual connections between source courses and target courses or to directly trace knowledge.
[0009] These methods typically rely on textual descriptions of the target course topics, semantic information of knowledge points, or natural language context. When the target course only contains topic numbers and lacks effective textual descriptions, these methods are difficult to apply effectively. Furthermore, large language model methods usually have a large parameter scale, resulting in high training and deployment costs. LLM-based methods exhibit uncertainties in concept alignment or text understanding, and the interpretability and stability of their inference results need further verification.
[0010] There is a lack of existing knowledge tracking methods that can achieve cross-course transfer in cold start scenarios without using any student interaction data of the target course (neither real answer records, nor overlapping student records, nor early student records, nor question text descriptions). Summary of the Invention
[0011] Based on the above analysis, the embodiments of the present invention aim to provide a cold-start cross-course knowledge tracking method and system to solve the problem of the lack of existing knowledge tracking methods that can realize cross-course migration in cold-start scenarios without using any student interaction data of the target course.
[0012] On one hand, embodiments of the present invention provide a cold-start cross-course knowledge tracking method, including the following steps: Obtain the answer sequences of multiple students in the source domain course; construct a training sample set based on the answer sequences of multiple students in the source domain course; A sequence neural network model is constructed, which is used to obtain the student's knowledge state representation based on stage state perception, and to predict the answer result based on the student's knowledge state representation; The sequence neural network model is trained based on the training sample set to obtain a trained sequence neural network model; An input sequence is constructed based on the questions to be predicted in the target domain course. The input sequence is then fed into a trained sequence neural network model to obtain the prediction results for the questions to be predicted.
[0013] Based on further improvements to the above method, a training sample set is constructed using student answer data from the source domain course, including: For each interaction in each student's answer sequence, construct a joint encoding of the question and the answer result to obtain the global joint encoding sequence for each student; Extract the joint coding sequence of L consecutive interactions as the historical joint coding sequence; Starting from the next interaction after the beginning of the historical joint coding sequence, extract the question sequence and answer result sequence of L consecutive interactions as the question sequence and answer result sequence to be predicted. A training sample is obtained by taking the historical joint encoding sequence and the question sequence to be predicted as the input sequence and the answer result sequence to be predicted as the label of the sample, and a training sample set is constructed.
[0014] Based on the above method, a further improvement is made to construct the joint coding of questions and answers in the following way:
[0015] in, Students The question ID of the t-th interaction. Students The result of the response in the t-th interaction. Students The joint encoding of the t-th interaction.
[0016] Based on a further improvement of the above method, the sequence neural network model includes an interaction representation module, a stage-aware state modeling module, an attention sequence modeling module, and a prediction module; the input sequence of the sequence neural network model includes a historical joint encoding sequence and a sequence of questions to be predicted; The interaction representation module is used to embed historical joint coding sequences to obtain temporal interaction features; The stage-aware state modeling module is used to extract the learning stage and learning state of the input sequence and jointly encode them to obtain the stage-aware state embedding, and fuse the temporal interaction features and the stage-aware state embedding of the historical jointly encoded sequence to obtain the fused features. The attention sequence modeling module is used to perform causal attention calculations on the fused features and stage-aware state embeddings to obtain a student knowledge state representation. The prediction module is used to predict the answer results based on the student's knowledge state representation.
[0017] Based on a further improvement of the above method, the interaction representation module uses the following method to embed the historical joint coding sequence to obtain the temporal interaction features: The historical joint coding sequence is transformed using an embedding matrix to obtain the joint coding embedding; each position in the historical joint coding sequence is encoded to obtain a position coding vector; The temporal interaction features are obtained by fusing joint encoding embedding and positional encoding vectors.
[0018] Based on a further improvement of the above method, the stage-aware state modeling module extracts the learning stage and learning state of the input sequence and jointly encodes them to obtain the stage-aware state embedding: For each time step of the input sequence, the learning stage ID corresponding to each time step is calculated based on its position in the answer sequence; For each time step of the input sequence, the learning state ID of each time step is determined based on its historical response results; The learning stage ID and learning state ID of each time step are combined and encoded to obtain the stage-aware state ID. The stage-aware state embedding corresponding to the stage-aware state ID is obtained based on the learnable stage-aware embedding table.
[0019] Based on a further improvement of the above method, the attention sequence modeling module uses the following method to perform causal attention calculation to obtain the student's knowledge state representation: The query matrix of the attention mechanism is obtained based on the sequence of questions to be predicted and its stage-aware state embedding; The value matrix and key matrix of the attention mechanism are obtained based on the fusion features; The student's knowledge state representation is obtained by performing multi-head causal attention mechanism calculation.
[0020] Based on the further improvement of the above method, the training loss is calculated using the following formula:
[0021] in, Indicates the total loss. Represents the binary cross-entropy loss. This represents the knowledge component prototype alignment loss. This represents the weighting coefficient.
[0022] Based on the above method, a further improvement is made, and the following formula is used to calculate the knowledge component prototype alignment loss:
[0023] in, This represents the set of common knowledge points between the source domain courses and the target domain courses. Represents a set The number of knowledge points Represents knowledge points in the source domain course A collection of questions, Represents a set The number of questions express The embedding vector of the i-th question. Representing knowledge points prototype vector, Represents the knowledge points in the target domain course A collection of questions, Represents a set The number of questions express The embedding vector of the j-th question. Indicates the weighting coefficient. Indicates the offset. Represents the distance function.
[0024] On the other hand, embodiments of the present invention provide a cold-start cross-course knowledge tracking system, including: The source domain sample set construction module is used to obtain the answer sequences of multiple students in the source domain course; and to construct a training sample set based on the answer sequences of multiple students in the source domain course. The model building module is used to build a sequence neural network model, which is used to obtain the student's knowledge state representation based on stage state perception, and predict the answer result based on the student's knowledge state representation. The model training module is used to train the sequence neural network model based on the training sample set to obtain a trained sequence neural network model; The target domain prediction module is used to construct an input sequence based on the questions to be predicted in the target domain course. The input sequence is then fed into a trained sequence neural network model to obtain the prediction results for the questions to be predicted.
[0025] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects: 1. This invention does not use any student answer data from the target course at all—neither real answer records are required for training nor fine-tuning is needed—it only uses student answer data from the source course to train the model, and after training, it is directly applied to the target course, achieving true zero-sample cold start cross-course knowledge tracing.
[0026] 2. This invention decouples the "stage-state" evolution pattern that students commonly experience during the learning process from the specific content of the questions by constructing a stage-aware state representation that is independent of the course. This allows the evolution pattern learned in the source course to be directly generalized to the target course, thereby solving the fundamental problem that traditional methods cannot transfer knowledge across courses.
[0027] 3. This invention introduces a knowledge component prototype alignment mechanism. It utilizes the static knowledge point mapping relationship shared between the source and target courses as prior structural information. The average embedding value of questions belonging to the same knowledge point in the source course is used as the prototype of that knowledge point. This causes the question embedding vectors belonging to that knowledge point in both the source and target courses to move closer to this prototype, thereby achieving structural alignment of the question embedding space. It only requires a static question-knowledge point mapping relationship, filling the gap in existing methods at the knowledge point-question structural alignment level.
[0028] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0029] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Figure 1 This is a flowchart of the cold start cross-course knowledge tracking method according to an embodiment of the present invention; Figure 2 This is a block diagram of a cold-start cross-course knowledge tracking system according to an embodiment of the present invention. Detailed Implementation
[0030] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0031] A specific embodiment of the present invention discloses a cold-start cross-course knowledge tracking method, such as... Figure 1 As shown, it includes the following steps: S1. Obtain the answer sequences of multiple students in the source domain course; construct a training sample set based on the answer sequences of multiple students in the source domain course; S2. Construct a sequence neural network model, wherein the sequence neural network is used to obtain the student's knowledge state representation based on stage state perception, and to predict the answer result based on the student's knowledge state representation; S3. Train the sequence neural network model based on the training sample set to obtain a trained sequence neural network model; S4. Construct an input sequence based on the questions to be predicted in the target domain course, and input the input sequence into the trained sequence neural network model to obtain the prediction result of the questions to be predicted.
[0032] Compared with existing technologies, the cold-start cross-course knowledge tracing method provided in this embodiment constructs a training sample set by acquiring the answer sequence of the source domain course, constructs a sequence neural network model based on stage state perception to obtain the student knowledge state representation, and predicts the answer result based on the student knowledge state representation. The training sample set is used to train the sequence neural network model, learns the "stage-state" two-level evolution pattern that is common in the evolution of student knowledge state in the source course, and then directly generalizes the pattern to the target course. It does not use any student answer data of the target course at all—neither real answer records are required for training, nor is fine-tuning required—it only uses the student answer data of the source course to train the model. After training, it is directly applied to the target course, realizing true zero-sample cold-start cross-course knowledge tracing. This invention does not generate any simulated data. The model is trained directly on real data from the source course and evaluated directly on real data from the target course, thus avoiding the distribution bias problem caused by simulated data.
[0033] In the source domain course, each student's answer interaction is a chronological sequence. To avoid confusion in the interaction order between different students, this invention constructs an independent interaction sequence for each student.
[0034] Let the student ID be ,student The length of the complete answer sequence is That is, the student has a total of This is the second question-and-answer interaction. The student's complete question-and-answer sequence is represented as follows:
[0035] in, Indicates that student u is in the first... The question ID answered in each interactive question-and-answer session. Student u in The answer results in the second question-answering interaction Indicates that the answer is correct. This indicates an incorrect answer. This represents the total number of questions in the source domain course. . .
[0036] During implementation, answer sequences from multiple students in the source domain course are collected. A training sample set is constructed based on these student answer sequences. Specifically, this includes: For each interaction in each student's answer sequence, construct a joint encoding of the question and the answer result to obtain the global joint encoding sequence for each student; Extract the joint coding sequence of L consecutive interactions as the historical joint coding sequence; Starting from the next interaction after the beginning of the historical joint coding sequence, extract the question sequence and answer result sequence of L consecutive interactions as the question sequence and answer result sequence to be predicted. A training sample is obtained by taking the historical joint encoding sequence and the question sequence to be predicted as the input sequence and the answer result sequence to be predicted as the label of the sample, and a training sample set is constructed.
[0037] Specifically, for students The Secondary interaction The joint coding of questions and answers is constructed using the following method:
[0038] in, Students The question ID of the t-th interaction. Students The result of the response in the t-th interaction. Students The joint encoding of the t-th interaction.
[0039] This encoding combines the question ID and the answer result into one, and then maps it to a vector through an embedding layer, avoiding the overhead of encoding and concatenating them separately.
[0040] The model requires a fixed-length input; let the length of the model input history window be... (In one embodiment of the present invention) That is, the model uses consecutive [data / data] each time. Prediction is made based on historical interactions.
[0041] Use a length of The sliding window extracts the joint coding sequence of L consecutive interactions as the historical joint coding sequence.
[0042] For example, for students Assume the starting position of the current sliding window in the global position of the answer sequence is... The joint encoding sequence corresponding to the current window is: , for the joint coding sequence of sample history .
[0043] The sequence of questions to be predicted and the sequence of answers to be predicted are extracted, starting from the next interaction after the beginning of the historical joint coding sequence. The corresponding sequence of questions to be predicted is: The sequence of responses to be predicted is as follows: .
[0044] A training sample is obtained by using the historical joint encoding sequence and the sequence of questions to be predicted as input sequences, and the sequence of answers to be predicted as labels y. That is, the input sequence of the sequence neural network model includes the historical joint encoding sequence and the sequence of questions to be predicted.
[0045] During implementation, the sliding window replacement step size is... (In one embodiment of the present invention) ).
[0046] Specifically, the constructed sequence neural network model includes an interaction representation module, a stage-aware state modeling module, an attention sequence modeling module, and a prediction module; The interaction representation module is used to embed historical joint coding sequences to obtain temporal interaction features; The stage-aware state modeling module is used to extract the learning stage and learning state of the input sequence and jointly encode them to obtain the stage-aware state embedding, and fuse the temporal interaction features and the stage-aware state embedding of the historical jointly encoded sequence to obtain the fused features. The attention sequence modeling module is used to perform causal attention calculations on the fused features and stage-aware state embeddings to obtain a student knowledge state representation. The prediction module is used to predict the answer results based on the student's knowledge state representation.
[0047] Specifically, the interaction representation module is responsible for converting the historical interaction sequence (i.e., the historical joint encoding sequence obtained in step S1) into a dense feature representation that can be used for subsequent attention computation, namely, the sequential interaction feature.
[0048] Specifically, the interaction representation module uses the following method to embed the historical joint coding sequence to obtain temporal interaction features: The historical joint coding sequence is transformed using an embedding matrix to obtain the joint coding embedding; each position in the historical joint coding sequence is encoded to obtain a position coding vector; The temporal interaction features are obtained by fusing joint encoding embedding and positional encoding vectors.
[0049] In implementation, a learnable embedding matrix is used. Map each element of the historical joint coding sequence to a A dimensional vector.
[0050] In practice, a learnable positional embedding matrix is used to capture the temporal sequence information in the sequence. Assign a unique identifier to each position in the historical joint coding sequence. 3D vector. The positional encoding here depends only on A local area within a long window. Represents a real number.
[0051] The temporal interaction features of the input sequence are obtained by adding the joint encoding embedding and the positional encoding vector. .
[0052] The stage-aware state modeling module is used to extract the learning stage and learning state of the input sequence and jointly encode them to obtain the stage-aware state embedding. It also fuses the temporal interaction features and the stage-aware state embedding of the historical jointly encoded sequence to obtain the fused features.
[0053] Specifically, the stage-aware state modeling module extracts the learning stage and learning state of the input sequence and jointly encodes them to obtain the stage-aware state embedding: For each time step of the input sequence, the learning stage ID corresponding to each time step is calculated based on its position in the answer sequence; For each time step of the input sequence, the learning state ID of each time step is determined based on its historical response results; The learning stage ID and learning state ID of each time step are combined and encoded to obtain the stage-aware state ID. The stage-aware state embedding corresponding to the stage-aware state ID is obtained based on the learnable stage-aware embedding table.
[0054] The stage-aware state modeling module generates stage-aware state embeddings based on the student's global learning progress (learning stage) and recent answer accuracy (learning state). It should be noted that the stage-aware state modeling module extracts the learning stage and learning state from the historical joint encoded sequence and the question sequence to be predicted using the above steps, and then jointly encodes them to obtain the stage-aware state embeddings for the historical joint encoded sequence and the question sequence to be predicted, respectively.
[0055] Specifically, for each time step of the input sequence, the learning stage ID corresponding to each time step is calculated based on its position in the answer sequence.
[0056] During implementation, the learning phase will be divided into: Each stage. In one embodiment of the invention. These correspond to the initial learning stage, the consolidation stage, and the proficiency stage, respectively.
[0057] For each time step of the historical joint coding sequence, the learning stage ID corresponding to each time step is calculated in the following way:
[0058] in, Let represent the learning stage ID corresponding to the i-th time step, and t represent the sequence number of the i-th time step in the answer sequence. This represents the length of the answer sequence for the u-th student. This indicates the total number of learning stages. This indicates rounding down to the nearest integer.
[0059] when hour, This indicates the initial learning stage. When... , , indicating the proficiency stage.
[0060] For each time step in the sequence of questions to be predicted, the formula for calculating its learning stage ID is:
[0061] in, This represents the maximum number of interactions for a single student in the source domain course.
[0062] To simulate the scenario where the length of the complete answer sequence is unknown in the target domain course, during training on the source domain data, it is assumed that the length of the complete answer sequence corresponding to the length of the question sequence to be predicted is unknown, and it is set to the maximum number of times a single student can answer questions in the source domain. .
[0063] The learning stage division of this invention depends only on the relative position of the interaction and is independent of the specific course content and the difficulty of the questions. Therefore, it has a consistent semantic meaning across different courses, which facilitates cross-course transfer.
[0064] For each time step of the historical joint encoding sequence and the question sequence to be predicted, the learning state ID of each time step is determined based on its historical answer results.
[0065] Set the window size used to calculate the learning state to be [size missing]. (In one embodiment of the present invention) The learning state ID for each time step is determined as follows:
[0066]
[0067] in, This represents the learning state ID at the i-th time step. Represents the time step before the i-th time step The accuracy rate of historical answers Represents the first... The answer results at each time step.
[0068] Assume the number of learning states is ,For example (Corresponding to "unskilled" and "skilled" states respectively). Through a preset threshold... (In one embodiment of the present invention) According to accuracy Determine the corresponding learning status ID.
[0069] During implementation, the threshold The effective sliding window accuracy of all students in the statistical source domain course (i.e., all...) can be pre-calculated before training in the following way: (corresponding acc value), take its p-th percentile to obtain In one embodiment of the invention, p = 50 (i.e., the median).
[0070] The advantage of using a global quantile threshold instead of a fixed threshold (fixed threshold 0.5) in this invention is that different courses and sets of questions of varying difficulty will lead to differences in the overall distribution of historical accuracy. For example, questions in a C programming course may be generally easier, resulting in a higher average student accuracy (e.g., 75%), while questions in a data structures course may be generally more difficult, resulting in a lower average student accuracy (e.g., 55%). If a fixed threshold of 0.5 is used, the state distribution of the two courses will be extremely unbalanced; however, using a quantile threshold (e.g., the median) ensures that the number of "proficient" and "unproficient" students in each course is approximately equal, guaranteeing statistical consistency of the state criteria when transferring between courses.
[0071] For each time step of the historical joint coding sequence and the sequence of questions to be predicted, the learning stage ID and learning state ID of each time step are combined and encoded in the following way to obtain the stage-aware state ID of each time step:
[0072] This represents the stage-aware state ID at the i-th time step of the input sequence.
[0073] Its function is to ensure Starting from 1, The value range is from 1 to Z × M.
[0074] The stage-aware state embedding corresponding to the stage-aware state ID is obtained based on the learnable stage-aware embedding table.
[0075] Learnable stage-aware embedding table The size is , This indicates the dimension of the embedding. During implementation, the stage-aware embedding table is consulted to retrieve the stage-aware state ID— This is mapped to the corresponding stage-aware state embedding.
[0076] The stacked representation of stage-aware state embeddings for all time steps of the historical joint coding sequence is as follows: .
[0077] The stacked representation of the stage-aware state embeddings for all time steps of the sequence of questions to be predicted is as follows: .
[0078] The stage-aware state of temporal interaction features and historical joint encoded sequences are embedded and fused to obtain fused features. ,in, This indicates the fusion feature.
[0079] The role of the attention sequence modeling module is to identify which historical moments are most important to the current question to be predicted based on the sequence of students' historical interactions, and then aggregate the important information to form the student's knowledge status of the current question.
[0080] During implementation, a causal multi-head self-attention mechanism is employed to ensure that the model predicts the first... When answering the question for the second time, you can only see the first to the second attempts. Historical information alone cannot foresee the future. Information is aggregated from historical interactions to generate a representation of the student's current knowledge state.
[0081] Specifically, the attention sequence modeling module uses the following method to perform causal attention calculations to obtain the student's knowledge state representation: The query matrix of the attention mechanism is obtained based on the sequence of questions to be predicted and its stage-aware state embedding; The value matrix and key matrix of the attention mechanism are obtained based on the fusion features; The student's knowledge state representation is obtained by performing multi-head attention mechanism calculations.
[0082] Specifically, the attention mechanism query is obtained based on the sequence of questions to be predicted and its stage-aware state embedding.
[0083] The sequence of questions to be predicted is denoted as follows: Through the question embedding layer Map each of its questions to The dimensional vector yields the embedding vector for each question.
[0084] The embedding vector of the question sequence to be predicted is added to the stage-aware state embedding of the question sequence to be predicted, and then multiplied by a learnable weight matrix. This yields the query matrix. .
[0085] .
[0086] The query matrix does not compute temporal interaction features because the order of the questions to be predicted does not need to be distinguished. Each query independently performs attention calculations with the historical sequence and outputs the corresponding prediction. The model does not need to know which query it is, but only which interactions in the history are important for this question to be predicted.
[0087] The fusion feature X of historical temporal interaction features and the stage-aware state representation of historical joint coding sequences is mapped to a key matrix K and a value matrix V, respectively:
[0088]
[0089] in, and Both represent learnable weight matrices.
[0090] To enhance the model's expressive power, a multi-head attention mechanism is employed. , , It is split into H heads along the feature dimension (H=8 in one embodiment of the invention), and the dimension of each head is... , No. The size is represented as: , , .
[0091] Attention calculation for each head uses scaled dot product attention and introduces a causal mask to ensure that the current position can only focus on historical positions (i.e., cannot see future information).
[0092] Single-head attention is calculated as follows:
[0093] The superscript T indicates transpose. This represents the softmax function. The causal mask matrix is defined as follows:
[0094] Multi-head attention fusion is:
[0095] in This indicates the output projection matrix.
[0096] Next, residual connections and layer normalization are applied: ,in, Representation layer normalization.
[0097] Then, the student knowledge state representation is obtained through feedforward network, residual connection and layer normalization. :
[0098]
[0099] in, , This represents the learnable weight matrix. and Indicates bias.
[0100] In practice, to enhance the model depth, the multi-head attention layer and feedforward network layer mentioned above can be stacked into N layers, with the parameters of each layer being learned independently, and the output of the nth layer serving as the input of the (n+1)th layer.
[0101] The prediction module predicts the answer result based on the student's knowledge state representation. It should be noted that this embodiment of the invention uses multi-step prediction. The prediction module employs a linear transformation layer and a sigmoid activation function to predict the answer result.
[0102] The constructed sequence neural network model is trained based on the training sample set to obtain a trained sequence neural network model.
[0103] Specifically, the training loss is calculated using the following formula:
[0104] in, Indicates the total loss. Represents the binary cross-entropy loss. This represents the knowledge component prototype alignment loss. This represents the weighting coefficient (set to 0.2 in one embodiment of the invention).
[0105] During implementation, the binary cross-entropy loss between the predicted and actual responses is calculated using the following formula:
[0106] in, This represents the response result predicted by the model for the i-th sample at the j-th time step. Let B represent the actual response result of the i-th sample at the j-th time step, B represent the size of the training batch, and L represent the length of the response result sequence.
[0107] To improve cross-course transfer performance, in one embodiment of the present invention, the training loss includes knowledge component prototype alignment loss.
[0108] Specifically, the knowledge component prototype alignment loss is calculated using the following formula:
[0109] in, This represents the set of common knowledge points between the source domain courses and the target domain courses. Represents a set The number of knowledge points Represents knowledge points in the source domain course A collection of questions, Represents a set The number of questions express The embedding vector of the i-th question. Representing knowledge points prototype vector, Represents the knowledge points in the target domain course A collection of questions, Represents a set The number of questions express The embedding vector of the j-th question. This represents the weighting coefficient, for example, 1.0.
[0110] To represent the distance function, one embodiment of the present invention uses L2 distance: .
[0111] During training, the question embeddings of the source domain courses and the target domain courses are placed in the same embedding table. Specifically, an offset is added to each question ID of the target course. This maps the data to the latter half of the embedded table, avoiding conflicts with the source course ID. In this embodiment... (Total number of questions in the source domain course). Therefore, the number of questions in the target domain course. ( The global embedding index of ) is Its embedding vector is .
[0112] The first term makes the embedding of questions with the same knowledge point in the source domain course move closer to the prototype, and the second term makes the embedding of questions with the same knowledge point in the target domain course move closer to the same prototype.
[0113] Specifically, the following formula is used to calculate the first... The prototype vector of each knowledge point:
[0114] in, express The embedding vector of the i-th question, i.e. .
[0115] By processing the question-knowledge point datasets of source domain courses and target domain courses, the mapping relationship between questions and knowledge points can be obtained, and an additional knowledge component prototype alignment loss can be introduced. This approach embeds questions on the same knowledge points from both courses closer together in the vector space, thereby improving cross-course transfer performance. This loss is calculated only during training of the source course and does not require any student answer data from the target course; it utilizes only the static knowledge point mapping of the target course.
[0116] During implementation, the Adam optimizer is used for parameter updates: Learning rate: ; The exponential decay rate estimated by the first moment: ; The exponential decay rate estimated by the second moment: ; Numerical stability term: .
[0117] The batch size is set to 32, and the maximum number of training rounds is set to 50.
[0118] An early stopping strategy is employed to avoid overfitting: After each training round, the AUC of the model on the source course validation set is calculated. If the current validation set AUC improves by more than 1e-4 compared to the historical best value, the current model parameters are saved, and the early stopping counter is reset to 0; otherwise, the early stopping counter is incremented by 1. When the early stopping counter has not improved for 10 consecutive rounds, training is stopped, and the trained sequence neural network model is obtained.
[0119] The parameters of a trained sequence neural network model are fixed and no further fine-tuning or retraining is required.
[0120] During implementation, for students in the target domain course, the following state variables are maintained independently: Number of questions completed Initially .
[0121] List of historical answer results It is initially empty.
[0122] Historical joint coding list It is initially empty.
[0123] Sliding window accuracy Initially (When there is no history).
[0124] Current stage ID ( ), Status ID ( Stage-aware state ID ( ) is calculated dynamically at each step.
[0125] If students haven't answered any questions in the target domain course, and the current question to be predicted is the first question, then the historical joint encoding list in the constructed input sequence... All elements are 0, the sequence of questions to be predicted The first element is the ID of the question to be predicted, and the rest are all 0.
[0126] Assuming the student has completed Answer the questions ( The true history is known. Now we need to predict the [missing information]. This is the second time I've answered a question; the question ID is... (Student subscripts omitted) ).
[0127] Construct the input sequence based on the questions to be predicted. The model requires an input length of [length missing]. The historical joint coding sequence.
[0128] When t is less than L, left padding is used: Create a length of array All initialized to ( (This indicates "no actual interaction").
[0129] Use the existing A real joint code The first few elements are placed into the array sequentially. One position.
[0130] Remaining positions (subscripts) arrive Keep as .
[0131] At the same time, construct the current question sequence. For length is The array, only in the first... Place the question to be predicted in one position. Fill in the remaining positions .
[0132] If t is greater than or equal to L, then the input sequence is constructed in the same way as the sample input sequence is constructed in the source domain course.
[0133] The input sequence is fed into a trained sequence neural network model to predict the answer result.
[0134] It should be noted that when applying a trained sequence neural network model for inference in the target domain course, for When determining the stage-aware state ID for each time step, if the data for that time step is filled with 0s, then the corresponding stage-aware state ID is 0. Otherwise, the learning stage ID and learning state ID are calculated separately and then combined to obtain the stage state ID.
[0135] The formula for calculating the learning state ID is described above. Calculation formula. Since the total number of questions a student will answer in the future cannot be predicted, the learning stage ID is calculated based on the maximum number of questions a single student can answer in a pre-defined source domain. Calculated, i.e.
[0136] During implementation, for example .
[0137] In the target domain course, the actual interaction results are obtained after each student answers a question, and the number of completed answers is updated accordingly. List of historical answer results Historical joint coding list .
[0138] The update process described above involves only simple arithmetic operations and table lookups, without retraining model parameters or calculating gradients. Therefore, the computational overhead is minimal, enabling real-time dynamic updates. This allows the model to continuously track changes in students' knowledge status and adapt to their dynamic behavioral patterns during the learning process.
[0139] This invention does not use any student interaction data from the target course at all; it only uses student answer data from the source course to train the model, and then applies it directly to the target course after training.
[0140] This invention was validated on six cross-course transfer tasks (C→CPP, CPP→C, C→DS, DS→C, Python→DS, Java→DS), all of which did not use any training data from the target course. Table 1 shows a comparison of the sequence neural network model of this invention with other existing models.
[0141] Traditional knowledge tracing methods (DKT, DKT+, Deep-IRT, DKVMN, GKT, SAKT, AKT, etc.) generally perform poorly in cross-course scenarios: DKT's average AUC on six tasks is only 0.5020 (close to random guessing), SAKT's AUC on the C→DS task is only 0.4894 (lower than random guessing), and GKT is the best performing traditional method with an average AUC of 0.5286, but it is still far lower than the present invention.
[0142] This invention decouples the "stage-state" dual-level evolutionary pattern commonly observed in students' learning process from specific question content through a stage-aware state modeling module. It utilizes a knowledge component prototype alignment mechanism to achieve structural alignment of the question embedding space through static knowledge point mapping. Experimental quantitative results show that this invention achieves an average AUC of 0.6503 and an average ACC of 0.7590 on six cross-course tasks using a sequence neural network model. On all six cross-course tasks, the AUC and ACC of this invention significantly outperform all baseline methods. The average AUC (0.6503) of this invention is 23.0% higher than the best traditional method, GKT (0.5286). The ACC of this invention, exceeding 0.76, indicates that the stage-state joint evolutionary pattern can be successfully transferred across courses.
[0143] Table 1 Model Performance Comparison Table
[0144] One specific embodiment of the present invention discloses a cold-start cross-course knowledge tracking system, such as... Figure 2 As shown, it includes: The source domain sample set construction module is used to obtain the answer sequences of multiple students in the source domain course; and to construct a training sample set based on the answer sequences of multiple students in the source domain course. The model building module is used to build a sequence neural network model, which is used to obtain the student's knowledge state representation based on stage state perception, and predict the answer result based on the student's knowledge state representation. The model training module is used to train the sequence neural network model based on the training sample set to obtain a trained sequence neural network model; The target domain prediction module is used to construct an input sequence based on the questions to be predicted in the target domain course. The input sequence is then fed into a trained sequence neural network model to obtain the prediction results for the questions to be predicted.
[0145] The above-described method and system embodiments are based on the same principles, and their related aspects can be referenced from each other to achieve the same technical effects. For specific implementation processes, please refer to the foregoing embodiments, which will not be repeated here.
[0146] Electronic device example: One specific implementation of this application discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the cold start cross-course knowledge tracing method in the method embodiment.
[0147] Examples of readable storage media: One specific implementation of this application discloses a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the cold-start cross-course knowledge tracing method in the method embodiment.
[0148] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0149] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A cold-start cross-course knowledge tracking method, characterized in that, Includes the following steps: Obtain the answer sequences of multiple students in the source domain course; construct a training sample set based on the answer sequences of multiple students in the source domain course; A sequence neural network model is constructed, which is used to obtain the student's knowledge state representation based on stage state perception, and to predict the answer result based on the student's knowledge state representation; The sequence neural network model is trained based on the training sample set to obtain a trained sequence neural network model; An input sequence is constructed based on the questions to be predicted in the target domain course. The input sequence is then fed into a trained sequence neural network model to obtain the prediction results of the questions to be predicted. The sequence neural network model includes an interaction representation module, a stage-aware state modeling module, an attention sequence modeling module, and a prediction module; the input sequence of the sequence neural network model includes a historical joint encoding sequence and a sequence of questions to be predicted; The interaction representation module is used to embed historical joint coding sequences to obtain temporal interaction features; The stage-aware state modeling module is used to extract the learning stage and learning state of the input sequence and jointly encode them to obtain the stage-aware state embedding, and fuse the temporal interaction features and the stage-aware state embedding of the historical jointly encoded sequence to obtain the fused features. The attention sequence modeling module is used to perform causal attention calculations on the fused features and stage-aware state embeddings to obtain a student knowledge state representation. The prediction module is used to predict the answer results based on the student's knowledge state representation. The training loss is calculated using the following formula: in, Indicates the total loss. Represents the binary cross-entropy loss. This represents the knowledge component prototype alignment loss. Indicates the weighting coefficient; The knowledge component prototype alignment loss is calculated using the following formula: in, This represents the set of common knowledge points between the source domain courses and the target domain courses. Represents a set The number of knowledge points This represents the knowledge points in the source domain course. A collection of questions, Represents a set The number of questions express The embedding vector of the i-th question. Representing knowledge points prototype vector, Represents the knowledge points in the target domain course A collection of questions, Represents a set The number of questions express The embedding vector of the j-th question. Indicates the weighting coefficient. Indicates the offset. Represents the distance function.
2. The cold-start cross-course knowledge tracking method according to claim 1, characterized in that, A training sample set is constructed based on student answer data from the source domain courses, including: For each interaction in each student's answer sequence, construct a joint encoding of the question and the answer result to obtain the global joint encoding sequence for each student; Extract the joint coding sequence of L consecutive interactions as the historical joint coding sequence; Starting from the next interaction after the beginning of the historical joint coding sequence, extract the question sequence and answer result sequence of L consecutive interactions as the question sequence and answer result sequence to be predicted. A training sample is obtained by taking the historical joint encoding sequence and the question sequence to be predicted as the input sequence and the answer result sequence to be predicted as the label of the sample, and a training sample set is constructed.
3. The cold-start cross-course knowledge tracking method according to claim 2, characterized in that, The joint coding of questions and answers is constructed using the following method: in, Students The question ID of the t-th interaction. Students The result of the response in the t-th interaction. Students The joint encoding of the t-th interaction.
4. The cold-start cross-course knowledge tracking method according to claim 1, characterized in that, The interaction representation module uses the following method to embed the historical joint coding sequence to obtain the temporal interaction features: The historical joint coding sequence is transformed using an embedding matrix to obtain the joint coding embedding; each position in the historical joint coding sequence is encoded to obtain a position coding vector; The temporal interaction features are obtained by fusing joint encoding embedding and positional encoding vectors.
5. The cold-start cross-course knowledge tracking method according to claim 1, characterized in that, The stage-aware state modeling module extracts the learning stage and learning state of the input sequence and jointly encodes them to obtain the stage-aware state embedding: For each time step of the input sequence, the learning stage ID corresponding to each time step is calculated based on its position in the answer sequence; For each time step of the input sequence, the learning state ID of each time step is determined based on its historical response results; The learning stage ID and learning state ID of each time step are combined and encoded to obtain the stage-aware state ID. The stage-aware state embedding corresponding to the stage-aware state ID is obtained based on the learnable stage-aware embedding table.
6. The cold-start cross-course knowledge tracking method according to claim 5, characterized in that, The attention sequence modeling module uses the following method to perform causal attention calculation to obtain the student's knowledge state representation: The query matrix of the attention mechanism is obtained based on the sequence of questions to be predicted and its stage-aware state embedding; The value matrix and key matrix of the attention mechanism are obtained based on the fusion features; The student's knowledge state representation is obtained by performing multi-head causal attention mechanism calculation.
7. A cold-start cross-course knowledge tracking system, characterized in that, The cold start cross-course knowledge tracing method as described in any one of claims 1-6 includes: The source domain sample set construction module is used to obtain the answer sequences of multiple students in the source domain course; and to construct a training sample set based on the answer sequences of multiple students in the source domain course. The model building module is used to build a sequence neural network model, which is used to obtain the student's knowledge state representation based on stage state perception, and predict the answer result based on the student's knowledge state representation. The model training module is used to train the sequence neural network model based on the training sample set to obtain a trained sequence neural network model; The target domain prediction module is used to construct an input sequence based on the questions to be predicted in the target domain course. The input sequence is then fed into a trained sequence neural network model to obtain the prediction results for the questions to be predicted.
Citation Information
Patent Citations
Knowledge tracking method and system based on external attention mechanism
CN114861754A
Knowledge tracking method based on knowledge concept association and historical attention information
CN118747527A