CN116342958A - Global class prototype small sample node classification method based on auxiliary graph enhancement - Google Patents

Global class prototype small sample node classification method based on auxiliary graph enhancement Download PDF

Info

Publication number
CN116342958A
CN116342958A CN202310329482.4A CN202310329482A CN116342958A CN 116342958 A CN116342958 A CN 116342958A CN 202310329482 A CN202310329482 A CN 202310329482A CN 116342958 A CN116342958 A CN 116342958A
Authority
CN
China
Prior art keywords
node
graph
nodes
representation
auxiliary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310329482.4A
Other languages
Chinese (zh)
Inventor
王晨旭
邓鑫婕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN202310329482.4A priority Critical patent/CN116342958A/en
Publication of CN116342958A publication Critical patent/CN116342958A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/42Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a global class prototype small sample node classification method based on auxiliary graph enhancement, which is used for acquiring a data set to be analyzed; analyzing the data set to be analyzed through a trained small sample node classification model to realize the label of the prediction node; the trained small sample node classification model is obtained through the following steps: according to the test set, obtaining graph node representations of the original attribute graph and the auxiliary graph, which are input into a graph encoder, and obtaining the graph node representations after the graph data enhancement, and obtaining the adjusted node importance scores; performing meta learning task sampling on the training set; calculating class prototype representations of all classes under the current task by using the support set node representations and the importance scores, and updating the global class prototype representations; and the distance between the query set node representation and the updated global class prototype representation is calculated, and the label of the query set node is predicted, so that the aim of classification is fulfilled. The method has better node classification performance and realizes accurate recommendation.

Description

Global class prototype small sample node classification method based on auxiliary graph enhancement
Technical Field
The invention relates to the field of attribute map node classification, in particular to a global class prototype small sample node classification method based on auxiliary map enhancement.
Background
Existing deep learning algorithms mostly rely on a large number of supervised samples to achieve good performance, but when the data set is small, its performance tends to be hindered. In real world property networks, only a small number of nodes are included in most categories. Because of the characteristics of irregular data, large noise and complex relationships among nodes of the attribute network, the research of the small sample node classification method on the attribute network is a difficult challenge faced by researchers. Combining the meta-learning framework with the graph neural network has become a mainstream trend in developing a small sample node classification method study on the attribute graph. The meta-learning framework is a framework specially set for the small sample task scene, and the meta-learning task division is used for adapting to the characteristic that the supervision samples in the small sample learning task scene are less. The graph neural network is a graph representation learning technology, and graph representation is learned by comprehensively utilizing attribute information of graph nodes and topology structure information of the graph.
The performance of existing deep learning models relies on large amounts of supervised data, whereas most classes in real world attribute networks contain only a limited number of labeled examples. Therefore, when the number of marked samples in the data set is limited, the existing node classification model is utilized for model training, and the model can face serious overfitting problem. Furthermore, the cost of labeling unknown instances is very high, and classification is difficult due to the lack of knowledge of the class that contains less supervisory information.
Disclosure of Invention
In order to overcome the problems in the prior art, the invention aims to provide a global class prototype small sample node classification method based on auxiliary graph enhancement.
In order to achieve the above purpose, the invention adopts the following technical scheme:
a global class prototype small sample node classification method based on auxiliary graph enhancement comprises the following steps:
acquiring a data set to be analyzed;
analyzing the data set to be analyzed through a trained small sample node classification model to realize the label of the prediction node; the trained small sample node classification model is obtained through the following steps:
step 1: obtaining an original attribute diagram according to the test set, and constructing an auxiliary diagram based on a diagram topological structure on the basis of the original attribute diagram;
step 2: inputting the original attribute graph and the auxiliary graph into a graph encoder to respectively obtain graph node representations of the original attribute graph and the auxiliary graph, and carrying out weighted summation operation on graph node representation matrixes of the original attribute graph and the auxiliary graph to obtain graph node representations after the graph data enhancement;
step 3: obtaining importance scores of all nodes in an original attribute graph through a graph evaluator based on a graph convolution network, finally obtaining a graph node importance score matrix, and obtaining an adjusted node importance score by utilizing the center score of the nodes;
step 5: the training set is sampled by meta learning tasks, support set node representation and query set node representation in each meta learning task are obtained through graph node representation after graph data enhancement, class prototype representation of each class under the current task is calculated by using the support set node representation and the importance scores after adjustment, and global class prototype representation is updated;
step 6: and measuring the distance between the query set node representation and the updated global class prototype representation in the meta-learning task, predicting the label of the query set node, and establishing a trained small sample node classification model.
Further, the specific construction process of the auxiliary graph is as follows:
1) Aiming at the original attribute graph, solving a second-order neighbor node set of each node;
2) For each node in the second-order neighbor node set, adding an edge between the node and the second-order neighbor node to form an auxiliary graph;
the edge weight calculation process is as follows:
Figure BDA0004154430670000021
wherein a is i For node v i A) corresponding to all edge weights of the block j For node v i Is a neighbor node v of (1) j A) corresponding to all edge weights of the block ij For node v i And node v j The edge weight of the edge between the two,
Figure BDA0004154430670000031
to build auxiliary graph G s Middle node v i And node v j Edge weights in between.
Further, the graph encoder is constructed by:
1) The graph convolution layer is constructed, and the calculation formula of graph convolution of the graph convolution layer is as follows:
Figure BDA0004154430670000032
Figure BDA0004154430670000033
Figure BDA0004154430670000034
wherein A is an adjacent matrix, I n Is a matrix of units which is a matrix of units,
Figure BDA0004154430670000035
for the normalized adjacency matrix, +.>
Figure BDA0004154430670000036
Is a diagonal matrix, H l Representing a graph node representation matrix obtained after passing through the first convolution layer, wherein sigma is a nonlinear activation function;
2) From the calculation result of the graph convolution layer, the graph nodes passing through the graph encoder constituted by two graph convolution layers are represented as follows:
Figure BDA0004154430670000037
the nonlinear activation function is a Relu function, the input matrix of the first layer is an original node attribute matrix X, the dimension is N X D, N represents the number of nodes in the attribute graph, the dimension of the graph node Z learned by the graph encoder is N X M, and D < M.
Further, the specific process of step 2 is as follows:
1) Inputting the original attribute graph and the auxiliary graph into a graph encoder to obtain graph node representations of the original attribute graph and the auxiliary graph respectively:
Figure BDA0004154430670000038
Figure BDA0004154430670000039
wherein Z is o For the node representation of the original attribute map obtained after coding, Z s For the node representation of the auxiliary graph obtained after coding, A is the adjacency matrix of the original attribute graph, A s For the adjacency matrix of the auxiliary graph, sigma is a nonlinear activation function, X is the input matrix of the first layer and is the original node attribute matrix, W 1 For the parameters of the first picture volume layer, W 2
Parameters for the second graph convolutional layer; 2) And carrying out weighted summation operation on the graph node representation matrix of the original attribute graph and the auxiliary graph to obtain a graph node representation Z after the graph data enhancement:
Z=(1-α)*Z o +α*Z s
where α is a hyper-parameter.
Further, a graph evaluator based on a graph rolling network is constructed by the following process:
1) Constructing a graph evaluator consisting of two graph convolution layers and a full connection layer, and acquiring an importance score matrix of the graph nodes by utilizing node attribute information and graph topological structure information of an original attribute graph:
2) Evaluating the centrality of the node by using the degree of the node to obtain the centrality score of the node:
c i =log(deg(v i ))
wherein deg (v) i ) Representing node v i Degree of (c) i Representing node v i Center fraction of (c);
3) According to the importance score matrix of the graph nodes, the importance scores of the nodes are adjusted by using the center scores of the nodes, and the adjusted importance scores of the nodes are obtained.
Further, the importance score matrix of the graph node:
Figure BDA0004154430670000041
wherein, linear is the full connection layer, A is the adjacent matrix of the original attribute graph, X is the input matrix of the first layer is the original node attribute matrix, W 1 For the parameters of the first picture volume layer, W 2 Parameters for the second graph convolutional layer;
center score of node:
c i =log(deg(v i ))
wherein deg (v) i ) Representing node v i Degree of (c) i Representing node v i Center fraction of (c);
center score of node:
c i =log(deg(v i ))
wherein deg (v) i ) Representing node v i Degree of (c) i Representing node v i Center fraction of (c);
the adjusted node importance score:
Figure BDA0004154430670000042
wherein s is i Is the vector of the ith row in the importance score matrix S of the graph node.
Further, the meta learning task sampling process is as follows:
1) For a training set, randomly extracting n categories, and randomly extracting k+q nodes under each category, wherein k nodes are used as support set nodes, and q nodes are used as query set nodes; the Q times of the cyclic sampling process are carried out to obtain a meta-training task set T train
2) For the test set, a meta-test task set T is obtained test
Further, the specific process of step 5 is as follows:
1) Setting a cross-task global class prototype representation P global
2) In each meta-learning task of meta-learning task sampling, corresponding weights are first calculated for each node representation by supporting set node importance scores:
Figure BDA0004154430670000051
wherein, support c Representing a set of nodes of category c in the support set,
Figure BDA0004154430670000052
for node v i Importance score, beta i For node v i Corresponding weights;
3) Calculating various class prototype representations according to the normalized weight of each node of the support set and the graph node representation enhanced by the graph data:
Figure BDA0004154430670000053
wherein P is c A class prototype representation of class c under the current task;
4) Updating global classesPrototype representation P global The specific updating process is as follows:
Figure BDA0004154430670000054
wherein,,
Figure BDA0004154430670000055
for the global class prototype representation of class c, mean () is an average pooling operation.
Further, the specific process of predicting the labels of the nodes of the query set is as follows:
1) Measuring Euclidean distance between query set nodes and various global class prototype representations in the current task, and calculating probability of node label prediction;
2) Taking the category corresponding to the maximum probability value as a predictive label of the node;
3) In the training phase, the loss of the current task is the average negative log likelihood probability L of correct classification:
Figure BDA0004154430670000061
wherein n is the number of categories, k is the number of support set nodes in the meta-learning task, and i is the node sequence number.
Further, the probability of node label prediction is calculated by:
Figure BDA0004154430670000062
where d () is the Euclidean distance metric function,
Figure BDA0004154430670000063
for the query set node representation, +.>
Figure BDA0004154430670000064
Predicting probability for the node label;
the average negative log likelihood probability L of correct classification is calculated by:
Figure BDA0004154430670000065
wherein n is the number of categories, k is the number of support set nodes in the meta-learning task, and i is the node sequence number.
Compared with the prior art, the invention has the following beneficial effects:
in order to classify the nodes of unknown labels in the scene, the invention constructs a global prototype small sample node classification method based on auxiliary graph enhancement by combining a meta learning framework with a graph neural network. The node classification steps of the model are mainly as follows: firstly, constructing an auxiliary graph through topological mechanism information of the graph, and inputting an original attribute graph and the auxiliary graph into a graph encoder based on a graph convolution neural network to obtain a low-dimensional graph node representation, so that the purpose of reducing the dimension of high-dimensional sparse graph data is achieved. And meanwhile, inputting the original attribute graph into a graph evaluator based on a graph convolution neural network to evaluate the importance of the nodes. And then, performing meta-learning task sampling according to a meta-learning framework, and in each meta-learning task, carrying out weighted summation on importance scores of support set nodes and node representations to obtain various prototype representations, measuring Euclidean distances between the prototype representations and query set node representations under the current task, wherein a label corresponding to the minimum distance value is a prediction label of the query set node. The method can be suitable for small sample node classification tasks of large-scale high-dimensional sparse attribute network data. Compared with the existing small sample node classification method in the attribute network field, the method can capture information of more nodes in the same category, and therefore has the characteristic of high classification accuracy. The method and the device can classify the unknown marker nodes only under the category containing a small amount of supervision information, realize quick model deployment and realize accurate recommendation.
Further, in an e-commerce network, a node is generally formed by products, if the same user looks at different products, an edge is formed between the different products, and the category of the product is the category of the node, thereby forming an attribute map. In such networks, most of the classes only contain a small number of marked nodes, and the invention can use the small number of marked nodes to enable the model to learn the information of the class and classify the unknown marked nodes of the class, namely, the products. The accurate classification of the products can accurately recommend the products to the user when recommending the products.
Drawings
Fig. 1 is a framework diagram of a song multi-label recommendation method based on an improved collaborative filtering algorithm.
Fig. 2 is a comparison graph of ablation experiments at different meta-learning task mode settings.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings.
The invention provides a global prototype-like small sample node classification method based on auxiliary graph enhancement, wherein an attribute graph is high-dimensional sparse data, and the relationship between graph nodes is complex, so that an auxiliary graph is constructed by utilizing topological structure information of the graph based on nearest neighbor ideas. To obtain a graph node representation with high expressive power, the graph node representation is learned by introducing a graph encoder based on a graph convolutional neural network into the model. Meanwhile, a graph encoder based on a graph convolution neural network is constructed to learn the importance scores of the graph nodes, so that better class prototype representation can be conveniently learned in a meta-learning task. And then, performing meta learning task sampling by adopting a meta learning framework, and respectively obtaining a plurality of meta training tasks and meta testing tasks aiming at the training set and the testing set so as to adapt to the small sample node classification task scene. Setting cross-task class prototype representation so as to acquire information of more similar nodes in different meta-learning tasks. In each meta-learning task, the importance scores of the support set nodes and the representations of the support set nodes are utilized to acquire various class prototype representations under the current task, and the global class prototype representations are updated. The aim of classifying the query set nodes is achieved by measuring Euclidean distances between the query set nodes and various prototype representations in the current task. Compared with the existing small sample node classification model in the attribute network field, the method enhances the graph data by constructing the auxiliary graph, so that the encoder learns the graph node representation with stronger expression capability. While a better prototype-like representation is learned by the graph evaluator. And the global class prototype setting of the cross-task enables the model to learn more information of each class, so that the accuracy of node classification is improved.
Table 1 presents the basic information of the data set used in the present invention. Amazon-closing is an e-commerce network consisting of Clothing, shoes and jewelry products in an Amazon platform. In the dataset, each product is considered a node, and the product description constitutes attribute information of the node. If the same user looks at different products, edges are formed between the different products. Referring to table 1, this dataset contains 24919 nodes, 91680 edges, and the product is divided into 77 classes, with node attribute dimension of 9034 dimensions.
Table 1 data set summary information table
Figure BDA0004154430670000081
FIG. 1 is a flowchart of the method, referring to FIG. 1, for a small sample node classification task under the Amazon-cloning dataset, the specific flow mainly comprises the following steps:
step 1: for Amazon-cloning dataset, the ratio of class numbers is first 40: the whole data set is divided into a training set and a test set 20. And respectively performing meta learning task sampling aiming at the training set and the testing set, wherein the task sampling process is as follows: (taking the 5-way 3-shot task as an example)
1) For the training set, n classes are randomly extracted, and k+q nodes are randomly extracted under each class, wherein k nodes are used as support set nodes, and q nodes are used as query set nodes. The Q times of the cyclic sampling process are carried out to obtain a meta-training task set T train . In the 5-way 3-shot task, n=5, k=3.
2) For the test set, the meta-test task set T is obtained by adopting the same task sampling method as in the step 1) test
Step 2: for the Amazon-closing dataset, nodes are formed by products, product descriptions form node attribute features, and if the same user looks at different products, edges are constructed between nodes represented by the products, thereby obtaining an original attribute map formed by the Amazon-closing dataset. Constructing an auxiliary graph G based on a graph topology structure on the basis of an original attribute graph s The specific construction process of the auxiliary graph is as follows:
1) Aiming at the original attribute graph, solving a second-order neighbor node set neighbor of each node;
2) For each node, adding an edge between the node and a second-order neighbor node, and calculating the edge weight as follows:
Figure BDA0004154430670000091
wherein a is i For node v i A) corresponding to all edge weights of the block j For node v i Is a neighbor node v of (1) j A) corresponding to all edge weights of the block ij For node v i And node v j The edge weight of the edge between the two,
Figure BDA0004154430670000092
to build auxiliary graph G s Middle node v i And node v j Edge weights in between.
Step 3: a low-dimensional graph node representation of the original attribute graph and the auxiliary graph is obtained by constructing a graph encoder based on a graph convolutional neural network. And (3) comprehensively utilizing the attribute information of the nodes and the topological structure information of the graph, reducing the original attribute graph node representation of which the original dimension is N x D to N x M dimension, wherein for Amazon-cloning data set, N=24919, D=9034 and M=16. The specific process of the dimension reduction operation is as follows:
1) The graph convolution layer is constructed, and the calculation formula of the graph convolution is as follows:
Figure BDA0004154430670000093
Figure BDA0004154430670000094
Figure BDA0004154430670000095
wherein A is an adjacent matrix, I n Is a matrix of units which is a matrix of units,
Figure BDA0004154430670000096
for the normalized adjacency matrix, +.>
Figure BDA0004154430670000097
Is a diagonal matrix, each element in the matrix is the degree of the node added from the ring edge in the graph, and the degree calculation formula of each node is +.>
Figure BDA0004154430670000098
H l Representing the graph nodes obtained after passing through the first convolution layer represents a matrix, σ, which is a nonlinear activation function.
2) The graph nodes passing through the graph encoder composed of two graph roll layers are represented as follows:
Figure BDA0004154430670000099
wherein,,
Figure BDA00041544306700000910
for the normalized adjacency matrix, +.>
Figure BDA00041544306700000911
Is a diagonal matrix, H l Representing a graph node representation matrix obtained after passing through the first convolution layer, wherein sigma is a nonlinear activation function; w (W) 1 For the parameters of the first picture volume layer, W 2 Parameters for the second graph convolutional layer; by usingIs a Relu function, and a specific calculation formula is Relu (x) =max0, x). The input matrix of the first layer is an original node attribute matrix X, the dimension of the input matrix is N X D, N represents the number of nodes in an attribute graph, the dimension of a graph node representation Z learned by a graph encoder is N X M, and the size relationship between D and M is D < M. For Amazon-closing dataset, the original node attribute matrix X is 24919X 9034, and the dimension of the graph node representation matrix Z obtained after passing through the graph encoder is 24919X 16.
Step 4: the original attribute graph and the auxiliary graph are input into a graph encoder to respectively obtain graph node representations of the two graphs, weighted summation operation is carried out through the two graph node representation matrixes, and graph node representations after graph data enhancement are obtained, wherein the specific calculation process is as follows:
1) Obtaining graph node representations of the original attribute graph and the auxiliary graph, respectively:
Figure BDA0004154430670000101
Figure BDA0004154430670000102
wherein Z is o For the node representation of the original attribute map obtained after coding, Z s For the node representation of the auxiliary graph obtained after coding, A is the adjacency matrix of the original attribute graph, A s To assist in the adjacency matrix of the graph, both dimensions are 24919 x 24919.
2) A weighted summation operation is performed on both graph node representations to obtain a final graph node representation.
Z=(1-α)*Z o +α*Z s
Where alpha super parameter is the value of 0.25 in the model setup of the method.
Step 5: and obtaining importance scores of all nodes in the original attribute graph by constructing a graph evaluator based on a graph convolution network, and finally obtaining an N1 graph node importance score matrix S. For the Amazon-closing dataset, the dimension of S is 24919 x 1. The specific construction process of the graph evaluator is as follows:
1) Constructing a graph evaluator consisting of two graph convolution layers and a full connection layer, comprehensively utilizing node attribute information and graph topological structure information of an original attribute graph to obtain an importance score matrix S of graph nodes, wherein the specific calculation process is as follows:
Figure BDA0004154430670000103
and the Linear is a full-connection layer, and the node importance score matrix S of the N1-dimensional graph is obtained after the full-connection layer is mapped.
2) The centrality of the node is evaluated by using the degree of the node, and the centrality score of the node is calculated as follows:
c i =log(deg(v i ))
wherein deg (v) i ) Representing node v i Degree of (c) i Representing node v i Center fraction of (c).
3) The importance scores of the nodes are adjusted by using the center scores of the nodes, and the adjusted importance scores of the nodes are as follows:
Figure BDA0004154430670000111
step 6: a global class prototype representation is set across tasks. For each meta-learning task, calculating a class prototype representation of each class under the current task by using the support set node representation and the importance score, and updating the global class prototype representation, wherein the specific process is as follows:
1) Setting a cross-task global class prototype representation P global
2) In each meta-learning task, the corresponding weights of the node representations are first calculated by supporting set node importance scores:
Figure BDA0004154430670000112
Support c representing a set of nodes of category c in the support set,
Figure BDA0004154430670000113
for node v i Importance score, beta i For node v i Corresponding to the weights.
3) Calculating class prototype representations of various classes according to the normalized weights of the nodes in the support set and the representations of the nodes:
Figure BDA0004154430670000114
wherein P is c A class prototype representation of class c under the current task.
4) Updating global class prototype representations P global The specific updating process is as follows:
Figure BDA0004154430670000115
wherein,,
Figure BDA0004154430670000116
for the global class prototype representation of class c, mean () is an average pooling operation.
Step 7: in the meta-learning task, the distance between the node representation of the query set and the global class prototype representation is measured by utilizing Euclidean distance, the label of the node of the query set is predicted, and the establishment of the small sample node classification model is completed, wherein the specific process is as follows:
1) The Euclidean distance between the query set node and each prototype representation in the current task is measured, and the probability of node label prediction is calculated:
Figure BDA0004154430670000121
where d () is the Euclidean distance metric function,
Figure BDA0004154430670000122
for the query set node representation, +.>
Figure BDA0004154430670000123
The probability is predicted for the node label.
2) Predictive label y taking category corresponding to probability maximum as node predict
3) In the training phase, the loss of the current task is the average negative log likelihood probability that the classification is correct:
Figure BDA0004154430670000124
4) Training a small sample node classification model through the task loss to obtain a trained small sample node classification model, wherein finally, the trained model small sample node classification model parameters theta are as follows:
Figure BDA0004154430670000125
step 8: inputting the test set into a trained small sample node classification model, and for a meta-test task set T test Each meta-test task in the model is used for calculating various global class prototype representations through the representation of support set nodes and importance scores, and classifying the query set nodes by utilizing the distance between the Euclidean distance metric query set node representations and various global class prototype representations as the query set nodes, wherein the prediction types of the nodes are as follows
Figure BDA0004154430670000126
The method comprises the following steps:
Figure BDA0004154430670000127
wherein j is the sequence number of the node,
Figure BDA0004154430670000128
for node->
Figure BDA0004154430670000129
Is included in the prediction category of (a).
In the Amazon_cloning e-commerce network, the method and the system can accurately classify the nodes, namely accurately classify the products, so that the method and the system are more accurate when recommending the products to the users. For example, if a user searches for a product with a monopod category that rarely appears in the original amazon_listing dataset, the present invention learns from a small number of products with monopod categories and sorts the products that are monopod categories but not marked, thereby recommending the product to the user for accurate recommendation purposes.
The invention has the advantages that:
compared with the existing small sample node classification method in the attribute network field, the method integrates the characteristics of the attribute network and the characteristics of the small sample node classification task, and has the advantage of high classification accuracy.
TABLE 2 comparison of experimental results for the present method under different meta-learning task mode settings on Amazon-cloning dataset
Figure BDA0004154430670000131
The effect evaluation of the method uses the classification Accuracy Accuracy as an evaluation index of a classification result, and the following is defined:
accuracy:
Figure BDA0004154430670000132
wherein True is the number of nodes with correct classification, false is the number of nodes with incorrect classification, true+false is the number of nodes to be classified, and the value of true+false is n×q. The higher the Accuracy Accuracy, the greater the proportion of nodes with correct classification to the total node number.
Table 3 and fig. 2 show that in order to verify whether the improved methods of the present invention are effective, the comparison results demonstrate that the improved methods of the present invention can all improve the accuracy of classification of small sample nodes in the attribute field very well under different meta-learning task mode settings on Amazon-cloning data sets.
Table 3 ablation experiment detailed description information
Figure BDA0004154430670000141
In the invention, it is proposed that: 1) auxiliary graph enhancement mechanism based on graph topology, 2) graph encoder and graph evaluator based on graph convolutional neural network, 3) global class prototype representation across tasks. The method mainly solves the problem of low recommendation accuracy in the existing small sample node classification method based on the attribute network. The invention provides a graph data enhancement mechanism for constructing an auxiliary graph based on a graph topological structure, and a graph encoder based on a graph convolution neural network is utilized to perform dimension reduction processing on high-dimensional sparse graph data. Compared with the prior prototype network model, the cross-task global class prototype representation and the graph evaluator based on the graph convolution neural network provided by the invention can learn better class prototype representation, thereby improving the accuracy of node classification. Experimental results based on Amazon-cloning data sets show that the classification accuracy of the method is greatly improved compared with that of the previous small sample node classification model.

Claims (10)

1. The global class prototype small sample node classification method based on auxiliary graph enhancement is characterized by comprising the following steps of:
acquiring a data set to be analyzed;
analyzing the data set to be analyzed through a trained small sample node classification model to realize the label of the prediction node; the trained small sample node classification model is obtained through the following steps:
step 1: obtaining an original attribute diagram according to the test set, and constructing an auxiliary diagram based on a diagram topological structure on the basis of the original attribute diagram;
step 2: inputting the original attribute graph and the auxiliary graph into a graph encoder to respectively obtain graph node representations of the original attribute graph and the auxiliary graph, and carrying out weighted summation operation on graph node representation matrixes of the original attribute graph and the auxiliary graph to obtain graph node representations after the graph data enhancement;
step 3: obtaining importance scores of all nodes in an original attribute graph through a graph evaluator based on a graph convolution network, finally obtaining a graph node importance score matrix, and obtaining an adjusted node importance score by utilizing the center score of the nodes;
step 5: the training set is sampled by meta learning tasks, support set node representation and query set node representation in each meta learning task are obtained through graph node representation after graph data enhancement, class prototype representation of each class under the current task is calculated by using the support set node representation and the importance scores after adjustment, and global class prototype representation is updated;
step 6: and measuring the distance between the query set node representation and the updated global class prototype representation in the meta-learning task, predicting the label of the query set node, and establishing a trained small sample node classification model.
2. The global class prototype small sample node classification method based on auxiliary graph enhancement as claimed in claim 1, wherein the specific construction process of the auxiliary graph is as follows:
1) Aiming at the original attribute graph, solving a second-order neighbor node set of each node;
2) For each node in the second-order neighbor node set, adding an edge between the node and the second-order neighbor node to form an auxiliary graph;
the edge weight calculation process is as follows:
Figure FDA0004154430660000011
wherein a is i For node v i A) corresponding to all edge weights of the block j For node v i Is a neighbor node v of (1) j All edge weight pairs of (2)Vectors of the response, a ij For node v i And node v j The edge weight of the edge between the two,
Figure FDA0004154430660000021
to build auxiliary graph G s Middle node v i And node v j Edge weights in between.
3. The global class prototype small sample node classification method based on auxiliary graph enhancement as claimed in claim 1, wherein the graph encoder is constructed by:
1) The graph convolution layer is constructed, and the calculation formula of graph convolution of the graph convolution layer is as follows:
Figure FDA0004154430660000022
Figure FDA0004154430660000023
Figure FDA0004154430660000024
wherein A is an adjacent matrix, I n Is a matrix of units which is a matrix of units,
Figure FDA0004154430660000025
for the normalized adjacency matrix, +.>
Figure FDA0004154430660000026
Is a diagonal matrix, H l Representing a graph node representation matrix obtained after passing through the first convolution layer, wherein sigma is a nonlinear activation function;
2) From the calculation result of the graph convolution layer, the graph nodes passing through the graph encoder constituted by two graph convolution layers are represented as follows:
Figure FDA0004154430660000027
the nonlinear activation function is a Relu function, the input matrix of the first layer is an original node attribute matrix X, the dimension is N X D, N represents the number of nodes in the attribute graph, the dimension of the graph node Z learned by the graph encoder is N X M, and D < M.
4. The global class prototype small sample node classification method based on auxiliary graph enhancement according to claim 1, wherein the specific process of step 2 is as follows:
1) Inputting the original attribute graph and the auxiliary graph into a graph encoder to obtain graph node representations of the original attribute graph and the auxiliary graph respectively:
Figure FDA0004154430660000028
Figure FDA0004154430660000029
wherein Z is o For the node representation of the original attribute map obtained after coding, Z s For the node representation of the auxiliary graph obtained after coding, A is the adjacency matrix of the original attribute graph, A s For the adjacency matrix of the auxiliary graph, sigma is a nonlinear activation function, X is the input matrix of the first layer and is the original node attribute matrix, W 1 For the parameters of the first picture volume layer, W 2 Parameters for the second graph convolutional layer; 2) And carrying out weighted summation operation on the graph node representation matrix of the original attribute graph and the auxiliary graph to obtain a graph node representation Z after the graph data enhancement:
Z=(1α)*Z o +α*Z s
where α is a hyper-parameter.
5. The global class prototype small sample node classification method based on auxiliary graph enhancement according to claim 1, wherein the graph evaluator based on graph convolutional network is constructed by the following process:
1) Constructing a graph evaluator consisting of two graph convolution layers and a full connection layer, and acquiring an importance score matrix of the graph nodes by utilizing node attribute information and graph topological structure information of an original attribute graph:
2) Evaluating the centrality of the node by using the degree of the node to obtain the centrality score of the node:
c i =log(deg(v i ))
wherein deg (v) i ) Representing node v i Degree of (c) i Representing node v i Center fraction of (c);
3) According to the importance score matrix of the graph nodes, the importance scores of the nodes are adjusted by using the center scores of the nodes, and the adjusted importance scores of the nodes are obtained.
6. The global class prototype small sample node classification method based on auxiliary graph enhancement of claim 5, wherein the importance score matrix of the graph nodes:
Figure FDA0004154430660000031
wherein, linear is the full connection layer, A is the adjacent matrix of the original attribute graph, X is the input matrix of the first layer is the original node attribute matrix, W 1 For the parameters of the first picture volume layer, W 2 Parameters for the second graph convolutional layer;
center score of node:
c i =log(deg(v i ))
wherein deg (v) i ) Representing node v i Degree of (c) i Representing node v i Center fraction of (c);
center score of node:
c i =log(deg(v i ))
wherein deg (v) i ) Representing node v i Degree of (c) i Representing node v i Center fraction of (c);
the adjusted node importance score:
Figure FDA0004154430660000041
wherein s is i Is the vector of the ith row in the importance score matrix S of the graph node.
7. The global class prototype small sample node classification method based on auxiliary graph enhancement as claimed in claim 1, wherein the meta-learning task sampling process is as follows:
1) For a training set, randomly extracting n categories, and randomly extracting k+q nodes under each category, wherein k nodes are used as support set nodes, and q nodes are used as query set nodes; the Q times of the cyclic sampling process are carried out to obtain a meta-training task set T train
2) For the test set, a meta-test task set T is obtained test
8. The global class prototype small sample node classification method based on auxiliary graph enhancement as claimed in claim 1, wherein the specific process of step 5 is as follows:
1) Setting a cross-task global class prototype representation P global
2) In each meta-learning task of meta-learning task sampling, corresponding weights are first calculated for each node representation by supporting set node importance scores:
Figure FDA0004154430660000042
wherein, support c Representing a set of nodes of category c in the support set,
Figure FDA0004154430660000043
for node v i Importance score, beta i For node v i Corresponding weights;
3) Calculating various class prototype representations according to the normalized weight of each node of the support set and the graph node representation enhanced by the graph data:
Figure FDA0004154430660000051
wherein P is c A class prototype representation of class c under the current task;
4) Updating global class prototype representations P global The specific updating process is as follows:
Figure FDA0004154430660000052
wherein,,
Figure FDA0004154430660000053
for the global class prototype representation of class c, mean () is an average pooling operation.
9. The global class prototype small sample node classification method based on auxiliary graph enhancement according to claim 1, wherein the specific process of predicting the label of the query set node is as follows:
1) Measuring Euclidean distance between query set nodes and various global class prototype representations in the current task, and calculating probability of node label prediction;
2) Taking the category corresponding to the maximum probability value as a predictive label of the node;
3) In the training phase, the loss of the current task is the average negative log likelihood probability L of correct classification:
Figure FDA0004154430660000054
wherein n is the number of categories, k is the number of support set nodes in the meta-learning task, and i is the node sequence number.
10. The global class prototype small sample node classification method based on auxiliary graph enhancement according to claim 9, wherein the probability of node label prediction is calculated by:
Figure FDA0004154430660000055
where d () is the Euclidean distance metric function,
Figure FDA0004154430660000056
for the query set node representation, +.>
Figure FDA0004154430660000057
Predicting probability for the node label;
the average negative log likelihood probability L of correct classification is calculated by:
Figure FDA0004154430660000058
wherein n is the number of categories, k is the number of support set nodes in the meta-learning task, and i is the node sequence number.
CN202310329482.4A 2023-03-30 2023-03-30 Global class prototype small sample node classification method based on auxiliary graph enhancement Pending CN116342958A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310329482.4A CN116342958A (en) 2023-03-30 2023-03-30 Global class prototype small sample node classification method based on auxiliary graph enhancement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310329482.4A CN116342958A (en) 2023-03-30 2023-03-30 Global class prototype small sample node classification method based on auxiliary graph enhancement

Publications (1)

Publication Number Publication Date
CN116342958A true CN116342958A (en) 2023-06-27

Family

ID=86877072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310329482.4A Pending CN116342958A (en) 2023-03-30 2023-03-30 Global class prototype small sample node classification method based on auxiliary graph enhancement

Country Status (1)

Country Link
CN (1) CN116342958A (en)

Similar Documents

Publication Publication Date Title
CN111950594A (en) Unsupervised graph representation learning method and unsupervised graph representation learning device on large-scale attribute graph based on sub-graph sampling
CN115269357B (en) Micro-service abnormity detection method based on call chain
CN111881342A (en) Recommendation method based on graph twin network
Ding et al. Where to prune: Using LSTM to guide data-dependent soft pruning
CN113065974B (en) Link prediction method based on dynamic network representation learning
CN112381179A (en) Heterogeneous graph classification method based on double-layer attention mechanism
CN112686376A (en) Node representation method based on timing diagram neural network and incremental learning method
CN109754122A (en) A kind of Numerical Predicting Method of the BP neural network based on random forest feature extraction
Chen et al. Generative dynamic link prediction
CN111949885A (en) Personalized recommendation method for scenic spots
CN106407379A (en) Hadoop platform based movie recommendation method
CN114897085A (en) Clustering method based on closed subgraph link prediction and computer equipment
CN117156442A (en) Cloud data security protection method and system based on 5G network
CN114679372A (en) Node similarity-based attention network link prediction method
CN113159976B (en) Identification method for important users of microblog network
CN116342958A (en) Global class prototype small sample node classification method based on auxiliary graph enhancement
CN115456093A (en) High-performance graph clustering method based on attention-graph neural network
CN115526293A (en) Knowledge graph reasoning method considering semantic and structural information
CN114997378A (en) Inductive graph neural network pruning method, system, device and storage medium
Berton et al. The Impact of Network Sampling on Relational Classification.
CN115019342A (en) Endangered animal target detection method based on class relation reasoning
CN114254738A (en) Double-layer evolvable dynamic graph convolution neural network model construction method and application
CN114265954A (en) Graph representation learning method based on position and structure information
CN113837266A (en) Software defect prediction method based on feature extraction and Stacking ensemble learning
CN114051218B (en) Environment-aware network optimization method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination