A global prototype-based small-sample node classification method based on auxiliary graph enhancement
By constructing auxiliary graph and graph convolution neural networks, combined with the meta-learning framework, the overfitting problem of small sample node classification in attribute networks is solved, and high-accuracy node classification and recommendation under a small amount of supervision information is achieved.
Patent Information
- Application Number
- CN202310329482.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-03-30
AI Technical Summary
Existing deep learning algorithms are prone to overfitting when classifying small sample nodes in attribute networks, and the cost of labeling unknown instances is high, making it difficult to effectively use a small amount of supervision information for classification.
By constructing an auxiliary graph based on graph topology, combining graph convolutional neural network and meta-learning framework, graph encoder and graph evaluator obtain graph node representations and importance scores, graph data enhancement, and update global class prototype representations in meta-learning tasks for node classification.
The effective dimensionality reduction of high-dimensional sparse data and improved node classification accuracy in the attribute network, and the accurate classification of unknown marking nodes can be accurately classified under a small amount of supervision information, which is suitable for product recommendations in e-commerce networks.
Smart Images

Figure CN116342958B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of attribute graph node classification, and in particular to a global prototype-like small sample node classification method based on auxiliary graph enhancement. Background Art
[0002] Most existing deep learning algorithms rely on a large number of supervised samples to achieve good performance, but their performance is often hindered when the dataset is small. In real-world attribute networks, most categories contain only a small number of nodes. Due to the irregularity, high noise, and complex relationships between nodes in attribute networks, developing small-sample node classification methods on attribute networks is a difficult challenge for researchers. Combining meta-learning frameworks with graph neural networks has become a mainstream trend in the research of small-sample node classification methods on attribute graphs. Meta-learning frameworks are specifically designed for small-sample task scenarios. They adapt to the small number of supervised samples in small-sample learning tasks through meta-learning task partitioning. Graph neural networks are a graph representation learning technology that learns graph representations by combining the attribute information of the graph nodes themselves with the graph's topological structure.
[0003] The performance of existing deep learning models relies on large amounts of supervised data, but most categories in real-world attribute networks contain only a limited number of labeled instances. Therefore, when datasets contain a limited number of labeled examples, using existing node classification models for training can lead to severe overfitting. Furthermore, labeling unknown instances is prohibitively expensive, and the lack of knowledge about categories with less supervised information makes labeling and classifying these examples particularly challenging. Summary of the Invention
[0004] In order to overcome the problems in the prior art, the present invention aims to provide a global prototype-like small sample node classification method based on auxiliary graph enhancement.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A global prototype-like small sample node classification method based on auxiliary graph enhancement includes the following steps:
[0007] Obtain the data set to be analyzed;
[0008] The dataset to be analyzed is analyzed using a trained small sample node classification model to predict node labels. The trained small sample node classification model is obtained through the following steps:
[0009] Step 1: Based on the test set, obtain the original attribute graph and construct an auxiliary graph based on the graph topology structure.
[0010] Step 2: Input the original attribute graph and the auxiliary graph into the graph encoder to obtain the graph node representations of the original attribute graph and the auxiliary graph respectively. Perform a weighted sum operation on the graph node representation matrices of the original attribute graph and the auxiliary graph to obtain the graph node representation after graph data enhancement.
[0011] Step 3: Obtain the importance score of each node in the original attribute graph through the graph evaluator based on the graph convolutional network, and finally obtain the graph node importance score matrix. Then, use the node centrality score to obtain the adjusted node importance score;
[0012] Step 5: Sample the training set for meta-learning tasks. Obtain the support set node representation and query set node representation for each meta-learning task using the graph node representation augmented with graph data. Use the support set node representation and the adjusted importance scores to calculate the class prototype representation for each category in the current task and update the global class prototype representation.
[0013] Step 6: Measure the distance between the query set node representation in the meta-learning task and the updated global class prototype representation, predict the label of the query set node, and establish a trained small sample node classification model.
[0014] Furthermore, the specific construction process of the auxiliary graph is as follows:
[0015] 1) For the original attribute graph, find the set of second-order neighbor nodes for each node;
[0016] 2) For each node in the set of second-order neighbor nodes, add edges between the node and its second-order neighbor nodes to form an auxiliary graph;
[0017] The edge weight calculation process is as follows:
[0018]
[0019] Among them, a i For node v i The vector corresponding to all edge weights of a j For node v i Neighbor node v j The vector corresponding to all edge weights of a ij For node v i and node v j The edge weights between The auxiliary graph G constructed s Midpoint v i and node v j The edge weights between .
[0020] Furthermore, the graph encoder is constructed through the following process:
[0021] 1) Construct a graph convolution layer. The calculation formula of the graph convolution layer is as follows:
[0022]
[0023]
[0024]
[0025] Among them, A is the adjacency matrix, I n is the identity matrix, is the normalized adjacency matrix, is a diagonal matrix, H l represents the graph node representation matrix obtained after the lth convolutional layer, and σ is the nonlinear activation function;
[0026] 2) Based on the calculation results of the graph convolution of the graph convolution layer, the graph node after the graph encoder composed of two graph convolution layers is represented as follows:
[0027]
[0028] The nonlinear activation function used is the Relu function. The input matrix of the first layer is the original node attribute matrix X, whose dimension is N*D, where N represents the number of nodes in the attribute graph. The dimension of the graph node representation Z learned by the graph encoder is N*M, where D<<M.
[0029] Furthermore, the specific process of step 2 is as follows:
[0030] 1) Input the original attribute graph and the auxiliary graph into the graph encoder to obtain the graph node representations of the original attribute graph and the auxiliary graph respectively:
[0031]
[0032]
[0033] Among them, Z o is the original attribute graph node representation obtained after encoding, Z s is the auxiliary graph node representation obtained after encoding, A is the adjacency matrix of the original attribute graph, A s is the adjacency matrix of the auxiliary graph, σ is the nonlinear activation function, X is the input matrix of the first layer, is the original node attribute matrix, and W 1 is the parameter of the first graph convolution layer, W 2
[0034] is the parameter of the second graph convolutional layer; 2) a weighted sum operation is performed on the graph node representation matrix of the original attribute graph and the auxiliary graph to obtain the graph node representation Z after graph data enhancement:
[0035] Z=(1-α)*Z o +α*Z s
[0036] Here, α is a hyperparameter.
[0037] Furthermore, the graph evaluator based on graph convolutional network is constructed through the following process:
[0038] 1) Construct a graph evaluator consisting of two graph convolutional layers and one fully connected layer, and use the node attribute information and graph topology information of the original attribute graph to obtain the importance score matrix of the graph nodes:
[0039] 2) Use the node degree to evaluate the node centrality and obtain the node centrality score:
[0040] c i =log(deg(v i ))
[0041] Among them, deg(v i ) represents node v i degree, c i Represents node v i The centrality score of
[0042] 3) According to the importance score matrix of the graph nodes, the importance scores of the nodes are adjusted using the centrality scores of the nodes to obtain the adjusted node importance scores.
[0043] Furthermore, the importance score matrix of the graph nodes is:
[0044]
[0045] Among them, Linear is the fully connected layer, A is the adjacency matrix of the original attribute graph, X is the input matrix of the first layer, and W is the original node attribute matrix. 1 is the parameter of the first graph convolution layer, W 2 are the parameters of the second graph convolutional layer;
[0046] Centrality score of a node:
[0047] c i =log(deg(v i ))
[0048] Among them, deg(v i ) represents node v i degree, c i Represents node v i The centrality score of
[0049] Centrality score of a node:
[0050] c i =log(deg(v i ))
[0051] Among them, deg(v i ) represents node v i degree, c i Represents node v i The centrality score of
[0052] Adjusted node importance scores:
[0053]
[0054] Among them, s i is the vector of the i-th row in the importance score matrix S of the graph nodes.
[0055] Furthermore, the meta-learning task sampling process is as follows:
[0056] 1) For the training set, randomly select n categories, and randomly select k+q nodes from each category, where k nodes are used as support set nodes and q nodes are used as query set nodes; repeat the sampling process Q times to obtain the meta-training task set T train ;
[0057] 2) For the test set, obtain the meta-test task set T test .
[0058] Furthermore, the specific process of step 5 is as follows:
[0059] 1) Set the global class prototype representation P across tasks global ;
[0060] 2) In each meta-learning task sampled, the corresponding weight of each node representation is first calculated using the support set node importance score:
[0061]
[0062] Among them, Support c represents the set of nodes of category c in the support set, For node v i The importance score, β i For node v i corresponding weights;
[0063] 3) Calculate the class prototype representation of each class based on the normalized weight of each node in the support set and the graph node representation after graph data enhancement:
[0064]
[0065] Among them, P c is the prototype representation of category c under the current task;
[0066] 4) Update the global class prototype representation P global The specific update process is as follows:
[0067]
[0068] in, is the global class prototype representation of category c, and Mean() is the average pooling operation.
[0069] Furthermore, the specific process of predicting the labels of the query set nodes is as follows:
[0070] 1) Measure the Euclidean distance between the query set nodes and the global class prototype representation of each class in the current task, and calculate the probability of node label prediction;
[0071] 2) Take the category corresponding to the maximum probability as the predicted label of the node;
[0072] 3) During the training phase, the loss of the current task is the average negative log-likelihood probability L of the correct classification:
[0073]
[0074] Where n is the number of categories, k is the number of support set nodes in the meta-learning task, and i is the node index.
[0075] Furthermore, the probability of node label prediction is calculated as follows:
[0076]
[0077] Among them, d() is the Euclidean distance metric function, is the query set node representation, Predict probabilities for node labels;
[0078] The average negative log-likelihood probability L of correct classification is calculated as follows:
[0079]
[0080] Where n is the number of categories, k is the number of support set nodes in the meta-learning task, and i is the node index.
[0081] Compared with the prior art, the present invention has the following beneficial effects:
[0082] To classify nodes with unknown labels in such scenarios, this paper combines a meta-learning framework with a graph neural network to construct a global prototype-like small-sample node classification method based on auxiliary graph enhancement. The node classification steps of this model are as follows: First, an auxiliary graph is constructed based on the graph's topological structure information. The original attribute graph and the auxiliary graph are input into a graph encoder based on a graph convolutional neural network to obtain low-dimensional graph node representations, thereby achieving the goal of dimensionality reduction of high-dimensional sparse graph data. Simultaneously, the original attribute graph is input into a graph evaluator based on a graph convolutional neural network to evaluate the importance of the nodes. Subsequently, meta-learning tasks are sampled according to the meta-learning framework. In each meta-learning task, the importance scores of the support set nodes and the node representations are weighted summed to obtain various prototype representations. The Euclidean distance between each prototype representation and the query set node representation for the current task is measured. The label corresponding to the minimum distance is the predicted label of the query set node. This method is suitable for small-sample node classification tasks in large-scale, high-dimensional, sparse attribute network data. Compared with existing small-sample node classification methods in the attribute network field, this method can capture information on more nodes of the same category, thereby achieving high classification accuracy. The present invention can classify only unknown labeled nodes in categories that contain only a small amount of supervision information, achieve rapid model deployment, and realize accurate recommendation.
[0083] Furthermore, in e-commerce networks, nodes are typically composed of products. If the same user views different products, edges are formed between them, with the product category representing the node category, thus forming an attribute graph. In such networks, most categories contain only a small number of labeled nodes. The present invention can utilize these small numbers of labeled nodes to enable the model to learn information about the category and classify unlabeled nodes within that category, thereby classifying the products. Accurately classifying products enables precise product recommendations for users. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 This is a framework diagram of the multi-label playlist recommendation method based on the improved collaborative filtering algorithm.
[0085] Figure 2 A comparison chart of ablation experiments under different meta-learning task mode settings. DETAILED DESCRIPTION
[0086] The present invention is described in detail below with reference to the accompanying drawings.
[0087] The present invention provides a global prototype-based small-sample node classification method based on auxiliary graph enhancement. The attribute graph itself is high-dimensional and sparse data, and the relationships between graph nodes are complex. Therefore, an auxiliary graph is first constructed based on the nearest neighbor concept, utilizing the graph's topological structure information. To obtain a highly expressive graph node representation, a graph encoder based on a graph convolutional neural network is introduced into the model to learn the graph node representation. Simultaneously, a graph encoder based on a graph convolutional neural network is constructed to learn graph node importance scores, facilitating the learning of more optimal prototype-based representations in meta-learning tasks. A meta-learning framework is then used to sample meta-learning tasks, obtaining multiple meta-training tasks and meta-testing tasks for the training and test sets, respectively, to accommodate small-sample node classification scenarios. Cross-task prototype-based representations are set to obtain more information about similar nodes in different meta-learning tasks. In each meta-learning task, the importance scores and representations of the support set nodes are used to obtain the prototype-based representations of each class for the current task, and the global prototype-based representation is updated. The query set nodes are classified by measuring the Euclidean distance between the query set nodes in the current task and the prototype representations of each class. Compared to existing small-sample node classification models in attribute networks, this method enhances graph data by constructing an auxiliary graph, enabling the encoder to learn more expressive graph node representations. Furthermore, the graph evaluator learns better class prototype representations. The cross-task global class prototype setting enables the model to learn more information about each category, thereby improving node classification accuracy.
[0088] Table 1 introduces the basic information of the dataset used in this paper. Amazon-Clothing is an e-commerce network consisting of clothing, shoes, and jewelry products on the Amazon platform. In this dataset, each product is considered a node, and the product description constitutes the node's attribute information. If the same user views different products, edges are formed between different products. As shown in Table 1, this dataset contains a total of 24,919 nodes and 91,680 edges. Products are divided into 77 categories, and the node attribute dimension is 9,034.
[0089] Table 1 Dataset summary information
[0090]
[0091] Figure 1 For a detailed flow chart of this method, see Figure 1 For the small sample node classification task in the Amazon-Clothing dataset, the specific process is mainly divided into the following steps:
[0092] Step 1: For the Amazon-Clothing dataset, first split the entire dataset into training and test sets with a 40:20 ratio of the number of categories. Meta-learning task sampling is performed on both the training and test sets. The task sampling process is as follows (using the 5-way 3-shot task as an example):
[0093] 1) For the training set, randomly select n categories, and randomly select k+q nodes from each category, where k nodes are used as support set nodes and q nodes are used as query set nodes. Repeat the sampling process Q times to obtain the meta-training task set T train In the 5-way 3-shot task, n=5, k=3.
[0094] 2) For the test set, the same task sampling method as in step 1) is used to obtain the meta-test task set T test .
[0095] Step 2: For the Amazon-Clothing dataset, the nodes are composed of products, and the product descriptions are the node attribute features. If the same user has viewed different products, an edge is constructed between the nodes represented by the product, thereby obtaining the original attribute graph of the Amazon_Clothing dataset. An auxiliary graph G based on the graph topology is constructed based on the original attribute graph. s , the specific construction process of the auxiliary graph is as follows:
[0096] 1) For the original attribute graph, find the second-order neighbor node set Neigh for each node;
[0097] 2) For each node, add an edge between the node and its second-order neighbor nodes. The edge weight calculation process is as follows:
[0098]
[0099] Among them, a i For node v i The vector corresponding to all edge weights of a j For node v i Neighbor node v j The vector corresponding to all edge weights of a ij For node v i and node v j The edge weights between The auxiliary graph G constructed s Midpoint v i and node v j The edge weights between .
[0100] Step 3: Build a graph encoder based on a graph convolutional neural network to obtain low-dimensional graph node representations of the original attribute graph and the auxiliary graph. By combining the node attribute information and the graph topology, the original N*D-dimensional attribute graph node representation is reduced to N*M dimensions. For the Amazon-Clothing dataset, N=24919, D=9034, and M=16. The specific process of the dimensionality reduction operation is as follows:
[0101] 1) Construct a graph convolution layer. The calculation formula for graph convolution is as follows:
[0102]
[0103]
[0104]
[0105] Among them, A is the adjacency matrix, I n is the identity matrix, is the normalized adjacency matrix, It is a diagonal matrix. Each element in the matrix is the degree of the node after the node in the graph is added to the self-ring edge. The degree calculation formula of each node is H l represents the graph node representation matrix obtained after the l-th convolutional layer, and σ is a nonlinear activation function.
[0106] 2) The graph nodes after the graph encoder consisting of two graph convolutional layers are represented as follows:
[0107]
[0108] in, is the normalized adjacency matrix, is a diagonal matrix, H l represents the graph node representation matrix obtained after the lth convolutional layer, σ is the nonlinear activation function; W 1 is the parameter of the first graph convolution layer, W 2 The parameters of the second graph convolutional layer are denoted by Relu (Relu) (x) = max 0, x). The input matrix of the first layer is the original node attribute matrix X, which has a dimension of N*D, where N represents the number of nodes in the attribute graph. The graph node representation Z learned by the graph encoder has a dimension of N*M, with D << M. For the Amazon-Clothing dataset, the original node attribute matrix X is 24919*9034, and the graph node representation matrix Z obtained by the graph encoder has a dimension of 24919*16.
[0109] Step 4: Input the original attribute graph and the auxiliary graph into the graph encoder to obtain the graph node representations of the two graphs respectively. Perform a weighted sum operation on the two graph node representation matrices to obtain the graph node representation after graph data enhancement. The specific calculation process is as follows:
[0110] 1) Obtain the graph node representations of the original attribute graph and the auxiliary graph respectively:
[0111]
[0112]
[0113] Among them, Z o is the original attribute graph node representation obtained after encoding, Z s is the auxiliary graph node representation obtained after encoding, A is the adjacency matrix of the original attribute graph, A s is the adjacency matrix of the auxiliary graph, and the dimensions of both are 24919*24919.
[0114] 2) Perform a weighted sum operation on the two graph node representations to obtain the final graph node representation.
[0115] Z=(1-α)*Z o +α*Z s
[0116] where α is a hyperparameter, and its value is 0.25 in the model setting of this method.
[0117] Step 5: Build a graph evaluator based on a graph convolutional network to obtain the importance score of each node in the original attribute graph, and finally obtain an N*1 graph node importance score matrix S. For the Amazon-Clothing dataset, the dimension of S is 24919*1. The specific construction process of the graph evaluator is as follows:
[0118] 1) Construct a graph evaluator consisting of two graph convolutional layers and one fully connected layer. It uses the node attribute information and graph topology information of the original attribute graph to obtain the importance score matrix S of the graph nodes. The specific calculation process is as follows:
[0119]
[0120] Among them, Linear is a fully connected layer, and after mapping through the fully connected layer, an N*1-dimensional graph node importance score matrix S is obtained.
[0121] 2) Use the node degree to evaluate the centrality of the node. The centrality score of the node is calculated as follows:
[0122] c i =log(deg(v i ))
[0123] Among them, deg(v i ) represents node v i degree, c i Represents node v i The centrality score of .
[0124] 3) Use the centrality score of the node to adjust the importance score of the node. The adjusted node importance score is as follows:
[0125]
[0126] Step 6: Set the global class prototype representation across tasks. For each meta-learning task, use the support set node representation and importance score to calculate the class prototype representation of each category under the current task, and update the global class prototype representation. The specific process is as follows:
[0127] 1) Set the global class prototype representation P across tasks global ;
[0128] 2) In each meta-learning task, the corresponding weight of each node is first calculated using the support set node importance score:
[0129]
[0130] Support c represents the set of nodes of category c in the support set, For node v i The importance score, β i For node v i Corresponding weight.
[0131] 3) Calculate the class prototype representation of each class based on the normalized weight of each node in the support set and the representation of the node:
[0132]
[0133] Among them, P c It is the prototype representation of category c under the current task.
[0134] 4) Update the global class prototype representation P global The specific update process is as follows:
[0135]
[0136] in, is the global class prototype representation of category c, and Mean() is the average pooling operation.
[0137] Step 7: In the meta-learning task, use the Euclidean distance to measure the distance between the query set node representation and the global class prototype representation, and predict the label of the query set node to complete the establishment of the small sample node classification model. The specific process is as follows:
[0138] 1) Measure the Euclidean distance between the query set nodes and the various prototype representations in the current task, and calculate the probability of node label prediction:
[0139]
[0140] Among them, d() is the Euclidean distance metric function, is the query set node representation, Predict probabilities for node labels.
[0141] 2) Take the category corresponding to the maximum probability as the predicted label y of the node predict ;
[0142] 3) During the training phase, the loss of the current task is the average negative log-likelihood probability of correct classification:
[0143]
[0144] 4) The small sample node classification model is trained through this task loss to obtain a trained small sample node classification model. The parameters Θ of the trained small sample node classification model are:
[0145]
[0146] Step 8: Input the test set into the trained small sample node classification model. For the meta-test task set T test For each meta-test task in the dataset, we calculate the representations of various global class prototypes through the representations and importance scores of the support set nodes, and use the Euclidean distance metric to measure the distance between the query set node representation and the representations of various global class prototypes to classify the query set nodes. The predicted category of the node is for:
[0147]
[0148] Where j is the node number, For nodes The predicted category.
[0149] In the Amazon_Clothing e-commerce network, the present invention can accurately classify nodes, specifically products, resulting in more accurate product recommendations for users. For example, if a user searches for products categorized as "monopods," a category rarely found in the original Amazon_Clothing dataset, the present invention can learn from the small number of products categorized as "monopods" and classify unlabeled products categorized as "monopods," thereby recommending these products to the user, achieving accurate recommendations.
[0150] The present invention has the advantages that:
[0151] Compared with the existing small-sample node classification methods in the attribute network field, this method combines the characteristics of the attribute network itself and the characteristics of the small-sample node classification task, and has the advantage of high classification accuracy.
[0152] Table 2 Comparison of experimental results of this method under different meta-learning task mode settings on the Amazon-Clothing dataset
[0153]
[0154] The effectiveness of this method uses classification accuracy as the evaluation indicator of classification results. The following is its definition:
[0155] Accuracy:
[0156]
[0157] Where True is the number of correctly classified nodes, False is the number of incorrectly classified nodes, and True+Fale is the number of nodes to be classified, which is n*q. A higher accuracy indicates a greater proportion of correctly classified nodes to the total number of nodes.
[0158] Table 3 and Figure 2 The figure shows the effectiveness of the various improved methods of the present invention. Under different meta-learning task mode settings on the Amazon-Clothing dataset, the comparison results show that the various improved methods proposed in the present invention can greatly improve the accuracy of small sample node classification in the attribute field.
[0159] Table 3 Detailed description of ablation experiments
[0160]
[0161] The invention proposes: 1) an auxiliary graph enhancement mechanism based on graph topology, 2) a graph encoder and graph evaluator based on a graph convolutional neural network, and 3) a cross-task global class prototype representation. It mainly solves the problem of low recommendation accuracy in the existing small-sample node classification method based on the attribute network. The present invention proposes to construct a graph data enhancement mechanism based on an auxiliary graph of a graph topology, and uses a graph encoder based on a graph convolutional neural network to perform dimensionality reduction processing on high-dimensional and sparse graph data. Compared with the previous prototype network model, the cross-task global class prototype representation and the graph evaluator based on a graph convolutional neural network proposed in the present invention can learn better class prototype representations, thereby improving the accuracy of node classification. The experimental results based on the Amazon-Clothing dataset show that the classification accuracy of the invention has been greatly improved compared with the previous small-sample node classification model.
Claims
1. A global prototype-based small sample node classification method based on auxiliary graph enhancement, characterized by: The following steps are involved: Obtain the data set to be analyzed; The dataset to be analyzed is analyzed using a trained small sample node classification model to predict node labels. The trained small sample node classification model is obtained through the following steps: Step 1: Based on the test set, obtain the original attribute graph and construct an auxiliary graph based on the graph topology structure. Step 2: Input the original attribute graph and the auxiliary graph into the graph encoder to obtain the graph node representations of the original attribute graph and the auxiliary graph respectively. Perform a weighted sum operation on the graph node representation matrices of the original attribute graph and the auxiliary graph to obtain the graph node representation after graph data enhancement. Step 3: Obtain the importance score of each node in the original attribute graph through the graph evaluator based on the graph convolutional network, and finally obtain the graph node importance score matrix. Then, use the node centrality score to obtain the adjusted node importance score; Step 5: Sample the training set for meta-learning tasks. Obtain the support set node representation and query set node representation for each meta-learning task using the graph node representation augmented with graph data. Use the support set node representation and the adjusted importance scores to calculate the class prototype representation for each category in the current task and update the global class prototype representation. Step 6: Measure the distance between the query set node representation in the meta-learning task and the updated global class prototype representation, predict the label of the query set node, and build a trained small-sample node classification model; The specific process of step 5 is as follows: 1) Set the global class prototype representation P across tasks global ; 2) In each meta-learning task sampled, the corresponding weight of each node representation is first calculated using the support set node importance score: Among them, Support c represents the set of nodes of category c in the support set, For node v i The importance score, β i For node v i corresponding weights; 3) Calculate the class prototype representation of each class based on the normalized weight of each node in the support set and the graph node representation after graph data enhancement: Among them, P c is the prototype representation of category c under the current task; 4) Update the global class prototype representation P global The specific update process is as follows: in, is the global class prototype representation of category c, and Mean() is the average pooling operation.
2. A global prototype-like small sample node classification method based on auxiliary graph enhancement according to claim 1, characterized in that: The specific construction process of the auxiliary graph is as follows: 1) For the original attribute graph, find the set of second-order neighbor nodes for each node; 2) For each node in the set of second-order neighbor nodes, add edges between the node and its second-order neighbor nodes to form an auxiliary graph; The edge weight calculation process is as follows: Among them, a i For node v i The vector corresponding to all edge weights of a j For node v i Neighbor node v j The vector corresponding to all edge weights of a ij For node v i and node v j The edge weight between sij The auxiliary graph G constructed s Midpoint v i and node v j The edge weights between .
3. The global prototype-like small sample node classification method based on auxiliary graph enhancement according to claim 1 is characterized in that: The graph encoder is constructed through the following process: 1) Construct a graph convolution layer. The calculation formula of the graph convolution layer is as follows: Among them, A is the adjacency matrix, I n is the identity matrix, is the normalized adjacency matrix, is a diagonal matrix, H l represents the graph node representation matrix obtained after the lth convolutional layer, and σ is the nonlinear activation function; 2) Based on the calculation results of the graph convolution of the graph convolution layer, the graph node after the graph encoder composed of two graph convolution layers is represented as follows: The nonlinear activation function used is the Relu function. The input matrix of the first layer is the original node attribute matrix X, whose dimension is N*D, where N represents the number of nodes in the attribute graph. The dimension of the graph node representation Z learned by the graph encoder is N*M, where D< <M。 4. The method for global prototype-like small sample node classification based on auxiliary graph enhancement according to claim 1, characterized in that: The specific process of step 2 is as follows: 1) Input the original attribute graph and the auxiliary graph into the graph encoder to obtain the graph node representations of the original attribute graph and the auxiliary graph respectively: Among them, Z o is the original attribute graph node representation obtained after encoding, Z s is the auxiliary graph node representation obtained after encoding, is the normalized adjacency matrix, A is the adjacency matrix of the original attribute graph, and A s is the adjacency matrix of the auxiliary graph, σ is the nonlinear activation function, X is the input matrix of the first layer, is the original node attribute matrix, and W 1 is the parameter of the first graph convolution layer, W 2 is the parameter of the second graph convolutional layer; 2) a weighted sum operation is performed on the graph node representation matrix of the original attribute graph and the auxiliary graph to obtain the graph node representation Z after graph data enhancement: Z=(1-α)*Z o +α*Z s Here, α is a hyperparameter.
5. The method for global prototype-like small sample node classification based on auxiliary graph enhancement according to claim 1, characterized in that: The graph evaluator based on graph convolutional network is constructed through the following process: 1) Construct a graph evaluator consisting of two graph convolutional layers and one fully connected layer, and use the node attribute information and graph topology information of the original attribute graph to obtain the importance score matrix of the graph nodes: 2) Use the node degree to evaluate the node centrality and obtain the node centrality score: c i =log(deg(v i )) Among them, deg(v i ) represents node v i degree, c i Represents node v i The centrality score of 3) According to the importance score matrix of the graph nodes, the importance scores of the nodes are adjusted using the centrality scores of the nodes to obtain the adjusted node importance scores.
6. A global prototype-like small sample node classification method based on auxiliary graph enhancement according to claim 5, characterized in that: Importance score matrix of graph nodes: Among them, Linear is the fully connected layer, A is the adjacency matrix of the original attribute graph, is the normalized adjacency matrix, X is the input matrix of the first layer, W is the original node attribute matrix, 1 is the parameter of the first graph convolution layer, W 2 are the parameters of the second graph convolutional layer; Adjusted node importance scores: Among them, s i is the vector of the i-th row in the importance score matrix S of the graph nodes.
7. The method for global prototype-like small sample node classification based on auxiliary graph enhancement according to claim 1, characterized in that: The meta-learning task sampling process is as follows: 1) For the training set, randomly select n categories, and randomly select k+q nodes from each category, where k nodes are used as support set nodes and q nodes are used as query set nodes; Cycle the sampling process Q times to obtain the meta-training task set T train ; 2) For the test set, obtain the meta-test task set T test .
8. The method for global prototype-like small sample node classification based on auxiliary graph enhancement according to claim 1, characterized in that: The specific process of predicting the labels of query set nodes is as follows: 1) Measure the Euclidean distance between the query set nodes and the global class prototype representation of each class in the current task, and calculate the probability of node label prediction; 2) Take the category corresponding to the maximum probability as the predicted label of the node; 3) During the training phase, the loss of the current task is the average negative log-likelihood probability L of the correct classification: Where n is the number of categories, k is the number of support set nodes in the meta-learning task, i is the node number, Predict probabilities for node labels.
9. The method for global prototype-like small sample node classification based on auxiliary graph enhancement according to claim 8, characterized in that: The probability of node label prediction is calculated as follows: Among them, d() is the Euclidean distance metric function, is the query set node representation, Predict probabilities for node labels; is the global class prototype representation of category c; The average negative log-likelihood probability L of correct classification is calculated as follows: Where n is the number of categories, k is the number of support set nodes in the meta-learning task, and i is the node index.
Citation Information
Patent Citations
Automatic driving environment perception-oriented small sample in-loop learning system and method
CN110070139A
Small sample image classification method based on improved prototype network
CN114742127A