Method and system for quotation network classification by performing positive sample sampling based on semantic perception

By employing node feature masking, edge perturbation, and semantic-aware positive sample selection, the method improves the accuracy and robustness of graph neural networks in citation networks by accurately defining positive and negative sample pairs, addressing the semantic drift issue in existing GCL methods.

CN119202713APending Publication Date: 2024-12-27HANGZHOU DIANZI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411223180.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Existing graph contrastive learning (GCL) methods in citation networks rely heavily on random enhancement, which can distort the intrinsic properties of graphs and fail to accurately define positive and negative sample pairs, leading to semantic drift and reduced model performance.

Method used

A citation network classification method that enhances the graph using node feature masking and edge perturbation, selects one-hop neighbors as positive pairs based on topology, and uses k-hop subgraphs with semantic-aware similarity thresholds to define positive pairs, improving the accuracy of positive and negative sample selection.

Benefits of technology

This method significantly enhances the representation learning ability of graph neural networks by accurately selecting semantically similar pairs, reducing false positives and improving classification performance and robustness in citation networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202713A_ABST
    Figure CN119202713A_ABST
Patent Text Reader

Abstract

The invention discloses a semantic perception-based quotation network classification method and system for performing positive sample sampling, and the method comprises the steps: firstly constructing an original quotation network, and carrying out the data enhancement twice, thereby obtaining two enhanced quotation networks; secondly, inputting the two enhanced quotation networks into a GNN encoder to obtain a node representation matrix H of the enhanced quotation networks; a positive sample pair in topology and a positive sample pair in feature are then selected. And finally, obtaining an intersection of the positive sample pairs obtained in the two aspects to obtain a positive pair set, calculating a negative pair set, calculating a comparison loss function by utilizing corresponding node representation of the positive and negative sample pairs in H, carrying out training optimization, and inputting the optimized H into a classifier to obtain a citation network classification result. According to the method, the overall performance of graph contrast learning is effectively improved, so that the model is more efficient and accurate during quotation network classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of deep learning, and specifically relates to a citation network classification method and system for positive sample sampling based on semantic perception. Background Art

[0002] Citation networks are graphs of citation relationships between academic documents, where each academic paper can be regarded as a node and citation relationships are represented as edges in the graph. Such networks are widely used in academic research, literature retrieval, and academic collaboration. Graph Neural Networks (GNNs) are widely used in citation networks because they can process academic document data with complex relationships and help researchers better organize, understand, and utilize these data. By learning node representations in graph structures, GNNs can improve the performance of document classification, citation prediction, influence analysis, and recommendation systems, making it a mainstream framework for processing citation network data. GNNs can iteratively learn the target dimension representation by transforming and aggregating neighbor information. However, previous graph representation learning methods heavily rely on a large amount of labeled data, while labels are often scarce and precious. Therefore, self-supervised learning methods that do not require pre-trained GNNs with labeled data have attracted widespread attention.

[0003] Graph Contrastive Learning (GCL), as one of the most representative graph self-supervised learning methods, has attracted extensive research interest. It has achieved good performance in many downstream tasks, such as node classification, node clustering, and link prediction. GCL aims to learn an effective GNN encoder so that similar nodes get similar representations after encoding, and dissimilar nodes get different representations. Most of the existing GCL methods adopt a similar paradigm: first, they use various graph enhancement methods to enhance the input original graph and generate two enhanced views; then, these enhanced views are input into the GNN encoder to learn preliminary node embeddings; finally, positive and negative sample pairs are selected from the two enhanced views, and the entire training process is optimized by the graph contrast loss function, so that the model can capture the similarity between positive pairs and the difference between negative pairs. Therefore, the definition of positive and negative sample pairs plays a vital role in GCL. Effective selection of positive and negative sample pairs can significantly affect the performance and stability of the model, ensuring that the model can distinguish similar nodes from dissimilar nodes, thereby improving the overall quality of graph representation.

[0004] When defining positive and negative sample pairs, current GCL methods usually define the embeddings of the same nodes in two enhanced views as positive pairs, and the embeddings of all different nodes as negative pairs. However, existing GCL methods usually use random enhancement to generate enhanced views. Since nodes and edges often have different importance in the graph, randomly deleting important edges or nodes may seriously damage the intrinsic properties of the graph, causing the semantics of the same nodes in the two enhanced views to drift. For example, in a molecular structure, deleting an edge may destroy key chemical bonds, making the two molecules completely different. In addition, two different nodes of the same category may have similar semantics after enhancement, and these node pairs should not be considered as negative samples. Therefore, it is believed that the previous method of defining positive and negative pairs has a bottleneck because there may be some artifacts between positive and negative pairs.

[0005] In order to improve the quality of positive and negative samples, several works have focused on improving graph augmentation methods to reduce the probability of semantic drift of the same nodes in two views by reducing the damage to the intrinsic properties of the graph. For example, Graph Contrastive Learning with Adaptive Augmentation (GCA) introduces centrality metrics in the augmentation process, so that important edge and node properties are preserved. However, these methods rely on carefully designed graph data augmentation and do not change the definition of positive and negative sample pairs, failing to solve the problem from the root. Recently, some pioneering works have begun to propose new ways to define positive and negative sample pairs. Neighbor Contrastive Learning (NCLA) based on learnable graph augmentation proposes to treat the neighbors of each node as additional positive samples. However, this method only uses the network topology as a supervisory signal to define positive and negative samples, ignoring the semantic information at the feature level between nodes, and cannot guarantee the quality of positive and negative sample pairs. Summary of the invention

[0006] The purpose of the present invention is to provide a citation network classification method and system for sampling positive samples based on semantic perception in view of the deficiencies of the prior art, which mines the potential semantic information in the graph from the two aspects of topology and features, and constructs the truly semantically similar node pairs as positive pairs. By improving the semantic matching between sample pairs, it can not only reduce the impact of false positive pairs, but also help GNN learn the semantic associations between nodes. First, the original graph is enhanced to generate two enhanced views; then, a semantic-aware positive sample sampling method is introduced to improve the semantic matching between positive and negative sample pairs from two aspects: topology and features; specifically, in terms of topology, one-hop neighbors of each node in the original graph are selected as additional positive samples; in terms of features, we extract k-hop subgraphs of each node in the two enhanced views, use subgraph-level graph kernels to fuse node features and subgraph structures to represent these nodes, and then calculate the similarity between them. According to the similarity of the same node between different enhanced views, a separate threshold is set for each node, and node pairs with similarity greater than or equal to the threshold are defined as positive pairs; finally, the positive pair sets obtained from the two aspects are intersected to obtain the final positive pair set, while the remaining node pairs in the two views are regarded as negative pairs, and these sample pairs are used to calculate the contrast loss to learn better node representations. By introducing the graph contrast learning method, the accuracy of academic document classification in citation networks is significantly improved, and the model is made more generalizable and robust. The present invention emphasizes a semantic-aware positive sample sampling method, which helps to improve feature representation, handle noisy labels, and better understand the relationship between documents, thereby improving classification performance.

[0007] In a first aspect, the present invention provides a citation network classification method for positive sample sampling based on semantic perception, which is implemented by the following steps:

[0008] Step 1: Construct the original citation network based on the academic literature database.

[0009] Step 2: Perform two data enhancements on the original citation network to obtain two enhanced citation networks, where the data enhancement includes node feature masking and edge perturbation.

[0010] Step 3: Input the two enhanced citation networks into a GNN encoder to obtain the node representation matrix H of the enhanced citation network.

[0011] Step 4: Select positive sample pairs from the topology aspect: According to the original citation network, select node pairs with neighbor relationships as positive sample pairs. The present invention selects one-hop neighbor nodes on the original citation network.

[0012] Step 5: Select positive sample pairs from the feature aspect: Calculate the semantic similarity between the node pairs on the two enhanced citation networks, and select the node pairs whose similarity is greater than or equal to the set threshold as positive sample pairs.

[0013] Step 6: Take the intersection of the positive sample pairs obtained from the two aspects to obtain the final positive pair set, and then calculate the negative pair set, and use the corresponding node representations of these positive and negative sample pairs in the node representation matrix H to calculate the contrast loss function.

[0014] Step 7: Repeat steps 2 to 6, perform gradient descent training according to the contrast loss function, and optimize the node representation matrix H until the predetermined number of iterations is completed.

[0015] Step 8: Input the optimized node representation matrix H into the classifier to obtain the citation network classification result, and test the accuracy of the classification result.

[0016] In a second aspect, the present invention also provides a citation network classification system for positive sample sampling based on semantic perception, including a data acquisition and processing module and a classification module:

[0017] The data acquisition and processing module is used to construct an original citation network, perform data enhancement on the original citation network, and obtain two enhanced citation networks.

[0018] The classification module includes a node representation matrix acquisition unit, a positive and negative sample pair unit, and a training classification unit, and is used to obtain a citation network classification result based on two enhanced citation networks and perform classification output.

[0019] The node representation matrix acquisition unit is used to input two enhanced citation networks into a GNN encoder to obtain a node representation matrix of the enhanced citation network.

[0020] The positive and negative sample pair unit is used to mine the potential semantic information in the graph from two aspects, topology and features, to obtain positive sample pairs, to construct a positive pair set, and to calculate a negative pair set.

[0021] The training classification unit calculates a contrast loss function for corresponding node representations in a node representation matrix using positive and negative samples, performs training optimization, and outputs a citation network classification result through a classifier after the optimized node representation matrix.

[0022] The present invention has the beneficial effects:

[0023] The present invention significantly improves the representation learning ability of graph neural networks by introducing semantically-aware graph contrast learning and positive sample sampling mechanisms. Specifically, in the process of graph contrast learning, the present invention accurately selects semantically similar positive sample pairs by combining topological structures and node features, thereby avoiding the problem of false positive samples that may be introduced by traditional random sampling methods. This method effectively improves the effect of contrastive learning, allowing the model to more accurately capture the semantic relationship between nodes. The present invention solves the problem of insufficient utilization of graph structure information in existing methods, and significantly improves the feature extraction ability and classification performance of the contrastive learning model through a semantically-aware positive sample selection mechanism. In short, the present invention emphasizes the importance of semantic perception and positive sample selection, effectively improves the overall performance of graph contrastive learning, makes the model more efficient, accurate and robust when processing various graph tasks, and achieves efficient and accurate citation network classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a training framework diagram of the method of the present invention;

[0025] Figure 2 This is the positive and negative sample pair construction method of the present invention. DETAILED DESCRIPTION

[0026] The following figure further illustrates the present invention in combination with the accompanying drawings and specific embodiments.

[0027] like Figure 1 As shown in the figure, the citation network graph contrastive learning method with semantic-aware positive sampling (GCLPS) is used. The specific steps are as follows:

[0028] Step 1: Construct the original citation network.

[0029] 1-1 Obtain the document set V from the academic document database and extract the document feature matrix X. Then, use the document citation relationship as the edge and the document as the node to construct the original citation network. Each node corresponds to a document feature x, and the document feature is a d-dimensional feature vector.

[0030] The node set of the original citation network is expressed as:

[0031] V=[v1,v2,…,v N ] (1)

[0032] Where v is a document node in the citation network, and N is the number of citation network nodes.

[0033] The document feature matrix of the original citation network is expressed as:

[0034] X=[x1,x2,…,x N ] (2)

[0035] Among them, x is the document feature corresponding to the document node, and N is the number of citation network nodes.

[0036] The document characteristics of each node are expressed as:

[0037] x=[x1,x2,…,x d ] (3)

[0038] Where d is the dimension of the document feature.

[0039] The document features include the title, author, abstract, and citation relationship of the document.

[0040] 1-2 Construct an adjacency matrix A based on the original citation network. Its dimension is N×N, where N is the number of nodes in the citation network. Each row and column corresponds to a node in the citation network. The element A[i][j] of the matrix represents the node v. i and node v j The reference relationship between them; if the value of A[i][j] is 1, then node v i With node v j There is an edge between them; if the value of A[i][j] is 0, then there is no edge between them.

[0041] Step 2: Perform two data augmentations on the original citation network to obtain two enhanced citation networks, where the data augmentation includes node feature masking and edge perturbation.

[0042] 2-1 Mask the node features of the original citation network:

[0043] The document feature matrix X is feature masked according to the mask matrix M, and the document feature matrix of the enhanced citation network is updated to the product of the mask matrix and the document feature matrix of the original citation network, that is,

[0044] The mask matrix is ​​expressed as:

[0045] M=[m1,m2,…,m N ] (4)

[0046] Where N is the number of citation network nodes and m is the mask vector.

[0047] The mask vector is represented as:

[0048] m=[m1,m2,…,m d ] (5)

[0049] Where d is the dimension of the mask vector, each dimension of which is independently drawn from a Bernoulli distribution, i.e. in It represents the probability of each attribute being masked, which reflects the importance of the i-th dimension of the document feature.

[0050] The document feature matrix of the enhanced citation network is expressed as:

[0051]

[0052] Where N is the number of citation network nodes.

[0053] 2-2 Perform edge perturbations on the original citation network:

[0054] By randomly adding or deleting edges according to a set ratio, the adjacency matrix A of the original citation network is perturbed, and the adjacency matrix of the enhanced citation network is updated to

[0055] Step 3: Input the two enhanced citation networks into a GNN encoder to obtain the node representation matrix H of the enhanced citation network.

[0056] The node representation matrix of the enhanced citation network is expressed as:

[0057]

[0058] Where N is the number of citation network nodes, To enhance the node p in citation network 1 i The node representation is To enhance the node q in citation network 2 i The node representation of node p i and node q i All correspond to node v in the original citation network i .

[0059] The GNN model can be expressed as follows:

[0060]

[0061] in, represents the aggregation function that aggregates messages from the node's neighbors, represents an update function that updates the representation of a given node and the representations of its neighbors, Represents node v i The neighbor set of v j Represents a neighbor set The nodes in , k represents the kth layer of GNN, Represents node v j Node representation of the k-1th layer GNN.

[0062] The GNN encoder adopts the GCN model.

[0063] Step 4: Select positive sample pairs from the topological aspect: Select node pairs with close neighbor relationships as positive sample pairs. The present invention selects one-hop neighbor nodes on the original citation network, and the one-hop neighbor nodes are equivalent to the adjacency matrix A of the original citation network:

[0064] The adjacency matrix A of the original citation network is expanded to the two enhanced citation networks, and the resulting set is expressed as:

[0065]

[0066] Where I is the identity matrix, represents the adjacency matrix of the original citation network with self-loops added, and P1 is the positive pair set matrix constructed in topology.

[0067] Step 5: Select positive sample pairs from the feature aspect: Calculate the semantic similarity between the node pairs on the two enhanced citation networks, and select the node pairs with similarity greater than or equal to a specific threshold as positive sample pairs:

[0068] 5-1 Extract the k-hop subgraph of each node on the two enhanced citation networks.

[0069] The k-hop subgraph set can be expressed as follows:

[0070]

[0071] Where N is the number of citation network nodes, To enhance the node p in citation network 1 i The k-hop subgraph of To enhance the node q in citation network 2 i The k-hop subgraph of node p i and node q i All correspond to node v in the original citation network i .

[0072] 5-2 Based on the subgraph-level graph kernel, the node features and subgraph structure are fused to represent the nodes on the two enhanced citation networks, and the similarity between the nodes is calculated.

[0073] The sub-graph level kernel can be expressed as follows:

[0074]

[0075] in, To enhance the target node v in the citation network i The adjacency matrix of the k-hop subgraph, I is the identity matrix, D iis a matrix The degree matrix of To enhance the target node v in the citation network i The normalized adjacency matrix of the k-hop subgraph is To enhance the target node v in the citation network i The characteristic matrix of the k-hop subgraph, β is the attenuation coefficient, l is the lth layer, L is the total number of layers, Φ(G i ) represents the target node v in the enhanced citation network i The graph representation matrix of the k-hop subgraph, Φ(G i )[i] represents the target node v in the graph representation matrix i The corresponding row vector, s(·,·) represents the cosine similarity, represents the target node v in the enhanced citation network i and the target node v j The similarity between .

[0076] 5-3 Obtain the similarity matrix S between any two nodes on the two enhanced citation networks 2N×2N , where the elements on the main diagonal are set to 0.

[0077] 5-4 sets a separate threshold for each node, whose value is the similarity between the node on the original citation network and the corresponding node on the two enhanced citation networks, and obtains a 2N-dimensional threshold vector threshold;

[0078] The threshold vector is expressed as:

[0079] threshold=[thr1,…,thr i ,…,thr N ,thr1,…,thr i ,…,thr N ] (16)

[0080]

[0081] Where N is the number of citation network nodes.

[0082] 5-5 Compare the elements in each row of the similarity matrix S with the corresponding dimension values ​​of the threshold vector, select the node pairs whose similarity values ​​are greater than or equal to the threshold as positive sample pairs, and obtain the positive pair set matrix P2 composed of feature aspects.

[0083] Step 6: Figure 2 As shown in the figure, the positive sample pairs obtained from the two aspects are intersected to obtain the final positive pair set, and then the negative pair set is calculated. The node representations corresponding to these positive and negative sample pairs in the node representation matrix H are used to calculate the contrast loss function:

[0084] 6-1 obtains the final opposite set matrix P=P1∩P2.

[0085] Its collection form can be expressed as:

[0086]

[0087] Where N is the number of citation network nodes, is the node p in the enhanced citation network 1 i The positive sample set, is the node q in the enhanced citation network 2 i A set of positive samples, each element in the set corresponds to a row of the final positive set matrix P.

[0088] 6-2 obtains the negative pair set matrix Y=1-(P+I), where I is the unit matrix.

[0089] Its collection form can be expressed as:

[0090]

[0091] Where N is the number of citation network nodes, is the node p in the enhanced citation network 1 i The negative sample set, is the node q in the enhanced citation network 2 i A set of negative samples, each element in the set corresponds to a row of the final positive set matrix N.

[0092] 6-3 Optimizing node representation using contrastive learning loss;

[0093] For node v in the original citation network i , whose corresponding node in the enhanced citation network 1 is p i , the corresponding node in the enhanced citation network 2 is q i . To enhance the node p in citation network 1 i For example, define each positive sample pair (p i ,m j The specific form of the optimization objective is as follows:

[0094]

[0095] Where e is the natural logarithm, is node p i The positive sample of is node p i Negative samples, τ is the temperature parameter, is an evaluation function used to evaluate the similarity between two node representations, where s(·,·) represents the cosine similarity, g(·) is a nonlinear projection head, is node v i Node representation of .

[0096] The optimization objective in Enhanced Citation Network 2 is the same as that in Enhanced Citation Network 1. The specific form of contrastive learning loss is as follows:

[0097]

[0098] Where N is the number of citation network nodes, P is the number of positive sample pairs in enhanced citation network 1, and Q is the number of positive sample pairs in enhanced citation network 2.

[0099] Step 7: Repeat steps 2 to 6, perform gradient descent training according to the contrast loss function, and optimize the node representation matrix H until the predetermined number of iterations is completed;

[0100] Step 8: Input the optimized node representation matrix H into the classifier to obtain the citation network classification result and test the accuracy of the classification result.

[0101] Six commonly used isomorphic graph benchmark datasets were used to train and test the citation network graph comparative learning method based on semantic-aware positive sample sampling.

[0102] The shared parameter GNN encoder adopts a graph convolutional neural network GCN (Graph Convolutional Networks, GCN).

[0103] The open source graph neural network library PyTorch geometric (PYG) is used to build and train the model.

[0104] The performance of the model was tested on node classification and node clustering based on logistic regression linear classifier and K-Means clustering algorithm.

[0105] The citation network classification system based on semantic perception for positive sample sampling includes data acquisition and processing modules and classification modules:

[0106] The data acquisition and processing module is used to construct an original citation network, perform data enhancement on the original citation network, and obtain two enhanced citation networks.

[0107] The classification module includes a node representation matrix acquisition unit, a positive and negative sample pair unit, and a training classification unit, and is used to obtain a citation network classification result based on two enhanced citation networks and perform classification output.

[0108] The node representation matrix acquisition unit is used to input two enhanced citation networks into a GNN encoder to obtain the node representation matrix of the enhanced citation network. The positive and negative sample pair unit is used to mine the potential semantic information in the graph from the two aspects of topology and features, obtain positive sample pairs, construct a positive pair set, and calculate a negative pair set. The training classification unit calculates the contrast loss function using the node representations corresponding to the positive and negative sample pairs in the node representation matrix, performs training optimization, and the optimized node representation matrix outputs the citation network classification result through the classifier.

[0109] The present invention performs well on six commonly used benchmark datasets Cora, Citeseer, Pubmed, Computers, Photo, and CS, surpassing most of the most advanced baseline models, thus strongly verifying the effectiveness of the present invention, improving the performance of contrastive learning models, and improving the training accuracy of downstream tasks such as node classification and node clustering.

[0110] Table 1 Node classification accuracy (including standard deviation) (unit: %). The best results are marked in bold:

[0111] Table 1

[0112]

[0113] As shown in Table 1 above, the classification accuracy of the GCLPS of the present invention is improved compared with several state-of-the-art baseline models, and it ranks first on average.

[0114] Table 2 Performance of node clustering, with NMI and ARI as evaluation indicators (unit: %), the best results are marked in bold;

[0115] Table 2

[0116]

[0117] As shown in the above table, compared with the most advanced baseline model, the node clustering evaluation indicators NMI and ARI of the GCLPS of the present invention are improved, and it ranks first on average.

Claims

1. A citation network classification method based on semantic perception for positive sample sampling, characterized in that: The following steps are involved: Step 1: Construct the original citation network based on the academic literature database; Step 2: Perform two data augmentations on the original citation network to obtain two augmented citation networks; Step 3: Input the two enhanced citation networks into a GNN encoder to obtain the node representation matrix H of the enhanced citation network; Step 4: According to the original citation network, select node pairs with neighbor relationships as positive sample pairs in terms of topology; Step 5: Calculate the semantic similarity between the node pairs on the two enhanced citation networks, and select the node pairs with similarity greater than or equal to the set threshold as the positive sample pairs in terms of features; Step 6: Take the intersection of the positive sample pairs obtained from the two aspects to obtain the positive pair set, then calculate the negative pair set, and use the corresponding node representations of the positive and negative sample pairs in H to calculate the contrast loss function for training optimization; Step 7: Input the optimized H into the classifier to obtain the citation network classification result.

2. The citation network classification method based on semantic perception for positive sample sampling according to claim 1 is characterized in that: The specific process of constructing the original citation network is as follows: 1-1 Obtain the document set V from the academic document database, extract the document feature matrix X, and then use the document citation relationship as the edge and the document as the node to construct the original citation network; The node set of the original citation network is represented as: V = [v1, v2, ..., v N ], v is a document node in the citation network, and N is the number of citation network nodes; The document feature matrix of the original citation network is: X = [x1, x2, ..., x N ], x is the document feature corresponding to the document node; the document feature of each node is: x = [x1, x2, ..., x d ], d is the dimension of document characteristics; 1-2 Construct an adjacency matrix A based on the original citation network, with a dimension of N×N; each row and column corresponds to a node in the citation network, and the element A[i][j] of the matrix represents the node v i and node v j The reference relationship between them; if the value of A[i][j] is 1, then node v i With node v j There is an edge between them; if the value of A[i][j] is 0, then there is no edge between them.

3. The citation network classification method based on semantic perception for positive sample sampling according to claim 2 is characterized in that: In step 2, data enhancement is performed twice, including node feature masking and edge perturbation. The specific implementation process is as follows: 2-1 Mask the node features of the original citation network: The document feature matrix X is feature masked according to the mask matrix M, and the document feature matrix of the enhanced citation network is updated to the product of the mask matrix and the document feature matrix of the original citation network, that is, The mask matrix is ​​expressed as: M = [m1, m2, ..., m N ], m is the mask vector; the mask vector is represented as: m = [m1, m2, ..., m d ], each dimension of the vector is independently extracted from the Bernoulli distribution; the document feature matrix of the enhanced citation network is expressed as: 2-2 Perform edge perturbations on the original citation network: By randomly adding or deleting edges according to a set ratio, the adjacency matrix A of the original citation network is perturbed, and the adjacency matrix of the enhanced citation network is updated to 4. The citation network classification method based on semantic perception for positive sample sampling according to claim 3 is characterized in that: The node representation matrix of the enhanced citation network in step 3 is expressed as: To enhance the node representation of node pi in citation network 1, To enhance the node q in citation network 2 i The node representation of node p i and node q i All correspond to node v in the original citation network i .

5. The citation network classification method based on semantic perception for positive sample sampling according to claim 4 is characterized in that: The specific implementation process of step 4 is as follows: Select node pairs with neighbor relationships as positive sample pairs. Here, we select one-hop neighbor nodes on the original citation network, and the one-hop neighbor nodes are equivalent to the adjacency matrix A of the original citation network: The adjacency matrix A of the original citation network is expanded to the two enhanced citation networks, and the resulting set is: Where I is the identity matrix, represents the adjacency matrix of the original citation network with self-loops added, and P1 is the positive pair set matrix constructed in topology.

6. The citation network classification method based on semantic perception for positive sample sampling according to claim 5 is characterized in that: The specific implementation process of step 5 is as follows: 5-1 Extract the k-hop subgraph of each node in the two enhanced citation networks; The k-hop subgraph set is expressed as follows: in, To enhance the k-hop subgraph of node pi in citation network 1, To enhance the k-hop subgraph of node qi in citation network 2, node p i and node q i All correspond to node v in the original citation network i ; 5-2 According to the subgraph-level graph kernel, the node features and subgraph structure are integrated to represent the nodes on the two enhanced citation networks, and the similarity between the nodes is calculated: in, To enhance the target node v in the citation network i The adjacency matrix of the k-hop subgraph, I is the identity matrix, D i is a matrix The degree matrix of To enhance the target node v in the citation network i The normalized adjacency matrix of the k-hop subgraph is To enhance the target node v in the citation network i The characteristic matrix of the k-hop subgraph, β is the attenuation coefficient, l is the lth layer, L is the total number of layers, Φ(G i ) represents the target node v in the enhanced citation network i The graph representation matrix of the k-hop subgraph, Φ(G i )[i] represents the target node v in the graph representation matrix i The corresponding row vector, s(·,·) represents the cosine similarity, represents the target node v in the enhanced citation network i and the target node v j The similarity between 5-3 Obtain the similarity matrix S between any two nodes on the two enhanced citation networks 2N×2N , where the elements on the main diagonal are set to 0; 5-4 sets a separate threshold for each node, whose value is the similarity between the node on the original citation network and the corresponding node on the two enhanced citation networks, and obtains a 2N-dimensional threshold vector threshold: threshold=[thr1,…,thr i ,…,thr N ,thr1,…,thr i ,…,thr N ] 5-5 Compare the elements in each row of the similarity matrix S with the corresponding dimension values ​​of the threshold vector, select the node pairs whose similarity values ​​are greater than or equal to the threshold as positive sample pairs, and obtain the positive pair set matrix P2 composed of feature aspects.

7. The citation network classification method based on semantic perception for positive sample sampling according to claim 6 is characterized in that: The specific implementation process of step 6 is as follows: 6-1 obtains the positive set matrix P = P1∩P2; Its collection form is expressed as: is the positive sample set of node pi in the enhanced citation network 1, is the positive sample set of node qi in the enhanced citation network 2, and each element in the set corresponds to a row of the final positive pair set matrix P; 6-2 obtains the negative pair set matrix Y=1-(P+I), where I is the identity matrix; Its collection form is expressed as: is the set of negative samples of node pi in the enhanced citation network 1, is the negative sample set of node qi in the enhanced citation network 2, and each element in the set corresponds to a row of the final positive pair set matrix N; 6-3 Optimizing node representation using contrastive learning loss; For node v in the original citation network i , whose corresponding node in the enhanced citation network 1 is p i , the corresponding node in the enhanced citation network 2 is q i ; Node p in enhanced citation network 1 i , each positive sample pair (p i , m j The specific form of the optimization objective is as follows: Where e is the natural logarithm, is node p i The positive sample of is node p i negative samples, τ is the temperature parameter, is an evaluation function that evaluates the similarity between two node representations, where s(·,·) represents the cosine similarity, g(·) is a nonlinear projection head, is node v i Node representation of ; The optimization objective in enhanced citation network 2 is the same as that in enhanced citation network 1, and the specific form of contrastive learning loss is: Among them, P is the number of positive sample pairs in enhanced citation network 1, and Q is the number of positive sample pairs in enhanced citation network 2.

8. A citation network classification system for positive sample sampling based on semantic perception, used to implement the classification citation network method according to any one of claims 1 to 7, characterized in that: Including data acquisition and processing module, classification module: The data acquisition and processing module is used to construct an original citation network, perform data enhancement on the original citation network, and obtain two enhanced citation networks; The classification module includes a node representation matrix acquisition unit, a positive and negative sample pair unit, and a training classification unit, and is used to obtain a citation network classification result based on two enhanced citation networks and perform classification output.

9. The citation network classification system for positive sample sampling based on semantic perception according to claim 8, characterized in that: The node representation matrix acquisition unit is used to input two enhanced citation networks into a GNN encoder to obtain a node representation matrix of the enhanced citation network; The positive and negative sample pair unit is used to mine the potential semantic information in the graph from the two aspects of topology and features, obtain positive sample pairs, construct a positive pair set, and calculate a negative pair set; The training classification unit calculates a contrast loss function for corresponding node representations in a node representation matrix using positive and negative samples, performs training optimization, and outputs a citation network classification result through a classifier after the optimized node representation matrix.

Citation Information

Cited By

  • Paper classification method and equipment for citation network, and medium

    CN121166930A

  • Exception detection method for supercomputing cluster

    CN122220184A