Cognitive diagnosis method and system based on heterogeneous relation graph embedding

By constructing a multivariate cognitive relationship graph and combining graph neural networks and metric learning, the shortcomings of existing cognitive diagnostic methods in handling multivariate interaction relationships and heterogeneous data are addressed. This enables accurate modeling of complex interaction relationships between students, test questions, and knowledge points, thereby improving the accuracy and robustness of cognitive diagnosis.

CN120543004BActive Publication Date: 2026-05-12NINGXIA TEACHERS UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NINGXIA TEACHERS UNIV
Filing Date
2025-05-07
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing cognitive diagnostic methods have limitations in handling complex cognitive interactions and fine-grained cognitive state modeling, especially when dealing with multi-faceted interaction relationships and heterogeneous data. They struggle to accurately model the interaction relationships between various cognitive entities, and the model diagnostic accuracy is affected when data is sparse or incomplete.

Method used

By constructing and embedding a multi-faceted cognitive relationship graph, combined with graph neural networks and metric learning, the complex interactive relationships between students, test questions, and knowledge points are accurately represented. Relationship-aware encoding and dynamic embedding are used to adaptively adjust the weights of different relationships, thereby enhancing the model's ability to distinguish student responses.

Benefits of technology

It significantly improves the accuracy and robustness of cognitive diagnosis in low-density interaction scenarios, enabling more accurate identification of students' answer patterns and enhancing diagnostic precision in personalized learning assessment and intelligent education.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120543004B_ABST
    Figure CN120543004B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of cognitive diagnosis method and system based on heterogeneous relationship graph embedding, it aims at by the combination of graph neural network and metric learning, improve the accuracy and efficiency of cognitive diagnosis.The present application is specifically divided into four technical implementation stages of constructing multiple cognitive relationship graph and carrying out embedding processing, relationship perception coding based on graph neural network, metric learning and answer mode discrimination and joint training and model optimization.Specifically, the present application constructs multiple cognitive relationship graph and carries out embedding processing, and finely depicts the complex interaction between student, test and knowledge point.Based on graph neural network, relationship perception coding is carried out, and node embedding representation is updated, and different types of relationship information are fused.Combined with metric learning technology, the correct and wrong answer behavior of student is accurately distinguished.Finally, through joint training optimization model, the precision and robustness of cognitive diagnosis are improved, and it is suitable for personalized learning evaluation and intelligent education and other fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cognitive diagnostic technology, and in particular to a heterogeneous relation graph embedding method based on graph neural networks. Specifically, this invention provides a cognitive diagnostic method based on heterogeneous relation graph embedding, which aims to accurately describe the multi-dimensional interaction relationships between cognitive entities by constructing a directed multi-dimensional cognitive relation attribute graph, and to jointly model cognitive diagnostic tasks by combining graph neural network technology with metric learning. Background Technology

[0002] Cognitive diagnosis (CD) is increasingly widely used in education, playing a central role, particularly in intelligent education systems and personalized learning path recommendations. The purpose of cognitive diagnosis is to infer students' mastery of various knowledge points by analyzing multimodal behavioral data such as answer trajectories, eye-tracking data, and interaction logs, thereby providing accurate evidence for educational assessment. Cognitive Diagnosis Models (CDMs), as the core tool for achieving this goal, have become an important research direction in the field of educational measurement. Traditional cognitive diagnosis methods, such as probabilistic structural models based on Item Response Theory (IRT) and Deterministic Inputs Noisy “AND” Gate (DINA), primarily infer students' cognitive states by analyzing their answering behavior on test questions.

[0003] The advantage of these traditional models lies in their ability to infer students' cognitive states by fitting the probabilities of their answer patterns. However, these methods have limitations when dealing with complex cognitive interactions and fine-grained cognitive state modeling. For example, traditional models often assume that students need to master all the knowledge points covered in the test to answer correctly. This "all-or-nothing" assumption cannot effectively capture students' mastery of different knowledge points, especially in real-world educational scenarios where students' cognitive states are often dynamic and multi-layered. Furthermore, probabilistic CDMs typically rely on manually designed Q matrices and attribute independence assumptions, which makes them less flexible and adaptable when dealing with complex, real-world educational data. The diagnostic accuracy of the model is significantly affected, particularly when the data is sparse or incomplete.

[0004] With the rise of deep learning technology, the field of cognitive diagnostics has begun to introduce more complex nonlinear modeling methods, especially neural network models, which have greatly improved the expressive power and applicability of cognitive diagnostic models. For example, the Deep Learning-Enhanced Item Response Theory (DIRT) proposed by Cheng et al. uses deep neural networks (DNNs) to learn students' latent cognitive traits and the discriminative power of test items, while introducing long short-term memory networks (LSTMs) to model the difficulty of test items. This method can effectively extract features automatically from large-scale data and improve the model's performance through end-to-end training. However, these neural network-based cognitive diagnostic methods still have two significant drawbacks when dealing with the diverse and complex interactions between cognitive entities (students, test items, and knowledge points): First, there is the dilemma of homogeneous modeling of interaction relationships. Most existing neural network-based cognitive diagnostic models use a single relation parameter to model the interaction relationships between students, test items, and knowledge points. Although this method can handle simple associations, it fails to fully consider the heterogeneous semantics between "positive transfer" and "negative feedback." For example, students' correct and incorrect answers to test questions, the feedback from test questions to students, and the connections between knowledge points often exhibit asymmetry and dynamic changes, information that is often not accurately represented in existing models. Furthermore, existing multi-relationship models typically model relationships through simple positive-negative sample splitting. This approach is prone to poor training performance when data is sparse or interaction density is low, especially when high-frequency positive samples dominate, leading to model bias. On the other hand, there is a lack of modeling of higher-order interaction information. Traditional cognitive diagnostic models often use bipartite graphs (e.g., student-question, question-knowledge point) to model one-to-one interactions between entities, but this approach ignores the higher-order information flow between indirect interacting entities. For example, a student's answer to a test question may be influenced not only by the current knowledge point but also indirectly by other knowledge points, such as a chain-like cognitive dependency of "knowledge point A → knowledge point B → knowledge point C". This higher-order dependency is crucial for assessing students' knowledge mastery, but existing models fail to effectively capture this implicit interaction information. Although cognitive diagnostic models based on graph neural networks (GNNs) have made progress in addressing this problem in recent years, they still face the issue of information oversmoothing, where information from higher-order neighbor nodes may be overwhelmed by noise during propagation, leading to a reduction in the model's expressive power.

[0005] In recent years, the rapid development of Graph Representation Learning (GRL) technology has provided new ideas for solving the above problems. Graph Neural Networks (GNNs), as a powerful tool for modeling graph-structured data, can propagate information through relationships between nodes and capture implicit and higher-order interaction information between different entities. For example, the cognitive diagnosis method based on GNNs proposed by Wang et al. utilizes techniques such as Graph Convolutional Networks (GCNs) and Graph Attention Networks (GATs) to effectively handle complex interaction relationships between students, test questions, and knowledge points. Although these methods have made significant progress in heterogeneous relationship modeling and higher-order interaction capture, existing technologies still have shortcomings in accurately representing the semantic differences of heterogeneous relationships and adaptively mining implicit relationships. Summary of the Invention

[0006] Addressing the limitations of existing cognitive diagnostic models, this invention proposes a cognitive diagnostic method based on heterogeneous relational graph embedding. By constructing a multidimensional, heterogeneous cognitive relational graph, this invention can accurately represent the complex interaction relationships between students, test questions, and knowledge points, including different types of semantic differences such as positive transfer and negative feedback. Furthermore, this method introduces an implicit relational reasoning mechanism to adaptively discover implicit information flows from existing entity interaction data, thereby improving the model's performance in complex cognitive diagnostic tasks.

[0007] This invention relates to a cognitive diagnostic method based on heterogeneous relation graph embedding, aiming to improve the accuracy and efficiency of cognitive diagnosis by combining graph neural networks with metric learning. To address the limitations of existing cognitive diagnostic methods in handling diverse interaction relationships and heterogeneous data, this invention proposes an innovative cognitive diagnostic method based on multi-relation embedding, specifically comprising four technical implementation stages: constructing a multi-relation graph and performing embedding processing; relation-aware encoding based on graph neural networks; metric learning and answer pattern discrimination; and joint training and model optimization. Specifically, this invention constructs a multi-relation graph and performs embedding processing to finely characterize the complex interaction relationships between students, test questions, and knowledge points. Relationship-aware encoding is performed based on graph neural networks to update node embedding representations and fuse different types of relation information. Metric learning technology is combined to accurately distinguish between students' correct and incorrect answer behaviors. Finally, the model is optimized through joint training to improve the accuracy and robustness of cognitive diagnosis, making it applicable to personalized learning assessment and intelligent education. To achieve the objectives of this invention, the following technical solutions are adopted.

[0008] The cognitive diagnostic method based on heterogeneous relation graph embedding consists of four stages: constructing a multivariate cognitive relation graph and performing embedding processing; relation-aware encoding based on graph neural networks; metric learning and response pattern recognition; and joint training and model optimization. These four technical implementation stages include the following steps:

[0009] Step 1: Construct a multi-dimensional cognitive relationship graph. First, extract the entity features of students, test questions, and knowledge points and generate initial embeddings. Connect the three through different types of relationships to form a graph structure. Dynamically embed the interaction relationships between entities to generate initial relationship embeddings. Construct an adjacency matrix based on the interaction relationships between entities to complete the initialization of the multi-dimensional cognitive relationship graph.

[0010] Step 2: Using a multi-dimensional cognitive relationship graph as input, message propagation and aggregation are achieved through a relationship-aware graph neural network, and entity and relationship embeddings are updated based on the aggregated messages;

[0011] Step 3: The updated student, question, and corresponding relationship embeddings are used as input, and the student and question embeddings are projected onto different hyperplanes to obtain the projected student and question representations; the distance between positive and negative sample triples is optimized based on metric learning to enhance the feature difference between the two interaction relationships of correct and incorrect answers, thereby obtaining enhanced features; the hyperplane includes the correct answer relationship hyperplane and the incorrect answer relationship hyperplane;

[0012] Step 4: Input enhanced features, capture the non-linear interaction between students and test questions through an attention-enhanced neural network structure, and then output the probability of students answering correctly through probability prediction;

[0013] Step 5: Based on the cognitive diagnostic model constructed in steps 1-4, jointly train and optimize the model parameters, iteratively train the model until convergence, and finally predict the student's response.

[0014] Furthermore, step 1 specifically includes: extracting entity features of students, test questions, and knowledge points from student answer data, and generating initial embedded representations of entities; and fusing lateral information embedding of entities to enhance the semantic information of entity embedding.

[0015] Furthermore, eight interactive relationships are dynamically embedded: student-question correct / incorrect answers, question-student correct / incorrect feedback, question-knowledge association / guidance, and knowledge similarity / dependency.

[0016]

[0017] in, It is a relation type The initial embedding representation, This represents the relation type. eigenvectors, Indicates the relation type, It is the parameter matrix of the dense layer.

[0018] Furthermore, step 2, message propagation and aggregation, specifically includes:

[0019] In the multi-cognitive relationship diagram Given a set of entity interaction triples , Indicates the source node, Indicates relation edges, Indicates the target node; the target node message is generated by combining the source node and relation edges:

[0020]

[0021] in, The target node In the The embedding representation of the layer, i.e., the updated feature vector; These are the target nodes. Source node and relationship edge In the Layer embedding representation, Represents the target node The set of neighboring nodes, including those with Directly connected nodes and edges; It is a trainable weight matrix that depends on the relation type. ; It is a function that maps relation types to indices in the weight matrix; It is a function used to generate a message by combining the features of the source node, the target node, and the relation edges; It is a non-linear activation function.

[0022] Further settings The weight matrix for different directions is represented by the following calculation method:

[0023]

[0024] in, , and These represent the weight matrices for positive relationships, negative relationships, and self-connections, respectively. and It is the reciprocal of the degree matrix used for weight normalization; Represents the set of all positive relations. Represents the set of all reverse relations. This represents the set of all sub-ring relationships.

[0025] Furthermore, updating entity and relation embeddings specifically includes:

[0026] Employing a relation-aware attention mechanism for the target node Source node and relationship edge The specific process of performing relevance calculations on the embedded representation, realizing message aggregation, and updating entity embeddings is as follows:

[0027]

[0028]

[0029]

[0030] in, and These represent the linear transformation matrices for node embedding and relation embedding, respectively; The target node In the Layers via relation edges Features of aggregated neighbor nodes Indicates the source node In the Layers via relation edges eigenvectors; Indicates the relationship with the target node via relation edges Interactive neighbors Indicates the relationship with the target node via relation edges The set of connected neighboring nodes; Represents the target node and source node Through relationships Attention score Represents the target node and source node Between them via relation edges Normalized attention weights; Representing relation edges In the Layer feature representation, It is a trainable parameter vector;

[0031] For relation edges The embedding update process is as follows:

[0032]

[0033] It is a trainable matrix used for linear transformations, a function Used for nonlinear activation.

[0034] Furthermore, embedding students and test questions into different hyperplanes specifically includes:

[0035] Given a set of response interaction triples ,in, Representing students, This indicates the test question. This represents the relationship between the student and the test questions, i.e., whether the student answered correctly or incorrectly; it sets up the representation of the student entity. and the representation of test item entities And the relationship between the two in terms of responses. The representational relationship between the three can be obtained in the vector space, namely:

[0036]

[0037] Will and Projecting onto different hyperplanes, each relation's hyperplane is considered its own space. The projection of an entity onto this space represents its semantics under that relation. For a correct-response relation, the projection operation is as follows:

[0038]

[0039]

[0040] in, This represents a trainable relational normal vector, used to define the hyperplane of the relation for correct responses. and This represents the student and question representation projected onto the correct answer relation hyperplane.

[0041] Furthermore, optimizing the distance between positive and negative sample triples through metric learning specifically includes:

[0042] The formula for measuring the similarity between the projected student entity and the test question entity under the correct answer relation is as follows:

[0043]

[0044] in, It is a distance function. The feature vector representing the relationship between correct answers. This represents the L2 normal form; similarly, the similarity between the student entity and the question entity under the incorrect answer relation is calculated as follows:

[0045]

[0046]

[0047]

[0048] in, Represents student entity and test question entities Similarity measurement under the relationship of incorrect answers This represents the projected feature vector of the student entity under the incorrect answer relation. The feature vector representing the relationship between incorrect answers. This represents the projected feature vector of the question entity under the incorrect answer relation. This represents the trainable weight matrix used for projecting incorrect response relationships; for a given student-question interaction triple... Construct triples This makes two triples pairwise positive and negative examples, and the sign of the triple is determined by a given relation label. To determine, if This indicates a triplet For positive samples, triples Negative samples; Conversely, the training objectives for metric learning are as follows:

[0049]

[0050] in, It is a hyperparameter.

[0051] Furthermore, in step 4, student characteristics are considered. Test characteristics Characteristics of Correct Answers Characteristics of incorrect answers This enables the predictive modeling of the probability of student answer patterns, as shown in the following formula:

[0052]

[0053]

[0054]

[0055] in, It is a multilayer perceptron, consisting of two fully connected layers and an activation function sigmoid; This represents the probability that student s will answer question q correctly. This represents the probability that student s will answer question q incorrectly. This represents a prediction of student s's answer to question q.

[0056] The loss between the predicted probability and the actual label of a student's answer is calculated using a binary cross-entropy loss function. The specific calculation formula is as follows:

[0057]

[0058] in, Labels indicating student's answer results.

[0059] This invention also provides a cognitive diagnostic system based on heterogeneous relation graph embedding, comprising:

[0060] The processor and memory are used to store program instructions, and the processor is used to call the stored instructions in the memory to execute the cognitive diagnostic method based on heterogeneous relational graph embedding as described in the above technical solution.

[0061] The innovation of this invention lies in its use of heterogeneous relation graph embedding technology to address the shortcomings of traditional methods in modeling multi-dimensional interaction relationships and high-order information. Compared with existing neural network-based cognitive diagnostic methods, this invention can more effectively capture the complex interactions between students and test questions and knowledge points. Especially in low-density interaction scenarios, the method of this invention can avoid the model's over-reliance on positive sample interaction paths, thereby providing more accurate cognitive diagnostic results.

[0062] Compared with existing technologies, this invention has the following obvious and prominent substantive features and significant technological advancements:

[0063] 1. Existing cognitive diagnostic methods (CDM) often struggle to effectively handle different types of heterogeneous relationships, leading to semantic information confusion and an inability to accurately model the interaction relationships between various cognitive entities. This invention proposes a graph neural network (REG-CD) method based on multivariate relation embedding. By accurately characterizing the multivariate interaction relationships between students, test questions, and knowledge points, this method avoids the information confusion problem in existing methods and significantly improves the model's ability to model various complex relationships.

[0064] 2. This invention innovatively designs a relation-aware graph neural network, which dynamically calculates and transmits information about different types of relationships (such as correct / incorrect answers between students and test questions, and the association between test questions and knowledge points), and incorporates the directional and heterogeneous characteristics of relationships in message transmission. Compared to the static relationship modeling of traditional methods, this invention enables the model to adaptively adjust the weights of different relationships, improving the accuracy and robustness of cognitive diagnostic results.

[0065] 3. This invention employs the concept of metric learning, using a triplet loss function to ensure a significant distance difference in the spatial distance between the embedding representations of correct and incorrect answers, thereby enhancing the model's ability to distinguish student answering behaviors. This technique enables the invention to more accurately identify student answering patterns, particularly showing a significant improvement in predicting student answer accuracy and error rates.

[0066] 4. This invention introduces side information (such as test question text, student answer patterns, etc.) during the node and edge embedding process, and transforms it into vector representations through a pre-trained BERT model. This multi-dimensional feature fusion enables the model to more comprehensively describe the relationships between cognitive entities in a low-dimensional space, thereby improving the model's adaptability and generalization ability. Especially in the cold start phase, it can effectively reduce errors during model training.

[0067] 5. This invention underwent comparative and ablation experiments using a large amount of real-world data. The results show that, compared with existing technologies, this invention demonstrates significant improvements in multiple indicators, including accuracy, recall, and F1 score. On certain experimental datasets, compared with traditional cognitive diagnostic methods, the REG-CD model of this invention improves prediction accuracy by more than 10%, and also shows a clear advantage in distinguishing between correct and incorrect answers. Attached Figure Description

[0068] Figure 1 This is a heterogeneous relationship scenario diagram in an embodiment of the present invention.

[0069] Figure 2 This is a diagram of a cognitive diagnostic model based on heterogeneous relation graph embedding in an embodiment of the present invention. Detailed Implementation

[0070] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0071] This method discloses a cognitive diagnosis approach based on heterogeneous relational graph embedding. It primarily constructs a multivariate cognitive relational graph and combines graph neural networks and metric learning techniques to model the multivariate interactive relationships between students, test questions, and knowledge points. This deeply mines the intrinsic connections between students' cognitive characteristics and test questions, thereby enabling accurate cognitive diagnosis. Specifically, firstly, a multivariate cognitive relational graph is constructed, connecting cognitive entities such as students, test questions, and knowledge points through different types of relationships to form a graph structure. Relationship types include the student-test question answering relationship and the correlation between test questions and knowledge points, providing rich semantic information for subsequent model training. Next, a graph neural network is used for node embedding. By designing a relationship-aware message passing mechanism, the node embedding representation is updated based on the features of the nodes and relationships. During this process, the graph neural network can effectively distinguish different types of relationships (such as forward, backward, and self-connected relationships) through adaptive weight parameters, thereby enhancing the model's ability to represent complex relationships between students, test questions, and knowledge points. By introducing metric learning, positive and negative sample pairs are further constructed using a triplet loss function, making the embedding distance between correct and incorrect answers more apparent in space, which helps improve the accuracy of identifying students' cognitive characteristics. Finally, a joint training strategy is adopted to jointly optimize the loss functions of the cognitive diagnosis task and the metric learning task. The model is trained using an adaptive optimization algorithm, enabling the final model to accurately predict students' mastery of various knowledge points. Experimental comparative analysis shows that the cognitive diagnosis method based on heterogeneous relational graph embedding significantly improves the accuracy of predicting students' answering behavior. The specific implementation method is as follows:

[0072] (1) Construction and initialization of cognitive relationship graph, including extracting student, test question and knowledge point entity features from student answer data and generating initial entity embedding; fusing side information embedding of entity attributes to enhance the semantic information of entity embedding; dynamically embedding the interaction relationship between entities to generate relationship embedding, and constructing adjacency matrix to complete the initialization of cognitive relationship graph;

[0073] A cognitive diagnostic model based on heterogeneous relation graph embedding is shown in the figure below. Figure 2 As shown, a three-layer module design is adopted: an input module, a relation-aware graph encoder, and a diagnostic decoder based on metric learning enhancement. In the input layer of the relation-aware graph encoder, we can see that the construction and initialization of the cognitive relationship graph is a crucial step in the cognitive diagnostic method. Its purpose is to capture the complex interactive relationships between students, test questions, and knowledge points through a structured representation of the graph.

[0074] (1-1) Entity Feature Extraction and Embedding

[0075] Heterogeneous relationship scenario diagram as follows Figure 1As shown, feature extraction is performed by extracting relevant entity features from student answer data, including students' answering patterns, question difficulty, and knowledge point distribution. Subsequently, a dense layer is used to transform these extracted features into low-dimensional dense vectors, thereby generating the initial entity embedding.

[0076] (1-1-1) Student Characteristics: During the assessment process, students' responses vary based on their current skill mastery, and the influence of this skill mastery may not be limited to a single skill but rather influenced by multiple skills. Therefore, to obtain students' hidden knowledge state regarding the assessment, it is necessary to extract relevant hidden information. In this model... It is the one-hot vector representation of the student, generated by the id index.

[0077] (1-1-2) Item Characteristics: Assessment items possess diverse potential characteristics. The same student may respond differently to different questions testing the same skill because, although the items cover the same skill, the difficulty level of the skill assessment may vary. The objective existence of item difficulty is the direct reason why a single Q-matrix is ​​insufficient to describe item characteristics; therefore, this model selects the Q-matrix and the assessment difficulty matrix as item characteristics. Currently, there are several mainstream methods for representing the skill difficulty matrix of items:

[0078] Annotated by experts and scholars. Some educational measurement models use manual methods to create a skill difficulty matrix for test questions. The corresponding experts for each assessment item will subjectively classify the difficulty of each question, which is the crystallization of expert experience.

[0079] Statistical annotation. This uses the accuracy rate of responses as the indicator. In some public assessment projects, thanks to sufficient student response data, we can use statistical characteristics such as the accuracy rate of responses to measure the difficulty of the project. Compared to expert annotation, statistical annotation is more realistic.

[0080] Fitting. With the powerful fitting ability of neural networks, we can use student answer data to fit the difficulty of the exam and incorporate the difficulty into the backward feedback iteration. This improves the indicators while making the fitted exam difficulty more closely resemble the hidden true exam difficulty.

[0081] In this model, we use neural network fitting to extract test item features. These are the one-hot vector representations of the test questions, generated by the id index.

[0082] (1-1-3) Knowledge Point Characteristics: The knowledge points tested vary depending on the test questions. The similarity within the knowledge points can be manually categorized to classify all the knowledge points tested in the test questions into different categories. By introducing the attribute of time point features, we can uncover the inherent connections between knowledge points and the deep relationships between knowledge points and students' skills during a single diagnostic process. In this model, It is a one-hot vector representation of knowledge points, generated by the id index.

[0083] (1-1-4) Feature Transformation into Low-Dimensional Vectors for Embedding: Initial attribute representations are generated by embedding students, test questions, and knowledge entities respectively. By inputting the one-hot vectors of students, test questions, and knowledge points from steps (1-1-1), (1-1-2), and (1-1-3) into the dense layer, the initial embedding representations of the corresponding entities are obtained, as shown in the formula:

[0084] (Formula 1-1)

[0085] (Formula 1-2)

[0086] (Formula 1-3)

[0087] in, , , These represent the parameter matrices of the dense layer, which are updated through backpropagation during model training. It is the learner's entity representation. It is the entity representation of the test question. It is a physical representation of knowledge points, where I represents the number of students, J represents the number of test questions, and K represents the number of knowledge points.

[0088] Indicates the initial embedding dimension; , , These are one-hot vector representations of students, test questions, and knowledge, respectively, generated by the id index.

[0089] (1-2) Side Information Fusion

[0090] After completing entity feature extraction and embedding, the next step is to fuse the entity attributes by embedding lateral information. Specifically, text encoding uses a pre-trained BERT model to transform the entity's lateral information (such as the test question text) into embedding vectors. Dimension adjustment is achieved by optimizing the dimensions of the embedding vectors through principal component analysis (PCA), thereby enhancing the semantic information of the entity embeddings.

[0091] (1-2-1) BERT encoded side information:

[0092] For any entity The lateral information, such as the question text, is represented as a single text. We use a pre-trained BERT model to encode text into embedding vectors. Let the BERT tokenizer... Converted into a token sequence, the input to the BERT model can be represented as:

[0093] (Formula 1-4)

[0094] Here, Tokenizer represents breaking down a text string into smaller embedding features. Indicates the sequence length. and These represent the start and end segments specific to BERT. The BERT model maps the input sequence to hidden state representations. Let the hidden layer dimension of BERT be 1. (BERT-base is 768), then BERT will output the text as embedded features:

[0095] (Formula 1-5)

[0096] in, This represents the entity's inherent features after the BERT model encodes lateral information, and m represents the dimension of the embedded features.

[0097] (1-2-2) PCA adjusts dimensions to enhance semantics:

[0098] To ensure that the BERT-encoded lateral information in step (1-2-1) maintains dimensionality consistency with the random entity embeddings, principal component analysis (PCA) is used for linear scaling of the dimensions.

[0099] (Formula 1-6)

[0100] Represents the projection matrix of PCA, entity The final embedding is represented as:

[0101] (Formula 1-7)

[0102] in, For the current embedding, For the final embedding, considering that most datasets do not provide effective side information, a more general approach is adopted here, which is to look at students' response patterns on test items. The knowledge-related patterns of test questions The data is converted into a text representation for embedding, where J represents the number of test items and K represents the number of knowledge points. This indicates whether the student's answers to the test questions are correct or incorrect. This indicates whether the current test question involves any specific knowledge points.

[0103] (1-3) Interaction relationship embedding and adjacency matrix construction

[0104] Relation embedding dynamically embeds eight types of interaction relationships, generating relationship embedding vectors. Adjacency matrix generation constructs an adjacency matrix based on the interaction relationships between entities, completing the initialization of the cognitive relationship graph.

[0105] (1-3-1) Relation embedding generation:

[0106] After step (1-2-2) of PCA adjusts the dimensions to enhance semantics, the interaction relationships are then embedded with attributes to represent the heterogeneous and directional features of the relationships. Eight interaction relationships are dynamically embedded: student-question correct / incorrect answer, question-student correct / incorrect feedback, question-knowledge association / guidance, and knowledge similarity / dependency.

[0107] (Formula 1-8)

[0108] in, It is a relation type The initial embedding representation, This represents the relation type. eigenvectors, Indicates the relation type, It is the parameter matrix of the dense layer, which is updated through backpropagation during model training.

[0109] (1-3-2) Construct the adjacency matrix:

[0110] The adjacency matrix of the cognitive relationship graph is represented as follows If entity and entity If there is an interaction, then there is Then there is In layman's terms, if the vertex... and vertex There exists an edge (i.e., , If a vertex belongs to the set E of edges, then in the adjacency matrix A, from vertex A... To the top elements Set as an edge .

[0111] The cognitive diagnostic model based on heterogeneous relation graph embedding takes an adjacency matrix and entity relation embedding as input, represented as:

[0112] (Formula 1-9)

[0113] in, It is the learner's entity representation. It is the entity representation of the test question. It is the entity representation of knowledge points.

[0114] (2) Message propagation and aggregation: Using a multi-dimensional cognitive relationship graph as input, message propagation and aggregation are achieved through a graph neural network, and entity and relationship embeddings are updated based on the aggregated messages:

[0115] The joint representation combines the embeddings of the source node and relation edges (i.e., relation types) to generate the message for the target node: Cognitive Relationship Graph Given a set of entity interaction triples , Indicates the source node, Indicates relation edges, Let represent the target node. The message propagation and aggregation operations that combine the source node and relation edges to generate the target node can be represented as follows:

[0116] (Formula 2-1)

[0117] in, The target node In the The layer's embedding representation, i.e., the updated feature vector.

[0118] These are the target nodes. Source node and relationship edge In the Layer embedding representation. Represents the target node The set of neighboring nodes, including those with Directly connected nodes and edges. It is a trainable weight matrix that depends on the relation type. . It is a function that maps relation types to indices in the weight matrix. It is a function that combines the features of the source node, the target node, and the relation edges to generate a message. It is a non-linear activation function used to introduce non-linearity, enabling the model to learn more complex feature representations. To further distinguish the directionality of interactive information transmission, it is set... To represent the weight matrix in different directions:

[0119] (Formula 2-2)

[0120] , and These represent the weight matrices for positive relationships, negative relationships, and self-connections, respectively. and It is the reciprocal of the degree matrix used for weight normalization. Represents the set of all positive relations. Represents the set of all reverse relations. This represents the set of all sub-ring relationships.

[0121] (2-1) Message aggregation

[0122] A cognitive diagnostic model based on heterogeneous relation graph embedding is shown in the figure below. Figure 2 As shown, in the message aggregation and nonparametric aggregation sections of the relation-aware graph encoder, attention aggregation employs a relation-aware attention mechanism to aggregate messages, considering weight matrices in different directions to distinguish the directionality of interactive information. Embedding update updates the relation embeddings based on the aggregated messages, learning dynamic representations of entities and relations.

[0123] (2-1-1) Relationship-aware attention convergence:

[0124] Employing a relation-aware attention mechanism to embed the three elements (target node) Source node and relationship edge In the The layer's embedded representation is used to perform relevance calculations and message aggregation. The specific process is as follows:

[0125] (Formula 2-3)

[0126] (Formula 2-4)

[0127] (Formula 2-5)

[0128] in, and Let represent the linear transformation matrices for node embedding and relation embedding, respectively. The target node In the Layers via relation edges Features of aggregated neighbor nodes. Indicates the source node In the Layers via relation edges eigenvectors, Indicates the relationship with the target node via relation edges The set of connected neighboring nodes. Indicates the relationship with the target node via relation edges The set of connected neighbor nodes, Represents the target node and source node Through relationships Attention score Represents the target node and source node Between them via relation edges Normalized attention weights. Representing relation edges In the Layer feature representation. It is a trainable parameter vector used to compute attention weights.

[0129] (2-2) Message Update

[0130] (2-2-1) Update the embedding and learn the dynamic representation:

[0131] For relation edges The embedding update process is as follows:

[0132] (Formula 2-6)

[0133] It is a trainable matrix used for linear transformations, a function Used for nonlinear activation.

[0134] (3) Distinguishing between answering relationships: The updated entity and relationship embeddings are used as input. Based on metric learning, the feature differences between correct and incorrect answers are enhanced. The student and question representations are projected onto different hyperplanes to fit the differences under different answering patterns. The distance between positive and negative sample triples is optimized through metric learning.

[0135] The concepts of "responding" and "discriminating" are defined using Cognitive Relationship Graph (CRG) and Graph Neural Networks (GNNs) to differentiate the interactions between correct and incorrect student responses. In the model design, "responding" refers to the student's reaction to a test question (e.g., correct or incorrect), while "discriminating" enhances the ability to differentiate between correct and incorrect responses within the graph neural network through metric learning and relational awareness.

[0136] (3-1) Feature projection and difference enhancement

[0137] A cognitive diagnostic model based on heterogeneous relation graph embedding is shown in the figure below. Figure 2As shown, in the structure of the diagnostic decoder based on metric learning enhancement, we can see how the idea of ​​metric learning is used to enhance the feature differences between correct and incorrect responses, enabling the model to better identify the two response patterns. Given a set of response interaction triples... ,in, Representing students, This indicates the test question. This represents the relationship between the student and the test question, i.e., whether the answer is correct or incorrect; after the initial entity embedding in step (1-1-4) is encoded in step (2), its feature vector is output in the upper-layer network, including: the representation of the student entity. and the representation of test item entities And the relationship between the two in terms of responses. In vector space, the representational relationship among the three can be naively obtained, namely:

[0138] (Formula 3-1)

[0139] (3-1-1) Hyperplane projection enhances the differences in answer characteristics

[0140] In order to enable students to represent and test item representation Different response patterns have different representations, representing entities. and Projecting onto different hyperplanes, each relation's hyperplane can be viewed as its "dedicated space," and the entity's projection into this space represents its semantics under that relation. For correct-response relations, the projection operation is as follows:

[0141] (Formula 3-2)

[0142] (Formula 3-3)

[0143] in, Represents the trainable relational normal vector ( ), used to define a specific relation (correct answer) hyperplane, and This represents the student and question representation projected onto the correct answer relation hyperplane.

[0144] (3-2) Metric Learning Optimization

[0145] The distance between positive and negative triplet pairs is optimized by metric learning, so that the distance between positive triplet pairs is as close as possible, and the distance between negative triplet pairs and positive triplet pairs is as far as possible.

[0146] (3-2-1) Distance Optimization

[0147] The similarity between the student entity and the test question entity projected in step (3-1-1) under the correct answer relation is measured by the following formula:

[0148] (Formula 3-4)

[0149] in, It is a distance function. The feature vector representing the relationship between correct answers. This represents the L2 paradigm.

[0150] Similarly, the similarity between the student entity and the question entity under the incorrect answer relationship is calculated as follows:

[0151] (Formula 3-5)

[0152] (Formula 3-6)

[0153] (Formula 3-7)

[0154] in, Represents student entity and test question entities Similarity measurement under the relationship of incorrect answers This represents the projected feature vector of the student entity under the incorrect answer relation. The feature vector representing the relationship between incorrect answers. This represents the projected feature vector of the question entity under the incorrect answer relation. Let represent the trainable weight matrix used for projecting incorrect response relationships. For a given student-question interaction triplet... Construct triples Conversely, this ensures that two triples are paired positive and negative examples of each other. The positive or negative sign of a triple is determined by a given relation label. To determine, if This indicates a triplet For positive samples, triples Negative samples; Conversely, the training objective of metric learning is to make the distance between positive triples as close as possible, and the distance between negative triples and positive triples as far as possible, as shown in the formula:

[0155] (Formula 3-8)

[0156] in, It is a hyperparameter that represents the margin by which the distance between the anchor point and the negative sample must be at least greater than the distance between the anchor point and the positive sample. This is used to prevent the model from simply learning the rule that "positive samples are slightly farther than negative samples".

[0157] (4) Cognitive diagnosis prediction

[0158] Cognitive diagnostic prediction is the process of analyzing students' responses to test questions to assess their mastery of specific knowledge points and predict their future learning or response behaviors. Specifically, cognitive diagnostic prediction uses graph neural networks (GNNs) and metric learning methods to model the relationships between students, test questions, and knowledge points, thereby inferring students' cognitive states.

[0159] (4-1) Capturing nonlinear interaction relationships

[0160] (4-1-1) Input enhancement features to capture the non-linear relationship between students and test questions

[0161] Feature input is the student representation in step (3-1) Test characteristics The relationship between students and test questions is represented as input, and the non-linear interaction between students and test questions is captured through an attention-enhanced neural network structure.

[0162] (4-2) Neural Network Prediction

[0163] (4-2-1) Probability prediction outputs the probability that the student answers correctly.

[0164] A cognitive diagnostic model based on heterogeneous relation graph embedding is shown in the figure below. Figure 2 As shown, in the structure of the diagnostic decoder based on metric learning enhancement, an item response function is designed to incorporate student features. Test characteristics Characteristics of Correct Answers Characteristics of incorrect answers This enables the predictive modeling of the probability of student answer patterns, as shown in the following formula:

[0165] (Formula 4-1)

[0166] (Formula 4-2)

[0167] (Formula 4-3)

[0168] in, It is a multilayer perceptron, consisting of two fully connected layers and an activation function, Sigmoid.

[0169] This represents the probability that student s will answer question q correctly. This represents the probability that student s will answer question q incorrectly. This represents a prediction of student s's answer to question q.

[0170] The loss between the predicted probability and the actual label of a student's answer is calculated using a binary cross-entropy loss function. The specific calculation formula is as follows:

[0171] (Formula 4-4)

[0172] in, Labels indicating student's answer results.

[0173] (5) Training of neural network structure

[0174] (5-1) Collect the dataset and train the network structure

[0175] The Junyi dataset consists of 718 objective questions. PISA 2015 consists of 17 objective questions. Assistment 2017 consists of 102 objective questions. Each dataset was represented by an educational expert using a rating matrix and a given Q-matrix for the assessed skills. All questions were predicted in a predictive model, and Table 1 shows information for these datasets.

[0176] Junyi: The Junyi dataset comes from "Junyi Academy". The original Junyi dataset contained more than 20 million response records, distributed across different learning stages. In order to conform to the static assumption of cognitive diagnosis, we analyzed the relationship between students' response data and the exercises and concepts contained therein.

[0177] PISA 2015 Dataset: PISA is a globally recognized authoritative online assessment system with high-quality test items that record students' answers and response times. The PISA 2015 dataset includes computer-based PISA mathematical data. This study selected and used 17 computer-scored dichotomous items. The database used for analysis contains dichotomous response data and continuous response time data from a randomly selected sample of 6,000 students.

[0178] Assistment2017: Assistment2017 originated from the “2017 ASSISTments Data Mining Competition” and provides learners’ answer records from 2014 to 2017, as well as the relationships between the exercises and concepts included.

[0179] Table 1. Statistical information of the dataset

[0180]

[0181] (5-2) Joint training to optimize model parameters

[0182] In the structure of the feedback neural network, this model uses the Cross Entropy Loss Function as the loss function to measure the loss between the predicted and true values, and proves the effectiveness of the model by pursuing a lower loss value. The Cross Entropy Loss Function formula can be described as:

[0183] (Formula 5.1)

[0184] (Formula 5.2)

[0185] (Formula 5.3)

[0186] However, for this model, a joint training mode is adopted. The overall loss is composed of the loss from the learning task in step (3-2-1) and the loss from the diagnostic prediction task in step (4-2-1), as shown in the formula:

[0187] (Formula 5.4)

[0188] in These are manually set hyperparameters that represent the weighting percentage of the loss in the diagnostic and prediction task.

[0189] (5-3) Selecting an optimization algorithm

[0190] The model uses the Adam optimization algorithm to train the trainable parameters in the network. Adam (Adaptive Moment Estimation) is an iterative optimization algorithm based on gradient descent, commonly used to train neural networks and other machine learning models. Adam can adaptively adjust the learning rate of each parameter according to the training data.

[0191] On the other hand, embodiments of the present invention also provide a cognitive diagnostic system based on heterogeneous relation graph embedding, including:

[0192] The processor and memory are used to store program instructions, and the processor is used to call the stored instructions in the memory to execute the cognitive diagnostic method based on heterogeneous relational graph embedding as described in the above technical solution.

[0193] It should be noted that the above description of the examples of the present invention is for the purpose of explaining the technical features of the present invention in detail. Various improvements and modifications made without departing from the present invention are also protected by the present invention; therefore, the scope of protection of the present invention should be determined by the content defined in the claims of this application.

Claims

1. A cognitive diagnostic method based on heterogeneous relation graph embedding, characterized in that, Includes the following steps: Step 1: Construct a multi-dimensional cognitive relationship graph. First, extract the entity features of students, test questions, and knowledge points and generate initial embeddings. Connect the three through different types of relationships to form a graph structure. Dynamically embed the interaction relationships between entities to generate initial relationship embeddings. Construct an adjacency matrix based on the interaction relationships between entities to complete the initialization of the multi-dimensional cognitive relationship graph. Step 2: Using a multi-dimensional cognitive relationship graph as input, message propagation and aggregation are achieved through a relationship-aware graph neural network, and entity and relationship embeddings are updated based on the aggregated messages; The message propagation and aggregation through a relationship-aware graph neural network includes: using a relationship-aware attention mechanism to aggregate messages, and considering weight matrices in different directions to distinguish the directionality of interactive information; Step 3: The updated student, question, and corresponding relationship embeddings are used as input, and the student and question embeddings are projected onto different hyperplanes to obtain the projected student and question representations; the distance between positive and negative sample triples is optimized based on metric learning to enhance the feature difference between the two interaction relationships of correct and incorrect answers, thereby obtaining enhanced features; the hyperplane includes the correct answer relationship hyperplane and the incorrect answer relationship hyperplane; Step 4: Input enhanced features, capture the non-linear interaction between students and test questions through an attention-enhanced neural network structure, and then output the probability of students answering correctly through probability prediction; Step 5: Based on the cognitive diagnostic model constructed in steps 1-4, jointly train and optimize the model parameters, iteratively train the model until convergence, and finally predict the student's response.

2. The cognitive diagnostic method based on heterogeneous relation graph embedding as described in claim 1, characterized in that: Step 1 specifically includes: extracting entity features of students, test questions, and knowledge points from student answer data, and generating initial embedded representations of entities; and fusing lateral information embedding of entities to enhance the semantic information of entity embedding.

3. The cognitive diagnostic method based on heterogeneous relation graph embedding as described in claim 1, characterized in that: The system dynamically embeds eight types of interaction relationships: student-correct / incorrect answers to questions, questions-student correct / incorrect feedback, questions-knowledge association / guidance, and knowledge similarity / dependence. in, It is a relation type The initial embedding representation, This represents the relation type. eigenvectors, Indicates the relation type, It is the parameter matrix of the dense layer.

4. The cognitive diagnostic method based on heterogeneous relation graph embedding as described in claim 1, characterized in that: Step 2, message propagation and aggregation, specifically includes: In the multi-cognitive relationship diagram Given a set of entity interaction triples , Indicates the source node, Indicates relation edges, Indicates the target node; the target node message is generated by combining the source node and relation edges: in, The target node In the The embedding representation of the layer, i.e., the updated feature vector; These are the target nodes. Source node and relationship edge In the Layer embedding representation, Represents the target node The set of neighboring nodes, including those with Directly connected nodes and edges; It is a trainable weight matrix that depends on the relation type. ; It is a function that maps relation types to indices in the weight matrix; It is a function used to generate a message by combining the features of the source node, the target node, and the relation edges; It is a non-linear activation function.

5. The cognitive diagnostic method based on heterogeneous relation graph embedding as described in claim 4, characterized in that: set up The weight matrix for different directions is represented by the following calculation method: in, , and These represent the weight matrices for positive relationships, negative relationships, and self-connections, respectively. and It is the reciprocal of the degree matrix used for weight normalization; Represents the set of all positive relations. Represents the set of all reverse relations. This represents the set of all sub-ring relationships.

6. The cognitive diagnostic method based on heterogeneous relation graph embedding as described in claim 5, characterized in that: Updating entity and relation embeddings specifically includes: Employing a relation-aware attention mechanism for the target node Source node and relationship edge The specific process of performing relevance calculations on the embedded representation, realizing message aggregation, and updating entity embeddings is as follows: in, and These represent the linear transformation matrices for node embedding and relation embedding, respectively; The target node In the Layers via relation edges Features of aggregated neighbor nodes Indicates the source node In the Layers via relation edges eigenvectors; Indicates the relationship with the target node via relation edges Interactive neighbors Indicates the relationship with the target node via relation edges The set of connected neighbor nodes, Represents the target node and source node Through relationships Attention score Represents the target node and source node Between them via relation edges Normalized attention weights; Representing relation edges In the Layer feature representation, It is a trainable parameter vector; For relation edges The embedding update process is as follows: It is a trainable matrix used for linear transformations, a function Used for nonlinear activation.

7. The cognitive diagnostic method based on heterogeneous relation graph embedding as described in claim 1, characterized in that: In step 3, a set of interactive triplets is given. ,in, Representing students, This indicates the test question. This represents the relationship between the student and the test questions, i.e., whether the student answered correctly or incorrectly; it sets up the representation of the student entity. and the representation of test item entities And the relationship between the two in terms of responses. The representational relationship between the three can be obtained in the vector space, namely: Will and Projecting onto different hyperplanes, each relation's hyperplane is considered its own space. The projection of an entity onto this space represents its semantics under that relation. For a correct-response relation, the projection operation is as follows: in, This represents a trainable relational normal vector, used to define the hyperplane of the relation for correct responses. and This represents the student and question representation projected onto the correct answer relation hyperplane.

8. The cognitive diagnostic method based on heterogeneous relation graph embedding as described in claim 7, characterized in that: Optimizing the distance between positive and negative sample triples through metric learning specifically includes: The formula for measuring the similarity between the projected student entity and the test question entity under the correct answer relation is as follows: in, It is a distance function. The feature vector representing the relationship between correct answers. This represents the L2 normal form; similarly, the similarity between the student entity and the question entity under the incorrect answer relation is calculated as follows: in, Represents student entity and test question entities Similarity measurement under the relationship of incorrect answers This represents the projected feature vector of the student entity under the incorrect answer relation. The feature vector representing the relationship between incorrect answers. This represents the projected feature vector of the question entity under the incorrect answer relation. This represents the trainable weight matrix used for projecting incorrect response relationships; for a given student-question interaction triple... Construct triples This makes two triples pairwise positive and negative examples, and the sign of the triple is determined by a given relation label. To determine, if This indicates a triplet For positive samples, triples Negative samples; Conversely, the training objectives for metric learning are as follows: in, It is a hyperparameter.

9. The cognitive diagnostic method based on heterogeneous relation graph embedding as described in claim 8, characterized in that: In step 4, the formula for prediction modeling is as follows: in, It is a multilayer perceptron, consisting of two fully connected layers and an activation function sigmoid; This represents the probability that student s will answer question q correctly. This represents the probability that student s will answer question q incorrectly. This represents a prediction of student s's answer to question q. The loss between the predicted probability and the actual label of a student's answer is calculated using a binary cross-entropy loss function. The specific calculation formula is as follows: in, Labels indicating student's answer results.

10. A cognitive diagnostic system based on heterogeneous relation graph embedding, characterized in that, include: The processor and memory, wherein the memory is used to store program instructions, and the processor is used to invoke the stored instructions in the memory to execute the cognitive diagnostic method based on heterogeneous relational graph embedding as described in any one of claims 1-9.