Multi-dimensional test question characterization method based on heterogeneous graph neural network
By constructing a multi-dimensional representation method of test questions, knowledge points and difficulty levels through heterogeneous graph neural networks, the problems of personalization and accuracy of test question recommendations in online education platforms are solved, and efficient personalization of test question recommendations is achieved.
Patent Information
- Application Number
- CN202510891988.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-16
AI Technical Summary
Existing online education platforms lack multi-dimensional information fusion in test question recommendations, resulting in a lack of personalization and accuracy in recommendation results. Traditional methods are unable to effectively handle the deep semantic correlation between test questions and knowledge points.
A heterogeneous graph neural network is used to construct a multi-dimensional representation method for test questions, knowledge points and difficulty levels. Multi-source features are fused through relational graph convolution and attention mechanism to generate high-quality test question representation vectors for personalized recommendations.
It significantly improves the accuracy and personalization of test question recommendations on online education platforms and improves the matching effect of learning resources.
Smart Images

Figure CN120653847A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and educational information technology, and in particular to test question feature modeling and personalized recommendation technologies for online education platforms. Specifically, the present invention discloses a multidimensional test question representation method based on a heterogeneous graph neural network (HGNN). This method integrates multiple sources of information, including test question text content, knowledge point associations, and difficulty levels, thereby improving the accuracy and personalization of learning resource recommendation systems. Background Art
[0002] With the rapid development of online education (MOOCs, intelligent question banks, online homework platforms, etc.), educational resources are becoming increasingly diverse and expansive. Accurately recommending appropriate test resources for learners at different levels has become a core challenge for intelligent education systems. Test questions are key learning resources for assessing student mastery and guiding learning paths. Their quality directly impacts recommendation effectiveness and the overall learning experience.
[0003] Traditional question representation methods often focus on text content, extracting keywords from question stems and answer options, or using tags or knowledge point labels for search-based recommendations. This single-dimensional modeling approach ignores the deeper semantic relationships between questions and knowledge points, and fails to reflect the adaptability of question difficulty levels to student abilities. Consequently, recommendation results are often limited to text similarity matching, lacking true personalization and precision.
[0004] In recent years, graph neural networks (GNNs) have demonstrated significant advantages in fields such as social network analysis, knowledge graphs, and recommender systems. However, most GNNs (such as GCN and GAT) assume homogeneity between node and edge types in the graph, making them difficult to model in real-world educational scenarios, such as the complex multi-node modeling requirements for the "test question-knowledge point-difficulty" relationship. Heterogeneous graph neural networks (HGNNs), on the other hand, naturally support parallel learning of multiple node and edge types and have been applied in fields such as social recommendation and biomedicine. However, in online education, the application of multi-dimensional test question representation and recommendation, in particular, remains exploratory, with most existing research remaining at the proof-of-concept stage and lacking systematic engineering solutions. Therefore, a heterogeneous graph modeling and group learning approach is needed that can simultaneously integrate multi-dimensional information, such as test question text, knowledge point associations, and difficulty levels, to improve the quality of test question representation and recommendation accuracy. Summary of the Invention
[0005] This paper provides a multi-dimensional test question representation method based on a heterogeneous graph neural network. This method constructs a heterogeneous graph containing test question nodes, knowledge point nodes, and difficulty level nodes. It then uses relational graph convolutional neural networks (GCNs) to embed and learn multiple types of nodes. It also employs an attention mechanism to dynamically fuse multi-source features. Ultimately, it generates high-quality test question representation vectors, providing accurate input for downstream personalized recommendation models. This significantly improves the accuracy and personalization of test question recommendations on online education platforms.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a multi-dimensional test question representation method based on heterogeneous graph neural network, the specific steps are as follows:
[0007] 1. Heterogeneous graph construction module
[0008] (1) Obtaining original test data from the online education platform, including question text, option text, knowledge point label set, and difficulty level label;
[0009] (2) Define three types of nodes in a heterogeneous graph:
[0010] Exercise Node: represents a specific exercise question. The node features are derived from the semantic embedding of the exercise question text.
[0011] Knowledge Node: represents the concept of a knowledge point. The node features are derived from the embedding of the text description of the knowledge point.
[0012] Difficulty Node: Indicates the difficulty level of the test question (such as "low", "medium", "high"), expressed in one-hot or numerical encoding;
[0013] (3) Define three types of edges in a heterogeneous graph:
[0014] Test question–knowledge point edge (E1): If a test question tests a certain knowledge point, an edge is established between the corresponding test question node and the knowledge point node, with the semantics of the “test” relationship;
[0015] Knowledge point-knowledge point edge (E2): If there is a prerequisite or association relationship between knowledge points, an edge is established between the two knowledge point nodes with the semantics of "association" relationship;
[0016] Question-Difficulty Edge (E3): Connects the question node to the difficulty node corresponding to its difficulty, with the semantics of "has this difficulty".
[0017] 2. Node feature initialization module
[0018] (1) For each question node, use the pre-trained BERT model to encode the question stem and option text, and concatenate the question stem and option embeddings to obtain the initial feature vector of the question node;
[0019] (2) For each knowledge point node, use the pre-trained word vector Word2Vec to encode the knowledge point name or description and generate the initial feature vector of the knowledge point node;
[0020] (3) For each difficulty node, one-hot encoding (such as "low" → [1,0,0], "medium" → [0,1,0], "high" → [0,0,1]) or scalar numerical encoding (such as "low" → 1, "medium" → 2, "high" → 3) is used to generate the initial feature vector of the difficulty node.
[0021] 3. Heterogeneous Graph Neural Network Embedding Learning Module
[0022] (1) Construct the above node set V and edge set E into a heterogeneous graph ,That They correspond to three types of edges E1, E2, and E3 respectively;
[0023] (2) Use the Relational Graph Convolutional Network (R-GCN) to perform multi-type relational convolution on heterogeneous graphs. The update formula is:
[0024]
[0025] (3) After stacking multiple layers of R-GCN, the embedding representations of the question node, knowledge point node, and difficulty node at the Lth layer are obtained respectively.
[0026] 4. Feature fusion module
[0027] (1) For a certain question node, its final latent representation in R-GCN essentially contains a comprehensive representation from three types of adjacency information. However, this study further subdivides it into three parts:
[0028] Only the latent representation obtained after the test question-knowledge point edge propagation is considered to reflect the interaction between the text and the knowledge points;
[0029] Only the latent representation obtained after the question-difficulty edge propagation is considered to reflect the difficulty information;
[0030] The residual part after the node's own features are updated;
[0031] (2) After concatenating or weighted summing the above three vectors, input them into the attention fusion network and dynamically generate weights. The calculation method is as follows:
[0032]
[0033]
[0034]
[0035] (3) Final test question embedding representation:
[0036]
[0037] 5. Student-Question Matching Prediction Module (Recommendation Module)
[0038] (1) The final test question vector obtained by the above fusion is input into downstream prediction models such as multi-layer perceptron (MLP), and student features (such as student knowledge mastery vector) are spliced as input;
[0039] (2) Predict the probability or fitness score of students answering the test questions to generate a personalized recommendation list. The model can be trained using a binary cross entropy loss function or a ranking loss function. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The following drawings are used to illustrate embodiments of the present invention and are not intended to limit the present invention.
[0041] Figure 1 Flowchart of the test question characterization method of the present invention.
[0042] Figure 2 This is a diagram of the overall architecture of the method described in the present invention. DETAILED DESCRIPTION
[0043] The specific implementation method of the "multi-dimensional test question representation method and system based on heterogeneous graph neural network" of the present invention is described in detail below with reference to the accompanying drawings, but the protection scope of the present invention is not limited to this embodiment.
[0044] A multi-dimensional test question representation method based on heterogeneous graph neural network, the specific steps are as follows:
[0045] 1. Heterogeneous Graph Construction
[0046] The present invention first obtains the original data of test questions from the online education platform, including the stem text, option text, annotated knowledge point list and difficulty label of each test question.
[0047] Three types of nodes are defined in a heterogeneous graph:
[0048] Exercise Node, represented by a circular node, whose features are derived from the text embedding of the exercise;
[0049] Knowledge Node: It is represented by a triangle node. The node features are derived from the concept description embedding of the knowledge point.
[0050] Difficulty Node, represented by a square node, the node feature is one-hot or numerical encoding.
[0051] Three edge types are defined in heterogeneous graphs:
[0052] Question-Knowledge Point Side (E1): If the question Test knowledge points , a solid line is established between the two to indicate the “examination” relationship;
[0053] Knowledge point-knowledge point edge (E2): If the knowledge point and If there is a prerequisite or association relationship, a dotted line is established between them to indicate the "association" relationship;
[0054] Question-Difficulty Edge (E3): If question v i The difficulty label of is "medium", then and "medium" difficulty nodes A dotted line is established between them to indicate "this level of difficulty".
[0055] In the entire heterogeneous graph G=(V,E,R), the node set , where V E For all question nodes, V K For all knowledge point nodes, V D There are three difficulty nodes. , a set of relationship types .
[0056] 2. Node feature initialization
[0057] The present invention performs the following feature initialization on different types of nodes:
[0058] 2.1 Question node initialization: Concatenate the stem text and option text of each question and input them into the pre-trained BERT model. Take the last layer [CLS] vector or the average vector after pooling to get the dimension The original embedding of If Chinese BERT is used in a multilingual scenario, the [CLS] vector representation is also used.
[0059] 2.2 Knowledge point node initialization: Input the name or brief description of each knowledge point into the pre-trained word vector model to obtain a dimension of The original embedding of .
[0060] Difficulty node initialization: assign one-hot vectors (such as "[1,0,0]", "[0,1,0]", "[0,0,1]") or scalar numerical encodings (such as "1, 2, 3") to the three difficulty levels of "low", "medium", and "high", respectively, and generate dimensions of Vector .
[0061] If the above embedding dimensions are respectively mapped to a unified dimension d through a linear mapping layer (fully connected layer):
[0062]
[0063]
[0064]
[0065] in, .
[0066] 3. Heterogeneous Graph Neural Network Embedding Learning
[0067] As shown in Figure 2, the embedding update process of multi-layer relational graph convolution (R-GCN) on a heterogeneous graph is demonstrated. The node features in the heterogeneous graph constructed above and the initialized node features are simultaneously input into the R-GCN module.
[0068] The (l+1)th layer representation of a single node Vi is updated by the following convolution:
[0069]
[0070] Where: hi(l+1) is the feature representation of the (l+1)th layer of node Vi. Wr(l) is the relationship type in the lth layer The weight matrix of N, W0(l) is the weight matrix of the node’s own features. i r Indicates that the node Vi is in the relationship type The next set of neighbors. (.) is a nonlinear activation function.
[0071] 4. Attention Feature Fusion
[0072] like Figure 2 The figure shows the attention fusion module. The present invention uses the attention mechanism to dynamically weight the sub-vectors from three sources. The steps are as follows:
[0073] The latent representation of the question node obtained from the heterogeneous graph convolution module is decomposed into the following according to the feature dimension:
[0074]
[0075] Use the attention mechanism to assign dynamic weights to features of different dimensions to obtain the final representation of the test question node:
[0076]
[0077] Among them, the attention weight α is obtained through learning, and the specific calculation method is:
[0078]
[0079] in, 、 are the parameter vectors and matrices of the attention mechanism, which are used to learn the importance of features of different dimensions.
Claims
1. A multi-dimensional test question representation method based on heterogeneous graph neural network, characterized by: The following steps are involved: S1. Construct a heterogeneous graph structure, comprising three types of nodes: question nodes, knowledge point nodes, and difficulty level nodes; and construct three types of edges according to the following rules: a question-knowledge point edge represents the examination relationship between a question and a knowledge point, a knowledge point-knowledge point edge represents the prerequisite or association relationship between knowledge points, and a question-difficulty edge represents the relationship between a question and its corresponding difficulty level; S2. Initialize the features of the three types of nodes respectively, wherein the feature initialization includes: S3. Perform multi-layer convolution operations on the heterogeneous graph based on a relational graph convolutional network (R-GCN) to obtain node latent representations at the Lth layer; S4. For each question node, split its latent representation at layer L into three parts: question-knowledge point sub-vector , Question-Difficulty Subvector , and the node's own residual subvector ; S5. Use the attention mechanism to assign dynamic weights to the above three sub-vectors and perform weighted fusion to generate the final embedding representation vector of the test question. ; S6, the Stored in the feature library and available for call through the external interface.
2. According to claim 1, a multi-dimensional test question representation method based on heterogeneous graph neural network is characterized in that: In step S2, there are four initialization processes: (1) For the question node, use the pre-trained BERT model to encode the question stem and option text to obtain the initial feature vector h i (0) ; (2) For the knowledge point node, use the pre-trained word vector model to encode the knowledge point text description to obtain the initial feature vector k j (0) ; (3) For difficulty level nodes, use one-hot encoding or scalar encoding to obtain the initial feature vector ; (4) Map the above initial features to a unified dimension through a linear mapping layer .
3. A multi-dimensional test question representation method based on heterogeneous graph neural network according to claim 2, characterized in that: The update formula for the hidden representation of the l-th layer node in R-GCN is: ; in: For nodes The feature representation of the (l+1)th layer, is the relationship type in layer l The weight matrix, is the weight matrix of the node’s own features, Representation node In the relationship type The neighbor set below, (.) is a nonlinear activation function.
4. A multi-dimensional test question representation method based on heterogeneous graph neural network according to claim 3, characterized in that: The test question node feature hi (0) It is obtained by concatenating the test question stem and the option text and inputting them into the pre-trained BERT model, taking the last layer vector or the average vector after pooling, the knowledge point node feature k j (0) The knowledge point name or description is encoded by the pre-trained word vector model, and the difficulty node feature d l (0) Use three-dimensional one-hot encoding to represent the three difficulty levels of "low", "medium", and "high", or use scalars "1", "2", and "3" for numerical encoding.
5. A multi-dimensional test question representation method based on heterogeneous graph neural network according to claim 4, characterized in that: The attention mechanism calculation steps are as follows:
1. Split the L-th layer hidden representation of the test question node into , , ; 2. Concatenate the three vectors into And input two layers of fully connected network and LeakyReLU activation function to obtain the attention score vector; 3. Obtain the weight coefficient by performing the corresponding softmax operation , , ; 4. Sum the three vectors according to their corresponding weights to get the final representation of the test question .
6. A multi-dimensional test question representation method based on heterogeneous graph neural network according to claim 5, characterized in that: The mapping formula of the linear mapping layer is: ; ; ; in, .
7. A multi-dimensional test question representation method based on heterogeneous graph neural network according to claim 6, characterized in that: The R-GCN model introduces residual connections and batch normalization to stabilize the training process and prevent gradient vanishing. The specific implementation of the split sub-vector is as follows: in the R-GCN structure, different convolution weight matrices are set for different relationship types, and the intermediate outputs belonging to the "test question - knowledge point" relationship are summarized as , the intermediate outputs belonging to the "question-difficulty" relationship are summarized as , output the node's own self-loop item as .
8. The multi-dimensional test question representation method based on heterogeneous graph neural network according to claim 7 is characterized in that: The pre-trained BERT model may be BERT-base-uncased or Chinese BERT-base, with an encoding dimension of 768; the pre-trained word vector model is Word2Vec, and the embedding dimension is 300; the one-hot encoding is specifically a three-dimensional vector "[1,0,0]", "[0,1,0]", and "[0,0,1]", which correspond to "low", "medium", and "high", respectively; the scalar encoding is specifically "1", "2", and "3", which correspond to "low", "medium", and "high", respectively.
9. The multi-dimensional test question representation method based on heterogeneous graph neural network according to claim 8 is characterized in that: The "knowledge point-knowledge point edge" relationship comes from a pre-built knowledge graph or the prerequisite dependency relationship defined in the textbook outline. The associated edge can also be automatically constructed by counting the co-occurrence frequency of students' answers.