Collaborative knowledge tracing method based on difficulty perception
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF ELECTRONICS SCI & TECH OF CHINA
- Filing Date
- 2026-04-14
- Publication Date
- 2026-06-26
AI Technical Summary
Existing collaborative knowledge tracing methods fail to effectively incorporate question difficulty factors, resulting in a mismatch between collaborative information and cognitive levels. This affects the accuracy and stability of knowledge state prediction, especially when students have limited historical answer data or are in the cold start phase, leading to unstable similarity calculations.
By introducing a difficulty perception mechanism, the difficulty of questions is acquired and standardized, students' difficulty perception behavior characteristics are constructed, collaborative reference students with matching difficulty are selected, collaborative information filtering for difficulty constraints is carried out, and knowledge status is predicted through long short-term memory networks and difficulty perception attention mechanisms.
It improves the accuracy and stability of knowledge state prediction, reduces noise interference, enhances the robustness of the model in data-sparse scenarios, and improves the effect of personalized learning recommendations.
Smart Images

Figure CN122045435B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge tracing technology, and in particular to a collaborative knowledge tracing method based on difficulty perception. Background Technology
[0002] With the rapid development of online education platforms and intelligent teaching systems, knowledge tracking technology, which models and predicts students' knowledge status based on their historical learning behavior, has been widely applied in scenarios such as personalized practice recommendation, learning path planning, and learning outcome evaluation. Existing knowledge tracking methods typically use students' answer sequences as input and employ statistical models or deep learning models to characterize the dynamic changes in students' knowledge levels.
[0003] In existing technologies, collaborative knowledge tracing methods, while modeling the learning behavior of the target student, incorporate historical answer data from other students as supplementary information. By calculating the similarity between students, several similar students are selected, and their learning trajectories are used to supplement the prediction of the target student's knowledge status. It typically constructs student similarity based on indicators such as overlap in student answer records, knowledge point coverage, or overall accuracy, and then performs collaborative modeling based on this.
[0004] Another approach involves explicitly incorporating question difficulty information during knowledge tracing. By treating question difficulty as an additional feature or parameter, it works in conjunction with student ability in the prediction model, thereby improving the model's ability to fit student responses. This type of method primarily focuses on the performance differences of individual students on questions of varying difficulty, aiming to improve the accuracy of characterizing individual student knowledge states.
[0005] Although existing solutions have improved the predictive performance of knowledge tracing models to some extent, they still have the following shortcomings in practical applications:
[0006] First, existing collaborative knowledge tracing methods typically fail to effectively differentiate between question difficulty levels when constructing student similarity. These methods often select similar students solely based on the superficial similarity of their answer records (e.g., answers to the same questions or knowledge points), without considering whether the difficulty ranges corresponding to students' correct answers are consistent. Since students' performance on questions of different difficulty levels varies significantly, this deficiency can easily lead to students with different ability boundaries but superficially similar answer trajectories being incorrectly identified as similar students. This introduces cognitively mismatched collaborative information, reducing the reliability of the prediction results.
[0007] Secondly, while some techniques incorporate question difficulty information, difficulty modeling is limited to the individual student dimension and is not used for student similarity calculations or collaborative information filtering in the collaborative modeling process. In this case, question difficulty information cannot constrain the source of collaborative information, leading to learning behaviors from a wide range of difficulty levels being included in the collaborative modeling process simultaneously, further amplifying collaborative information noise.
[0008] Furthermore, when there is limited historical student response data or the student is in the cold start phase, existing collaborative knowledge tracing methods heavily rely on a limited number of response records for selecting similar students, making them susceptible to the influence of accidental responses. Without the constraint of a difficulty dimension, a small number of response records cannot accurately reflect students' true ability levels, leading to unstable similarity calculation results and a significant decrease in collaborative modeling effectiveness.
[0009] In summary, existing technologies for collaborative knowledge tracing generally fail to effectively incorporate question difficulty factors during the student similarity modeling and collaborative information utilization stages. This leads to cognitive biases in the collaborative information, making it difficult to improve prediction accuracy while maintaining stability. Therefore, it is necessary to propose a new technical solution that introduces a constraint mechanism based on question difficulty during collaborative knowledge tracing to improve the effectiveness of collaborative information and the accuracy of knowledge state prediction. Summary of the Invention
[0010] The purpose of this invention is to provide a difficulty-aware collaborative knowledge tracking method to solve the technical problem that existing collaborative knowledge tracking technologies fail to effectively consider the difficulty of questions during student similarity modeling, resulting in a mismatch of collaborative information at the cognitive level, which affects the accuracy and stability of knowledge state prediction.
[0011] The technical solution adopted in this invention is: a difficulty-aware collaborative knowledge tracing method, which includes the following steps:
[0012] Step 1: Determining and Standardizing the Difficulty of the Questions
[0013] The difficulty of each question in the student's historical answer sequence is obtained and normalized so that the difficulty of different questions is mapped to a unified continuous difficulty range. Multiple ordered difficulty anchors are set on this difficulty range, and each difficulty anchor is equipped with a learnable prototype vector. The historical answer at each time step in the historical answer sequence includes the question answered and the answer result.
[0014] Step 2, Construction of Students' Difficulty Perception Behavioral Characteristics
[0015] The weight of each difficulty anchor point is calculated based on the distance between the question difficulty and the difficulty anchor point, thus obtaining the weight of each question at each difficulty anchor point.
[0016] Based on students' historical answer sequences, the correct answer rate corresponding to the difficulty level of each difficulty anchor point is calculated. The correct answer rate is smoothed based on the weight of the difficulty anchor point to obtain students' difficulty perception behavior characteristics, which are used to characterize the distribution characteristics of students' abilities at different question difficulty levels.
[0017] Compared to constructing student features based solely on answer accuracy or question overlap, this step obtains corresponding weights based on question difficulty and the distance between each difficulty anchor point. This allows a single interaction to contribute to multiple difficulty levels to varying degrees, enabling student behavioral features to distinguish the differences in students' answers at different difficulty levels. This avoids incorrect clustering of students with different ability boundaries in the feature space.
[0018] Step 3: Filtering similar students based on difficulty-aware features
[0019] Based on the students' difficulty perception behavior characteristics, the similarity between the target student and each student in the student group is calculated, and based on the similarity, at least one similar student whose answer performance in the question difficulty dimension is similar to that of the target student is selected to form a collaborative reference student set.
[0020] By introducing difficulty-aware behavioral features into the similarity calculation process, this step effectively avoids the cognitive mismatch problem caused by screening similar students based solely on a small amount of overlapping answers or overall accuracy, and improves the reliability of collaborative information sources.
[0021] Step 4: Collaborative Information Filtering Based on Difficulty Constraints
[0022] Using the target question's difficulty level as the target difficulty, and based on the target question and target difficulty, selecting historical answers from the co-reference student set that match the target difficulty level to form difficulty-aligned co-reference information:
[0023] Among them, the historical responses that matched the screening difficulty include:
[0024] First, choose a historical question that is the same as the target question to answer;
[0025] When the number of historical answers that match the target question is less than the preset number of filters, continue to select historical answers whose difficulty level does not exceed the preset difficulty threshold.
[0026] If the number of historical responses that meet the preset difficulty threshold is still insufficient for screening, the difficulty threshold is relaxed to supplement the responses; or responses are supplemented sequentially according to their proximity to the target difficulty.
[0027] This step limits the difficulty range of collaborative information through a difficulty constraint mechanism, thereby reducing noise information introduced by difficulty differences from the source.
[0028] Step 5: Collaborative Knowledge State Prediction
[0029] The system jointly models the target student's historical answer sequence and collaborative reference information. It embeds and fuses the questions, answer results and difficulty in the historical answer sequence and collaborative reference information to output the target student's answer prediction result for the target question. The difficulty embedding is represented as the weighted sum of the weight of the question at each difficulty anchor point and the learnable prototype vector corresponding to each difficulty anchor point.
[0030] By following the steps above, the collaborative information is aligned with the target student's current prediction task in terms of question difficulty, thereby improving the accuracy and stability of knowledge state prediction. This is especially suitable for application scenarios where there is limited historical student answer data.
[0031] Furthermore, in step 1, the unified continuous difficulty range is [0,1].
[0032] Furthermore, in step 2, the weights of each difficulty anchor point are set as follows:
[0033]
[0034] in, Indicates the first The weight of each difficulty anchor point Indicates the difficulty of the question. Indicates the first The difficulty value of each difficulty anchor point. ; This represents the difficulty value of any given difficulty anchor point. ,in, Indicates the number of difficulty anchor points. This indicates the set temperature over-parameter. This represents an exponential function.
[0035] Furthermore, in step 2, the specific characteristics of students' difficulty perception behavior are as follows:
[0036]
[0037]
[0038] in, This indicates the student's perceived difficulty behavior characteristics at time point A. This represents the difficulty perception behavioral feature component of student A at time t for the difficulty level corresponding to the t-th difficulty anchor point; ; This represents the smoothed accuracy rate of student A at time t for the difficulty level corresponding to the nth difficulty anchor point; This represents the truncated confidence weight of student A at time t for the difficulty level corresponding to the nth difficulty anchor.
[0039] Furthermore, and The expressions are as follows:
[0040]
[0041]
[0042] in, The number of times student A answers the soft-assignment to the nth difficulty anchor point before time A is accumulated. The system calculates the number of correct answers given by student A for the soft-assignment of the nth difficulty anchor point before time A. The number of times the prior is correct. The number of prior errors. To preset the signal reduction parameters, This is the preset truncation threshold.
[0043] Furthermore, in step 3, the collaborative reference student set is: based on the set number of collaborative reference students K, and based on the cosine similarity between difficulty-perceived behavioral features, the similarity between the target student and each student in the student group is calculated, and the top K students with the highest similarity are taken as the collaborative reference student set of the target student.
[0044] Furthermore, in step 5, the prediction of the target students' answers to the target questions includes:
[0045] The fused embedding representation sequence of the historical answer sequence is obtained by using the question embedding representation, answer result embedding representation and difficulty embedding representation of each time step in the student's historical answer sequence;
[0046] Feature extraction is performed on the fused embedding representation sequence of the student's historical answer sequence using a Long Short-Term Memory (LSTM) network to obtain the hidden state sequence. The hidden state at the last moment of the hidden state sequence is taken as the student's personal historical final state at the current answer moment. This is used to retrieve the most relevant contextual information for the current prediction task from personal history and collaborative evidence.
[0047] definition Indicates target students The hidden state sequence, Represents the reference students in the coreferenced student set. The hidden state sequence, Indicates target students The final state of 𝑡's personal history at the current moment of answering; pieced together along the timeline. , constituting a group collaborative information representation ;
[0048] by For query vector, Using keys and values, a contextual representation of an individual's knowledge state is obtained through a difficulty-aware attention mechanism. ;by For query vector, Using keys and values, an initial contextual representation of the collaborative reference information is obtained through a difficulty-aware attention mechanism, and then reweighted by combining the weights of the collaborative reference samples to obtain a contextual representation representing the collaborative reference information. ;
[0049] Fusion and The final fusion representation is obtained. And based on the final fusion representation Predict answers to the target questions.
[0050] Furthermore, in step 5, fusion and The final fusion representation is obtained. include:
[0051] Gating value calculated based on temperature-based gating fusion :
[0052]
[0053] Among them, the gate value , Indicates target students The difficulty vector of the current target question. Indicates the difficulty embedding function, Presentation layer normalization operation, This represents a multilayer perceptron. This represents the preset gate temperature hyperparameter, which is used to control the smoothness of temperature-gated fusion and the sensitivity of weight allocation.
[0054] according to Calculate the final fused representation .
[0055] Furthermore, in step 5, during joint modeling, the loss function for model training is set as follows:
[0056]
[0057] in, This represents the total loss during model training. Indicates the predicted loss. Supervised contrastive loss representing difficulty perception; express Weighting coefficients;
[0058] in, , Indicates training samples The difficulty-aware supervised contrastive loss is expressed as follows:
[0059]
[0060] in, Denotes the set of positive samples of training sample X. Let n be the set of negative samples of the training sample. Representing training samples A and B respectively. , The final fusion representation, Represents the similarity function. This indicates the temperature hyperparameter for comparison.
[0061] Furthermore, the positive sample set and negative sample set Specifically set as follows:
[0062]
[0063]
[0064] in, , Representing training samples A and B respectively. The answer tags, Representing training samples A and B respectively. The difficulty vector of the corresponding question. , These represent the difficulty thresholds for positive and negative samples, respectively.
[0065] Furthermore, predicting losses Set to:
[0066]
[0067] in, The number of training samples. For training samples Normalized exponential weights based on the difficulty of the questions. For training samples The predicted answer results For training samples The answer tags, These are the preset focus parameters.
[0068] The technical solution provided by this invention brings at least the following beneficial effects:
[0069] By introducing a difficulty-aware student behavior feature construction method, the problem of not considering the difficulty of questions in the student similarity modeling of existing collaborative knowledge tracking methods is solved, making the selection of similar students more consistent with the actual ability distribution of students, thereby improving the cognitive consistency of collaborative information.
[0070] By introducing a question difficulty constraint mechanism in the collaborative information utilization stage, the mixed use of answer data at different difficulty levels is effectively avoided, noise interference in the collaborative modeling process is reduced, and the reliability of prediction results is improved.
[0071] When students have limited historical answer data or are in the cold start phase, this invention can use collaborative reference information aligned with difficulty to stably supplement students' abilities, alleviate the instability of similarity calculation caused by data sparsity, and thus improve the robustness of the knowledge tracing model in practical applications.
[0072] The method of this invention has a clear flow and is easy to implement. It can be directly deployed in existing online learning systems, improving the overall performance of knowledge state prediction without increasing additional hardware costs. Attached Figure Description
[0073] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0074] Figure 1 A flowchart of a difficulty-aware collaborative knowledge tracking method provided in an embodiment of the present invention.
[0075] Figure 2 The diagram shows the impact of different values of K. Detailed Implementation
[0076] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be described in detail and completely below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Generally, the components of the embodiments of the present invention described and shown in the accompanying drawings can be arranged and designed using different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present invention.
[0077] This invention provides a difficulty-aware collaborative knowledge tracing method, which is mainly used to solve the following problems: (1) When selecting similar students, existing collaborative knowledge tracing methods usually rely on the surface similarity of answer records and do not distinguish the students' answer performance in different question difficulty ranges. This can easily introduce students with different ability boundaries as collaborative objects, resulting in distorted collaborative information; (2) Existing knowledge tracing methods that introduce question difficulty mostly focus on modeling a single student and do not use question difficulty for similarity calculation and collaborative information screening in the collaborative modeling process. This makes it difficult to play the constraining role of difficulty information at the collaborative level; (3) When there is little historical answer data of students or when they are in the cold start stage, existing technologies rely too much on limited answer records and lack a stability constraint mechanism based on question difficulty, resulting in large fluctuations in similarity calculation results and unstable collaborative modeling effects.
[0078] The method proposed in this invention introduces a question difficulty constraint mechanism during collaborative knowledge tracing, ensuring consistency between student similarity modeling and collaborative information utilization across the difficulty dimension. This improves the effectiveness of collaborative information and enhances the accuracy and robustness of knowledge state prediction. The prediction results obtained based on the method proposed in this invention can be used for personalized learning recommendations on online learning platforms.
[0079] In one embodiment, such as Figure 1 As shown, the difficulty-aware collaborative knowledge tracing method provided in this embodiment includes the following steps:
[0080] Step S1: Determining and Standardizing the Difficulty of the Questions
[0081] In online education scenarios, knowledge tracking is often formalized as a sequence prediction problem: using students' past answers to predict the answer to the next question.
[0082] Let the set of problems be... The students gathered as For any student The historical response sequence corresponding to the historical response window of length t at time t is represented as:
[0083]
[0084] in, This indicates the questions that students answer at any given time. This indicates the corresponding answer result: 1 indicates a correct answer, and 0 indicates an incorrect answer.
[0085] Considering that the difficulty of the questions has a significant impact on students' answering behavior, this example provides each question with... Estimate a difficulty in advance ,Right now This represents the difficulty function, which is obtained by fitting an IRT (Item Response Theory) model to the training data and then normalizing it to an interval using a monotonic mapping. This is to maintain the relative ranking and comparability of the difficulty levels among the questions. Accordingly, students... The difficulty level of the question answered at time 𝑡 can be expressed as: ).
[0086] To explicitly model the mapping relationship between questions and difficulty in the attention mechanism, this embodiment introduces a difficulty conditional representation operation based on difficulty anchors, specifically including:
[0087] Set M (M≥2) ordered difficulty anchor points on the normalized difficulty interval, denoted as And for each difficulty anchor point Equipped with a learnable prototype vector ,use Representing each prototype vector The dimensions. Each difficulty anchor point. This corresponds to a difficulty level, such as a difficulty anchor. The difficulty range of its corresponding difficulty level is set to For the first difficulty anchor point, the corresponding difficulty level range is: .
[0088] Step S2: Construction of Students' Difficulty Perception Behavioral Characteristics
[0089] To characterize the distribution of students' abilities across different question difficulty levels, this embodiment uses M ordered difficulty anchor points and normalized difficulty values for each question. with difficulty anchor Distance is used to calculate weights, thereby providing more accurate difficulty alignment for collaborative reference information. To this end, for each Calculate the corresponding weights :
[0090]
[0091] in, Indicates the first The weights of each difficulty anchor point, i.e., the normalized exponential weights. Indicates the difficulty of the question. Indicates the first The difficulty value of each difficulty anchor point. This represents the difficulty value of any given difficulty anchor point. ,in, Indicates the number of difficulty anchor points. This indicates the set temperature over-parameter. This represents an exponential function.
[0092] Based on the obtained weights Combine it with the prototype vector The weighted sum constitutes the final difficulty embedding vector. .
[0093] Based on the aforementioned conditional representation of difficulty, this invention can map continuous difficulty scalars to a smooth, learnable vector space representation, preserving the order structure of difficulty while avoiding information loss caused by discrete difficulty values. This conditional representation of difficulty provides a stable and consistent foundation for subsequent difficulty-aware attention calculations and individual-group information fusion mechanisms.
[0094] To improve the model's ability to characterize students' knowledge status under cold start or sparse data, this example constructs a difficulty-conditional behavioral profile based on students' historical answer performance in different question difficulty ranges, thereby obtaining students' difficulty perception behavior characteristics and characterizing the distribution of students' abilities at different question difficulty levels.
[0095] Specifically, for the student's historical response sequence at time t ( Each interaction depends on the difficulty of the corresponding question. The difficulty level is mapped to the corresponding difficulty range using a soft-assignment method. For each answer, the weight is first calculated based on the distance between the question difficulty and each difficulty anchor point. This allows a single interaction to contribute to multiple difficulty ranges to varying degrees. Subsequently, within each difficulty range, the number of student responses and the number of correct responses are counted, and the accuracy rate of each range is smoothed to reduce the impact of statistical noise in low-frequency ranges. Through this process, student performance vectors are obtained for different difficulty ranges, and these vectors are combined to form a student's performance vector. Difficulty perception behavior characteristics at time 𝑡 It depicts the historical answering patterns of students at different difficulty levels, reflecting their overall learning behavior characteristics, rather than depending on the specific answering order or question content.
[0096] in, It includes M components, and the expression for each component is:
[0097]
[0098] in, This represents the difficulty perception behavioral feature component of student A at time t for the difficulty level corresponding to the t-th difficulty anchor point;
[0099] This represents the smoothed accuracy rate of student A at time t for the difficulty level corresponding to the nth difficulty anchor point;
[0100] This represents the truncated confidence weight of student A at time t for the difficulty level corresponding to the nth difficulty anchor.
[0101] in, This indicates the student's perceived difficulty behavior characteristics at time point A. This represents the difficulty perception behavioral feature component of student A at time t for the difficulty level corresponding to the t-th difficulty anchor point; This represents the smoothed accuracy rate of student A at time t for the difficulty level corresponding to the nth difficulty anchor point; This represents the truncated confidence weight of student A at time t for the difficulty level corresponding to the nth difficulty anchor point;
[0102] and The expressions are as follows:
[0103]
[0104]
[0105] in, The number of times student A answers the soft-assignment to the nth difficulty anchor point before time A is accumulated. The system calculates the number of correct answers given by student A for the soft-assignment of the nth difficulty anchor point before time A. The number of times the prior is correct. The number of prior errors. To preset the signal reduction parameters, This is the preset truncation threshold.
[0106] Step S3: Filtering similar students based on difficulty-aware features
[0107] set up and They represent the target students respectively. and similar students At any moment The difficulty-perceived behavioral characteristics are analyzed, and cosine similarity is used to measure the closeness between the two in the "difficulty-performance" space:
[0108]
[0109] in, Indicates target students and similar students Feature similarity;
[0110] Based on the set number of collaborative reference students K, based on For target students The K most similar students are retrieved as co-reference students, forming its co-reference student set. .
[0111] This allows for the extraction of collaborative reference information relevant to the current prediction task from the historical interactions of collaborative reference students, thus forming a collaborative reference information set. This retrieval based on difficulty-conditional behavioral profiling and difficulty alignment constraints ensures the homogeneity of collaborative evidence at the cognitive level. This enables the prediction model to introduce high-confidence reference information from student groups with similar difficulty-conditional behavioral patterns in cold-start or data-sparse scenarios, thereby improving the robustness and stability of the prediction results.
[0112] Step S4: Collaborative Information Filtering Based on Difficulty Constraints
[0113] Using the target question's difficulty level as the target difficulty, and based on the target question and target difficulty, selecting historical answers from the co-reference student set that match the target difficulty level to form difficulty-aligned co-reference information:
[0114] Among them, the historical responses that matched the screening difficulty include:
[0115] First, choose a historical question that is the same as the target question to answer;
[0116] If the number of historical answers matching the target question is insufficient to meet the preset screening limit, continue selecting historical answers whose difficulty level does not exceed the preset difficulty threshold. The answer lies in history; among them, Represents the reference students in the coreferenced student set. The The difficulty of answering the questions. Indicates target students The difficulty of the current target question. Indicates target students At the current moment of answering, This represents a preset difficulty alignment threshold, used to control the matching range of collaborative evidence in the difficulty space, so as to avoid introducing interaction samples with excessively large difficulty differences;
[0117] If the number of historical responses that meet the preset difficulty threshold is still insufficient for selection, the difficulty threshold will be relaxed. Supplement accordingly; or supplement in order of increasing difficulty to the target; such as by The value represents the degree of closeness to the target difficulty. The smaller the value, the higher the degree of closeness. The values are added in descending order of closeness.
[0118] Step S5: Collaborative Knowledge State Prediction
[0119] The system jointly models the target student's historical answer sequence and collaborative reference information, embeds and fuses the questions, answer results and difficulty in the historical answer sequence and collaborative reference information, and outputs the target student's answer prediction result for the target question; the difficulty embedding is calculated by calculating the question difficulty embedding vector based on the prototype vector of the difficulty anchor point and the weighted sum of the weights.
[0120] The prediction result can be expressed as:
[0121]
[0122] in, This represents the historical response sequence of the target student, 𝑢, at time 𝑡. Indicates the target question. Indicates the difficulty of the target question. Represents a set of collaborative reference information. Indicates target students Predicted probability of answering the next question correctly. Indicates the predicted probability. This indicates the answer to the next question.
[0123] In one embodiment, let the question embedding matrix be... , answer embedding matrix Where R represents the real number field, This indicates the total number of questions. This indicates the dimension of the question embedding. This represents the dimension of the response embedding. The fusion embedding for each time step t of the student's goal u is represented as: The historical response sequence is then fused and embedded into the representation sequence. Inputting a single-layer unidirectional LSTM network yields the hidden state sequence. Take the hidden state at the last moment As the student's final state of personal history at time t, i.e., the individual query vector, it is used to retrieve the most relevant contextual information for the current prediction task from personal history and collaborative evidence.
[0124] For the retrieved collaborative reference student set Focusing on the target topic and its difficulty Interaction segments that meet the difficulty alignment criteria are selected from the historical interactions of each reference student. To control the scale of collaborative information and reduce noise, interactions close to the target difficulty are prioritized. All selected collaborative interaction segments are encoded using an embedding layer and LSTM encoding that share parameters with the individual paths from which individual query vectors are extracted, generating... Reference students Hidden state sequence and the generated By piecing them together along the time dimension, a unified representation of group collaboration evidence is formed. .
[0125] Through a shared embedding layer and a unified sequence encoding structure, individual path outputs and group path output They are projected into the same semantic space and maintain consistency on the difficulty scale, laying the foundation for subsequent joint attention modeling.
[0126] In obtaining , and After that, with For the query vector, respectively for The execution difficulty is perceived and attention converges to obtain a contextual representation that represents the individual's knowledge state. and the initial group context representation of the collaborative reference information .in Used to characterize the individual knowledge status of target students in a context consistent with the difficulty of the current prediction task; This is used to aggregate collaborative reference information among similar students in situations of similar difficulty.
[0127] The difficulty-aware attention can be represented as: ,in, , , The feature dimension representing the hidden state. Represents the sequence length that satisfies the difficulty alignment condition, where Let be the explicit difficulty bias vector, whose i-th component is determined by the difference between the difficulty of the current target question and the difficulty of the question corresponding to the i-th key vector. For the personal history branch, we have: , This indicates the difficulty of the question corresponding to the nth key vector. It is a hyperparameter that controls the bandwidth of the difficulty.
[0128] The resulting attention weights satisfy the following:
[0129]
[0130] in, Indicates the first The initial attention weights corresponding to each historical response This represents the nth key vector in the key matrix.
[0131] That is, when the model aggregates contextual information, it applies an exponential penalty to interactions that are significantly different in difficulty from the target question, thereby effectively suppressing the noise introduced by "difficulty mismatch".
[0132] Obtained from personal path and obtained based on group paths While both types of evidence are comparable in semantic space and difficulty scale, their contributions to the prediction target often differ significantly across contexts. For example, for students with rich interaction history, individual paths typically contain sufficient discriminative information; however, for students in the cold start phase or facing high-difficulty challenges, collaborative evidence from students of similar ability often provides crucial supplementary perspectives. To address this, a temperature-gated fusion module is designed to assign weights between the two paths in a sample-adaptive manner. Specifically, the two contexts and the target question difficulty embedding are used as inputs to the gating network to calculate the gating value. :
[0133]
[0134] Among them, the gate value , Indicates target students The difficulty vector of the current target question. Indicates the difficulty embedding function, Presentation layer normalization operation, This represents a multilayer perceptron. This represents a preset temperature-gated hyperparameter, used to control the smoothness of temperature-gated fusion and the sensitivity of weight allocation. The gating value 𝑔 can be seen as an estimate of the relative reliability of the current sample to an individual's historical path under a given difficulty condition.
[0135] Finally, according to Calculate the final fused representation .
[0136] While existing knowledge tracing models have made some progress in prediction accuracy, the latent representations they learn often lack explicit geometric structure constraints, making them prone to representation instability in scenarios with sparse data or strong label noise. To enhance the discriminativeness and robustness of student representations in the ability-difficulty space, this embodiment introduces a difficulty-aware supervised contrastive learning objective during the training phase. It utilizes the answer label and question difficulty as dual supervision signals to structurally constrain the representation space.
[0137] In this embodiment, a nonlinear projection head is first used to project... Mapping to the contrastive learning space yields the final fused representation. Specifically, for each training sample... Its final fusion representation is defined as:
[0138]
[0139] in, and For two learnable linear transformation parameters, This is a linear activation function. The output vector is normalized using the ℓ2 norm so that cosine similarity can be used to measure the similarity between samples.
[0140]
[0141] in, Training samples , The final fusion representation.
[0142] Let the nth, The answer labels corresponding to each training sample are: , , nnth, The difficulty of the questions corresponding to each training sample is , In each training batch, a set of positive and negative samples is constructed based on label consistency and difficulty comparability:
[0143] The set of positive samples for training sample X is defined as:
[0144]
[0145] That is, two training samples are considered positive sample pairs only when they provide identical answers and the questions are of similar difficulty, thereby strengthening the consistency of representations at similar difficulty levels. This represents the threshold for the difficulty of positive samples.
[0146] Accordingly, the negative sample set is defined as:
[0147]
[0148] in, This represents the threshold for the difficulty of negative samples.
[0149] The above design enables the model to focus on distinguishing sample pairs that are "similar in difficulty but different in performance", thereby learning more granular differences in ability, while avoiding the introduction of meaningless comparative signals due to excessively large differences in difficulty.
[0150] Based on the above construction of positive and negative samples, a difficulty-aware supervised contrastive loss is defined for each sample 𝑖:
[0151]
[0152] in, To compare temperature over-parameters, Representing samples A and B respectively. , The final fusion representation, This represents the similarity function.
[0153] This difficulty-aware supervised contrastive loss encourages bringing the representation distance between samples with the same label closer within local regions of comparable difficulty, while simultaneously pushing away samples with different labels, thereby forming a more stable and discriminative representation structure in the ability-difficulty space. Unlike self-supervised contrastive learning methods that rely on data augmentation to construct views, the supervised contrastive loss proposed in this embodiment directly utilizes the naturally existing supervisory signals in knowledge tracing tasks—answer labels and question difficulty—to organize contrastive relationships within local neighborhoods with limited difficulty. This design effectively mitigates the interference of accidental errors and noisy labels commonly found in educational data on representation learning, enabling the model to learn more robust and consistent student ability representations even in scenarios with sparse data and complex difficulty distributions.
[0154] Considering the prevalent category imbalance in educational data and the varying information value of questions of different difficulty levels in assessing ability, this embodiment introduces sample weights related to question difficulty. This adaptively adjusts the contribution of different samples to the loss function. Therefore, the main task prediction loss is defined as:
[0155]
[0156] in, The number of training samples, For sample number, For answering tags, To answer the prediction results, To focus on parameters, this reduces the dominant role of easily classified samples in the loss, thereby enhancing the model's ability to learn from difficult samples.
[0157] Among them, sample weights Normalized exponential weights based on the difficulty of the questions:
[0158]
[0159] in, For training samples The difficulty of the corresponding question, i.e., the difficulty of the current training sample. The difficulty of the questions Any training sample in the current training batch The difficulty of the questions, i.e. .
[0160] Building upon the loss from the main task, a difficulty-aware supervised contrastive learning loss is further introduced. This imposes structured constraints on the student representation space. The final training objective is defined as: ,in >0 represents the contrastive loss weight hyperparameter, used to control the relative importance of the contrastive learning objective in the overall optimization process.
[0161] During the training phase, the model jointly minimizes the above objective function on all training samples (i.e., This optimizes both prediction performance and representation quality simultaneously. During the validation and testing phases, only the main task prediction network is retained; the contrastive learning loss is no longer calculated, and the network is directly utilized... Predict the answer to the next question.
[0162] To further verify the knowledge tracking effect of the embodiments of the present invention, the following simulation was performed for verification.
[0163] In this embodiment, both the embedding dimension and the LSTM hidden state dimension of the practice-response interaction are set to 256. A sliding window with a window length of 50 is used in the model: for each student, their response sequence is divided into consecutive windows in chronological order, and each window is used to predict the next response. This training-test consistent windowing strategy does not introduce future information leakage and maintains strict consistency with the difficulty-conditional behavior profile construction process of this invention. The number of similar students is set to 8, 18, 8, and 12 on the knowledge tracking datasets ASSIST2009, ASSIST2012, and ASSIST2017, respectively. The number of self-attention heads for both individual paths and group paths is 4. In the supervised contrastive learning part, the contrastive temperature hyperparameter is used. Set it to 0.20, and set the contrast loss weight hyperparameter λ to 0.1.
[0164] Both training and testing are implemented using PyTorch. The optimizer is AdamW, the batch size is set to 64, the maximum number of training epochs is set to 30, and the learning rate is 3×10⁻. 4 Early stopping is performed based on the validation set AUC (area under the curve).
[0165] The experimental results evaluated the predictive performance of the proposed method (DaCKT) in this invention. Table 1 summarizes the AUC and ACC (accuracy) metrics of all comparative methods on three public datasets.
[0166] Overall, the method of this invention achieved the best performance in terms of AUC on all three datasets, indicating that it has strong generalization ability on datasets of different sizes and difficulty distributions.
[0167] Table 1 Performance comparison on three public datasets
[0168]
[0169] In Table 1, DKT is a knowledge tracking method based on deep neural networks, DKVMN is a knowledge tracking method based on dynamic key-value memory networks, SAKT is a knowledge tracking method based on self-attention mechanisms, AKT is a knowledge tracking method based on context-aware attention mechanisms, CoKT is a knowledge tracking method based on collaborative information modeling, CoSKT is a knowledge tracking method based on collaborative information and self-supervised mechanisms, CL4KT is a knowledge tracking method based on contrastive learning, and DaCKT is the model corresponding to the method proposed in this invention.
[0170] Based on the performance comparison of the proposed method and six baseline methods in Table 1, it can be seen that the proposed method outperforms all baseline models in terms of AUC and ACC. More precisely, the AUC value of the proposed method exceeds the best baseline by 5.69%, 1.54%, and 0.84% on the ASSIST2009, ASSIST2012, and ASSIST2017 datasets, respectively. The ACC value of DaCKT exceeds the best baseline by 3.69%, 1.53%, and 0.19% on the ASSIST2009, ASSIST2012, and ASSIST2017 datasets, respectively. These results indicate that modeling based solely on a single student's historical sequence has limitations in characterizing students' potential knowledge states. By introducing high-quality collaborative evidence, the proposed method can effectively alleviate the performance bottleneck caused by isolated sequence modeling.
[0171] Compared to existing collaborative knowledge tracing methods, this invention achieves superior AUC performance on all three datasets. Whether it's the earlier collaborative method CoKT or CoSKT, which incorporates attention mechanisms and self-supervised learning, this invention maintains its leading position across different data scales and difficulty distributions, demonstrating the good stability and generalization ability of its collaborative modeling strategy. This consistent performance improvement mainly stems from the differences in collaborative modeling methods. CoKT and CoSKT primarily rely on behavioral or sequence-level similarity for collaborative retrieval, easily introducing collaborative samples that are inconsistent with the target student at the cognitive level. In contrast, this invention constructs a difficulty-conditionalized behavioral profile through continuous difficulty anchors and retrieves collaborative students based on this profile, thus ensuring that collaborative information is consistent with the target student at the cognitive level, not just the behavioral level. Furthermore, this invention employs a difficulty-aware collaborative attention mechanism to finely align individual history with group collaborative evidence, enabling more complete and stable utilization of collaborative information during the fusion process.
[0172] Compared to knowledge tracing methods that utilize contrastive learning, the AUC of this invention (DaCKT) outperforms CL4KT on all three public datasets. The overall experimental results show that DaCKT maintains a consistent performance advantage under different data sizes and distributions, without significant performance degradation, demonstrating the stability and robustness of the method in practical knowledge tracing tasks.
[0173] To analyze the sensitivity of the method of this invention to the number of similar students (i.e., the number of co-referenced students K), K was gradually increased from 2 to 18, and the model performance was evaluated on three knowledge tracing datasets. The results are as follows: Figure 2 As shown. Overall, the variation of AUC in this invention remained within 1% on the ASSIST2009, ASSIST2012, and ASSIST2017 datasets, indicating that the model exhibits strong stability to changes in the number of similar students. When K is small, the model performance is relatively low due to the limited number of available similar students; as K increases, the introduced collaborative evidence gradually becomes richer, and the model performance improves to a certain extent and tends to stabilize. This result shows that this invention can effectively utilize collaborative information in similar student sets of different sizes without over-relying on the specific value of K. Specifically, for the ASSIST2009, ASSIST2012, and ASSIST2017 datasets, this invention (DaCKT) achieves the best performance at 8, 18, and 8, respectively.
[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the foregoing embodiments have described the present invention in detail, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the embodiments of the present invention.
[0175] The above descriptions are merely some embodiments of the present invention. Those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the scope of protection of the present invention.
Claims
1. A difficulty-aware collaborative knowledge tracing method, characterized in that, Includes the following steps: Step 1: Determining and Standardizing the Difficulty of the Questions The difficulty of each question in the student's historical answer sequence is obtained and normalized so that the difficulty of different questions is mapped to a unified continuous difficulty range; and multiple ordered difficulty anchors are set on this difficulty range, and each difficulty anchor is equipped with a learnable prototype vector. The historical responses at each time step in the historical response sequence include the question and the response result. Step 2, Construction of Students' Difficulty Perception Behavioral Characteristics The weight of each difficulty anchor point is calculated based on the distance between the question difficulty and the difficulty anchor point, thus obtaining the weight of each question at each difficulty anchor point. Based on students' historical answer sequences, the correct answer rate corresponding to the difficulty level of each difficulty anchor point is calculated. The correct answer rate is smoothed based on the weight of the difficulty anchor point to obtain students' difficulty perception behavior characteristics, which are used to characterize the distribution characteristics of students' abilities at different question difficulty levels. Step 3: Filtering similar students based on difficulty-aware features Based on the students' difficulty perception behavior characteristics, the similarity between the target student and each student in the student group is calculated, and based on the similarity, at least one similar student whose answer performance in the question difficulty dimension is similar to that of the target student is selected to form a collaborative reference student set. Step 4: Collaborative Information Filtering Based on Difficulty Constraints Using the target question's difficulty level as the target difficulty, and based on the target question and target difficulty, selecting historical answers from the co-reference student set that match the target difficulty level to form difficulty-aligned co-reference information: Among them, the historical responses that matched the screening difficulty include: First, choose a historical question that is the same as the target question to answer; When the number of historical answers that match the target question is less than the preset number of filters, continue to select historical answers whose difficulty level does not exceed the preset difficulty threshold. If the number of historical responses that meet the preset difficulty threshold is still insufficient for screening, the difficulty threshold is relaxed to supplement the responses; or responses are supplemented sequentially according to their proximity to the target difficulty. Step 5: Collaborative Knowledge State Prediction The system jointly models the target student's historical answer sequence and collaborative reference information, embeds and fuses the questions, answer results and difficulty in the historical answer sequence and collaborative reference information, and outputs the target student's answer prediction result for the target question; where the difficulty embedding is: the weight of the question at the difficulty anchor point and the weighted sum of the learnable prototype vector corresponding to the difficulty anchor point.
2. The difficulty-aware collaborative knowledge tracing method as described in claim 1, characterized in that, In step 1, the uniform continuous difficulty range is [0,1].
3. The difficulty-aware collaborative knowledge tracing method as described in claim 1, characterized in that, In step 2, the weights of each difficulty anchor point are set as follows: in, Indicates the first The weight of each difficulty anchor point Indicates the difficulty of the question. Indicates the first The difficulty value of each difficulty anchor point. ; This represents the difficulty value of any given difficulty anchor point. ,in, Indicates the number of difficulty anchor points. This indicates the set temperature over-parameter. This represents an exponential function.
4. The difficulty-aware collaborative knowledge tracing method as described in claim 1, characterized in that, In step 2, the specific characteristics of students' difficulty perception behavior are as follows: in, This indicates the student's perceived difficulty behavior characteristics at time point A. This represents the difficulty perception behavioral feature component of student A at time t for the difficulty level corresponding to the t-th difficulty anchor point; ; This represents the smoothed accuracy rate of student A at time t for the difficulty level corresponding to the nth difficulty anchor point; This represents the truncated confidence weight of student A at time t for the difficulty level corresponding to the nth difficulty anchor.
5. The difficulty-aware collaborative knowledge tracing method according to claim 1, characterized in that, In step 3, the collaborative reference student set is: based on the set number of collaborative reference students K, and based on the cosine similarity between difficulty-perceived behavioral features, the similarity between the target student and each student in the student group is calculated, and the top K students with the highest similarity are taken as the collaborative reference student set of the target student.
6. The difficulty-aware collaborative knowledge tracing method as described in claim 1, characterized in that, In step 5, the prediction of the target students' answers to the target questions includes: The fused embedding representation sequence of the historical answer sequence is obtained by using the question embedding representation, answer result embedding representation and difficulty embedding representation of each time step in the student's historical answer sequence; By using a Long Short-Term Memory (LSTM) network to extract features from the fused embedding representation of the historical answer sequence, the student's personal historical hidden state sequence is obtained, and the hidden state at the last moment of the personal historical hidden state sequence is taken as the student's personal historical final state at the current answer time t. definition Indicates target students The personal history of hidden states sequence Indicates target students At the current moment of answering, the final state of 𝑡's personal history. Represents the reference students in the coreferenced student set. A sequence of hidden states in an individual's history; spliced along the time dimension. , constituting a group collaborative information representation ; by For query vector, Using keys and values, a contextual representation of an individual's knowledge state is obtained through a difficulty-aware attention mechanism. ;by For query vector, Using keys and values, an initial contextual representation of the collaborative reference information is obtained through a difficulty-aware attention mechanism, and then reweighted by combining the weights of the collaborative reference samples to obtain a contextual representation representing the collaborative reference information. ; Fusion and The final fusion representation is obtained. And based on the final fusion representation Predict answers to the target questions.
7. The difficulty-aware collaborative knowledge tracing method as described in claim 6, characterized in that, In step 5, fusion and The final fusion representation is obtained. include: Gating value calculated based on temperature-based gating fusion : Among them, the gate value , Indicates target students The difficulty vector of the current target question. Indicates the difficulty embedding function, Presentation layer normalization operation, This represents a multilayer perceptron. This indicates a preset gated temperature over-parameter; according to Calculate the final fused representation .
8. The difficulty-aware collaborative knowledge tracing method as described in claim 6, characterized in that, In step 5, during joint modeling, the loss function for model training is set as follows: in, This represents the total loss during model training. Indicates the predicted loss. Supervised contrastive loss representing difficulty perception; express Weighting coefficients; in, , Indicates sample The difficulty-aware supervised contrastive loss is expressed as follows: in, Denotes the set of positive samples of sample X. Denotes the set of negative samples of sample X. Representing samples A and B respectively. , The final fusion representation, Represents the similarity function. This indicates the temperature hyperparameter for comparison.
9. The difficulty-aware collaborative knowledge tracing method as described in claim 8, characterized in that, Positive sample set and negative sample set Specifically set as follows: in, , Representing training samples A and B respectively. The answer tags, Representing training samples A and B respectively. The difficulty vector of the corresponding question. , These represent the difficulty thresholds for positive and negative samples, respectively.
10. The difficulty-aware collaborative knowledge tracing method as described in claim 8, characterized in that, Predicting losses Set to: in, The number of training samples. For training samples Normalized exponential weights based on the difficulty of the questions. For training samples The predicted answer results For training samples The answer tags, These are the preset focus parameters.
Citation Information
Patent Citations
Deep embedded knowledge tracking method based on exercise difficulty and student ability
CN113033808A
Personalized e-learning using a deep-learning-based knowledge tracing and hint-taking propensity model
US20190333400A1