Hierarchical attention cognition diagnosis method based on knowledge association and abnormal behavior mixing

By introducing a hierarchical attention method of knowledge association and abnormal behavior in the dynamic cognitive diagnostic model, the second-order coupling of knowledge, timing and behavioral characteristics is achieved, and the problems of information fragmentation and cognitive inconsistency in the existing model are solved, improving the comprehensive portrayal of the learning process and the accuracy of future performance prediction.

CN119514591AActive Publication Date: 2025-02-25WUHAN TEXTILE UNIV

Patent Information

Application Number
CN202411674133.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-25
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

The existing dynamic cognitive diagnostic model has problems of information fragmentation and cognitive inconsistency in dealing with learners' knowledge correlation and behavioral characteristics, and it is difficult to fully portray the learning process.

Method used

A hierarchical attention cognitive diagnosis method based on knowledge association and abnormal behavior is adopted, and the second-order coupling of knowledge, timing and behavioral characteristics is achieved through long-term and short-term hierarchical attention network and graph neural network, and the comprehensive ability status of learners is dynamically updated.

Benefits of technology

The perception of knowledge correlation in the time series is realized, ensuring the consistency between implicit cognition and explicit behavior performance, and improving the accuracy of learners' future performance predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514591A_ABST
    Figure CN119514591A_ABST
Patent Text Reader

Abstract

The invention provides a hierarchical attention cognition diagnosis method based on knowledge association and abnormal behavior mixing, which comprises the following steps of: aggregating heterogeneous test question attributes such as test question texts, concepts and difficulty by adopting a graph neural network technology, and updating neighbor nodes to obtain knowledge association; a short-term attention mechanism based on working memory capacity is adopted to aggregate preorder knowledge information associated in a time sequence, and first-order coupling of'knowledge-time sequence 'is achieved; key features reflecting student guessing and carelessness are extracted from click stream features, guessing and carelessness functions are set to calculate guessing indexes and carelessness indexes, and first-order coupling of'behavior-time sequence 'is achieved; based on the knowledge state and the abnormal behavior index, setting a guess gate and a carelessness gate, correcting the cognitive state of the student, obtaining the comprehensive ability state of the student, and realizing second-order coupling of'knowledge-time sequence-behavior '; and finally, adopting a multi-task learning method, and introducing an abnormal index prediction task so as to correct the answer performance prediction of the learner in the future.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of educational big data mining, graph neural network and student behavior modeling, and in particular to a hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior. Background Art

[0002] Cognitive diagnosis aims to model the data in a single assessment scenario of students. In order to solve the problem of one-sided diagnostic results caused by ignoring learners' historical priors in static cognitive diagnosis, Corbett and Anderson proposed knowledge tracking in 1994, realizing the coupling of knowledge and time sequence, also known as "dynamic cognitive diagnosis". Since then, the dynamic cognitive diagnosis model is no longer limited to a single learning scenario, but is applicable to multiple continuous learning scenarios, realizing the expansion of cognitive diagnosis in time granularity and continuous analysis of learning process.

[0003] (1) Traditional dynamic cognitive diagnosis models predict learners' future performance by tracking the fluctuations of learners' knowledge at a time granularity. Bayesian Knowledge Tracing (BKT) is a classic dynamic cognitive diagnosis model based on probability graphs. It abstracts the knowledge state into a set of binary variables, takes the learners' real-time interactions as input, and simulates the changes in the learners' knowledge mastery during the learning process through a hidden Markov model. There are many variants of the BKT model, such as three-parameter BKT, fusion of guessing and error factors, time factors, and problem difficulty estimation. Such models have good interpretability.

[0004] (2) The dynamic cognitive diagnosis model based on deep learning was proposed under the background of the rapid development of deep learning technology. It solves the complex problem of parameter estimation of the BKT series model and its performance is significantly better than the probabilistic graph model. The dynamic cognitive diagnosis model based on deep learning can model the knowledge state and learning process more complexly, track the evolution of knowledge through neural networks, and has stronger generalization ability. ① Dynamic cognitive diagnosis model based on recurrent neural network, using recurrent neural network to track the knowledge state of learners at different times, such as DKT is the earliest and most popular dynamic cognitive diagnosis model. The EKT model makes full use of the multimodal feature embedding of test questions to enhance the test question representation in the dynamic cognitive diagnosis model. The IEKT model models the sensitivity of knowledge acquisition by estimating the learner's cognition of the test questions and uses reinforcement learning to search for the best parameters. The DIMKT model introduces the difficulty of the test questions into the recurrent neural network to explore the impact of the difficulty of the test questions on learning performance. ② Dynamic cognitive diagnosis model based on memory network, using memory network to store the learner's implicit knowledge state, each answer will dynamically update the memory network through key-value pairs, DKVMN is a classic model of this type. The KIEDLKD model combines IRT theory to improve the interpretability of the model in predicting knowledge proficiency. The GKT model was first proposed as a dynamic cognitive diagnosis model based on graph neural networks, using graph neural networks to model the learner's knowledge mastery status. The ABKT model further proposed introduces ability factors into learning feedback attribution, and uses graph neural networks and ensemble learning to model the learning process. The SGKT model uses conversation graphs to model the learner's answer process and uses relationship graphs to simulate the relationship between practice and skills. The performance of the deep dynamic cognitive diagnosis series model is significantly better than the traditional probabilistic model and is the current mainstream dynamic cognitive diagnosis model. However, these models assume that the sequence data of the learner's answers are equidistant, ignoring the temporal information hidden in the historical data, and it is difficult to explain the process of knowledge evolution based on cognitive laws.

[0005] (3) Dynamic cognitive diagnosis model with temporal enhancement. There are rich temporal features in multiple continuous learning scenarios, which are important factors affecting the learner's cognitive process and can enhance the representation of the learning process. According to cognitive processing theory, the human brain has forgetting laws, learning laws, short-term memory laws, etc. for the memory of knowledge. First, the forgetting law is the most common memory law, which describes the phenomenon that the individual's mastery of knowledge will decline over time. Nagatani et al. combined the three forgetting features with the knowledge state representation and introduced forgetting into the learner's learning process. The AKT model, RKT model and HawkesKT model use exponential decay functions and the time interval between answers to model the forgetting curve. The DGMN model combines the forgetting gating mechanism with the attention structure to dynamically capture the forgetting behavior. Secondly, the learning law reveals that repeated learning of knowledge can improve the individual's mastery of knowledge, and is often modeled together with the forgetting law. For example, EKPT uses learning curves and forgetting curves to simulate the changes in concept proficiency over time. The LPKT model uses the temporal features in the learning process as learning and forgetting factors. The KTM-DLF model uses matrix decomposition technology to integrate learning and forgetting factors with learner ability and test difficulty. The GFLDKT model simulates explicit forgetting and learning behaviors in the learning process of learners through a gating mechanism. Finally, the short-term memory law highlights the answer records in the recent time period. For example, the MF-DAKT model records the learner's recent attempts at related concepts based on the recency effect to highlight the impact of the recent answers. The CKT model uses a convolutional neural network to simulate the enhancement of the current knowledge state by records in the adjacent time period. The MC-DRER model and the HMN model design a hierarchical memory network that integrates working memory and long-term memory to simulate the change process of learners' knowledge memory. The dynamic cognitive diagnosis model with temporal enhancement improves the interpretability of the deep learning model and improves the prediction performance to a certain extent because it follows the memory law in educational psychology. However, this type of model focuses on knowledge and temporal features, and it is difficult to capture the knowledge association fluctuations hidden behind different behaviors, and its diagnostic results are still inconsistent.

[0006] Therefore, the dynamic cognitive diagnosis model can diagnose the knowledge status of learners in the continuous learning process, making up for the defect of cognitive diagnosis ignoring the historical time sequence characteristics, and realizing the coupling of knowledge and time sequence to different degrees. Its essence is the binary coupling of knowledge and time sequence. However, the current dynamic cognitive diagnosis model either does not consider the association of multiple knowledge or the influence of answering behavior factors on the knowledge status of learners, which is easy to cause inconsistency between implicit cognition and learning behavior. The binary coupling of weakened process behavior has limitations, which will eventually lead to the problem of incomplete learning characterization. Summary of the invention

[0007] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a hierarchical attention cognitive diagnosis method based on the mixture of knowledge association and abnormal behavior. The purpose of the present invention is to address the information fragmentation and cognitive inconsistency caused by the existing dynamic cognitive diagnosis model ignoring the complex knowledge association in time series, and propose a hierarchical attention cognitive diagnosis method based on the mixture of knowledge association and abnormal behavior to achieve dynamic cognitive diagnosis with knowledge association perception in time series and consistent internal cognition and overt behavior performance.

[0008] The object of the present invention is achieved through the following technical measures: a hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior, comprising the following steps:

[0009] Step 1: Obtain the learning unit data of students when they take the test, including the knowledge characteristics of the test questions answered, the behavioral characteristics of the students when answering, and the time series characteristics of the answers. According to the chronological order, several learning units are combined into learning process sequence data to construct a time series data set. Based on the constructed time series data set, obtain the knowledge association representation of the test questions;

[0010] Step 2: Based on the acquired knowledge representation and the students’ responses to the test questions, a long-term and short-term hierarchical attention network is constructed to dynamically update the students’ knowledge status and realize the first-order coupling of knowledge and temporal features.

[0011] Step 3: Based on the clickstream behavior features generated by learners’ clicks during the learning process, the guessing index and carelessness index of learners when answering questions are calculated to achieve the first-order coupling of behavior and time series features.

[0012] Step 4: Based on the knowledge state obtained after coupling knowledge with time sequence, combined with the guessing index and carelessness index obtained after coupling behavior with time sequence, set the guessing gate and carelessness gate to achieve the second-order coupling of knowledge-time sequence-behavior and update the learner's comprehensive ability state;

[0013] Step 5, set the anomaly index and future performance prediction tasks, where the anomaly index includes the guessing index and the carelessness index, both of which are predicted using a feedforward neural network and a multi-sensory perceptron, and set two hyperparameters to balance the three prediction tasks, using the anomaly index prediction to enhance the learner's final performance prediction.

[0014] Furthermore, step 1 specifically includes:

[0015] (1-1) Embedding and encoding of test attributes;

[0016] The attributes of the test questions include concepts, content and difficulty;

[0017] (1-2) Construction of a heterogeneous graph of test question features;

[0018] Firstly, based on the different information of the test questions, three kinds of heterogeneous nodes, namely concept, difficulty and content, are set to construct a heterogeneous graph of test questions;

[0019] Secondly, the edge relationships in the heterogeneous graph are constructed. Given that there are three edge relationships between the three heterogeneous nodes, namely content-concept, content-difficulty, and concept-concept, the first two are obtained through the question-concept association matrix and the question-difficulty association matrix respectively, while the edge relationship between concepts is obtained through similarity calculation and threshold setting;

[0020] (1-3) Enhanced representation of questions that aggregate neighbor node information;

[0021] First, for the same type of nodes in the test questions, a bidirectional LSTM is set to aggregate the same type of nodes, and the average pooling method is used to obtain the corresponding type of aggregate vector. The formula can be expressed as:

[0022]

[0023] Among them, n i (v) The set of neighbor nodes of type i of the current node v, emb(ω) represents the embedded representation of the neighbor node w, is the aggregated vector of neighbor nodes of type i of node v;

[0024] Secondly, for different types of nodes, the attention mechanism is used to aggregate three different types of vectors and combine them with the embedding of the node v itself. The formula is expressed as:

[0025]

[0026] Among them, α (v,v) and α (v,i) represents the weight coefficient, It is the vector representation of the node v after aggregation. In this way, the multi-dimensional heterogeneous features of the test questions are aggregated through the heterogeneous graph, and the knowledge association representation of the test questions is realized.

[0027] Furthermore, the embedding and encoding of question attributes specifically include:

[0028] First, the conceptual features of the test questions belong to structural data, and one-hot encoding is used for embedding initialization;

[0029] Secondly, the difficulty features of the test questions are encoded using one-hot encoding;

[0030] Thirdly, the content nodes of the test questions, including the test content, are unstructured data. For formula information, subject domain ontology replacement technology is used to maintain the standardization of the content. Then, it is spliced ​​with text information, and the BERT model is used to make a unified semantic representation of the test questions. For image information, CNN is used for image recognition and representation. Finally, the embedded representations of text, formulas, and images are aggregated in a cascading manner to obtain the initial embedded representation of the test content.

[0031] Furthermore, step 2 specifically includes:

[0032] Firstly, the knowledge, time sequence and behavior ternary features are embedded and encoded using a long short-term memory neural network (LSTM) to obtain the current knowledge state.

[0033] Then, based on the principle that the higher the student's ability, the greater their working memory, the Rash model is used to calculate the student's latent traits, thereby calculating the student's working record capacity;

[0034] The student's memory capacity directly affects their short-term memory. A short-term attention mechanism with a triple gate function is used to enhance the student's current knowledge state.

[0035] Finally, the knowledge in short-term memory needs to be converted into long-term memory before it can be truly mastered. Therefore, long-term attention based on the laws of learning and forgetting is used to further update its knowledge status.

[0036] Furthermore, the specific implementation of step 2 includes the following steps:

[0037] (2-1) Ternary feature embedding and encoding

[0038] First, we define a learning unit consisting of three elements: knowledge, timing, and behavior, denoted by LC n =(q n ,s n ,b n ), which is used to represent the learning events that occur within a certain time unit n; where q n Indicates the knowledge characteristics of the investigation; s n Represents the time series features in time series data, including each time unit interval Δs n , the same concept learning interval Δr n and the number of repetitions Δc n ; b n represents the click flow behavior features generated by the learner during the learning process; the embedding of the learning unit is expressed as

[0039] X n =ε v +emb(s n )+emb(r n ),

[0040] Among them, ε v It is a knowledge association representation based on heterogeneous graph neural network, emb(s n ) is the embedding of reaction time, r n ∈b n is the correctness of the last click in the click stream, emb(r n ) is the embedding of the reaction result;

[0041] Then, a recurrent neural network is used to simulate the impact of previous answers on subsequent answers and initially obtain the potential knowledge state. The encoding process can be expressed as:

[0042] H n =LSTM(X n ),

[0043] Among them, LSTM is a long short-term memory neural network. Represents the potential knowledge state at the time of the nth question;

[0044] (2-2) Calculation of working memory capacity

[0045] First, based on the learners’ answers, the Rasch model is used to calculate the learners’ initial potential traits. The formula is as follows:

[0046] P(r in =1|θ i ,β n )=exp(θ i -β n )[1+exp(θ i -β n )] -1 ,

[0047] Among them, r in is a binary variable indicating whether the learner answered correctly or incorrectly, 1 indicates a correct answer and 0 indicates an incorrect answer. i is the latent characteristic parameter of learner i, β j is the difficulty parameter of test item n;

[0048] Subsequently, the latent trait values ​​obtained using the Rasch model were further used to determine the learner's working memory capacity; specifically, the learner's traits and the difficulty of the test questions were used to adjust the working memory capacity, which was calculated as follows:

[0049] WMC n =ΔC×σ(α·θ i -β·difff n )+ò

[0050] Among them, WMC nis the working memory capacity when answering the nth question, diff n is the difficulty of the nth question, α and β are weight factors used to adjust the influence of latent traits and question difficulty; σ is the Sigmoid activation function, which is used to limit the output value between 0 and 1; ΔC is the capacity floating range, ò is the minimum value of the capacity, ensuring that the capacity is not zero;

[0051] (2-3) Short-term attention based on triple masking

[0052] In order to block irrelevant or excessive information and enhance short-term dependencies in time series, a triple mask is set for the attention mechanism, including short-term mask, capacity mask and timing mask, to converge the influence of answers within limited capacity and time, so as to simulate the working memory operation mechanism;

[0053] First, the short-term mask M s It is used to shield learning units with longer time intervals, simulating the fact that humans have more active memories of recent events. By calculating the time interval Δs between the current learning unit n and the previous unit, if the time interval exceeds a certain short-term window threshold δ s , then the attention weight of the unit is set to 0, thus avoiding excessive attention to distant information;

[0054] Secondly, the capacity mask M w Based on the limitation of working memory capacity, learning units that exceed the capacity range are shielded to ensure that the model only focuses on important information within the current capacity; according to the working memory capacity WMC for the nth question obtained in the previous step n , set the mask so that only the front WMC is retained n The weight of learning units beyond this capacity range is set to 0;

[0055] Finally, the timing mask M c It is used to mask subsequent learning units to ensure temporal consistency and prevent future information from affecting the current state, that is, to avoid information leakage. For the current learning unit n, all learning units after it are masked so that the attention weight of the future time step on the current state is 0.

[0056] Combined with the triple mask, the formula of the attention mechanism is expressed as:

[0057] H n ′=Attention(H n ,M s ,M w ,M c ),

[0058] in, M represents the aggregated knowledge state after triple masking, and Attention refers to the multi-head self-attention network layer. s 、M w 、M c They are short-term mask, capacity mask and timing mask, which are used to regulate the information screening from different sources;

[0059] (2-4) Long-term attention based on learning and forgetting

[0060] On the basis of short-term memory enhancement, a long-term attention mechanism based on forgetting and learning curves is set up to capture the behavioral associations between long-term learning units;

[0061] First, the memory decay function F s (Δs n ) is used to simulate the process of human memory gradually weakening over time. We use a polynomial decay model to make the memory decay quickly at the beginning and then gradually slow down:

[0062] F s (Δs n )=1 / (1+γ·Δs n ) p

[0063] Where, Δs n is the time distance of the sequence; γ is the parameter for adjusting the decay speed, the larger the value, the faster the decay; p is the order of the polynomial, which is used to control the smoothness of the decay;

[0064] Secondly, learn the enhancement function F t (Δr n ,Δc n ) is used to describe the enhancing effect of repeated learning on memory, which is expressed as follows:

[0065] F t (Δr n ,Δc n )=(1+α·Δc n )·exp(-β·Δr n )

[0066] Where Δr n represents the time interval between the current learning unit and the last learning of the same concept, Δc n Represents the number of repeated learning; α and β are set hyperparameters, α is the enhancement coefficient of the number of repetitions, which is used to control the memory growth amplitude of each repeated learning; β is the decay rate of the learning interval, which is used to control the effect of the interval time on memory enhancement;

[0067] Finally, based on memory decay and learning enhancement, the learner's knowledge state evolves into:

[0068]

[0069] Among them, H′ n ' +1 is the inferred future state of knowledge after adjustment for learning and forgetting; is the query vector in the attention mechanism, q n+1 It is the representation of the test question to be answered at time n+1; Represents the knowledge state of the past learning unit and is used as the key matrix in the attention mechanism; It serves as the value matrix in the attention mechanism; are the weight matrices of the attention mechanism, which are used to linearly transform the query, key, and value vectors.

[0070] Furthermore, the guessing index based on the click stream in step 3 includes:

[0071] Firstly, based on the clickstream data generated when learners answer a question, the number of times they change their answers is calculated using a cumulative method;

[0072] Secondly, based on clickstream data, the counting method is used to calculate the coverage of options;

[0073] Then, based on the clickstream data, the dwell time ratio of the correct option is obtained by accumulation;

[0074] Finally, using these behavioral characteristics in the process of answering questions, the guessing index is derived. The calculation formula of the guessing index is as follows:

[0075]

[0076] Among them, guess∈[0,1] is the guess index, f c (count) represents the enhancement function of the number of times the answer is changed, f v (cover) represents the enhancement function of option coverage, f t (time) is a decay function representing the residence time ratio of the correct option; specifically, f c (count) = log(1+α·count). The more times the number of changes is, the more uncertain the learner is about the answer and the higher the degree of guessing is. v (cover) = β·cover. The higher the option coverage, the more options the learner tried when answering the question, and may guess when there is no clear answer. t (time) = 1 / (1+γ·time). The higher the dwell time ratio, the more confident the learner is about the answer and the lower the possibility of guessing. α, β and γ are all trainable parameters used to adjust these functions.

[0077] Furthermore, the clickstream-based carelessness index in step 3 includes:

[0078] First, calculate the ratio of the overall time spent in the click stream to the standard time, that is, the time spent ratio spend;

[0079] Then, by analyzing the learner's click stream characteristics and time proportion, the carelessness index is calculated. The formula is as follows:

[0080] skip=sigmoid(f′c(count)·f′ v (cover)·f s (spend)) -1

[0081] Among them, skip∈[0,1] is the guessing index, f s (spend) = 1 / (1+ζ·spend) is the attenuation function of the time spent ratio. The smaller the time spent ratio is, the more likely the learner is to be careless due to lack of time. ζ is also a trainable parameter, f′ c (count) and f′ v (cover) and f c (count) and f v The calculation method of the enhancement function is the same as that of (cover), except that the trainable parameters, namely α′ and β′, are replaced respectively.

[0082] Furthermore, the specific implementation of step 4 is as follows:

[0083] First, define a gating function GLU() to control the influence of guessing and carelessness. Its function can be expressed as:

[0084]

[0085] Among them, the GLU function is used to control the impact of abnormal behavior on the knowledge state, and the input value X is the student’s knowledge state H″ n+1 , W 1 , W 2 is the weight matrix, b 1 、b 2 is the bias term, represents element-wise product;

[0086] Subsequently, if guessing behavior is detected, the guessing gate is used to reduce the error caused by guessing, and the knowledge state is updated, subtracting the error caused by guessing from the knowledge mastery level. The formula is:

[0087] K n+1 =H″ n+1 -GLU g (guessn+1 ·W g +b g )

[0088] Among them, K n+1 represents the updated knowledge state after the guessing gate, H″ n+1 For the future state of knowledge, guess n+1 is the guess index at time step n+1, W g and b g To guess the weight and bias parameters of the gate;

[0089] Finally, if careless behavior is detected, the knowledge loss caused by carelessness is enhanced through the carelessness gate, and the knowledge state is further updated by adding the knowledge mastery level to the knowledge enhancement ignored by carelessness. The formula is:

[0090] θ n+1 =K n+1 +GLU s (skip n+1 ·W s +b s )

[0091] Among them, θ n+1 is the comprehensive ability status of the learner after passing the careless gate, K n+1 is the knowledge state after the guessing gate, skip n+1 is the carelessness index at time step n+1, W s and b s are the weight and bias parameters of the skilled gate.

[0092] Furthermore, in step 5, first, the corresponding pseudo labels are generated according to the behavioral characteristics, which are represented as and Specifically, the thresholds are set by the number of changes, option coverage, and dwell time ratio to mark the “guessing” behavior, and the samples that meet the conditions are assigned Otherwise, it is 0; similarly, the threshold is set based on the time proportion and the number of changes to mark the "careless" behavior, and the samples that meet the conditions are assigned Otherwise, 0;

[0093] Secondly, a guessing index prediction task is set. In the prediction task, a feedforward network layer is used to transform the comprehensive ability state into the prediction space of the guessing index, and a multi-layer perceptron is set to complete the prediction, that is,

[0094]

[0095] Among them, FNN and MLP are feedforward network layers and multi-layer perceptrons;

[0096] In order to optimize the prediction task, a loss function is defined to measure the difference between the guess index predicted by the model and the expected distribution. The loss function is defined as:

[0097]

[0098] in, is the predicted guess index, is the target value used for training;

[0099] Finally, the carelessness index prediction task is set. In the prediction task, the feedforward network layer is used to transform the comprehensive ability state into the prediction space of the carelessness index, and a multilayer perceptron is set to complete the prediction, that is,

[0100]

[0101] Correspondingly, the loss function is:

[0102]

[0103] in, is the predicted guess index, is the target value for training.

[0104] Furthermore, in order to predict the learner's future performance, the learner's knowledge state is spliced ​​with the predicted anomaly index to obtain the current comprehensive state, as follows:

[0105]

[0106] Secondly, a similar multi-layer perceptron is set up to predict the learner's response results, that is,

[0107]

[0108] in is the correct or incorrect result of the prediction; its loss function is:

[0109]

[0110] Finally, in order to balance the three prediction tasks, the loss functions are weighted and summed to obtain the global loss function of the multi-task, namely:

[0111] L=L r +λ 1 L g +λ 2 L s

[0112] Where L is the global loss function and the hyperparameter λ 1 and λ 2Used to adjust the weight of each task to achieve a balance between different tasks.

[0113] Compared with the prior art, the beneficial effects of the present invention are as follows: the existing dynamic cognitive diagnosis is essentially a binary coupling of "time series-knowledge", and the binary coupling of weakened procedural behavior has limitations, which will eventually lead to the problem of incomplete learning characterization. The present invention introduces knowledge association and abnormal behavior into time series modeling, sets up a ternary second-order coupling framework, analyzes students' comprehensive abilities through two-stage coupling of the ternary characteristics of knowledge, time series and behavior, and uses abnormal behavior analysis and prediction to correct the diagnosis results. The method first uses graph neural network technology to aggregate heterogeneous test attributes such as test text, concepts, and difficulty, and obtains knowledge associations through neighbor node updates; then, a short-term attention mechanism based on working memory capacity is used to aggregate the associated previous knowledge information in the time series to enhance the learner's current cognitive state representation, and the knowledge association sequence weights are updated by establishing long-term attention based on the laws of learning and forgetting to extract long-distance dependencies and realize the first-order coupling of "knowledge-time series"; thirdly, key features reflecting students' guessing and carelessness are extracted from click stream features, and guessing and carelessness functions are set to calculate the guessing index and carelessness index to realize the first-order coupling of "behavior-time series"; based on the knowledge state and abnormal behavior index obtained in the first two steps, guessing gates and carelessness gates are set to correct students' cognitive states, obtain students' comprehensive ability states, and realize the second-order coupling of "knowledge-time series-behavior"; finally, a multi-task learning method is adopted to introduce the abnormal index prediction task to correct learners' prediction of future answer performance and ensure the consistent diagnosis of implicit cognition and learning behavior. BRIEF DESCRIPTION OF THE DRAWINGS

[0114] Figure 1 4 is a principle block diagram of a method according to an embodiment of the present invention.

[0115] Figure 2 The flowchart of the method of the embodiment of the present invention is shown in FIG.

[0116] Figure 3 2 is a diagram showing an example structure of a learning unit in an embodiment of the present invention.

[0117] Figure 4 It is a comparison diagram of the coupling mechanism between the embodiment of the invention and the traditional cognitive diagnosis method. DETAILED DESCRIPTION

[0118] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0119] A hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior, the principle of which is as follows Figure 1As shown in the figure, its essence is a three-element second-order cognitive diagnosis architecture. The bottom layer uses "learning units" to describe educational situations. Learning units include three types of features: knowledge, time sequence, and behavior. For knowledge and behavior features, first-order coupling analysis is performed with time sequence features to obtain cognitive states. Specifically, a first-order coupling analysis of knowledge-time sequence can obtain the evolution of learners' knowledge states; a first-order coupling analysis of behavior-time sequence can analyze learners' behavioral changes. Then, the knowledge state and the behavior state are second-order coupled at the time granularity to obtain the learner's comprehensive ability state. According to the ability state, behavior and reaction dual tasks are set to enhance the prediction of learners' performance.

[0120] like Figure 2 As shown, an embodiment of the present invention provides a hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior, comprising the following steps:

[0121] (1) Obtain a time series data set when students participate in the assessment. The answer to a test question at a certain moment is called a "learning unit", which includes the knowledge characteristics of the test question, the behavioral characteristics of the student when answering, and the time series characteristics formed by the answer. According to the chronological order, several learning units can form a learning process sequence data, thereby constructing a time series data set. Based on the constructed time series data set, for the knowledge representation of the test questions, cross-modal test question data, such as the text, pictures and formulas of the test questions, are collected, and a unified representation of cross-modal test questions is achieved through different methods. Then, a heterogeneous graph is constructed based on the related information such as the test question itself, the difficulty of the test question, and the concept of the test question. By aggregating the feature information of the nodes of the heterogeneous graph of the test questions, the related features of the knowledge are mined to obtain the knowledge representation with related information;

[0122] (2) Based on the acquired knowledge representation and in combination with the students’ responses to the test questions, a long-short term hierarchical attention network is constructed to dynamically update the students’ knowledge status and realize the first-order coupling of knowledge and temporal features. Specifically, the knowledge, temporal and behavioral ternary features are first embedded and represented, and then encoded using the long short-term memory neural network (LSTM) to obtain the current knowledge status. The Rasch model is used to calculate the potential initial characteristics of each learner, and the learner’s working memory capacity is calculated accordingly. The self-attention mechanism is used to set a triple mask of short-term mask, capacity mask and temporal mask to aggregate the influence of responses within a limited capacity and time limit, and enhance the current knowledge status. At the same time, based on the laws of learning and forgetting, forgetting decay and learning enhancement functions are set to capture long-term attention and infer the learner’s knowledge status.

[0123] (3) Based on the clickstream behavior characteristics generated by learners’ clicks during the learning process, the guessing index and carelessness index of learners when answering questions are calculated to achieve the first-order coupling of behavior and time series characteristics. Specifically, based on the clickstream data, the number of option changes, option coverage, dwell time ratio, and time spent ratio are calculated. Based on the behavior characteristics, a variety of abnormal enhancement and reduction functions are set to output the guessing index and carelessness index of learners when answering this question.

[0124] (4) Based on the knowledge state obtained after coupling knowledge with time series (2), combined with the guessing index and carelessness index obtained after coupling behavior with time series (3), the guessing gate and carelessness gate are set to realize the second-order coupling of knowledge-time series-behavior and update the learner's comprehensive ability state. Specifically, based on the GLU gating function, the guessing gate is set to subtract the false knowledge growth obtained due to guessing from the original knowledge state; at the same time, the carelessness gate is set to add the knowledge lost due to carelessness to the current knowledge state, and the comprehensive ability state of the student is output.

[0125] (5) Three prediction tasks are set: guessing index, carelessness index, and performance. Feedforward neural network and multi-sensory perceptron are used for prediction. Two hyperparameters are set to balance the three prediction tasks. The abnormality index prediction is used to enhance the learner's final performance prediction.

[0126] The specific implementation of each step is as follows:

[0127] (1) Cross-modal test question representation and knowledge association mining

[0128] (1-1) Embedding and encoding of test attributes

[0129] The attributes of test questions include concepts, content, and difficulty. The steps to embed and encode test question attributes are as follows:

[0130] First, the conceptual features of the test questions belong to structural data, which has a fixed data structure and few categories, and one-hot encoding is used for embedding initialization;

[0131] Secondly, the difficulty characteristics of the test questions can be divided into 3-5 levels from easy to difficult, using one-hot encoding;

[0132] Secondly, the content nodes of the test questions, including the test questions, carry a large amount of heterogeneous information such as text, formulas and pictures, which belong to unstructured data. For formula information, the subject domain ontology replacement technology is used to maintain the standardization of the content; then it is spliced ​​with text information and the BERT model is used to make a unified semantic representation of the test questions; for picture information, CNN is used for image recognition and representation. Finally, it is planned to aggregate the embedded representations of text, formulas and pictures in a cascade manner to obtain the initial embedded representation of the test question content.

[0133] (1-2) Construction of the Heterogeneous Graph of Test Question Features

[0134] First, based on the different information of the above test questions, three heterogeneous nodes of concept, difficulty and content are set to construct a heterogeneous graph of test questions.

[0135] Secondly, the edge relationship in the heterogeneous graph is constructed. Given that there are three edge relationships between the three heterogeneous nodes, namely content-concept, content-difficulty, and concept-concept, the first two can be obtained through the question-concept association matrix and the question-difficulty association matrix, respectively, while the edge relationship between concepts is intended to be obtained through similarity calculation and threshold setting.

[0136] (1-3) Enhanced representation of questions with aggregated neighbor node information

[0137] First, for the same type of nodes in the test questions, a bidirectional LSTM is set to aggregate the same type of nodes, and the average pooling method is used to obtain the corresponding type of aggregate vector. The formula can be expressed as

[0138]

[0139] Among them, n i (v) The set of neighbor nodes of type i of the current node v, emb(ω) represents the embedded representation of the neighbor node w, It is the aggregated vector of the neighbor nodes of type i of node v.

[0140] Secondly, for different types of nodes, the attention mechanism is used to aggregate three different types of vectors and combine them with the embedding of the node v itself. The formula is expressed as

[0141]

[0142] Among them, α (v,v) and α (v,i) represents the weight coefficient, is the vector representation of the aggregated node v. In this way, the multi-dimensional heterogeneous features of the test questions are aggregated through the heterogeneous graph, and the knowledge association representation of the test questions is realized.

[0143] (2) Knowledge state update based on long-term and short-term hierarchical attention (knowledge-time first-order coupling)

[0144] like Figure 2In the "Long- and Short-Term Hierarchical Attention" part, based on the acquired knowledge association representation and combined with the students' responses to the test questions, a long- and short-term hierarchical attention network is constructed to dynamically update the students' knowledge status. Specifically, the ternary features of knowledge, timing and behavior are first embedded and represented, and the long- and short-term memory neural network LSTM is used to encode them to obtain the current knowledge status. According to the principle that "the higher the student's ability, the larger their working memory is likely to be", the Rash model is used to calculate the student's potential traits, thereby calculating the student's working record capacity. The student's memory capacity directly affects his or her short-term memory, and a short-term attention mechanism with a triple gate function is used to enhance the student's current knowledge status. Finally, the knowledge in short-term memory needs to be converted into long-term memory to be truly mastered, and its knowledge status is further updated based on the laws of learning and forgetting.

[0145] (2-1) Ternary feature embedding and encoding

[0146] First, if Figure 3 As shown in the figure, a learning unit consisting of three elements: knowledge, timing and behavior is defined, and LC is n =(q n ,s n ,b n ), which is used to represent the learning events that occur within a certain time unit n. n Indicates the knowledge characteristics of the test, such as the test questions and the concepts they consider; n Represents the time series features in time series data, including each time unit interval Δs n , the same concept learning interval Δr n and the number of repetitions Δc n etc.; b n represents the click flow behavior features generated by the learner during the learning process. The embedding of the learning unit is expressed as

[0147] X n =ε v +emb(s n )+emb(r n ),

[0148] Among them, ε v It is a knowledge association representation based on heterogeneous graph neural network, emb(s n ) is the embedding of reaction time, r n ∈b n is the correctness of the last click in the click stream, emb(r n ) is the embedding of the reaction result.

[0149] Then, a recurrent neural network is used to simulate the impact of previous answers on subsequent answers and initially obtain the potential knowledge state. The encoding process can be expressed as

[0150] H n =LSTM(X n ),

[0151] Among them, LSTM is a long short-term memory neural network. Represents the potential knowledge state at the time of the nth question.

[0152] (2-2) Calculation of working memory capacity

[0153] First, based on the learner's answers (right or wrong), the Rasch model is used to calculate the learner's initial potential traits. The formula is as follows:

[0154] P(r in =1|θ i ,β n )=exp(θ i -β n )[1+exp(θ i -β n )] -1 ,

[0155] Among them, r in is a binary variable indicating whether the learner answered correctly or incorrectly (1 indicates a correct answer, 0 indicates an incorrect answer), θ i is the latent characteristic parameter of learner i, β j is the difficulty parameter of test question n.

[0156] We then further used the latent trait values ​​obtained from the above Rasch model to determine the learner's working memory capacity. Working memory capacity reflects the amount of knowledge and information that learners can process when answering questions. The higher the latent trait, the larger the learner's working memory capacity; conversely, it is smaller. Specifically, we used the learner's traits and the difficulty of the test questions to adjust the working memory capacity, calculated as follows:

[0157] WMC n =ΔC×σ(α·θ i -β·difff n )+ò

[0158] Among them, WMC n is the working memory capacity when answering the nth question, diff n is the difficulty of the nth question, α and β are weight factors used to adjust the influence of latent traits and test difficulty. σ is the Sigmoid activation function, which is used to limit the output value between 0 and 1. ΔC is the capacity floating range, and ò is the minimum value of the capacity to ensure that the capacity is not zero. The working memory theory believes that the human memory capacity is 5±2, so we set ΔC to 4 and ò to 3.

[0159] (2-3) Short-term attention based on triple masking

[0160] In order to block irrelevant or excessive information and enhance short-term dependencies in time series, we set up a triple mask for the attention mechanism, including short-term mask, capacity mask and timing mask, to gather the influence of answers within limited capacity and time, so as to simulate the operation mechanism of working memory.

[0161] First, the short-term mask M s It is used to shield learning units with longer time intervals, simulating the fact that human memory of recent events is more active. By calculating the time interval Δs between the current learning unit n and the previous unit. If the time interval exceeds a certain short-term window threshold δ s , then the attention weight of the unit is set to 0, thus avoiding excessive attention to distant information.

[0162] Secondly, the capacity mask M w Based on the limitation of working memory capacity, learning units that exceed the capacity range are shielded to ensure that the model only focuses on important information within the current capacity. n , set the mask so that only the front WMC is retained n The weight of learning units beyond this capacity range is set to 0.

[0163] Finally, the timing mask M c It is used to mask subsequent learning units to ensure temporal consistency and prevent future information from affecting the current state, that is, to avoid information leakage. For the current learning unit n, all learning units after it are masked so that the attention weight of the future time step on the current state is 0.

[0164] Combined with the triple mask, the formula of the attention mechanism is expressed as:

[0165] H n ′=Attention(H n ,M s ,M w ,M c ),

[0166] in, M represents the aggregated knowledge state after triple masking, and Attention refers to the multi-head self-attention network layer. s 、M w 、M c They are short-term mask, capacity mask and timing mask, which are used to regulate the information screening from different sources.

[0167] (2-4) Long-term attention based on learning and forgetting

[0168] On the basis of short-term memory enhancement, a long-term attention mechanism based on forgetting and learning curves is set up to capture the behavioral associations between long-term learning units.

[0169] First, the memory decay function F s (Δs n ) is used to simulate the process of human memory gradually weakening over time. We use a polynomial decay model to make the memory decay quickly at the beginning and then gradually slow down:

[0170] F s (Δs n )=1 / (1+γ·Δs n ) p

[0171] Where, Δs n is the time distance of the sequence. γ is a parameter that adjusts the decay speed. The larger the value, the faster the decay. p is the order of the polynomial, which we set to 2 to control the smoothness of the decay.

[0172] Secondly, learn the enhancement function F t (Δr n ,Δc n ) is used to describe the strengthening effect of repeated learning on memory. The shorter the learning interval and the more repetitions, the more obvious the memory strengthening effect. It is expressed as follows:

[0173] F t (Δr n ,Δc n )=(1+α·Δc n )·exp(-β·Δr n )

[0174] Where Δr n represents the time interval between the current learning unit and the last learning of the same concept, Δc n Indicates the number of repeated learning. α and β are set hyperparameters. α is the enhancement coefficient of the number of repetitions, which is used to control the memory growth of each repeated learning. β is the decay rate of the learning interval, which is used to control the effect of the interval time on memory enhancement.

[0175] Finally, based on memory decay and learning enhancement, the learner's knowledge state evolves into:

[0176]

[0177] Among them, H′ n ' +1 It represents the inferred future state of knowledge after adjustment for learning and forgetting. is the query vector in the attention mechanism, q n+1It is the representation of the test question to be answered at time n+1. Represents the knowledge state of the past learning unit and is used as the key matrix in the attention mechanism. It serves as the value matrix in the attention mechanism. are all weight matrices of the attention mechanism, which are used to linearly change the query, key, and value vectors. We use the future test questions to be answered to retrieve the knowledge state of the past learning unit, combined with the memory decay function and the learning enhancement function, so as to capture the long-term impact of the past learning unit on the current unit, making the model more in line with the human memory and forgetting rules.

[0178] (3) Abnormal behavior analysis based on clickstream behavior (behavior-time sequence first-order coupling)

[0179] like Figure 2 In the "Abnormal Index Analysis" section, guessing and carelessness are common phenomena in the process of answering. According to the clickstream behavior, the degree of guessing and carelessness can be obtained. Guessing means that the student has not mastered the knowledge but guessed correctly, while carelessness means that the student has mastered the knowledge but answered incorrectly due to carelessness.

[0180] (3-1) Guessing Index Analysis Based on Clickstream

[0181] First, based on the clickstream data generated by the learner when answering a question, the number of times the learner changes the answer is calculated using the cumulative method. For example, if the clickstream of a learner answering a question is cs = {'A', 'B', 'A', 'C', 'A', 'B', 'A'}, the number of changes is 6, and count = Φ(cs) = 6.

[0182] Secondly, based on the click stream data, the counting method is used to calculate the coverage of options. For example, the click stream of a learner answering a test question is cs = {'A','B','A','C','A','B','A'}. This question has 4 options, so its option coverage is cover = Ψ(cs) = 3 / 4 = 0.75.

[0183] Then, based on the clickstream data, the dwell time ratio of the correct option is obtained by accumulation. For example, in the above clickstream, the learner's cumulative dwell time on A is 40s, and the total dwell time is 70s, then the dwell time ratio is time = Ω(cs) = 40 / 70 = 0.57.

[0184] Finally, we use these behavioral characteristics in the process of answering questions to derive the guessing index. The more times the options are changed, the greater the option coverage, and the shorter the correct answer stays, the greater the guessing degree. The calculation formula of the guessing index is as follows:

[0185]

[0186] Among them, guess∈[0,1] is the guess index, f c (count) represents the enhancement function of the number of times the answer is changed, f v (cover) represents the enhancement function of option coverage, f t (time) is a decay function representing the residence time ratio of the correct option. Specifically, f c (count) = log(1+α·count). The more times the number of changes is, the more uncertain the learner is about the answer and the higher the degree of guessing is. v (cover) = β·cover. The higher the option coverage, the more options the learner tried when answering the question, and may have guessed when there is no clear answer. t (time) = 1 / (1+γ·time). The higher the dwell time ratio, the more confident the learner is about the answer and the less likely the guess is. α, β and γ are all trainable parameters used to adjust these functions.

[0187] (3-2) Carelessness Index Analysis Based on Clickstream

[0188] First, calculate the ratio of the overall time spent in the click stream to the standard time. For example, if the time spent on all click options to answer a question is 3 seconds, and the average time to answer this question is 120 seconds, then the proportion of time spent is spend = Θ(cs) = 3 / 120.

[0189] Then, by analyzing the learner's click stream characteristics and time proportion, the carelessness index is calculated. The smaller the time proportion, the fewer times the options are changed, and the smaller the option coverage, the greater the probability of carelessness. The calculation formula is as follows:

[0190] skip=sigmoid(f′ c (count)·f′ v (cover)·f s (spend)) -1

[0191] Among them, skip∈[0,1] is the guessing index, f s (spend) = 1 / (1 + ζ·spend) is a weakening function of the time spent ratio. The smaller the time spent ratio, the more likely the learner is careless due to lack of time. ζ is also a trainable parameter. f′ c (count) and f′ v (cover) The calculation method of the enhancement function is the same as that in (3-1), except that the trainable parameters, namely α′ and β′, are replaced respectively.

[0192] (4) Ability status update of fusion anomaly index (second-order coupling of knowledge, timing and behavior)

[0193] like Figure 2 In the “Ability Update” section, a guessing gate and a careless gate are set to obtain the learner’s comprehensive ability status.

[0194] First, we define a gating function GLU() to control the influence of guessing and carelessness. Its function can be expressed as:

[0195]

[0196] Among them, the GLU function is used to control the impact of abnormal behavior on the knowledge state, and the input value X is the student’s knowledge state H″ n+1 , W 1 , W 2 is the weight matrix, b 1 , b 2 is the bias term, Represents element-wise product.

[0197] Subsequently, if guessing behavior is detected, the guess gate is used to reduce the error caused by guessing and update the knowledge state. We subtract the error caused by guessing from the knowledge mastery level, and the formula is:

[0198] K n+1 =H″ n+1 -GLU g (guess n+1 ·W g +b g )

[0199] Among them, K n+1 represents the updated knowledge state after the guessing gate, H″ n+1 is the future knowledge state obtained in (2-4), guess n+1 is the guess index at time step n+1, W g and b g To guess the weight and bias parameters of the gate.

[0200] Finally, if careless behavior is detected, the knowledge loss caused by carelessness is enhanced through the carelessness gate to further update the knowledge state. We add the knowledge mastery level to the knowledge enhancement ignored by carelessness. The formula is:

[0201] θ n+1 =K n+1 +GLU s (skip n+1 ·W s +b s )

[0202] Among them, θn+1 is the comprehensive ability status of the learner after passing the careless gate, K n+1 is the knowledge state after the guessing gate, skip n+1 is the carelessness index at time step n+1, W s and b s are the weight and bias parameters of the skilled gate.

[0203] (5) Performance prediction of abnormal index enhancement

[0204] like Figure 2 In the “Behavior Prediction” section, we set up the guessing index prediction, carelessness index prediction, and future performance prediction, and enhance the final performance prediction through the abnormal behavior predictions of the first two.

[0205] (5-1) Anomaly Index Prediction

[0206] First, we set up the prediction task of guessing index and carelessness index to capture the learner's abnormal behavior tendency. Since the guessing index and carelessness index are difficult to observe directly, we generate corresponding pseudo labels based on the behavioral characteristics, which are expressed as and Specifically, we set thresholds based on features such as number of changes, option coverage, and dwell time ratio to mark “guessing” behavior, and assign qualified samples Otherwise, it is 0. Similarly, we set a threshold to mark “careless” behavior by combining features such as time proportion and number of changes, and assign the qualified samples Otherwise, 0;

[0207] Secondly, a guessing index prediction task is set. In the prediction task, a feedforward network layer is used to transform the comprehensive ability state into the prediction space of the guessing index, and a multi-layer perceptron is set to complete the prediction, that is,

[0208]

[0209] Among them, FNN and MLP are feedforward network layer and multi-layer perceptron.

[0210] In order to optimize the prediction task, a loss function is defined to measure the difference between the guess index predicted by the model and the expected distribution. The loss function is defined as:

[0211]

[0212] in, is the predicted guess index, is the target value for training.

[0213] Finally, similarly, a carelessness index prediction task is set. In the prediction task, the feedforward network layer is used to transform the comprehensive ability state into the prediction space of the carelessness index, and a multilayer perceptron is set to complete the prediction, that is,

[0214]

[0215] Correspondingly, the loss function is:

[0216]

[0217] in, is the predicted guess index, is the target value for training.

[0218] (5-2) Future performance forecast

[0219] In order to predict the learner's future performance, the learner's knowledge state is spliced ​​together with the predicted anomaly index to obtain the current comprehensive state, as follows:

[0220]

[0221] Secondly, a similar multi-layer perceptron is set up to complete the prediction of the learner's response results, namely:

[0222]

[0223] in is the correct or incorrect result of the prediction. Its loss function is:

[0224]

[0225] Finally, in order to balance the three prediction tasks, the loss functions are weighted and summed to obtain the global loss function of the multi-task, namely:

[0226] L=L r +λ 1 L g +λ 2 L s

[0227] Where L is the global loss function and the hyperparameter λ 1 and λ 2 Used to adjust the weight of each task to achieve a balance between different tasks.

[0228] The temporal hierarchical attention cognitive diagnosis method based on knowledge association enhancement proposed in the present invention is essentially a ternary second-order coupling framework, which divides the learning units in the learning process into "knowledge, timing, behavior" triplets, and introduces a variety of deep learning technologies to achieve second-order modeling of cognition and ability. The comparison between the static cognitive diagnosis method and the dynamic cognitive diagnosis method is shown in Table 1. As shown in Table 1, the static cognitive diagnosis method only uses the knowledge features in the educational context, does not consider the timing and behavior features in the real educational context, is suitable for a single learning context, and is essentially a unary coupling of knowledge; the dynamic cognitive diagnosis method considers the knowledge features and the sequence features of the learning process, is suitable for multiple learning contexts, ignores the time interval attributes and behavior process features in the learning process, and is essentially a weak coupling of knowledge and timing features, such as Figure 4 As shown in (a) of , weakening the binary coupling of process behavior has limitations, which will eventually lead to the problem of incomplete learning characterization; the cognitive diagnosis method proposed in this invention considers the second-order coupling of three features, such as Figure 4 As shown in (b) in the figure, it is possible to scientifically and comprehensively model the learner’s cognitive process and achieve accurate prediction of the learner’s future performance.

[0229] Table 1 Comparison of coupling mechanisms between this example method and traditional cognitive diagnosis methods

[0230]

[0231] The contents not described in detail in this specification belong to the prior art known to those skilled in the art.

[0232] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior, characterized in that: The steps include: Step 1: Obtain the learning unit data of students when they take the test, including the knowledge characteristics of the test questions answered, the behavioral characteristics of the students when answering, and the time series characteristics of the answers. According to the chronological order, several learning units are combined into learning process sequence data to construct a time series data set. Based on the constructed time series data set, obtain the knowledge association representation of the test questions; Step 2: Based on the acquired knowledge representation and the students’ responses to the test questions, a long-term and short-term hierarchical attention network is constructed to dynamically update the students’ knowledge status and realize the first-order coupling of knowledge and temporal features. Step 3: Based on the clickstream behavior features generated by learners’ clicks during the learning process, the guessing index and carelessness index of learners when answering questions are calculated to achieve the first-order coupling of behavior and time series features. Step 4: Based on the knowledge state obtained after coupling knowledge with time sequence, combined with the guessing index and carelessness index obtained after coupling behavior with time sequence, set the guessing gate and carelessness gate to achieve the second-order coupling of knowledge-time sequence-behavior and update the learner's comprehensive ability state; Step 5, set the anomaly index and future performance prediction tasks, where the anomaly index includes the guessing index and the carelessness index, both of which are predicted using a feedforward neural network and a multi-sensory perceptron, and set two hyperparameters to balance the three prediction tasks, using the anomaly index prediction to enhance the learner's final performance prediction.

2. A hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior as claimed in claim 1, characterized in that: Step 1 specifically includes: (1-1) Embedding and encoding of test attributes; The attributes of the test questions include concepts, content and difficulty; (1-2) Construction of a heterogeneous graph of test question features; Firstly, based on the different information of the test questions, three kinds of heterogeneous nodes, namely concept, difficulty and content, are set to construct a heterogeneous graph of test questions; Secondly, the edge relationships in the heterogeneous graph are constructed. Given that there are three edge relationships between the three heterogeneous nodes, namely content-concept, content-difficulty, and concept-concept, the first two are obtained through the question-concept association matrix and the question-difficulty association matrix respectively, while the edge relationship between concepts is obtained through similarity calculation and threshold setting; (1-3) Enhanced representation of questions that aggregate neighbor node information; First, for the same type of nodes in the test questions, a bidirectional LSTM is set to aggregate the same type of nodes, and the average pooling method is used to obtain the corresponding type of aggregate vector. The formula can be expressed as: Among them, n i (v) The set of neighbor nodes of type i of the current node v, emb(ω) represents the embedded representation of the neighbor node w, is the aggregated vector of neighbor nodes of type i of node v; Secondly, for different types of nodes, the attention mechanism is used to aggregate three different types of vectors and combine them with the embedding of the node v itself. The formula is expressed as: Among them, α (v,v) and α (v,i) represents the weight coefficient, It is the vector representation of the node v after aggregation. In this way, the multi-dimensional heterogeneous features of the test questions are aggregated through the heterogeneous graph, and the knowledge association representation of the test questions is realized.

3. A hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior as claimed in claim 2, characterized in that: The embedding and encoding of test question attributes specifically include: First, the conceptual features of the test questions belong to structural data, and one-hot encoding is used for embedding initialization; Secondly, the difficulty features of the test questions are encoded using one-hot encoding; Thirdly, the content nodes of the test questions, including the test content, are unstructured data. For formula information, subject domain ontology replacement technology is used to maintain the standardization of the content. Then, it is spliced ​​with text information, and the BERT model is used to make a unified semantic representation of the test questions. For image information, CNN is used for image recognition and representation. Finally, the embedded representations of text, formulas, and images are aggregated in a cascading manner to obtain the initial embedded representation of the test content.

4. A hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior as claimed in claim 1, characterized in that: Step 2 specifically includes: Firstly, the knowledge, time sequence and behavior ternary features are embedded and encoded using a long short-term memory neural network (LSTM) to obtain the current knowledge state. Then, based on the principle that the higher the student's ability, the greater their working memory, the Rash model is used to calculate the student's latent traits, thereby calculating the student's working record capacity; The student's memory capacity directly affects their short-term memory. A short-term attention mechanism with a triple gate function is used to enhance the student's current knowledge state. Finally, the knowledge in short-term memory needs to be converted into long-term memory before it can be truly mastered. Therefore, long-term attention based on the laws of learning and forgetting is used to further update its knowledge status.

5. A hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior as described in claim 1 or 4, characterized in that: The specific implementation of step 2 includes the following steps: (2-1) Ternary feature embedding and encoding First, we define a learning unit consisting of three elements: knowledge, timing, and behavior, denoted by LC n =(q n ,s n ,b n ), which is used to represent the learning events that occur within a certain time unit n; where q n Indicates the knowledge characteristics of the investigation; s n Represents the time series features in time series data, including each time unit interval Δs n , the same concept learning interval Δr n and the number of repetitions Δc n ; b n represents the click flow behavior features generated by the learner during the learning process; the embedding of the learning unit is expressed as X n =ε v +emb(s n )+emb(r n ), Among them, ε v It is a knowledge association representation based on heterogeneous graph neural network, emb(s n ) is the embedding of reaction time, r n ∈b n is the correctness of the last click in the click stream, emb(r n ) is the embedding of the reaction result; Then, a recurrent neural network is used to simulate the impact of previous answers on subsequent answers and initially obtain the potential knowledge state. The encoding process can be expressed as: H n =LSTM(X n ), Among them, LSTM is a long short-term memory neural network. Represents the potential knowledge state at the time of the nth question; (2-2) Calculation of working memory capacity First, based on the learners’ answers, the Rasch model is used to calculate the learners’ initial potential traits. The formula is as follows: P(r in =1∣θ i ,b n )=exp(θ i -b n )[1+exp(θ i -b n )] -1 , Among them, r in is a binary variable indicating whether the learner answered correctly or incorrectly, 1 indicates a correct answer and 0 indicates an incorrect answer. i is the latent characteristic parameter of learner i, β j is the difficulty parameter of test item n; Subsequently, the latent trait values ​​obtained using the Rasch model were further used to determine the learner's working memory capacity; specifically, the learner's traits and the difficulty of the test questions were used to adjust the working memory capacity, which was calculated as follows: Among them, WMC n is the working memory capacity when answering the nth question, diff n is the difficulty of the nth question, α and β are weight factors used to adjust the influence of latent traits and question difficulty; σ is the Sigmoid activation function, which is used to limit the output value between 0 and 1; ΔC is the capacity floating range, ò is the minimum value of the capacity, ensuring that the capacity is not zero; (2-3) Short-term attention based on triple masking In order to block irrelevant or excessive information and enhance short-term dependencies in time series, a triple mask is set for the attention mechanism, including short-term mask, capacity mask and timing mask, to converge the influence of answers within limited capacity and time, so as to simulate the working memory operation mechanism; First, the short-term mask M s It is used to shield learning units with longer time intervals, simulating the fact that humans have more active memories of recent events. By calculating the time interval Δs between the current learning unit n and the previous unit, if the time interval exceeds a certain short-term window threshold δ s , then the attention weight of the unit is set to 0, thus avoiding excessive attention to distant information; Secondly, the capacity mask M w Based on the limitation of working memory capacity, learning units that exceed the capacity range are shielded to ensure that the model only focuses on important information within the current capacity; according to the working memory capacity WMC for the nth question obtained in the previous step n , set the mask so that only the front WMC is retained n The weight of learning units beyond this capacity range is set to 0; Finally, the timing mask M c It is used to shield subsequent learning units to ensure temporal consistency and prevent future information from affecting the current state, that is, to avoid information leakage. For the current learning unit n, all learning units after it are shielded so that the attention weight of the future time step on the current state is 0. Combined with the triple mask, the formula of the attention mechanism is expressed as: H n ′=Attention(H n ,M s ,M w ,M c ), in, M represents the aggregated knowledge state after triple masking, and Attention refers to the multi-head self-attention network layer. s 、M w 、M c They are short-term mask, capacity mask and timing mask, which are used to regulate the information screening from different sources; (2-4) Long-term attention based on learning and forgetting On the basis of short-term memory enhancement, a long-term attention mechanism based on forgetting and learning curves is set up to capture the behavioral associations between long-term learning units; First, the memory decay function F s (Δs n ) is used to simulate the process of human memory gradually weakening over time. We use a polynomial decay model to make the memory decay quickly at the beginning and then gradually slow down: F s (Δs n )=1 / (1+γ·Δs n ) p Among them, Δs n is the time distance of the sequence; γ is the parameter for adjusting the decay speed, the larger the value, the faster the decay; p is the order of the polynomial, which is used to control the smoothness of the decay; Secondly, learn the enhancement function F t (Δr n ,Δc n ) is used to describe the enhancing effect of repeated learning on memory, which is expressed as follows: F t (Δr n ,Δc n )=(1+α·Δc n )·exp(-β·Δr n ) Where Δr n represents the time interval between the current learning unit and the last learning of the same concept, Δc n Represents the number of repeated learning; α and β are set hyperparameters, α is the enhancement coefficient of the number of repetitions, which is used to control the memory growth amplitude of each repeated learning; β is the decay rate of the learning interval, which is used to control the effect of the interval time on memory enhancement; Finally, based on memory decay and learning enhancement, the learner's knowledge state evolves into: Among them, H′ n ' +1 is the inferred future state of knowledge after adjustment for learning and forgetting; is the query vector in the attention mechanism, q n+1 It is the representation of the test question to be answered at time n+1; Represents the knowledge state of the past learning unit and is used as the key matrix in the attention mechanism; It serves as the value matrix in the attention mechanism; are the weight matrices of the attention mechanism, which are used to linearly transform the query, key, and value vectors.

6. A hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior as claimed in claim 1, characterized in that: The guess index based on clickstream in step 3 includes: Firstly, based on the clickstream data generated when learners answer a question, the number of times they change their answers is calculated using a cumulative method; Secondly, based on clickstream data, the counting method is used to calculate the coverage of options; Then, based on the clickstream data, the dwell time ratio of the correct option is obtained by accumulation; Finally, using these behavioral characteristics in the process of answering questions, the guessing index is derived. The calculation formula of the guessing index is as follows: Among them, guess∈[0,1] is the guess index, f c (count) represents the enhancement function of the number of times the answer is changed, f v (cover) represents the enhancement function of option coverage, f t (time) is a decay function representing the residence time ratio of the correct option; specifically, f c (count) = log(1+α·count). The more times the number of changes is, the more uncertain the learner is about the answer and the higher the degree of guessing is. v (cover) = β·cover. The higher the option coverage, the more options the learner tried when answering the question, and may guess when there is no clear answer. t (time) = 1 / (1+γ·time). The higher the dwell time ratio, the more confident the learner is about the answer and the lower the possibility of guessing. α, β and γ are all trainable parameters used to adjust these functions.

7. A hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior as claimed in claim 6, characterized in that: The clickstream-based carelessness index in step 3 includes: First, calculate the ratio of the overall time spent in the click stream to the standard time, that is, the time spent ratio spend; Then, by analyzing the learner's click stream characteristics and time proportion, the carelessness index is calculated. The formula is as follows: skip=sigmoid(f′ c (count)·f′ v (cover)·f s (spend)) -1 Among them, skip∈[0,1] is the guessing index, f s (spend) = 1 / (1+ζ·spend) is the attenuation function of the time spent ratio. The smaller the time spent ratio is, the more likely the learner is to be careless due to lack of time. ζ is also a trainable parameter, f c ′(count) and f v ′(cover) and f c (count) and f v The calculation method of the enhancement function is the same as that of (cover), except that the trainable parameters, namely α′ and β′, are replaced respectively.

8. The hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior as claimed in claim 1, characterized in that: The specific implementation of step 4 is as follows: First, define a gating function GLU() to control the influence of guessing and carelessness. Its function can be expressed as: Among them, the GLU function is used to control the impact of abnormal behavior on the knowledge state, and the input value X is the student’s knowledge state H″ n+1 , W1, W2 are weight matrices, b1, b2 are bias terms, represents element-wise product; Subsequently, if guessing behavior is detected, the guessing gate is used to reduce the error caused by guessing, and the knowledge state is updated, subtracting the error caused by guessing from the knowledge mastery level. The formula is: K n+1 =H″ n+1 -GLU g (guess n+1 ·W g +b g ) Among them, K n+1 represents the updated knowledge state after the guessing gate, H″ n+1 For the future state of knowledge, guess n+1 is the guess index at time step n+1, W g and b g To guess the weight and bias parameters of the gate; Finally, if careless behavior is detected, the knowledge loss caused by carelessness is enhanced through the carelessness gate, and the knowledge state is further updated by adding the knowledge mastery level to the knowledge enhancement ignored by carelessness. The formula is: θ n+1 =K n+1 +GLU s (skip n+1 ·W s +b s ) Among them, θ n+1 is the comprehensive ability status of the learner after passing the careless gate, K n+1 is the knowledge state after the guessing gate, skip n+1 is the carelessness index at time step n+1, W s and b s are the weight and bias parameters of the skilled gate.

9. The hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior as claimed in claim 1, characterized in that: In step 5, first, the corresponding pseudo labels are generated according to the behavioral characteristics, which are represented as and Specifically, the thresholds are set by the number of changes, option coverage, and dwell time ratio to mark the "guessing" behavior, and the samples that meet the conditions are assigned Otherwise, it is 0; similarly, the threshold is set based on the time proportion and the number of changes to mark the "careless" behavior, and the samples that meet the conditions are assigned Otherwise, 0; Secondly, a guessing index prediction task is set. In the prediction task, a feedforward network layer is used to transform the comprehensive ability state into the prediction space of the guessing index, and a multi-layer perceptron is set to complete the prediction, that is, Among them, FNN and MLP are feedforward network layers and multi-layer perceptrons; In order to optimize the prediction task, a loss function is defined to measure the difference between the guess index predicted by the model and the expected distribution. The loss function is defined as: in, is the predicted guess index, is the target value used for training; Finally, the carelessness index prediction task is set. In the prediction task, the feedforward network layer is used to transform the comprehensive ability state into the prediction space of the carelessness index, and a multilayer perceptron is set to complete the prediction, that is, Correspondingly, the loss function is: in, is the predicted guess index, is the target value for training.

10. A hierarchical attention cognitive diagnosis method based on a mixture of knowledge association and abnormal behavior as claimed in claim 9, characterized in that: In order to predict the learner's future performance, the learner's knowledge state is spliced ​​together with the predicted anomaly index to obtain the current comprehensive state, as follows: Secondly, a similar multi-layer perceptron is set up to predict the learner's response results, that is, in is the correct or incorrect result of the prediction; its loss function is: Finally, in order to balance the three prediction tasks, the loss functions are weighted and summed to obtain the global loss function of the multi-task, namely: L=L r +λ1L g +λ2L s Where L is the global loss function, and the hyperparameters λ1 and λ2 are used to adjust the weights of each task to achieve a balance between different tasks.

Citation Information

Patent Citations

  • Cognitive diagnosis method based on learner cognitive response model

    CN112765830A

  • Test question resource recommendation method and system

    CN114155124A

  • Attention knowledge tracking method based on multi-scale space-time convolution

    CN118095531A

  • Dynamic cognitive diagnosis method based on multivariate learning behavior causal inference

    CN118940795A

  • Non-point Pollutants Treatment Facility equipped with check valve

    KR102644687B1

Cited By

  • Education effect evaluation method and system based on artificial intelligence

    CN119831186A

  • An education effect evaluation method and system based on artificial intelligence

    CN119831186B