A citation network node classification method and system based on graph contrastive learning
By generating enhanced views through PU learning and data augmentation, combined with K-means clustering and SVM probability estimator, the problem of pseudo-negative bias in graph contrastive learning is solved, and the feature representation and performance of citation network node classification are improved.
Patent Information
- Application Number
- CN202310874661.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2043-07-17
AI Technical Summary
Existing graph contrastive learning methods suffer from pseudo-negative bias in the citation network node classification task, resulting in poor feature representation quality and classification performance. Existing pseudo-negative elimination mechanisms have low accuracy and rely on clustering results and prior knowledge of data distribution, which cannot effectively alleviate the pseudo-negative bias.
By constructing a PU learning method, using data augmentation to generate two enhanced views, combining K-means clustering and SVM probability estimator, setting pseudo labels, calculating negative propensity scores and cosine similarity, constructing a weighted graph contrast loss, optimizing embedding representation, and improving node classification performance.
It effectively alleviates the false negative bias, improves the performance of graph contrastive learning in citation network node classification, and enhances the feature representation quality and classification accuracy.
Smart Images

Figure CN117077026B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of citation network node classification, in particular to a citation network node classification method and system based on graph contrastive learning. BACKGROUND
[0002] In the big data era, graph (network) data is ubiquitous, and graph data can naturally express the complex relationship between objects and is suitable for complex application scenarios in the real world. Effective analysis and mining of graph data can play a huge role in promoting the development of related industries. In the field of graph machine learning, graph convolutional neural networks (GCN) aim to learn low-dimensional embedding representations of nodes and have achieved good results in node classification and have become a powerful tool for graph representation learning. However, most GCN methods belong to the category of supervised learning or semi-supervised learning, and a large number of high-quality node labels are needed for effective model optimization. However, in practical applications, it is very difficult and expensive to collect high-quality labels. For example, citation networks are typical network big data, which are composed of citation and cited relationships between documents. Citation network data can be used to describe the development of scientific fields, the relationship between disciplines, etc., and the node classification task has more significance, but the citation network often faces the problem of very high cost of obtaining labels, and traditional supervised learning or semi-supervised methods have great limitations for the citation network node classification task.
[0003] Based on mining self supervision information of graph contrast learning, the dependence on labeled data can be effectively alleviated, and the graph contrast learning has become one of the key technologies of graph representation learning. The graph contrast learning learns feature representation in embedding space by mining self information, and provides discriminative representation for downstream tasks. Therefore, discriminative feature representation can be obtained through graph contrast learning, and the performance of node classification task in citation network can be improved. However, most of the existing graph contrast learning methods usually pull the positive examples in the embedding space and push the negative examples away, and regard other samples except the anchor point as negative examples, ignoring the similar samples to the positive examples in the negative examples, that is, pseudo-negative examples, thereby introducing bias and affecting the quality of feature representation and the performance of node classification in citation network. In view of the pseudo-negative example bias problem in graph contrast learning, the current research work mainly uses pseudo-negative example elimination mechanism to gradually detect and delete pseudo-negative samples through clustering and curriculum learning and other ways. Although these methods can alleviate the pseudo-negative example problem in negative sampling of graph contrast learning to a certain extent, the pseudo-negative example selection accuracy of such strategy is low, depends on the clustering results and prior knowledge of data distribution, and the pre-defined selection process may not conform to the actual law of data distribution, thereby leading to weak discriminability of the embedding representation of graph contrast learning and affecting the performance of node classification, so that the graph contrast learning is difficult to be well applied in the node classification task of citation network. Therefore, developing a more efficient graph contrast learning method to alleviate the influence of pseudo-negative example bias and improve the performance of graph contrast learning in the node classification task of citation network has become one of the problems to be solved in the current field. SUMMARY
[0004] In order to alleviate the influence of pseudo-negative example bias in the existing graph contrast learning technology on the performance of citation network node classification task, the technical problem to be solved by the present application is to propose a citation network node classification method and system based on graph contrast learning to improve the performance of citation network node classification.
[0005] In order to solve the above technical problems, the technical scheme adopted by the present application is as follows: a citation network node classification method based on graph contrast learning, comprising the following steps:
[0006] S11: obtaining original view data G=(V,E) of citation network; obtaining first enhanced view and second enhanced view of the original view data through two enhancement functions, and then obtaining embedding representation of nodes through an encoder; wherein V represents a node set, E represents an edge set, wherein the embedding u i of any one node in the first enhanced view is regarded as an anchor, the embedding v i of the node in the second enhanced view is regarded as a positive example, and the embedding of other nodes in the two enhanced views is regarded as a negative example;
[0007] S12: Construct PU data (x, y, s) on the citation network original graph data, wherein x is a node sample, y∈{0, 1}, s∈{0, 1} is a binary label, then unsupervised clustering is performed on all nodes in the same view, and based on the clustering result, a pseudo label is set for all nodes, and nodes belonging to the same class share the same pseudo label;
[0008] S13: Introducing a PU learning method, inputting the obtained node features and pseudo labels into a PU learning probability estimator; obtaining a probability representation p(y=1|x) of the node sample being a positive example relative to the anchor point;
[0009] S14: Calculate the negative example tendency score of the node sample in the original view, and calculate the negative example measurement index of each node in the first enhanced view and the second enhanced view according to the negative example tendency score of each node and the cosine similarity of the sample in the corresponding enhanced view relative to the anchor point;
[0010] S15: Calculate the weighted graph comparison loss of each node in the two enhanced views according to the negative example measurement index in the two enhanced views, and calculate the total loss according to the weighted graph comparison loss of all nodes in the two enhanced views, and obtain the optimized embedding representation of the node by training the total loss;
[0011] S16: Input the obtained new embedding representation of the node into a logistic regression node classification model, and obtain the optimized graph comparison learning citation network task node classification result through a softmax operation.
[0012] In the step S12, the K-means clustering algorithm is used to perform unsupervised node clustering based on the embedding representation of the node, and according to the clustering result, the label of the class where the anchor point is located is set as y=1, and the pseudo labels of all other classes are set as y=0.
[0013] In the step S13, the PU learning probability estimator uses a SVM classifier.
[0014] In the step S14, the negative example tendency score e is calculated according to the negative example tendency score function of the node sample, and the calculation formula of the negative example tendency score function of the node sample is:
[0015] e(x)=1-p(y=1|x);
[0016] The calculation formula of the negative example measurement index m ik
[0017]
[0018] Wherein, α represents a compromise parameter, e ik (x) represents the kth sample x k relative to the anchor point xi negative example propensity score, s ik (x) denotes the kth sample x k relative anchor x i cosine similarity, N denotes the number of nodes.
[0019] sample x k relative anchor x i cosine similarity is calculated as:
[0020]
[0021] where |·| denotes the L2 norm of a vector, · denotes the dot product of a vector, x i denotes the anchor, x k denotes the node sample.
[0022] In step S15, the weighted graph contrastive loss l m (u i ,v i ) is calculated as:
[0023]
[0024] where θ(u i ,v i ) denotes the cosine similarity between the linear projection of the embedding u i of the i th node in the first augmented view and the linear projection of the embedding v i of the i th node in the second augmented view, θ(u i ,v k ) denotes the cosine similarity between the linear projection of the embedding u i of the i th node in the first augmented view and the linear projection of the embedding v k of the k th node in the second augmented view, θ(u i ,u k ) denotes the cosine similarity between the linear projection of the embedding u i of the i th node in the first augmented view and the linear projection of the embedding u k of the k th node in the first augmented view, and τ denotes the temperature coefficient.
[0025] In step S15, the total loss is calculated as:
[0026]
[0027] where N denotes the number of nodes, l m (u i ,v i ) and l m (v i ,ui ) respectively represent the loss of two enhanced views.
[0028] The specific representation of the logistic regression node classification model in the step S16 is:
[0029]
[0030] Wherein W and b are the weight matrix and bias vector of the logistic regression node classification model respectively, x i is the feature vector of the node, represents the output of the logistic regression node classification model.
[0031] In addition, the application also provides a citation network node classification system based on graph contrast learning, comprising:
[0032] The enhanced view embedding representation module is used for acquiring citation network graph data G=(V, E), wherein V represents a node set, E represents an edge set, and two enhanced views and are generated by using an enhanced function, and the node embedding representation of the two enhanced views is generated by a GCN encoder with shared parameters;
[0033] The original view pseudo-label representation module is used for unsupervised clustering of all nodes in the same view, and pseudo-labels are set for all nodes based on the clustering results, and nodes belonging to the same class share the same pseudo-labels;
[0034] The PU learning probability representation module is used for introducing a PU learning method, inputting the obtained node features and pseudo-labels into a PU learning probability estimator, and obtaining the probability representation p(y=1|x) of the node sample x being a positive example relative to an anchor point;
[0035] The negative example measurement index construction module is used for calculating a negative example tendency score, and calculating a negative example measurement index m ik (x) according to the negative example tendency score;
[0036] The reconstructed node embedding representation module is used for calculating a weighted contrast loss l m (u i ,v i ) and a total loss l m , and the model is trained by the total loss to obtain the optimized embedding representation of the node.
[0037] The citation network node classification optimization module is used for inputting the obtained optimized embedding representation of the node into a logistic regression node classification model, and obtaining an optimized graph contrast learning citation network node classification result through a softmax operation.
[0038] Compared with the prior art, the application has the following beneficial effects:
[0039] The application provides a citation network node classification method and system based on graph contrast learning, and by introducing PU learning to construct a debiasing strategy, the graph contrast learning negative sampling bias can be effectively alleviated, and the performance of the graph contrast learning in citation network node classification is improved. Specifically, according to given citation network data, two enhanced views are generated by using data enhancement, and embedding representations of the enhanced view nodes are obtained through an encoder. In the original citation network view layer, a K-means clustering algorithm is used for unsupervised clustering of all nodes. Based on anchor points, pseudo labels are set, the nodes in the class of the anchor points are set as positive labels, and the pseudo labels of all other class nodes are set as negative labels, and the nodes belonging to the same class share the same pseudo label. According to the obtained pseudo label, a PU learning SVM probability estimator is used to calculate the probability of the node sample being a positive example relative to the anchor point, and for the high probability, it is considered that the closer to the anchor point, the more likely to be a pseudo negative example. According to the probability, a negative example tendency score function is defined, and the negative example tendency score of the node sample is calculated to predict the possibility of the node sample being a true negative example relative to the anchor point, and the obtained negative example tendency score and the cosine similarity of the enhanced view corresponding node are linearly fused to construct a more discriminative negative example measurement index, so that the embedding representation quality of the citation network node of the graph contrast learning can be improved, and the performance of the citation network node classification can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 A flowchart of a citation network node classification method based on graph contrast learning is provided for the embodiments of the application.
[0041] Figure 2 A citation network enhanced view embedding representation diagram is provided.
[0042] Figure 3 A citation network original view negative example tendency score calculation diagram is provided.
[0043] Figure 4 A citation network node classification framework based on graph contrast learning is provided.
[0044] Figure 5 A structure diagram of a citation network node classification system based on graph contrast learning is provided. DETAILED DESCRIPTION
[0045] To make the purposes, technical solutions and advantages of the embodiments of the application clearer, the technical solutions in the embodiments of the application will be described clearly and completely below. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the application.
[0046] Embodiment one
[0047] As Figure 1 shown, the citation network node classification method based on graph contrastive learning provided by the embodiment one of the application comprises the following steps:
[0048] S11: Obtain the citation network original view data G=(V, E); obtain the first enhanced view and the second enhanced view of the original view data through two enhanced functions, and then obtain the embedding representation of the nodes through an encoder; wherein V represents a node set, E represents an edge set, wherein the embedding u i of any node in the first enhanced view is regarded as an anchor, the embedding v i in the second enhanced view is regarded as a positive example, and the embedding of other nodes in the two enhanced views is regarded as a negative example.
[0049] In this embodiment, referring to Figure 2 , for the citation network original view data G=(V, E), wherein V={v1, v2,..., v N}, E∈V×V respectively represent a node set and an edge set, and A∈{0, 1} N×N are a feature matrix and an adjacency matrix, enhanced functions t∈T and t'∈T are used to obtain two views and of the citation network original view data G. and The embedding representation of the nodes in the two views is represented as and
[0050] S12: Construct PU data (x, y, s) on the citation network original graph data, wherein x is a node sample, y∈{0, 1}, s∈{0, 1} is a binary label, then unsupervised clustering is performed on all nodes in the same view, and based on the clustering result, a pseudo label is set for all nodes, and nodes belonging to the same class share the same pseudo label.
[0051] In this embodiment, the citation network original graph data G=(V, E) is used to construct PU data (x, y, s), wherein x is a node sample, s is a label representing whether the sample is labeled, and y represents a pseudo label of the sample; y∈{0, 1}, s∈{0, 1} is a binary label. If the sample x is labeled, set s=1, and if x is not labeled, set s=0. The K-means clustering algorithm is used to perform unsupervised node clustering based on the embedding representation of the nodes, according to the clustering result, set the pseudo label y∈{0, 1}, set the label of the class where the anchor point is located as y=1, and set the pseudo label of all other classes as y=0, and nodes belonging to the same class share the same pseudo label.
[0052] S13: Introducing PU learning method, inputting the obtained node features and pseudo labels into PU learning probability estimator; obtaining probability representation p(y=1|x) of the node sample as positive example relative to anchor point.
[0053] In the step S13, the PU learning probability estimator adopts SVM classifier.
[0054] S14: Calculating negative example tendency score e of the node sample in the original view, and calculating negative example measurement index m of each node in the two enhanced views according to the negative example tendency score ik (x).
[0055] In the step S14, the negative example tendency score e is calculated according to the negative example tendency score function of the node sample, and the calculation formula of the negative example tendency score function of the node sample is:
[0056] e(x)=1-p(y=1|x) (1)
[0057] Wherein, the negative example tendency score e measures the possibility of the node sample as true negative example relative to the anchor point, and the higher the score is, the more likely it is a true negative example. As shown in the figure, it is a calculation diagram of negative example tendency score of original view of citation network. Figure 3
[0058] The calculation formula of the negative example measurement index m ik (x) of the i-th node is:
[0059]
[0060] Wherein, x represents node, a represents compromise parameter, e ik (x) represents the negative example tendency score of the k-th node sample x k relative to the anchor point x i , s ik (x) represents the cosine similarity of the k-th node sample x k relative to the anchor point x i , and N represents the number of nodes. In the embodiment, the cosine similarity of the corresponding node sample relative to the anchor point in the enhanced view is linearly fused on the basis of the negative example tendency score in the original view to form the multi-angle fusion negative example measurement index m ik (x), so as to re-measure the samples in negative sampling.
[0061] Wherein, the calculation formula of the cosine similarity of the sample x k relative to the anchor point x i is:
[0062]
[0063] where |·| denotes the L2 norm of a vector, · denotes the dot product of vectors, x i denotes an anchor point, x k denotes a node sample.
[0064] S15: According to the negative example measurement index m ik (x), the weighted graph contrastive loss of each node under different views is calculated, and the total loss l m is calculated according to the weighted graph contrastive loss of each node under different augmented views, and the optimized embedding representation of the node can be obtained by training through the total loss.
[0065] In the step S15, the weighted graph contrastive loss l m (u i ,v i ) is calculated according to the following formula:
[0066]
[0067] where l m (u i ,v i ) denotes the weighted graph contrastive loss of the i-th node under the first augmented view, θ(ui,vi) denotes the cosine similarity between the linear projection of the embedding u i of the i-th node in the first augmented view and the linear projection of the embedding v i of the i-th node in the second augmented view, θ(u i ,v k ) denotes the cosine similarity between the linear projection of the embedding u i of the i-th node in the first augmented view and the linear projection of the embedding v k of the k-th node in the second augmented view, θ(u i ,u k ) denotes the cosine similarity between the linear projection of the embedding u i of the i-th node in the first augmented view and the linear projection of the embedding u k of the k-th node in the first augmented view, and τ denotes the temperature coefficient. θ(u i ,v i )=s(g(u i ),g(v i ));Here s(·,·) is the cosine similarity, and g(·) is the linear projection to enhance the expression ability of θ(u i ,v i ). In this embodiment, the obtained negative example measurement index m ik (x) is multiplied by the negative example representation to reduce the weight of the pseudo-negative example and increase the weight of the true negative example, so as to alleviate the influence of the pseudo-negative example in the negative sampling on the graph contrastive learning feature representation.
[0068] In this embodiment, according to the view symmetry, the total loss l m The total loss is defined as the average of all positive weighted graph contrastive loss, and the calculation formula is:
[0069]
[0070] Where N represents the number of nodes, l m (u i ,v i ) and l m (v i ,u i ) represent the weighted graph contrastive loss of the i-th node in the two enhanced views, respectively. m (v i ,u i ) is calculated similarly to l m (u i ,v i ), just interchange the two enhanced views.
[0071] S16: input the obtained new node embedding representation into the logistic regression node classification model, and obtain the optimized graph contrastive learning citation network task node classification result through the softmax operation.
[0072] In the step S16, the specific representation of the logistic regression node classification model is:
[0073]
[0074] Where W and b are the weight matrix and bias vector of the logistic regression node classification model, respectively, x i is the feature vector of the node, represents the output of the logistic regression node classification model.
[0075] As Figure 4 shown in the figure is a schematic diagram of a citation network node classification framework based on graph contrastive learning. The entire classification framework first obtains two enhanced views from the original view of the citation network using data augmentation, obtains the node embedding representation of the enhanced view through the encoder, then performs node clustering in the original citation network graph data using the K-means clustering algorithm, sets the pseudo-label based on the clustering result, the same class of nodes share the same pseudo-label, uses PU learning SVM probability estimator to obtain the probability representation of the node sample as a positive example relative to the anchor point, calculates the node negative tendency score, fuses the original view negative tendency score and the enhanced view cosine similarity to construct the node negative measurement index, trains the model to obtain the optimized node embedding representation, and improves the citation network node classification effect.
[0076] Embodiment Two
[0077] As Figure 5 shown, the second embodiment of the present application provides a citation network node classification system based on graph contrastive learning, comprising: an enhanced view embedding representation module, an original view pseudo-label representation module, a PU learning probability representation module, a negative example measurement index construction module, a reconstructed node embedding representation module, and a citation network node classification optimization module.
[0078] The enhanced view embedding representation module is used to obtain citation network graph data G=(V, E), where V represents a node set and E represents an edge set, and then generate two enhanced views and using an enhanced function, and generate node embedding representations of the two enhanced views through a GCN encoder with shared parameters.
[0079] The original view pseudo-label representation module is used to perform unsupervised clustering on all nodes in the same view, set pseudo-labels for all nodes based on the clustering results, and nodes belonging to the same class share the same pseudo-label.
[0080] In this embodiment, the citation network original graph data G=(V, E) is constructed into PU data (x, y, s), where x is a node sample, s is a label representing whether the sample is labeled, and y represents the pseudo-label of the sample; y∈{0,1}, s∈{0,1} is a binary label. If the sample x is labeled, set s=1, and if x is not labeled, set s=0. Using the K-means clustering algorithm, unsupervised node clustering is performed based on the embedding representation of the nodes, and according to the clustering results, the pseudo-label y∈{0,1} is set, the label of the class where the anchor point is located is set to y=1, and the pseudo-label of all other classes is set to y=0. Nodes belonging to the same class share the same pseudo-label.
[0081] The PU learning probability representation module is used to introduce a PU learning method, input the obtained node features and pseudo-labels into a PU learning probability estimator, and obtain the probability representation p(y=1|x) of the node sample x being a positive example relative to the anchor point. The PU learning probability estimator uses a SVM classifier.
[0082] The negative example measurement index construction module is used to calculate the negative example tendency score of the node sample in the original view, and calculate the negative example measurement index m ik (x) of each enhanced view according to the negative example tendency score.
[0083] Specifically, the negative example measurement index construction module calculates the negative example tendency score according to the negative example tendency score function of the node sample, and the calculation formulas used are formula (1) and formula (2) respectively.
[0084] The reconstructed node embedding representation module is used to calculate the weighted contrastive loss l m (ui v i ) and total loss l m , and the optimized embedding representation of the node is obtained by training the model through the total loss. The calculation formula of the weighted contrastive loss l m (u i ,v i ) and the total loss l m are formula (4) and formula (5) respectively.
[0085] The citation network node classification optimization module is configured to input the obtained node optimized embedding representation into a logistic regression node classification model, and obtain an optimized graph contrastive learning citation network node classification result through a softmax operation. The specific representation of the logistic regression node classification model is formula (6).
[0086] To sum up, the application provides a citation network node classification method and system based on graph contrastive learning. By introducing PU learning to construct a debiasing strategy, the graph contrastive learning bias in negative sampling can be effectively alleviated, and the performance of graph contrastive learning in citation network node classification can be improved. Specifically, according to the given citation network data, two enhanced views are generated using data enhancement, and the embedding representation of the nodes in the enhanced views is obtained through an encoder. In the original citation network view layer, a K-means clustering algorithm is used to perform unsupervised clustering on all nodes. Based on the anchor point, pseudo labels are set, the nodes in the class of the anchor point are set as positive labels, and the pseudo labels of all other class nodes are set as negative labels. Nodes belonging to the same class share the same pseudo label. According to the obtained pseudo label, a PU learning SVM probability estimator is used to calculate the probability that the node sample is a positive example relative to the anchor point. For a high probability, it is considered to be closer to the anchor point, and it is more likely to be a pseudo negative example. According to the probability, a negative example tendency score function is defined, and the negative example tendency score of the node sample is calculated to predict the possibility that the node sample is a true negative example relative to the anchor point. The obtained negative example tendency score and the cosine similarity of the nodes corresponding to the enhanced views are linearly fused to construct a more discriminative negative example measurement index, improve the embedding representation quality of the graph contrastive learning citation network node, and improve the performance of the citation network node classification.
[0087] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the application, and not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the application.
Claims
1. A citation network node classification method based on graph contrastive learning, characterized by: The following steps are involved: S11: Obtain the original view data G = (V, E) of the citation network; obtain the first enhanced view and the second enhanced view of the original view data through two enhancement functions, and then obtain the embedded representation of the node through the encoder; where V represents the node set and E represents the edge set, and the embedding u of any node in the first enhanced view is i is considered as an anchor, the embedding v in the second augmented view i is considered as a positive example, and the other node embeddings in the two enhanced views are considered as negative examples; S12: Construct PU data (x, y, s) on the original graph data of the citation network, where x is a node sample, y∈{0,1}, and s∈{0,1} are binary labels. Then, perform unsupervised clustering on all nodes in the same view and set pseudo labels for all nodes based on the clustering results. Nodes belonging to the same class share the same pseudo label. S13: Introduce the PU learning method and input the acquired node features and pseudo labels into the PU learning probability estimator; obtain the probability representation p(y=1|x) that the node sample is a positive example relative to the anchor point; S14: Calculate the negative example propensity score of the node samples in the original view, and calculate the negative example measurement index corresponding to each node in the first enhanced view and the second enhanced view based on the negative example propensity score of each node and the cosine similarity of the sample in the corresponding enhanced view relative to the anchor point; S15: Calculate the weighted graph contrast loss of each node in the two enhanced views based on the negative example metrics in the two enhanced views, and calculate the total loss based on the weighted graph contrast loss of all nodes in the two enhanced views. Use the total loss for training to obtain the optimized embedding representation of the node. S16: The obtained new embedding representation of the node is input into the logistic regression node classification model, and the optimized node classification result of the graph comparative learning citation network task is obtained through the softmax operation.
2. A citation network node classification method based on graph contrastive learning according to claim 1, characterized in that: In step S12, the K-means clustering algorithm is used to perform unsupervised node clustering based on the embedded representation of the nodes. According to the clustering result, the label of the class where the anchor point is located is set to y=1, and the pseudo labels of all other classes are set to y=0.
3. The method for classifying citation network nodes based on graph contrastive learning according to claim 1, characterized in that: In step S13, the PU learning probability estimator adopts an SVM classifier.
4. The method for classifying citation network nodes based on graph contrastive learning according to claim 1, characterized in that: In step S14, the negative propensity score e is calculated according to the negative propensity score function of the node sample. The calculation formula of the negative propensity score function of the node sample is: e(x)=1-p(y=1|x); Negative example measurement index m ik The calculation formula for (x) is: Among them, α represents the compromise parameter, e ik (x) represents the kth sample x k Relative anchor point x i Negative propensity score, s ik (x) represents the kth sample x k Relative anchor point x i The cosine similarity of , N represents the number of nodes.
5. The method for classifying citation network nodes based on graph contrastive learning according to claim 4, characterized in that: Sample x k Relative to anchor point x i The calculation formula of cosine similarity is: Among them, |·| represents the L2 norm of the vector, · represents the dot product of the vector, x i represents the anchor point, x k Represents a node sample.
6. The method for classifying citation network nodes based on graph contrastive learning according to claim 1, characterized in that: In step S15, the weighted graph contrast loss l m (u i ,v i ) is calculated as: where θ(u i ,v i ) represents the embedding u of the i-th node in the first enhanced view i The linear projection of and its embedding v in the second augmented view i The cosine similarity between the linear projections of θ(u i ,v k ) represents the embedding u of the i-th node in the first enhanced view i The linear projection of the kth node in the second augmented view is k The cosine similarity between the linear projections of θ(u i ,u k ) represents the embedding u of the i-th node in the first enhanced view i The linear projection of the kth node in the first augmented view is u k The cosine similarity between the linear projections of , τ represents the temperature coefficient.
7. The method for classifying citation network nodes based on graph contrastive learning according to claim 1, characterized in that: In step S15, the total loss is calculated as follows: Where N represents the number of nodes, l m (u i ,v i ) and l m (v i ,u i ) represent the losses of the two enhanced views respectively.
8. The method for classifying citation network nodes based on graph contrastive learning according to claim 1, characterized in that: In step S16, the specific representation of the logistic regression node classification model is: Where W and b are the weight matrix and bias vector of the logistic regression node classification model, respectively, i is the feature vector of the node, Represents the output of a logistic regression node classification model.
9. A citation network node classification system based on graph contrastive learning, characterized by: include: Enhanced view embedding representation module: used to obtain citation network graph data G = (V, E), where V represents the node set and E represents the edge set, and then use the enhancement function to generate two enhanced views and And through the GCN encoder with shared parameters, the node embedding representations of the two enhanced views are generated; Original view pseudo-label representation module: used to perform unsupervised clustering of all nodes in the same view, set pseudo-labels for all nodes based on the clustering results, and nodes belonging to the same class share the same pseudo-label; PU learning probability representation module: used to introduce the PU learning method, input the acquired node features and pseudo labels into the PU learning probability estimator, and obtain the probability representation p(y=1|x) that the node sample x is a positive example relative to the anchor point; Negative example measurement indicator building module: used to calculate the negative example propensity score and calculate the negative example measurement indicator m based on the negative example propensity score ik (x); Reconstructed node embedding representation module: used to calculate the weighted contrast loss l m (u i ,v i ) and the total loss l m , and obtain the optimized embedding representation of the node by training the model with the total loss; Citation network node classification optimization module: used to embed the obtained node optimization representation into the input logistic regression node classification model, and obtain the optimized graph comparative learning citation network node classification results through softmax operation.
Citation Information
Patent Citations
Community discovery method based on comparative learning
CN115860048A
Self-supervised graph neural network method based on comparative learning
CN115983351A