Graph neural network cognitive diagnosis method based on multi-dimensional feature enhancement heterogeneous relation transfer
By introducing multi-dimensional feature enhancement and heterogeneous messaging technologies into the cognitive diagnostic model of graph neural networks, the shortcomings of existing models in educational data utilization and heterogeneous messaging are solved, and more accurate diagnosis and prediction of students' knowledge mastery are achieved.
Patent Information
- Application Number
- CN202510114553.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-06-06
AI Technical Summary
The existing graph neural network cognitive diagnostic model has insufficient in terms of educational data utilization and heterogeneous messaging, resulting in low evaluation accuracy.
A cognitive diagnosis method of graph neural networks based on multi-dimensional features enhances heterogeneous relationship transmission is proposed. By constructing heterogeneous graphs, the workload attributes and answering time of students and exercises are used to enhance the heterogeneity of message transmission, and the feature attributes of students and exercises are obtained through multi-layer attention networks.
Through multi-dimensional feature enhancement and heterogeneous message transmission, the diagnostic accuracy and prediction accuracy of students' knowledge mastery are improved, and the utilization rate of graph neural networks in educational data is enhanced.
Smart Images

Figure CN120106645A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of educational data mining, and specifically provides a graph neural network cognitive diagnosis method based on multi-dimensional feature enhanced heterogeneous relationship transmission for the intelligent diagnosis task of the learner's knowledge and skill mastery degree. Technical Background
[0002] With the popularization of the Internet and the development of online education, students have left a large amount of learning behavior data on various online learning platforms, including learning progress, online test results, and learning trajectories. These data provide rich information about students' strengths and weaknesses, allowing us to more comprehensively understand students' learning and academic performance through data analysis, and then provide more personalized and effective learning support. Therefore, personalized learning has received more and more attention in modern education, and cognitive diagnosis (CD) as its basic component is a task designed to assess students' mastery of specific knowledge concepts. It analyzes students' practice records and infers their mastery level of different skills, thereby identifying individual differences and providing support for personalized learning. CD can not only measure students' overall cognitive ability, but also deeply understand students' specific performance in various knowledge points. It plays a vital role in modern education.
[0003] Cognitive Diagnosis Models (CDMs) aim to infer students' mastery of specific knowledge concepts by analyzing their practice records, thereby identifying individual differences and providing personalized learning support. These models can be divided into two categories: traditional psychometric methods and deep learning-based methods. Traditional psychometric methods such as Classical Testing Theory (CTT) assume that students' performance is their true ability plus an error term, and evaluate the quality of learning data from different perspectives; while Item Response Theory (IRT) integrates student portraits, question difficulty, and other features into a logical function to predict student performance. MIRT, as a multidimensional extension of IRT, further improves the model's expressive power. Deterministic Inputs, Noisy "And" gate model (DINA) uses the Q matrix to clearly identify the specific skill requirements of each question and uses a binary vector to represent the student's knowledge proficiency. However, these traditional models have some limitations: they rely on manual features or features provided by domain experts, which limits the scope of applicability and generalization ability; at the same time, due to ignoring the noise and sparsity in the data, they may exhibit the problem of overconfidence in practical applications.
[0004] To overcome these limitations, researchers have proposed deep learning-based methods, such as the Neural Cognitive Diagnostic Model (NCDM), which uses feedforward neural networks to automatically learn the complex interactions between students and questions, rather than relying on manually defined interaction functions. Such models demonstrate strong fitting capabilities and less reliance on feature engineering, significantly enhancing the understanding of student-question interactions, but also face the risk of overfitting, especially when the amount of data is limited.
[0005] With the development of online education and technological advancement, cognitive diagnosis models have gradually introduced Graph Neural Networks (GNNs), Graph Attention Networks (GAT) and their improved version, Relational Graph Attention Network for Multi-Relational Graphs (r-GAT), which focus on modeling simple undirected single-relational graph data, but are not effective for multi-relational graphs containing directed links with different labels. Therefore, r-GAT is proposed to learn multi-channel entity representations, so that the model can better handle complex multi-relational graph structures. Relation Map Driven Cognitive Diagnosis (RCD) simulates the structural connections between different entities through multi-level relational mapping, but does not take into account the heterogeneity of message passing. The Graph-based Cognitive Diagnosis Model (GCDM) constructs a heterogeneous cognitive graph to directly discover the interactive relationship between students, skills, and questions, and uses three types of edges to represent students' correct answers, incorrect answers, and the relationship between questions and knowledge points. It takes into account the heterogeneity of message transmission, but simply regards the contribution of incorrect answer edges as nothing, which does not conform to the actual educational scenario. The Adaptive Semantic-aware Graph-based Cognitive Diagnosis model (ASG-CD) captures different types of relationship information by constructing a multi-view graph, and treats the correct answer edges and incorrect answer edges separately. It also considers the heterogeneity and uncertainty of edges through artificially designed hyperparameters. However, due to the separate treatment of the correct answer edges and the incorrect answer edges, it is unable to capture the internal relationship between the correct answer and the incorrect answer.
[0006] Although the above technologies have significantly improved the interpretability and accuracy of cognitive diagnosis models by introducing graph neural networks, there is still a lot of room for modeling the heterogeneity of message transmission between learners and test questions. The ability level of learners can be diagnosed not only by answering questions, but also by the time students answer questions, that is, the speed of answering questions reflects the ability level of learners to a certain extent. The two can work in coordination, and through the speed of answering questions, the uncertainty of edges can be alleviated and the heterogeneous transmission of edges can be enhanced. However, current neurocognitive diagnosis lacks research on how to enhance heterogeneous transmission through multidimensional features, and there is no research on the modeling between the two. Therefore, the evaluation accuracy of cognitive diagnosis models in existing technologies is still insufficient. Summary of the invention
[0007] The purpose of this invention is to address the problem that the current graph neural network cognitive diagnosis has insufficient research on the heterogeneous transmission of student attribute and test question attribute messages, and the low utilization of educational data processing. A graph neural network cognitive diagnosis method based on multi-dimensional features to enhance heterogeneous relationship transmission is proposed. This method enhances the heterogeneity of message transmission by utilizing the workload attributes of students and exercises and the actual answering time, and uses a multi-layer attention network to fuse semantic information to obtain the characteristic attributes of students and exercises. The graph neural network cognitive diagnosis method based on multi-dimensional features to enhance heterogeneous relationship transmission can provide a comprehensive diagnostic portrait of the student's current knowledge mastery level through feature modeling and diagnostic analysis.
[0008] To achieve the purpose of the invention, the present invention adopts the following technical solutions.
[0009] The method of cognitive diagnosis based on graph neural network with multi-dimensional feature enhancement and heterogeneous relationship transmission consists of heterogeneous graph construction stage, multi-dimensional feature enhancement stage, heterogeneous message transmission stage and diagnosis prediction stage, including the following steps:
[0010] (1) Heterogeneous graph construction: Based on the students’ answer logs, a student-exercise-concept heterogeneous graph is constructed, and a feature vector is initialized for each node. At the same time, the student and exercise nodes also have workload attributes for correct and incorrect answers, and the student-exercise edge contains the students’ actual answering time.
[0011] (2) Multi-dimensional feature enhancement: Workload transfer is performed on the correct answer side and the wrong answer side of the student-exercise. The correct answer workload is transferred and updated on the correct answer side, and the wrong answer workload is transferred and updated on the wrong answer side. Using the workload of the exercises and the students’ correct answers, the predicted correct answer time is obtained through the neural network; the predicted wrong answer time is obtained by using the workload of the students and the exercises’ wrong answers. The transfer strength of the correct answer side and the wrong answer side is obtained by using the predicted correct and wrong answer times and the actual times.
[0012] (3) Heterogeneous message transmission: Multi-layer attention convolution is performed on the heterogeneous graph with enhanced speed attributes to fuse the semantic information of different relationship edges and update the node feature vector. Using the transmission strength in the previous step, the node feature vector with enhanced speed features and fused semantic information of different relationship edges is obtained.
[0013] (4) Diagnostic prediction: The diagnostic algorithm consists of a neural network structure and a loss function. The final input representation vector extracted in step (3) is used as the input of the network structure, and the prediction of the student's answer response is output.
[0014] (5) Neural network structure training: collect data sets, set optimizers, iteratively train the model until convergence, and finally predict student responses and analyze changes in knowledge mastery.
[0015] In the above technical solution, the heterogeneous graph construction in step (1) specifically includes:
[0016] (1-1) The precedence and similarity relationships between concepts are obtained through the student answer records and the Q matrix. Then, a heterogeneous graph is constructed through the student answer records, the Q matrix, and the obtained relationships between concepts. In order to facilitate the transmission of messages, an inverse edge is added to each edge, and a self-loop is added to the node.
[0017] (1-2) Initialize the node feature vector, which is a randomly generated trainable vector. At the same time, add the correct answer workload attribute and the wrong answer workload attribute to the student node and the exercise node respectively. According to the student's answer time, add the student's answer time to the student-exercise edge.
[0018] In the above technical solution, the specific method of the multi-dimensional feature enhancement stage in step (2) includes:
[0019] (2-1) Through the meta-path, the correct answer edges and the wrong answer edges are extracted respectively, and then the correct answer workload and the wrong answer workload of the student and the exercise are convolved respectively.
[0020] (2-2) The student's correct workload attribute and the exercise's correct workload attribute obtained in step (2-1) are concatenated through a neural network to output the predicted correct answer time. The predicted incorrect answer time is obtained in the same way.
[0021] (2-3) Using the predicted time and actual answering time obtained in step (2-2), calculate the message transmission strength of the correct answer and the wrong answer.
[0022] In the above technical solution, the heterogeneous message transmission in step (3) specifically includes:
[0023] (3-1) Perform node-level attention mechanism on each node and calculate the attention score of a single relationship.
[0024] (3-2) In (3-1), when calculating the attention score of the correct answer and incorrect answer relationship for the student-exercise side and the exercise-student side, it is multiplied by the transmission strength of the correct answer and incorrect answer relationship between the student and the exercise obtained in step (2-3) to enhance the message heterogeneity transmission.
[0025] (3-3) Calculate the multi-relation attention score of each node to obtain complete semantic information.
[0026] (3-4) Calculate the final input representation vector.
[0027] In the above technical solution, the diagnosis prediction in step (4) specifically includes:
[0028] (4-1) Select a suitable network structure, and fit the student's feature vector, correct answer workload, and incorrect answer workload based on the strong fitting ability of the neural network to obtain the final student characteristics. In the same way, the final exercise characteristics are obtained;
[0029] (4-2) The student feature vector and exercise feature vector obtained in step (4-1) are combined with the feature vector of the knowledge point, and the student's mastery level and the difficulty of the exercise are obtained by using the linear layer. The predicted answer is obtained through the neural network.
[0030] (4-3) Calculate the speed attribute loss and the prediction score loss.
[0031] (4-4) A method is used to calculate the error gradient under each weight in real time. It is a classic method for training neural networks in combination with optimization methods (such as gradient descent, etc.). Gradient descent is used to reduce the loss function to optimize the parameters.
[0032] In the above technical solution, the neural network structure training in step (5) specifically includes:
[0033] (5-1) Collect three real-world datasets, namely Junyi, PISA2015, and Assistment2017;
[0034] (5-2) In the feedback neural network structure, the speed attribute loss function and the main loss function are combined to measure the loss between the predicted value and the true value;
[0035] (5-3) Perform back propagation and select a method to calculate the error gradient under each weight in real time to update the parameters;
[0036] (5-4) Select the optimization algorithm optimizer.step() and the backpropagation algorithm backward() to minimize the loss function.
[0037] Compared with the prior art, the present invention has the following obvious outstanding substantive features and remarkable technological progress:
[0038] 1. Aiming at the problems that the current graph neural network cognitive diagnosis model has low utilization rate of educational data and insufficient consideration of node heterogeneity message transmission, the present invention constructs a heterogeneous graph neural network based on cognitive diagnosis theory to characterize the multi-dimensional characteristics of students and test questions, and further adopts cognitive diagnosis analysis methods to model and train the multi-dimensional characteristics, diagnose students' knowledge mastery status, and predict students' future performance.
[0039] 2. The method of the present invention utilizes the workload attributes of students and exercises to enhance the correct and incorrect answer edges between students and exercises, and at the same time uses the attention mechanism to model the hierarchical relationship between each node of the students, assigning different weights to obtain the final node feature attributes.
[0040] 3. Build a heterogeneous graph neural network model through the implemented cognitive diagnosis method, so that it has the ability to perform cognitive diagnosis and prediction on students' answer records. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 The method of the present invention implements a scene graph.
[0042] Figure 2 The present invention discloses a cognitive diagnosis framework diagram of a graph neural network based on multi-dimensional features to enhance heterogeneous relationship transmission. DETAILED DESCRIPTION
[0043] This method discloses a cognitive diagnosis method framework of a graph neural network based on multi-dimensional feature enhanced heterogeneous relationship transmission. It mainly models the relationship between test questions, test knowledge points and students' mastery of skills through heterogeneous graph neural networks and attention mechanisms, uses rich educational data to deeply explore the intrinsic connections between nodes, and uses the intrinsic relationships between different types of nodes to model heterogeneous graphs. Through workload attributes and student answering speed factors, the intrinsic relationship between students and exercises, knowledge points, and answering speed is analyzed, and the correlation between students' cognitive characteristics is further explored, that is, the stronger the student's ability, the higher the accuracy rate, and the faster the answering time; if the answering time is close to the correct answering time and far away from the wrong answering time, the greater the error of the student's answering error. Then, the hierarchical attention mechanism is used to assign different influence weights to it and output the characteristic attributes of the node after combination, and finally the characteristic vector of the node attribute is passed to the neural network as the input, so as to obtain the final characteristic vector of the node. By utilizing the node workload attributes and attention mechanism, on the one hand, we can make better use of richer educational data, and on the other hand, we can mine node-level semantic information. At the same time, we divide the student-exercise connection edges into correct answer edges and wrong answer edges, and by utilizing multi-dimensional features, we enhance the heterogeneous message passing problem of graph neural networks.
[0044] Specifically, we first proposed a graph neural network based on multi-dimensional features to enhance heterogeneous relationship transfer. Using rich educational data, we explored modeling and visualization tasks for the intrinsic deep relationship between students, test questions, knowledge points, and the workload attributes of students and test questions, providing more valuable diagnostic information. Then, in order to integrate the final feature components of students and make full use of educational data, and to make the diagnostic results of data sets with answering time explainable, we proposed a cognitive diagnosis method of graph neural network based on multi-dimensional features to enhance heterogeneous relationship transfer. After experimental comparative analysis, the cognitive diagnosis method of graph neural network based on multi-dimensional features to enhance heterogeneous relationship transfer improved the prediction accuracy of answering results. Finally, we designed and implemented a cognitive diagnosis method system of graph neural network based on multi-dimensional features to enhance heterogeneous relationship transfer.
[0045] 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.
[0046] like Figure 2 As shown, an embodiment of the present invention provides a graph neural network cognitive diagnosis method based on multi-dimensional feature enhanced heterogeneous relationship transmission, which includes heterogeneous graph construction, multi-dimensional feature enhancement, heterogeneous message transmission and modeling diagnosis prediction.
[0047] (1) Heterogeneous Graph Construction
[0048] (1-1) The precedence and similarity relationships between concepts are obtained through the student answer records and the Q matrix, and then a heterogeneous graph is constructed through the student answer records, the Q matrix and the obtained relationship between concepts. To facilitate the transmission of information, an inverse edge is added to each relationship edge, and a self-loop is added to each node. The student-exercise and exercise-student edges are divided into correct answer edges and incorrect answer edges. Among them, the Q matrix corresponds to the knowledge points tested in the test questions, the columns represent the knowledge points, the rows represent the test questions, and the elements are only binary matrices of 0 or 1. For example, if the first question tests knowledge point 1, the first row and the first column are marked with 1, and the other columns of the first row are marked with 0.
[0049] (1-2) Initialize node attributes
[0050] Suppose a skill test has J test questions, testing K skills, and is answered by I students.
[0051] Matrix Q = {q jk} J×K is the correlation matrix between test questions and skills, q jk =1 means test question j tests skills k, q jk =0 means that question j does not test skill k. Student answer matrix Y i ={y ij} I×j,y ij =1 means student I answered question j correctly, otherwise y ij = 0. Und = {q jk} K×2 is the similarity relationship between skills, D = {q jk} K×2 It is the precedence relationship between skills. j1 Yes j2 a priori concept.
[0052] To build the model, first initialize the skill mastering model α of student i i ={α ik} I×K , α ik ∈[0,1] represents the mastery status of student i on skill k. Then initialize the test difficulty matrix K = {k jk} J×K , k jk ∈[0,1] represents the difficulty coefficient of applying skill K in problem J.
[0053] (1-2-1) Student node: During the process of students answering questions, each answer will be different according to the students’ current skill mastery, and the influence of skill mastery may not be limited to a single skill mastery, but may be affected by multiple skill mastery. During the process of students answering questions, each answer will be based on the students’ current test question mastery, which is the students’ knowledge mastery level S in this model. i =[α 1 ,α 2 ,...,α k At the same time, the student node also has the workload attribute feature vector of the correct answer and the workload attribute of the wrong answer, which are Sr i =[sr 1 ,sr 2 ,...,sr k ] and Sw i =[sw 1 ,sw 2 ,...,sw k ].
[0054] (1-2-2) Question node: For assessment questions, their potential characteristics are relatively diverse. The same student may give different responses to different questions that test the same skill. This is because although the questions cover the same skills, the difficulty of the questions themselves will also be different. In this model, the question difficulty feature vector E i =[e 1 ,e 2 ,...,e k]. In the heterogeneous graph neural network, the question node transmits messages with its neighboring student nodes and knowledge point nodes to obtain the final feature vector of the question node. Like the student node, the question also has its own workload attributes for correct answers and incorrect answers, which are Er i =[er 1 ,er 2 ,...,er k ] and Ew i =[ew 1 ,ew 2 ,...,ew k ].
[0055] (1-2-3) Knowledge point nodes: Depending on the test questions, the knowledge points tested are also different. At the same time, there are prior and similar relationships between knowledge points. In the model of the graph neural network cognitive diagnosis method based on multi-dimensional feature enhanced heterogeneous relationship transfer, the feature vector of the knowledge point is represented by K i =[k 1 ,k 2 ,...,k k ].
[0056] (2) Multi-dimensional feature enhancement
[0057] After building the heterogeneous graph, the workload attributes of the student and exercise nodes are convolved. In heterogeneous graph convolution, message transmission plays a vital role. The message transmission between the student workload and the exercise workload should have different relationship transformation matrices in the two cases of correct and incorrect answers.
[0058] (2-1) Meta-path workload transfer
[0059] In the process of heterogeneous graph convolution, the meta-path is used to determine the message passing edge relationship type. When the edge type is wrong answer, only the wrong answer workload of the student and the practice node is message passed. When the edge type is correct answer, only the correct answer workload of the student and the practice node is message passed.
[0060] (2-2) Predicting the time to answer questions
[0061] After obtaining the correct and incorrect answers of the students and the correct and incorrect answers of the exercises, the correct answers of the students and the exercises are concatenated and passed into the neural network for predicting the correct answers to obtain the predicted correct answer time T. r ; Concatenate the wrong answer workload of students and exercises, and pass it into the neural network for predicting wrong answers to get the predicted wrong answer time T w .
[0062] T r=MLP(s rw ,e rw ), T w =MLP(s ww ,e ww ) (Formula 2.1)
[0063] s rw With e rw The correct workload characteristics for students and exercises, s ww With e ww Wrong workload characteristics for students and exercises.
[0064] (2-3) Speed attribute enhancement
[0065] When passing messages between students and exercises, there are two completely different relationship edges: correct answers and incorrect answers. At the same time, since students may guess or make mistakes when answering, how to reduce this influence is of great significance to the interpretability and model effect of cognitive diagnosis. Traditional graph convolutional neural network cognitive diagnosis models are insufficient in this regard.
[0066] In education and psychological measurement, response time (i.e., the time it takes an individual to answer a question) is often used as an indicator of response engagement. When response time is used as a predictor variable, it means that it can predict or estimate the value of other variables. For example, if a student takes a particularly long time to respond to a question on a test, this may indicate that they will perform poorly on that question, perhaps because they do not understand the question well enough or are unsure of the answer.
[0067] Therefore, this model believes that answering time as an important educational data can also predict the student's answering results and student status. Even if the student answers incorrectly, the student's answering time is more inclined to the correct answer time. This model is more inclined to believe that the student answered incorrectly because of a mistake, and believes that the wrong answer is also a contribution to the student or the exercise. Through the answering time T, using the T obtained in step (2) r , T w , we get the relationship transfer reinforcement coefficient θ r With θ w .
[0068]
[0069] (3) Heterogeneous Message Transmission
[0070] Heterogeneous graph neural networks can better capture the complex structure of data by introducing the relationship information between data, and can more comprehensively describe the complex relationship between data, so it has stronger expressive power. In order to better transmit messages between different relationship edges, this model uses the relationship matrix W r, and introduce single-relation attention network and multi-relation attention network at the same time.
[0071] (3-1) Single Relation Attention Network
[0072] When updating the graph convolution, the neighbor nodes of the same relation connection have different importance to the target node, so the attention mechanism is introduced in this layer to simulate the interaction between the neighbor nodes of the same relation connection and the target node. Using the meta-path update method, the attention score of the neighbor nodes connected by each relation edge of the node is calculated separately to obtain the attention score of the neighbor nodes on the same relation edge of each node. Since it is a multi-relation heterogeneous graph, the relationship matrix W is used r Transformation relationship characteristics.
[0073] r i =W r r i
[0074] att viu =fn[e v ||r i ||e u ] (Formula 3.1)
[0075] Where || represents concatenation, f n is a feedforward neural network, r i Represents different relationship edges, which are represented by the weight matrix W r parameterization followed by a softmax nonlinearity.
[0076]
[0077] R vz is the relationship between an entity v and its adjacent variables z.
[0078] For the feature transfer between students and exercises on the correct and incorrect answer edges, the node single relationship edge attention score obtained in step (3-1) is multiplied by the reinforcement coefficient obtained in step (2-3) to alleviate the impact of heterogeneous message transfer, guesswork, and mistakes between students and exercises.
[0079]
[0080] where α vru It can be regarded as the correct answer relationship, the neighbor u constructs e vru Contribution, N vru Represents the correct edge relationship neighbor node set of a node. In order to aggregate the information from neighbor u to v, the correct answer relationship feature r is merged and e u Multiply it by that. And do the same for the wrong side.
[0081] (3-3) Multi-relation Attention Network
[0082] After obtaining the single-relation attention score, for each relation neighbor of each node, the attention score obtained in step (3-1) and the student-practice reinforcement message transmission coefficient obtained in step (3-2) are used. Then the attention scores of different relations to the node are calculated, and finally the final semantic feature vector of the node is obtained, which provides support for the neural network training parameters and improves the training effect of the neural network. It should be noted that although the attention mechanism has been used before, there are differences in the input of the two and the effects are not the same. On the one hand, in this layer, the input is the neighbor nodes connected by each relation edge rather than the influence representation of a single relation; on the other hand, after passing through the previous network, the potential characteristic representation of the information of the relation connection of each category has taken into account the mutual interaction and individual differences between them. Therefore, in this layer, the role of the attention mechanism is mainly to assign influence weights to each category of knowledge information based on the node characteristic representation.
[0083]
[0084] where α viu It can be regarded as the neighbor u constructing e v To aggregate the information from neighbor u to v, we merge the relation feature r and transform e u Multiply it.
[0085] (3-4) Calculate the final input representation vector
[0086] After obtaining the semantic vectors of each node in step (3-3), the semantic vectors of each student node are concatenated with the student's correct answer workload vector and incorrect answer workload vector, and the final representation vector is obtained through a multi-layer perceptron. In the same way, the final representation vector of each exercise node is obtained. The knowledge point vector is obtained by step (3-3).
[0087]
[0088] (4) Using the attention neural network structure to build a model diagnosis algorithm
[0089] (4-1) Determine the network structure
[0090] Neural network, cognitive diagnosis methods based on neural network were introduced in recent years. They fit both students and test questions based on the strong fitting ability of neural network. There are methods of fitting parameters combined with parameter estimation of manual modeling, and there are also end-to-end modes that directly fit the entire process, and the fitting parameters are diversified. Using neural network, student characteristics and workload attributes can be effectively fitted, and test questions can also be fitted. The specific formula of the network structure is as follows:
[0091] x=[v,w r ,w w ] (Formula 4.1)
[0092] f 1 =φ(w 1 × T +b 1 ) (Formula 4.2)
[0093] f 2 =φ(w 2 ×f 1 +b 2 ) (Formula 4.3)
[0094] f 3 =[v,f 2 ] (Formula 4.4)
[0095]
[0096] Among them, x is the concatenation of node characteristics and workload attributes, f 1 、f 2 is the output of the first and second fully connected layers, f 3 is the output of the residual network, which is also the output of f 2 The splicing of W and v. i are the parameters of each fully connected layer, b i is its bias parameter, For the final student and exercise node features.
[0097] (4-2) Fitting knowledge point feature prediction results
[0098] After obtaining the final features of students and exercises, the knowledge point features obtained by convolution in step (3) are fitted respectively to obtain the students’ knowledge point mastery and exercise difficulty vectors.
[0099]
[0100] a=φ(w 4 ×a T +b 1 ) (Formula 4.7)
[0101]
[0102] d=φ(w 5 ×y T +b 2 ) (Formula 4.9)
[0103]
[0104] Among them, x and y are the concatenation of student and exercise features and knowledge points, respectively. a and d are the outputs of the fully connected layer, indicating the degree of students’ mastery of knowledge points and the difficulty of exercises. The final prediction result.
[0105] (4-3) Calculate the loss function
[0106] The learner's ability level can not only be diagnosed by the answering situation, but also by the time it takes to answer the questions. That is, the speed of answering questions has a certain reflection on the learner's ability level. The two can work in coordination to enhance the heterogeneity of edges and alleviate uncertainty through the speed of answering questions.
[0107] The speed loss function can be expressed using the obtained transfer strength, which indicates whether the time spent by students on answering questions is more inclined to the time spent on correct answers or incorrect answers. The correct transfer strength θ r as the predicted probability of the correct answer.
[0108] P(r ij =1|θ i )=θ r (Formula 4.11)
[0109]
[0110] At the same time, the main loss function is calculated using the model predictions.
[0111]
[0112] (4-4) Real-time calculation of the error gradient under each weight
[0113] It is a classic method for training neural networks combined with optimization methods (such as gradient descent, etc.), which consists of two parts: incentive propagation and weight update.
[0114] (4-4-1) In the excitation propagation phase, each iteration is divided into two steps:
[0115] Step 1: Input the training results into the network to obtain the stimulus response;
[0116] Step 2: Differentiate the stimulus response with the corresponding output target to obtain the response error of the output layer and the hidden layer.
[0117] (4-4-2) In the weight update phase, two steps are performed on each weight:
[0118] Step 1: Multiply the input stimulus and response error to obtain the weight gradient;
[0119] Step 2: Use this gradient and multiply it by the learning rate, then take its inverse and add it to the weights.
[0120] (5) Neural network structure training
[0121] (5-1) Collect data sets and train network structures
[0122] The Junyi dataset consists of 718 objective questions. PISA2015 consists of 17 objective questions. Assistment2017 consists of 102 objective questions. Each dataset is represented by educational experts using a scoring matrix and a given test skill Q matrix. All questions have completed answer prediction in the prediction model, and Table 5.1 shows a summary of these datasets.
[0123] Junyi: The Junyi dataset comes from the "Junyi Academy". The original Junyi dataset contains more than 20 million response records distributed in different learning links. In order to meet the static assumptions of cognitive diagnosis, this model analyzes the relationship between students' answer data and the exercises and concepts contained therein.
[0124] PISA 2015 Dataset: PISA is a globally authoritative online test with high-quality test items, and records students' answer results and answer time. The PISA 2015 dataset includes computer-based PISA mathematics data. This model selects and uses 17 computer-scored dichotomous items. The database used for analysis contains dichotomous answer data and continuous answer time data of 6,000 randomly selected students.
[0125] Assistment2017: Assistment2017 originated from the "2017ASSISTments Data Mining Competition" and provides learners' answer records from 2014 to 2017 and the relationship between the exercises and concepts contained in them.
[0126] Table 5.1 Statistics of the data set
[0127] Dataset Number of students Number of exercises Concept Number Junyi 15000 718 39 PISA 2015 6000 17 11 Assistment2017 1709 102 3162
[0128] (5-2) Joint velocity attribute loss function and main loss function
[0129] In the structure of the feedback neural network, this model combines the speed attribute loss function with the main loss function to measure the final loss, and proves the effectiveness of the model by pursuing lower loss values.
[0130] loss = L main +L speed (Formula 5.1)
[0131] (5-3) Perform back propagation and select the real-time calculation method of the error gradient under each weight to update the parameters
[0132] The difficulty of the test questions and the mastery of the students are combined to obtain X. After receiving the mixed input X, X is transferred to the first fully connected layer (Linear layer). X is linearly mapped in the first fully connected layer to obtain z 1 , and then processed by the sigmoid activation function to obtain X 1 Then transfer X 1 Enter the second fully connected layer and repeat the above steps. After repeating the linear-sigmoid process twice, the mapping product X is obtained. 2 The formula is described as follows:
[0133]
[0134] X i+1 =sigmoid(z i ) (Formula 5.3)
[0135] In this model, back propagation plays a role in updating parameters for fitting, ΔW ij is the parameter update formula, which is described as follows:
[0136]
[0137] Variable W ij Denotes the neuron weight between i and j, and defines ΔW ij is the weight update, η is the learning rate, represents the partial derivative of the squared error function. i is the output of the current neuron, δ j is the error generated by the jth neuron in the current layer (i.e., the error between the actual value and the predicted value). The input part X leading to neuron j i is the output X of the upper neuron I i The weighted sum of .
[0138] (5-4) Select the optimization algorithm optimizer.step() and the backpropagation algorithm backward() to minimize the loss function.
[0139] W ij =W ij —ηX i δ j (Formula 5.6)
[0140] It should be noted that the above-mentioned examples of the present invention are intended to explain the technical features of the present invention in detail. Without departing from the present invention, several improvements and modifications made are also protected by the present invention, so the protection scope of the present invention should be based on the content defined by the claims of this application.
[0141] The contents not described in detail in this specification belong to the prior art known to those skilled in the art.
Claims
1. A graph neural network cognitive diagnosis method based on multi-dimensional features to enhance heterogeneous relationship transfer, characterized by The method comprises the following steps: (1) Heterogeneous graph construction: Based on the students’ answer logs, a student-exercise-concept heterogeneous graph is constructed, and a feature vector is initialized for each node. At the same time, the student and exercise nodes also have workload attributes for correct and incorrect answers, and the student-exercise edge has the student’s actual answering time. (2) Multi-dimensional feature enhancement: workload transfer is performed on the correct answer side and the wrong answer side of the student-exercise relationship. The correct answer workload is transferred and updated on the correct answer side, and the wrong answer workload is transferred and updated on the wrong answer side. The workload of the exercises and the students’ correct answers is used to obtain the predicted correct answer time through a neural network; the workload of the students’ and the exercises’ wrong answers is used to obtain the predicted wrong answer time; the predicted correct and wrong answer times and the actual times are used to obtain the transfer strength between the correct answer side and the wrong answer side. (3) Heterogeneous message transmission: multi-layer attention convolution is performed on the heterogeneous graph to enhance the speed attribute, fuse the semantic information of different relationship edges, update the node feature vector, and use the transmission strength in the previous step to obtain the node feature vector with enhanced speed feature and fused the semantic information of different relationship edges; (4) Diagnosis prediction: using neural network modeling to build a diagnosis algorithm. The diagnosis algorithm consists of a neural network structure and a loss function. The final input representation vector extracted in step (3) is used as the input of the network structure, and the prediction of the student's response is output; (5) Training the neural network structure, collecting data sets, setting the optimizer, iteratively training the model until convergence, and finally predicting the student's response and the change in knowledge mastery.
2. The method for cognitive diagnosis based on graph neural network with multi-dimensional feature enhanced heterogeneous relationship transfer according to claim 1 is characterized in that The specific method of constructing the heterogeneous graph in step (1) includes: (1-1) The precedence and similarity relationships between concepts are obtained through the student answer records and the Q matrix. Then, a heterogeneous graph is constructed through the student answer records, the Q matrix, and the obtained relationship between concepts. In order to facilitate the transmission of messages, an inverse edge is added to each edge, and a self-loop is added to the node; (1-2) Initialize the node feature vector, which is a randomly generated trainable vector. At the same time, add the correct answer workload attribute and the wrong answer workload attribute to the student node and the practice node respectively. According to the student's answering time, add the student's answering time to the student-practice edge.
3. The method for cognitive diagnosis based on graph neural network with multi-dimensional feature enhanced heterogeneous relationship transfer according to claim 1 is characterized in that The specific method of step (2) multi-dimensional feature enhancement includes: (2-1) Through the meta-path, extract the correct answer edge and the wrong answer edge respectively, and then convolve the correct answer workload and the wrong answer workload of the student and the exercise respectively; (2-2) The student's correct workload attribute and the exercise's correct workload attribute obtained in step (2-1) are concatenated through a neural network to output a predicted correct answer time, and the predicted incorrect answer time is obtained in the same way; (2-3) Using the predicted time and actual answering time obtained in step (2-2), calculate the message transmission strength of the correct answer and the wrong answer.
4. The method for cognitive diagnosis based on graph neural network with multi-dimensional feature enhanced heterogeneous relationship transfer according to claim 1 is characterized in that The specific method of heterogeneous message transmission in step (3) includes: (3-1) Perform node-level attention mechanism on each node and calculate the attention score of a single relationship; (3-2) In step (3-1), when calculating the attention score of the correct answer and wrong answer relationship for the student-exercise side and the exercise-student side, multiply it by the transmission strength of the correct answer and wrong answer relationship between the student and the exercise obtained in step (2) to enhance the message heterogeneity transmission; (3-3) Calculate the multi-relation attention score of each node to obtain complete semantic information; (3-4) Calculate the final input representation vector.
5. The method for cognitive diagnosis based on graph neural network with multi-dimensional feature enhanced heterogeneous relationship transfer according to claim 1 is characterized in that The specific method of diagnosis and prediction in step (4) includes: (4-1) Select a suitable network structure, and fit the student's feature vector, correct answer workload, and incorrect answer workload based on the strong fitting ability of the neural network to obtain the final student characteristics. In the same way, the final exercise characteristics are obtained; (4-2) The student feature vector and the exercise feature vector obtained in step (4-1) are combined with the feature vector of the knowledge point respectively, and the student's mastery level and the difficulty of the exercise are obtained by using the linear layer, and the predicted answer is obtained through the neural network; (4-3) Calculate speed attribute loss and prediction score loss; (4-4) The method of calculating the error gradient under each weight in real time is adopted, and gradient descent is performed to reduce the loss function to optimize the parameters.
6. The method for cognitive diagnosis based on graph neural network with multi-dimensional feature enhanced heterogeneous relationship transfer according to claim 1 is characterized in that The specific method of training the neural network structure in step (5) includes: (5-1) Collect three datasets, namely Junyi, PISA2015, and Assistment2017; (5-2) In the feedback neural network structure, the speed attribute loss function and the main loss function are combined to measure the loss between the predicted value and the true value; (5-3) Perform back propagation and select a method to calculate the error gradient under each weight in real time to update the parameters; (5-4) Select the optimization algorithm optimizer.step() and the backpropagation algorithm backward() to minimize the loss function.