A cognitive diagnosis method based on self-supervised graph learning and application thereof
A cognitive diagnostic method based on self-supervised graph learning and sparse view optimization was developed to address the diagnostic problem of long-tail students and improve the overall effectiveness of the diagnostic network.
Patent Information
- Application Number
- CN202211246960.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-12
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-10-12
AI Technical Summary
Existing neural network-based cognitive diagnostic techniques neglect the interaction records of long-tail students during the training process, resulting in poor diagnostic performance.
We employ a self-supervised graph learning approach, constructing a cognitive diagnostic relationship graph and a sparse view to optimize the graph network. We then utilize contrastive learning techniques from self-supervised learning to optimize the diagnostic network, focusing on the diagnostic performance of long-tail students without affecting the diagnostic performance of other students.
This improved the diagnostic effectiveness for long-tail students, ensured that the diagnostic effectiveness for other students was not affected, and improved the overall diagnostic level.
Smart Images

Figure CN115618939B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of intelligent education, and particularly relates to a cognitive diagnosis method based on self-supervised graph learning and application thereof. BACKGROUND
[0002] Cognitive diagnosis is an important basic task in the field of intelligent education, and further work in the intelligent education system, such as knowledge tracking and exercise recommendation, is carried out based on the results of cognitive diagnosis. Cognitive diagnosis aims to find the ability level of different students on a specific knowledge concept. Existing technologies such as NCD based on neural networks and RCD based on graph neural networks have good performance in overall prediction of student ability level, but all ignore the long-tail problem existing in the cognitive diagnosis system, that is, most students only have interaction records with a small part of exercises in the system. Due to the sparsity of interaction data, the existing technologies are prone to ignore these students in the training process of the network, and thus the diagnosis effect is poor. SUMMARY
[0003] The application is proposed to solve the above-mentioned problems of the prior art, and provides a cognitive diagnosis method based on self-supervised graph learning and application thereof, so as to pay attention to the long-tail students in the training process of the diagnosis network, thereby improving the diagnosis effect of the diagnosis network on the students with a high proportion of population and only a few interaction records, while not affecting the diagnosis effect of the network on other students, and further improving the overall diagnosis effect and diagnosis level.
[0004] In order to achieve the above-mentioned application purposes, the application adopts the following technical solutions.
[0005] The cognitive diagnosis method based on self-supervised graph learning has the following steps.
[0006] Step 1, constructing a cognitive diagnosis relation graph:
[0007] Step 1.1, setting the number of students as M, the number of exercises as N, and the number of knowledge concepts as K;
[0008] Step 1.2, creating student nodes Exercise nodes Knowledge concept nodes Wherein, s i represents the i-th student node, e j represents the j-th exercise node, and c k represents the k-th knowledge concept node, i=1, 2, …, M, j=1, 2, …, N, and k=1, 2, …, K;
[0009] Step 1.3, constructing a relation graph Wherein, For the student-problem relationship subgraph, For the sub-graph of the relationship between exercises and knowledge concepts:
[0010] Step 1.3.1: Construct a subgraph showing the relationship between students and exercises. Among them, the student-problem node set Let represent the set of student-problem relationship edges, if the i-th student node s i For the nth exercise node e n If an answer is given, then the i-th student node s i and the j-th exercise node e j There exists an edge between them, denoted as
[0011] Step 1.3.2: Construct a subgraph of the relationship between exercises and knowledge concepts. Among them, the set of exercises and knowledge concept nodes R ec Let the set of edges representing the relationship between exercises and knowledge concepts be defined. If the j-th exercise node e j Involves the k-th knowledge concept node c k Then the j-th exercise node e j and the kth knowledge concept node c k There exists an edge between them, denoted as
[0012] Step 2: Construct a diagnostic network, including an embedding layer and a GCN network consisting of L layers and GCN layers. G The GCN network consists of a diagnostic layer and a prediction layer. G The parameter set is θ G ;
[0013] Step 2.1: Calculate the initial embedding vector for each student, exercise, and knowledge concept using the embedding layer:
[0014] Step 2.1.1: Map each student node to a one-hot encoded vector, and let the i-th student node s i One-hot encoded vector x i The i-th bit is 1, and the other bits are 0;
[0015] Map each exercise node to a one-hot encoded vector, and let the j-th exercise node e j One-hot encoded vector y j The j-th bit is 1, and the other bits are 0;
[0016] Map each knowledge concept node to a one-hot encoded vector, and let the k-th knowledge concept node c k One-hot encoded vector z kThe k-th bit is 1, and the other bits are 0;
[0017] Step 2.1.2: Define the student embedding matrix. Exercise Embedding Matrix and knowledge concept embedding matrix The Xavier initialization method is used to initialize the initial student embedding matrix S. 0 The initial problem embedding matrix E 0 The initial knowledge concept embedding matrix C 0 Where d is the embedding vector dimension, and d = K;
[0018] Step 2.1.3: Use equation (1) to calculate the initial embedding vector for each student node, exercise node, and knowledge concept node:
[0019]
[0020] In equation (1), S represents the initial student embedding matrix. 0 The i-th student node s i The initial embedding vector, Represents the initial problem embedding matrix E 0 The j-th exercise node e j The initial embedding vector, C represents the initial knowledge concept embedding matrix. 0 The k-th knowledge concept node c k The initial embedding vector, where T represents the transpose;
[0021] Step 2.2: Using the initial vector S output by the embedding layer... 0 E 0 C 0 Relationship diagram As input to the GCN network, and after message passing processing through the L-layer GCN network, the student feature set S, which is the fused interactive information output by the L-th layer, is obtained. L Exercise feature set E L and the set of features of knowledge concepts C L ;
[0022] Step 2.3: Use the diagnostic layer to calculate students' mastery of knowledge concepts and the difficulty of exercises:
[0023] Step 2.3.1: Use equation (2) to calculate the i-th student node s. i Vector of mastery of each knowledge concept
[0024]
[0025] In equation (2), S represents the set of student features. L The i-th student node s i The feature vector after fusing interactive information, F s The parameter is θ s The fully connected layer, where σ represents the sigmoid non-linear activation function;
[0026] Step 2.3.2: Use formula (3) to calculate the j-th exercise e. j Difficulty vector for each knowledge concept
[0027]
[0028] In equation (3), Describe the feature set E of the exercises L The j-th exercise node e j The feature vector after fusing interactive information, F e The parameter is θ e A fully connected layer;
[0029] Step 2.4: Use the prediction layer to predict the probability of students answering questions correctly:
[0030] Step 2.4.1: Use equation (4) to predict the i-th student node s. i Answer the j-th exercise node e j The correct probability y ij :
[0031]
[0032] In equation (4), Represents the j-th exercise node e j The knowledge concepts involved are numbered, |·| represents the counting symbol, F predict The parameter is θ p A fully connected layer;
[0033] Step 2.5: Construct the cross-entropy loss function of the diagnostic network using equation (5).
[0034]
[0035] In equation (5), (i, j) represents student-exercise sample pairs obtained from the training set, and r ij Represents the i-th student node s i Answer the j-th exercise node e j The true score;
[0036] Step 3: Use graph comparison learning to optimize the parameter θ. G GCN network f G :
[0037] Step 3.1: Use the edge deletion method based on edge importance to create a student-problem relationship subgraph. Generate two sparse views and And each is connected to a subgraph relating to exercises and knowledge concepts. First sparse view of the composition graph Second sparse view
[0038] Step 3.2: Using the initial vector S output by the embedding layer... 0 E 0 C 0 The first sparse view of the relationship graph As a GCN network G The input is used to obtain the first sparse view. The student feature set S′ and the exercise feature set E′ are given.
[0039] The initial vector S output by the embedding layer 0 E 0 C 0 The second sparse view of the relationship graph As a GCN network G The input is used to obtain the second sparse view. The set of student features S″ and the set of exercise features E″ are given on the ABC model.
[0040] Step 3.3: Calculate the student characteristic self-supervised loss using equation (6).
[0041]
[0042] In equation (6), s′ i and s″ i Let s represent the i-th student node s in student feature set S′ and student feature set S″, respectively. i The features are: sim(·) represents the cosine similarity, and τ represents the hyperparameter of the temperature coefficient;
[0043] Step 3.4: Calculate the self-supervised loss of the exercise features using formula (7).
[0044]
[0045] In equation (7), e′ i and e″ iLet e represent the j-th exercise node in the exercise feature set E′ and the exercise feature set E″, respectively. i Features;
[0046] Step 3.5: Construct the GCN network using equation (8) G Self-supervised loss function
[0047]
[0048] Step 4: Diagnostic network training:
[0049] Step 4.1: Initialize all network parameters using the Xavier initialization method;
[0050] Step 4.2: Calculate the total loss of the diagnostic network using equation (9).
[0051]
[0052] In equation (9), Θ represents all trainable network parameters, and λ1 and λ2 are hyperparameters;
[0053] Step 4.3: Train the diagnostic network using the Adam optimizer and minimize... until The process continues until convergence, thus obtaining the optimal diagnostic network for diagnosing students' mastery of knowledge concepts.
[0054] The cognitive diagnostic method based on self-supervised graph learning described in this invention is also characterized in that step 3.1 is performed according to the following process:
[0055] Step 3.1.1: Create the student-problem relationship subgraph. Split into two directed graphs and in, All edges are directed edges that start from student nodes and end at exercise nodes. All edges are The opposite direction of the middle edge;
[0056] Step 3.1.2, for For all directed edges, the importance of each edge is calculated using equation (10) based on the degree of the student node:
[0057]
[0058] In equation (10), t(s) i ) indicates the endpoint is s i The importance of edges, d(s i) represents node s i The degree, θ is a positive constant, and k is a hyperparameter;
[0059] Step 3.1.3: Calculate the retention probability of each edge during the generation of the sparse view using equation (11):
[0060]
[0061] In equation (11), p(s) i ) indicates the endpoint is s i The probability of retaining an edge, p min This represents the minimum probability of retention.
[0062] Step 3.1.4, for For all directed edges, calculate the retention probability of each edge using equations (12) and (13):
[0063]
[0064]
[0065] In equations (12)-(13), t(e i ) indicates the endpoint is e i The importance of edges, d(e i ) represents node e i The degree, p(e) i ) indicates the endpoint is e i The probability of retaining an edge;
[0066] Step 3.1.5: Based on the retention probability of each edge, construct a student-problem relationship subgraph. Randomly generate the first sparse view Second sparse view And each is connected to a subgraph relating to exercises and knowledge concepts. First sparse view of the composition graph Second sparse view
[0067] The present invention provides an electronic device, including a memory and a processor, characterized in that the memory is used to store a program supporting the processor in executing the cognitive diagnostic method, and the processor is configured to execute the program stored in the memory.
[0068] The present invention provides a computer-readable storage medium storing a computer program, characterized in that the computer program, when run by a processor, executes the steps of the cognitive diagnostic method.
[0069] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0070] 1. This invention solves the long-tail problem in cognitive diagnosis by constructing self-supervised learning on a sparse view of a cognitive diagnostic relationship graph to optimize the graph network, thereby improving the diagnostic effectiveness of the diagnostic network in assessing students' cognitive states.
[0071] 2. This invention constructs a sparse view based on the interaction graph between students and exercises. In the original student-exercise interaction graph, a small number of nodes have the majority of edges, while in the sparse view, all nodes have similar weights. The network trained on the sparse view can pay more attention to long-tail nodes, thereby improving the diagnostic network's diagnostic effect on the students corresponding to these nodes.
[0072] 3. This invention uses contrastive learning techniques in self-supervised learning to treat the training process on sparse views as an auxiliary task to optimize the graph network in the diagnostic network. While improving the network's diagnostic effect on long-tail students, it does not affect the network's diagnostic effect on other students due to the loss of information caused by sparse sampling of the relationship graph. Attached Figure Description
[0073] Figure 1 This is a schematic diagram of the cognitive diagnosis relationship diagram constructed in this invention;
[0074] Figure 2 This is a schematic diagram of the diagnostic network in this invention;
[0075] Figure 3 This is a schematic diagram of comparative learning in this invention;
[0076] Figure 4 This is a schematic diagram of the sparse view generation steps in this invention. Detailed Implementation
[0077] In this embodiment, a cognitive diagnosis method based on self-supervised graph learning includes the following steps:
[0078] Step 1: Construct a cognitive diagnostic relationship diagram:
[0079] The constructed relationship diagram is as follows Figure 1 As shown. The purpose of constructing the relationship graph is to apply the GCN network to mine the interactive information between students and exercises, and between exercises and knowledge concepts.
[0080] Step 1.1: Set the number of students to M, the number of exercises to N, and the number of knowledge concepts to K;
[0081] Step 1.2: Create student nodes Exercise Nodes Knowledge concept nodes Among them, s i Let e represent the i-th student node. jLet c represent the j-th exercise node. k Let i represent the k-th knowledge concept node, i = 1, 2, ..., M, j = 1, 2, ..., N, k = 1, 2, ..., K;
[0082] Step 1.3: Construct a relationship diagram in, For the student-problem relationship subgraph, For the sub-graph of the relationship between exercises and knowledge concepts:
[0083] Step 1.3.1: Construct a student-problem relationship subgraph Among them, the student-problem node set Let represent the set of student-problem relationship edges, if the i-th student node s i For the nth exercise node e n If a student answers, then the i-th student node s i and the j-th exercise node e j There exists an edge between them, denoted as
[0084] Step 1.3.2: Construct a subgraph of the relationship between exercises and knowledge concepts. Among them, the set of exercises and knowledge concept nodes R ec Let the set of edges representing the relationship between exercises and knowledge concepts be defined. If the j-th exercise node e j Involves the k-th knowledge concept node c k Then the j-th exercise node e j and the kth knowledge concept node c k There exists an edge between them, denoted as
[0085] Step 2: Construct a diagnostic network, including an embedding layer and a GCN network consisting of L layers and GCN layers. G The GCN network consists of a diagnostic layer and a prediction layer. G The parameter set is θ G ;
[0086] The constructed diagnostic network, such as Figure 2 As shown, the embedding layer is used to generate the initial embedding vector for each student, exercise, and knowledge concept, which is the input vector of each node in the relation graph in the GCN network.
[0087] Step 2.1: Calculate the initial embedding vector for each student, exercise, and knowledge concept using the embedding layer:
[0088] Step 2.1.1: Map each student node to a one-hot encoded vector, and let the i-th student node s iOne-hot encoded vector x i The i-th bit is 1, and the other bits are 0;
[0089] Map each exercise node to a one-hot encoded vector, and let the j-th exercise node e j One-hot encoded vector y j The j-th bit is 1, and the other bits are 0;
[0090] Map each knowledge concept node to a one-hot encoded vector, and let the k-th knowledge concept node c k One-hot encoded vector z k The k-th bit is 1, and the other bits are 0;
[0091] Step 2.1.2: Define the student embedding matrix. Exercise Embedding Matrix and knowledge concept embedding matrix The Xavier initialization method is used to initialize the initial student embedding matrix S. 0 The initial problem embedding matrix E 0 The initial knowledge concept embedding matrix C 0 Where d is the embedding vector dimension, and d = K;
[0092] In cognitive diagnostic systems, the dimension of the embedding vector is usually the same as the number of knowledge points. That is, each dimension of the student's embedding vector represents the student's mastery of the knowledge point corresponding to that dimension, and each dimension of the exercise's embedding vector represents the difficulty of the exercise corresponding to the knowledge point in that dimension.
[0093] The initial student embedding matrix is a learnable matrix, with each row representing an initial embedding vector for a student. This vector can be extracted using one-hot encoding. The initial exercise embedding matrix and knowledge concept embedding matrix are processed similarly. These initial embedding matrices serve as learnable parameters for the neural network and are updated using the backpropagation algorithm.
[0094] Step 2.1.3: Use equation (1) to calculate the initial embedding vector for each student node, exercise node, and knowledge concept node:
[0095]
[0096] In equation (1), S represents the initial student embedding matrix. 0 The i-th student node s i The initial embedding vector, Represents the initial problem embedding matrix E 0 The j-th exercise node e j The initial embedding vector, C represents the initial knowledge concept embedding matrix. 0 The k-th knowledge concept node c k The initial embedding vector, where T represents the transpose;
[0097] Equation (1) is a method for extracting an initial embedding vector for a student, exercise, or knowledge concept using a one-hot encoded vector.
[0098] Step 2.2: Using the initial vector S output by the embedding layer... 0 E 0 C 0 Relationship diagram As input to the GCN network, and after message passing processing through the L-layer GCN network, the student feature set S, which is the fused interactive information output by the L-th layer, is obtained. L Exercise feature set E L and the set of features of knowledge concepts C L ;
[0099] Here, a standard GCN network is used to update the features. In each layer of GCN, student nodes aggregate the features of adjacent exercise nodes, exercise nodes aggregate the features of adjacent student and knowledge concept nodes, and knowledge concept nodes aggregate the features of adjacent exercise nodes.
[0100] Step 2.3: Use the diagnostic layer to calculate students' mastery of knowledge concepts and the difficulty of exercises:
[0101] like Figure 2 As shown, the diagnostic layer takes the output features of the GCN network as input and calculates the knowledge mastery vector for each student node and the difficulty vector for each exercise node. The student's knowledge mastery vector obtained here is the target of the cognitive diagnostic system.
[0102] Step 2.3.1: Use equation (2) to calculate the i-th student node s. i Vector of mastery of each knowledge concept
[0103]
[0104] In equation (2), S represents the set of student features. L The i-th student node s i The feature vector after fusing interactive information, F s The parameter is θ s The fully connected layer, where σ represents the sigmoid non-linear activation function;
[0105] Step 2.3.2: Use formula (3) to calculate the j-th exercise e. j Difficulty vector for each knowledge concept
[0106]
[0107] In equation (3), Describe the feature set E of the exercises L The j-th exercise node e j The feature vector after fusing interactive information, F e The parameter is θ e A fully connected layer;
[0108] Step 2.4: Use the prediction layer to predict the probability of students answering questions correctly:
[0109] Because students' true grasp of each knowledge concept cannot be quantified, diagnostic results are usually used to predict students' accuracy in answering questions, and the prediction results are used to train and evaluate the model.
[0110] Step 2.4.1: Use equation (4) to predict the i-th student node s. i Answer the j-th exercise node e j The correct probability y ij :
[0111]
[0112] In equation (4), Represents the j-th exercise node e j The knowledge concepts involved are numbered, |·| represents the counting symbol, F predict The parameter is θ p A fully connected layer;
[0113] Step 2.5: Construct the cross-entropy loss function of the diagnostic network using equation (5).
[0114]
[0115] In equation (5), (i, j) represents student-exercise sample pairs obtained from the training set, and r ij Represents the i-th student node s i Answer the j-th exercise node e j The true score;
[0116] Step 3: Use graph comparison learning to optimize the parameter θ. G GCN network f G :
[0117] Comparative learning process as follows Figure 3As shown. Contrastive learning is a method in self-supervised learning that provides self-supervised signals by maximizing the feature consistency of the same sample under different views and maximizing the feature inconsistency of different samples under different views. This invention uses contrastive learning to optimize the GCN network, enabling the trained network to perform better on sparse nodes. At the same time, as an auxiliary training task, it does not affect other nodes due to the loss of information from deleting edges.
[0118] Step 3.1: Use an edge deletion method based on edge importance to modify the relationship graph. Generate sparse views:
[0119] The process of generating sparse views is as follows: Figure 4 As shown, solid lines represent retained edges, and dashed lines represent deleted edges.
[0120] The purpose of edge deletion is to balance the weights of different nodes in the graph. In the original graph, a few nodes possess most of the edges, which will bias the training of the GCN network towards these nodes. Therefore, this invention appropriately deletes edges connected to nodes with higher degree while retaining edges connected to nodes with lower degree. In the sparse view generated in this way, all nodes have similar weights. Because the long-tail problem exists in the student-problem interaction, the deletion operation is only performed on the student-problem subgraph.
[0121] Step 3.1.1: Create a student-problem relationship subgraph. Split into two directed graphs and in, All edges are directed edges that start from student nodes and end at exercise nodes. All edges are The opposite direction of the middle edge;
[0122] In relational graphs, it's common for an edge to connect nodes with unequal degrees; for example, one node might have a very high degree while the other has a very low degree. Deleting such edges can create isolated nodes, disrupting the graph's adjacency structure and preventing information from reaching these isolated nodes in the GCN network. Therefore, this invention splits each edge into two directed edges, with the direction of the directed edges representing the direction of information transmission in the GCN network. Each direction is then deleted individually.
[0123] Step 3.1.2, for For all directed edges, the importance of each edge is calculated using equation (10) based on the degree of the student node:
[0124]
[0125] In equation (10), t(s) i ) indicates the endpoint is s i The importance of edges, d(s i ) represents node s i The degree, θ is a positive constant, and k is a hyperparameter;
[0126] The smaller the degree of a node, the more important the edge connected to that node is, and the greater the likelihood that deleting that edge will create an isolated node.
[0127] Step 3.1.3: Calculate the retention probability of each edge during the generation of the sparse view using equation (11):
[0128]
[0129] In equation (11), p(s) i ) indicates the endpoint is s i The probability of retaining an edge, p min This represents the minimum probability of retention.
[0130] The probability of retaining each edge in the generated sparse view is calculated using equation (11). The greater the importance of a node, the greater the probability of retaining that edge.
[0131] Step 3.1.4, for For all directed edges, calculate the retention probability of each edge using equations (12) and (13):
[0132]
[0133]
[0134] In equations (12)-(13), t(e i ) indicates the endpoint is e i The importance of edges, d(e i ) represents node e i The degree, p(e) i ) indicates the endpoint is e i The probability of retaining an edge.
[0135] Step 3.1.5: Based on the retention probability of each edge, construct a student-problem relationship subgraph. Randomly generate the first sparse view Second sparse view And each is connected to a subgraph relating to exercises and knowledge concepts. First sparse view of the composition graph Second sparse view
[0136] Because the sparse view is generated randomly while retaining probability, multiple generation processes will result in different sparse views.
[0137] Step 3.2: Using the initial vector S output by the embedding layer... 0 E 0 C 0 The first sparse view of the relationship graph As a GCN network G The input is used to obtain the first sparse view. The student feature set S′ and the exercise feature set E′ are given.
[0138] The initial vector S output by the embedding layer 0 E 0 C 0 The second sparse view of the relationship graph As a GCN network G The input is used to obtain the second sparse view. The set of student features S″ and the set of exercise features E″ are given on the ABC model.
[0139] Step 3.3: Calculate the student characteristic self-supervised loss using equation (6).
[0140]
[0141] In equation (6), s′ i and s″ i Let s represent the i-th student node s in student feature set S′ and student feature set S″, respectively. i The features are: sim(·) represents the cosine similarity, and τ represents the hyperparameter of the temperature coefficient;
[0142] In self-supervised loss, the numerator is used to maximize the similarity of the same node in different views, and the denominator is used to minimize the similarity of different nodes in different views. The temperature coefficient τ is a hyperparameter commonly used in contrastive learning to discover hard sample pairs.
[0143] Step 3.4: Calculate the self-supervised loss of the exercise features using formula (7).
[0144]
[0145] In equation (7), e′ i and e″ i Let e represent the j-th exercise node in the exercise feature set E′ and the exercise feature set E″, respectively. i Features;
[0146] Step 3.5: Construct the GCN network using equation (8)G Self-supervised loss function
[0147]
[0148] Step 4: Diagnostic network training:
[0149] Step 4.1: Initialize all network parameters using the Xavier initialization method;
[0150] Step 4.2: Calculate the total loss of the diagnostic network using equation (9).
[0151]
[0152] In equation (9), Θ represents all trainable network parameters, and λ1 and λ2 are hyperparameters;
[0153] Step 4.3: Train the diagnostic network using the Adam optimizer and minimize... until The process continues until convergence, thus obtaining the optimal diagnostic network for diagnosing students' mastery of knowledge concepts.
[0154] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the cognitive diagnostic method, and the processor is configured to execute the program stored in the memory.
[0155] In this embodiment, a computer-readable storage medium stores a computer program that is executed by a processor to perform the steps of the cognitive diagnostic method.
Claims
1. A cognitive diagnostic method based on self-supervised graph learning, characterized in that, Includes the following steps: Step 1: Construct a cognitive diagnostic relationship diagram: Step 1.1: Set the number of students to M, the number of exercises to N, and the number of knowledge concepts to K; Step 1.2: Create student nodes Exercise Nodes Knowledge concept nodes Among them, s i Let e represent the i-th student node. j Let c represent the j-th exercise node. k Let i represent the k-th knowledge concept node, i = 1, 2, ..., M, j = 1, 2, ..., N, k = 1, 2, ..., K; Step 1.3: Construct a relationship diagram in, For the student-problem relationship subgraph, For the sub-graph of the relationship between exercises and knowledge concepts: Step 1.3.1: Construct a student-problem relationship subgraph Among them, the student-problem node set Let represent the set of student-problem relationship edges, if the i-th student node s i For the nth exercise node e n If an answer is given, then the i-th student node s i and the j-th exercise node e j There exists an edge between them, denoted as Step 1.3.2: Construct a subgraph of the relationship between exercises and knowledge concepts. Among them, the set of exercises and knowledge concept nodes Let the set of edges representing the relationship between exercises and knowledge concepts be defined. If the j-th exercise node e j Involves the k-th knowledge concept node c k Then the j-th exercise node e j and the kth knowledge concept node c k There exists an edge between them, denoted as Step 2: Construct a diagnostic network, including an embedding layer and a GCN network consisting of L layers and GCN layers. G The GCN network consists of a diagnostic layer and a prediction layer. G The parameter set is θ G ; Step 2.1: Calculate the initial embedding vector for each student, exercise, and knowledge concept using the embedding layer: Step 2.1.1: Map each student node to a one-hot encoded vector, and let the i-th student node s i One-hot encoded vector x i The i-th bit is 1, and the other bits are 0; Map each exercise node to a one-hot encoded vector, and let the j-th exercise node e j One-hot encoded vector y j The j-th bit is 1, and the other bits are 0; Map each knowledge concept node to a one-hot encoded vector, and let the k-th knowledge concept node c k One-hot encoded vector z k The k-th bit is 1, and the other bits are 0; Step 2.1.2: Define the student embedding matrix. Exercise Embedding Matrix and knowledge concept embedding matrix The Xavier initialization method is used to initialize the initial student embedding matrix S. 0 The initial problem embedding matrix E 0 The initial knowledge concept embedding matrix C 0 Where d is the embedding vector dimension, and d = K; Step 2.1.3: Use equation (1) to calculate the initial embedding vector for each student node, exercise node, and knowledge concept node: In equation (1), S represents the initial student embedding matrix. 0 The i-th student node s i The initial embedding vector, Represents the initial problem embedding matrix E 0 The j-th exercise node e j The initial embedding vector, C represents the initial knowledge concept embedding matrix. 0 The k-th knowledge concept node c k The initial embedding vector, where T represents the transpose; Step 2.2: Using the initial vector S output by the embedding layer... 0 E 0 C 0 Relationship diagram As input to the GCN network, and after message passing processing through the L-layer GCN network, the student feature set S, which is the fused interactive information output by the L-th layer, is obtained. L Exercise feature set E L and the set of features of knowledge concepts C L ; Step 2.3: Use the diagnostic layer to calculate students' mastery of knowledge concepts and the difficulty of exercises: Step 2.3.1: Use equation (2) to calculate the i-th student node s. i Vector of mastery of each knowledge concept In equation (2), S represents the set of student features. L The i-th student node s i The feature vector after fusing interactive information, F s The parameter is θ s The fully connected layer, where σ represents the sigmoid non-linear activation function; Step 2.3.2: Use formula (3) to calculate the j-th exercise e. j Difficulty vector for each knowledge concept In equation (3), Describe the feature set E of the exercises L The j-th exercise node e j The feature vector after fusing interactive information, F e The parameter is θ e A fully connected layer; Step 2.4: Use the prediction layer to predict the probability of students answering questions correctly: Step 2.4.1: Use equation (4) to predict the i-th student node s. i Answer the j-th exercise node e j The correct probability y ij : In equation (4), Represents the j-th exercise node e j The knowledge concepts involved are numbered, |·| represents the counting symbol, F predict The parameter is θ p A fully connected layer; Step 2.5: Construct the cross-entropy loss function of the diagnostic network using equation (5). In equation (5), (i, j) represents student-exercise sample pairs obtained from the training set, and r ij Represents the i-th student node s i Answer the j-th exercise node e j The true score; Step 3: Use graph comparison learning to optimize the parameter θ. G GCN network f G : Step 3.1: Use the edge deletion method based on edge importance to create a student-problem relationship subgraph. Generate two sparse views and And each is connected to a subgraph relating to exercises and knowledge concepts. First sparse view of the composition graph Second sparse view Step 3.2: Using the initial vector S output by the embedding layer... 0 E 0 C 0 The first sparse view of the relationship graph As a GCN network G The input is used to obtain the first sparse view. The student feature set S′ and the exercise feature set E′ are given. The initial vector S output by the embedding layer 0 E 0 C 0 The second sparse view of the relationship graph As a GCN network G The input is used to obtain the second sparse view. The set of student features S″ and the set of exercise features E″ are given on the ABC model. Step 3.3: Calculate the student characteristic self-supervised loss using equation (6). In equation (6), s′ i and s″ i Let s represent the i-th student node s in student feature set S′ and student feature set S″, respectively. i The features are: sim(.) represents the cosine similarity, and τ represents the hyperparameter of the temperature coefficient; Step 3.4: Calculate the self-supervised loss of the exercise features using formula (7). In equation (7), e′ i and e″ i Let e represent the j-th exercise node in the exercise feature set E′ and the exercise feature set E″, respectively. i Features; Step 3.5: Construct the GCN network using equation (8) G Self-supervised loss function Step 4: Diagnostic network training: Step 4.1: Initialize all network parameters using the Xavier initialization method; Step 4.2: Calculate the total loss of the diagnostic network using equation (9). In equation (9), Θ represents all trainable network parameters, and λ1 and λ2 are hyperparameters; Step 4.3: Train the diagnostic network using the Adam optimizer and minimize... until The process continues until convergence, thus obtaining the optimal diagnostic network for diagnosing students' mastery of knowledge concepts.
2. The cognitive diagnostic method based on self-supervised graph learning according to claim 1, characterized in that, Step 3.1 is performed as follows: Step 3.1.1: Create the student-problem relationship subgraph. Split into two directed graphs and in, All edges are directed edges that start from student nodes and end at exercise nodes. All edges are The opposite direction of the middle edge; Step 3.1.2, for For all directed edges, the importance of each edge is calculated using equation (10) based on the degree of the student node: In equation (10), t(s) i ) indicates the endpoint is s i The importance of edges, d(s i ) represents node s i The degree, θ is a positive constant, and k is a hyperparameter; Step 3.1.3: Calculate the retention probability of each edge during the generation of the sparse view using equation (11): In equation (11), p(s) i ) indicates the endpoint is s i The probability of retaining an edge, p min This represents the minimum probability of retention. Step 3.1.4, for For all directed edges, calculate the retention probability of each edge using equations (12) and (13): In equations (12)-(13), t(e i ) indicates the endpoint is e i The importance of edges, d(e i ) represents node e i The degree, p(e) i ) indicates the endpoint is e i The probability of retaining an edge; Step 3.1.5: Based on the retention probability of each edge, construct a student-problem relationship subgraph. Randomly generate the first sparse view Second sparse view And each is connected to a subgraph relating to exercises and knowledge concepts. First sparse view of the composition graph Second sparse view 3. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store programs that support the processor in executing the cognitive diagnostic method of claim 1 or 2, the processor being configured to execute the programs stored in the memory.
4. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the steps of the cognitive diagnostic method according to claim 1 or 2.
Citation Information
Patent Citations
A cognitive diagnostic method for a cognitive process of a student
CN109191345A
Practical effect evaluation and learning path recommendation system and method based on cognitive diagnosis
CN110930274A