A subgraph-based signed link prediction method and system
Patent Information
- Application Number
- CN202311508882.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-11-13
AI Technical Summary
然而,这种范式是以节点为中心的,无法捕获所要预测的节点对之间的隐式关系,从而无法区分具有明显不同上下文的节点对
[0031]1.本发明针对目前的符号链路预测方法无法独立地学习两个目标节点的表示,从而无法捕获所要预测的节点对之间的隐式关系的问题,提出了基于子图的符号链路预测方法。该方法的主要思路是为每个目标节点对提取子图,并使用该子图的表示作为链路表示进行符号预测,更适用于链路级别的任务。
Smart Images

Figure CN117749641B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graph data mining, specifically to a method and system for predicting symbolic links based on subgraphs. Background Technology
[0002] Symbolic networks are networks where edges have positive or negative sign attributes, with positive and negative edges representing positive and negative relationships, respectively. Specifically, positive edges in a symbolic network can represent positive relationships such as friendship, trust, liking, and support, using a positive sign; while negative edges are typically used to represent negative relationships such as enmity, distrust, dislike, and opposition, using a negative sign. Symbolic networks exist in many real-world fields, such as the friendship and enmity relationships among social networking site users, the cooperation and competition relationships among online game players, and the facilitation and inhibition relationships between neurons in the biological field. Research on symbolic networks mainly focuses on their structural and evolutionary analysis, with symbolic link prediction being a hot topic. By analyzing observed network structures, it can predict whether there are potential links between two unconnected nodes or the likelihood of establishing future links. Symbolic link prediction can reveal behavioral patterns in link generation, helping to analyze networks with missing data and understand implicit evolutionary mechanisms, thus providing a theoretical basis for the analysis of social network structure and evolutionary models.
[0003] Currently, the main paradigm for symbolic link prediction is based on graph representation learning. These methods learn low-dimensional embedding vectors (i.e., node representations) of nodes on a symbolic network, and then aggregate the two target representations into a link representation to predict symbols. Existing methods can be divided into two categories: symbolic network representation and symbolic graph neural networks. Symbolic network representation methods employ specially designed random walk strategies or probabilistic estimation models to learn the structural information of the symbolic network, thus embedding network structure and symbolic information into low-dimensional vectors. In recent years, graph neural networks have received increasing attention, aiming to aggregate neighbor information for node representation learning. Therefore, researchers have begun to utilize graph neural networks for symbolic graph representation learning; this type of method is called symbolic graph neural network technology. For example, some foreign scholars have integrated the well-known social psychology theory—equilibrium theory—into the message propagation layer of graph convolutional neural networks and graph attention neural networks to aggregate neighbor information on the symbolic network.
[0004] While these methods have made some progress, they all share a common drawback. Existing methods independently learn the representations of two target nodes and predict the symbols of the target node pair based on the similarity between the representations. However, this paradigm is node-centric and fails to capture the implicit relationships between the node pairs to be predicted, thus failing to distinguish between node pairs with significantly different contexts. For node-pair-centric symbol prediction tasks, these methods will produce unsatisfactory performance. Therefore, existing symbolic network graph representation learning methods still need improvement to achieve better symbolic link prediction results. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing symbolic link prediction methods by proposing a subgraph-based symbolic link prediction method and system. This method learns a node pair-centered representation, explicitly models the neighborhood around the target node pair using a subgraph, and then uses this subgraph representation as the final representation of the node pair for symbolic link prediction.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A subgraph-based symbol link prediction method includes the following steps:
[0008] Preprocess the graph data to obtain the adjacency matrix of the symbolic graph;
[0009] An importance-based subgraph extraction module is constructed, which selects global neighbor nodes and extracts a subgraph for each target node in the network.
[0010] A symbol-aware node labeling module is constructed. The node labeling module centers on the target node and uses relative distance encoding to encode the graph structure of the subgraph to obtain a feature vector representing the structure, thereby realizing the knowledge embedding of neighbor information.
[0011] A self-balancing symbol classification module is constructed. The symbol classification module inputs the encoded subgraph into a graph neural network, extracts features from the subgraph information using graph convolution and graph pooling operations, obtains the subgraph representation, and achieves balanced classification of links through focus loss and self-pruning contrastive loss.
[0012] The subgraph extraction module, the node labeling module, and the symbol classification module are trained.
[0013] Symbol link prediction is performed using the trained subgraph extraction module, node labeling module, and symbol classification module.
[0014] Furthermore, the subgraph extraction module uses a personalized PageRank algorithm to calculate the importance scores of global neighbor nodes, and performs subgraph sampling on the target nodes based on the importance scores. For each target node in the network, a subgraph is formed that provides rich and crucial graph structure knowledge. The subgraph is then divided into regular subgraphs based on the symbols of the links. and negative graph
[0015] Furthermore, the node marking module uses a relative distance marking strategy to locate the position of each node in the extracted subgraph; the relative distance marking strategy focuses on the target node v0 and calculates the position of other nodes v0. i The shortest distance d(v) from v0 i ,v0), where d(v0,v0)=0, then d(v i The vector (v0) is converted into a one-hot vector form as the initial structural attribute. Based on the relative distance to the target node pair, the relative distance labeling strategy is used to obtain node labels with positive and negative properties for the positive and negative subgraphs, respectively. Then, the one-hot encoding of the node labels is used as the node feature input to the downstream graph neural network (GNN).
[0016] Furthermore, the symbol classification module uses a relational graph convolutional network as a GNN to learn the link representation H, and then inputs H into the link classifier, using focus loss for symbol prediction; simultaneously, another RGCN is created through network pruning operations to obtain another link representation. By comparing H and By employing self-pruning contrastive loss, the weights of negative links are implicitly increased, resulting in a more balanced link representation for symbolic link prediction tasks.
[0017] Furthermore, the relational graph convolutional network comprises multiple graph convolutional layers and a final graph pooling layer; the graph convolutional layers are designed to perform neighbor aggregation and message propagation operations on all nodes in the subgraph; the graph pooling layer is designed to learn a comprehensive representation of the entire subgraph to better represent the target node.
[0018] Furthermore, the graph pooling layer calculates the average output of the feature representations of all nodes in the subgraph, concatenates it with the feature representation of the target node pair, and obtains the target node pair (v i ,v j The final node of ) represents H i,j :
[0019]
[0020] in, Subgraph The set of all nodes, h i and hj The target node v is respectively i and v j Feature representation after graph convolution and residual connection.
[0021] Furthermore, the self-pruning contrast loss is defined as:
[0022]
[0023] Where s(·) represents the similarity measurement function, H represents the indicator function. i and Representing the H matrix and The representation of the i-th link in the matrix, where ε represents the link training set.
[0024] A subgraph-based symbolic link prediction system, comprising:
[0025] The preprocessing module is used to preprocess the graph data to obtain the adjacency matrix of the symbolic graph;
[0026] The importance-based subgraph extraction module is used to select global neighbor nodes and extract subgraphs for each target node in the network.
[0027] The symbol-aware node labeling module is used to encode the graph structure of the subgraph with the target node as the center using relative distance encoding, so as to obtain the feature vector representing the structure and realize the knowledge embedding of neighbor information;
[0028] The self-balancing symbol classification module is used to input the encoded subgraph into the graph neural network, extract features from the subgraph information using graph convolution and graph pooling operations to obtain the subgraph representation, and achieve balanced classification of links through focus loss and self-pruning contrastive loss.
[0029] The link prediction module is used to train the subgraph extraction module, the node labeling module, and the symbol classification module, and to perform symbol link prediction using the trained subgraph extraction module, node labeling module, and symbol classification module.
[0030] Compared with the prior art, the positive effects of the present invention are as follows:
[0031] 1. This invention addresses the problem that current symbolic link prediction methods cannot independently learn the representations of two target nodes, thus failing to capture the implicit relationships between the node pairs to be predicted. It proposes a subgraph-based symbolic link prediction method. The main idea of this method is to extract a subgraph for each target node pair and use the representation of this subgraph as the link representation for symbol prediction, making it more suitable for link-level tasks.
[0032] 2. This invention addresses the problem that current symbolic link prediction methods cannot handle highly imbalanced link classification (positive links are much larger than negative links). It proposes a self-pruned contrastive loss to implicitly increase the weight of negative links, thereby obtaining a more balanced link representation.
[0033] 3. This invention addresses the problem that current graph data mining methods cannot simultaneously model the structure and symbol information of symbolic graphs, and proposes an effective encoding strategy. Attached Figure Description
[0034] Figure 1 This is an overall flowchart of a subgraph-based symbol link prediction method according to the present invention.
[0035] Figure 2 This is a schematic diagram illustrating the specific processing steps of the method of the present invention. Detailed Implementation
[0036] To better illustrate the subgraph-based symbol link prediction method and system proposed in this invention, the invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0037] The present invention provides a subgraph-based symbol link prediction method, comprising the following steps:
[0038] 1) Construct an importance-based subgraph extraction module, a symbol-aware node labeling module, and a self-balancing symbol classification module. The importance-based subgraph extraction module selects global neighbor nodes, forming a subgraph that provides rich and crucial graph structure knowledge for each target node pair in the network. The symbol-aware node labeling module encodes the graph structure using relative distance encoding centered on the target node, obtaining feature vectors representing the structure and embedding neighbor information. The self-balancing symbol classification module inputs the sampled and encoded subgraph into a graph neural network, extracts features from the subgraph information using graph convolution and graph pooling operations, obtains the subgraph representation, and achieves balanced classification of links through self-pruning contrastive loss.
[0039] 2) Training an importance-based subgraph extraction module. First, calculate the importance scores of global neighbors, and extract some closely related nodes for the target node pair to form an information-rich subgraph. This subgraph can provide the target node pair with sufficiently rich network structure and semantic information, thereby generating high-quality feature representations for the target node pair.
[0040] 3) Training a symbol-aware node labeling module. To achieve feature extraction from graph information, an efficient encoding strategy needs to be designed for the sampled subgraphs. The nodes in the structure are encoded. This structure encoding strategy requires: 1) encoding the target node pair (v i ,vj 1) Distinguish it from other nodes in the subgraph; 2) Based on the pair (v) with the target node i ,v j The relationship between nodes with different structures and symbolic relationships is used to distinguish them. Otherwise, subsequent feature extractors will be unable to determine the location of the target node and will lose relevant graph structure information.
[0041] 4) Training a self-balancing symbol classification module. After obtaining the initial attributes (including structure and semantics) of each node in the subgraph, representation learning is required for the subgraph to be used as the representation of the target node pair, thereby learning a high-quality node representation. This scheme uses a subgraph-level graph neural network (GNN) for feature extraction. This GNN contains multiple graph convolutional layers and a final graph pooling layer. The graph convolutional layers are designed to perform neighbor aggregation and message propagation operations on all nodes in the subgraph, while the graph pooling layer is designed to learn a comprehensive representation of the entire subgraph to better represent the target node pair. Furthermore, to address the imbalance problem in the symbol link prediction task (the number of positive links is much greater than the number of negative links), this scheme employs focus loss and self-pruning contrastive loss to achieve balanced classification of symbol links.
[0042] Figure 1 The present invention provides an overall flowchart of a subgraph-based symbol link prediction method, which includes four stages: data preprocessing, subgraph extraction module construction, node labeling module construction, symbol classification module construction and training, and data testing. Figure 2 This is a schematic diagram illustrating the specific processing steps of this method.
[0043] Step 1. Data Preprocessing. Preprocess the graph data to obtain the adjacency matrix A of the symbolic graph, where the elements are Ai. ij A ij =1 indicates that there is a positive connection between node i and node j, A ij =-1 indicates that there is a negative connection between node i and node j, A ij =0 indicates that there is no connection between node i and node j. Since symbolic link prediction is essentially a binary classification task of links, each data instance (i.e., link) has a corresponding instance label.
[0044] Step 2. Construction of the Importance-Based Subgraph Extraction Module. This step initializes the importance-based subgraph extraction module. The subgraph extraction module primarily uses a personalized PageRank algorithm to sample the target nodes' subgraphs. Considering that the relevance of different neighbors varies for a specific node, this scheme uses a personalized PageRank algorithm to calculate the importance scores of global neighbor nodes. Then, for each pair of target nodes in the network, a subgraph providing rich and crucial graph structure knowledge is formed. Since forward and negative links represent different semantics, this scheme divides the subgraph into positive subgraphs based on the symbols of the links. and negative graph
[0045] Step 3. Construction of the Symbol-Aware Node Labeling Module. This step initializes the symbol-aware node labeling module. To label the different roles of nodes in the extracted symbolic subgraph, this scheme proposes a Relative Distance Labeling (RDL) strategy to locate the position of each node in the extracted subgraph. Based on the relative distance to the target node pair, RDL is applied to positive and negative subgraphs to obtain node labels with positive and negative properties, respectively. Then, the one-hot encoding of these two node labels is used as node features and input into the downstream Graph Neural Network (GNN).
[0046] Step 4. Construction (i.e., initialization) and model training of the self-balancing symbol classification module. This scheme uses a relational graph convolutional network (RGCN) as the GNN to learn the link representation H, and then inputs H into the link classifier, using focal loss for symbol prediction. Simultaneously, another RGCN is created through network pruning to obtain another link representation. By comparing H and By employing self-pruning contrastive loss, the weights of negative links are implicitly increased, resulting in a more balanced link representation for symbolic link prediction tasks.
[0047] Step 5. Testing Phase. Using the links in the test set as input, after subgraph extraction, node labeling, and self-balancing representation learning, the final symbolic link prediction task is performed.
[0048] For example, in step 2, this scheme first uses a personalized PageRank algorithm to analyze the target node pairs (v... i v j Subgraph sampling is performed. Considering that the relevance of different neighbors varies for a specific node, this paper uses a personalized PageRank algorithm to calculate the importance score of global neighbor nodes. Using the adjacency matrix A as input, the importance score metric matrix M is defined as:
[0049] M=α(I n -(1-α)AD -1 )
[0050] Where I n Let D represent the identity matrix, α∈[0,1] represent hyperparameters, and the element D(i,i) in D is defined as D(i,i)=∑ jA(i, j) represents the corresponding diagonal matrix. The metric matrix M calculates the importance score of global neighbors for each node, focusing on highly relevant global neighbors, thus providing rich and crucial graph structure knowledge. Notably, the calculation of the metric matrix M can be performed during the data preprocessing stage, thereby reducing the corresponding computational overhead for large networks.
[0051] Then, for a given pair of target nodes (v) i v j This scheme applies to node v i and node v j The union of the node index sets of the top-k most important global neighbors is represented as:
[0052] idx=top_rank(M(i,:),k)∪top_rank(M(j,:),k)
[0053] Here, `top-rank` is a function that returns the indices of the top-k important neighbors, M represents the importance score metric matrix, and (i, :) represents the i-th row of matrix M. Therefore, these global neighbors constitute the subgraph. This scheme derives the subgraph from the global adjacency matrix. Neighbor matrix A i,j :
[0054] A i,j =A idx,idx
[0055] For example, in step 2, since the semantics of forward and negative links are different, this scheme divides the subgraph according to the symbol of the link. Divided into subgraphs and negative graph
[0056] For example, in step 3, this scheme proposes a simple and efficient encoding method called the Relative Distance Labeling (RDL) strategy. The main idea is to record the relative position of each node in the subgraph. Specifically, focusing on the target node v0, the relative positions of other nodes v0 are calculated. i The shortest distance d(v) from v0 i , v0), where d(v0, v0) = 0. Then, d(v i , v0) is converted into one-hot vector form and used as the initial structural property.
[0057] For example, in step 3, this scheme respectively addresses the positive subgraphs. and negative graph Execute the RDL strategy for the target node pair (v i v j), thus obtaining the focus on the target node v i Encoding in positive and negative subgraphs yields a focus on the target node v. j The encoding is performed in the positive and negative subgraphs. Then, the four one-hot vectors of the distance encoding are concatenated to obtain the initial attributes of each node in the subgraph. These node features are then further input into the downstream graph neural network (GNN).
[0058] For example, in step 4, after obtaining the initial attributes of each node in the subgraph (including structural and symbolic information), this scheme needs to perform representation learning operations on the subgraph, thereby using the subgraph representation as the representation of the target node pair to learn a high-quality node representation.
[0059] This scheme employs a subgraph-level relational graph convolutional network (RGCN) for feature extraction. This graph neural network contains multiple graph convolutional layers and a final graph pooling layer. The graph convolutional layers are designed to perform neighbor aggregation and message propagation operations on all nodes in the subgraph, while the graph pooling layer is designed to learn a comprehensive representation of the entire subgraph to better characterize the target node.
[0060] Specifically, the graph convolutional layer in this scheme is defined as follows:
[0061]
[0062] in, Represents node v i The feature vector of the l-th layer, and They represent nodes v respectively i In the corresponding subgraph, neighbors are connected by positive and negative edges. ...
[0063] Then, the graph convolutional layers are mapped using the ReLU activation function, resulting in a total of L layers. For each node v in the subgraph... i The feature outputs from the L-layer graph convolution are residually concatenated to obtain the corresponding node representations:
[0064]
[0065] Here, `concat(·)` represents the concatenation operation. After obtaining the feature representations of each node in the subgraph, graph pooling is used to obtain the overall representation of the subgraph, which serves as the final node representation of the target node.
[0066] Subsequently, this scheme proposes a novel graph pooling strategy, which calculates the average output of the feature representations of all nodes in the subgraph, concatenates it with the feature representation of the target node pair, and obtains the target node pair (v i ,v jThe final node of ) represents H i,j :
[0067]
[0068] in, Subgraph The set of all nodes, h i and h j The target node v is respectively i and v j The feature representation after graph convolution and residual concatenation, h k This represents the feature representation of node k in the graph.
[0069] For example, in step 4, to address the imbalanced classification problem through supervised learning, this scheme utilizes focus loss, which applies a modulation term to the cross-entropy loss to focus on misclassified links. Focus loss can be viewed as a dynamically scaled cross-entropy loss, whose scaling factor automatically reduces the weight of easily classified links. Focus loss is defined as:
[0070]
[0071] Where ε represents the link training set, y i,j and These represent links (v) i ,v j The true and predicted labels are γ and β. γ is a focusing hyperparameter that controls the rate of weight reduction for easily classified links, and β is a weighting hyperparameter assigned to different link types.
[0072] For example, in step 4, this scheme introduces another layer of contrastive view through "model enhancement" (by pruning the weights of the RGCN). This work employs a weight-based pruning strategy, that is, pruning the minimum weight parameters of e% in each iteration to obtain the pruned RGCN, thereby obtaining the target node pair (v i ,v j Another view of ) Finally, the representations of all links in the link training set ε are obtained, using H and express.
[0073] For example, in step 4, the self-pruning contrast loss is defined as:
[0074]
[0075] Where s(·) represents the similarity measurement function, H represents the indicator function. i and Representing the H matrix and The representation of the i-th link in the matrix.
[0076] Specifically, similarity metrics are typically defined as:
[0077]
[0078] Where τ represents the temperature value that determines the degree of polymerization.
[0079] For example, in step 4, the final total loss function is defined as follows:
[0080]
[0081] Here, λ is a balancing hyperparameter that controls the weights of the contrastive loss. In this scheme, all parameters are optimized using the standard backpropagation algorithm.
[0082] Key aspects of this invention include:
[0083] 1. The proposed subgraph-based symbol link prediction method integrates importance-based subgraph extraction, symbol-aware node labeling module, and self-balancing symbol classification module into an end-to-end framework. This method can efficiently learn representations focused on symbol links and significantly improve the performance of cross-network node classification.
[0084] 2. The proposed subgraph-based symbol link prediction method comprises three modules: an importance-based subgraph extraction module that extracts closely related nodes from the entire graph to adaptively form subgraphs, providing rich graph information for representation learning; a symbol-aware node labeling module that provides a unique feature for each node in the extracted subgraphs, enabling the encoding of symbol graph information; and a self-balancing symbol classification module that uses focusing loss and self-pruning contrastive loss to obtain more balanced representations in order to solve the data imbalance problem in link classification.
[0085] 3. This method proposes two interacting and mutually influential loss functions: supervised node focusing loss and self-supervised self-pruning contrastive loss.
[0086] This invention can be applied to scenarios such as social networks and e-commerce networks.
[0087] For example, in a social network recommendation scenario, nodes in the network represent users, positive edges represent positive relationships between users (e.g., likes, friendship, trust, affection, support, etc.), and negative edges represent negative relationships (e.g., negative comments, distrust, dislike, opposition, etc.). Given two nodes, it is necessary to predict the relationship between these two nodes. Existing methods independently learn the representations of two target nodes and predict whether the relationship between the target node pair is positive or negative based on the similarity between the representations. However, this method focuses on nodes rather than edges, failing to capture the implicit relationship between the node pairs to be predicted. Furthermore, such methods assume that the more similar two nodes are, the more likely a positive edge exists; the less similar two nodes are, the more likely a positive edge exists. However, this basic assumption is difficult to satisfy in the real world because similar nodes can also have negative edges. To address this, this invention proposes a subgraph-based symbolic link prediction method and system. This method learns a representation centered on node pairs and then uses this subgraph representation as the final representation of the node pairs for prediction. This method focuses more on node pairs, predicting the potential relationship of the central node pair from the contextual information of the node pairs, making it more suitable for symbolic link prediction scenarios.
[0088] For example, in the context of e-commerce networks, a symbolic network could be a consumer review website (such as Epinions). Nodes in the network represent users, who can express their trust (i.e., positive) or distrust (i.e., negative) attitudes toward others' reviews, represented by positive and negative edges, respectively.
[0089] Another embodiment of the present invention provides a subgraph-based symbolic link prediction system, comprising:
[0090] The preprocessing module is used to preprocess the graph data to obtain the adjacency matrix of the symbolic graph;
[0091] The importance-based subgraph extraction module is used to select global neighbor nodes and extract subgraphs for each target node in the network.
[0092] The symbol-aware node labeling module is used to encode the graph structure of the subgraph with the target node as the center using relative distance encoding, so as to obtain the feature vector representing the structure and realize the knowledge embedding of neighbor information;
[0093] The self-balancing symbol classification module is used to input the encoded subgraph into the graph neural network, extract features from the subgraph information using graph convolution and graph pooling operations to obtain the subgraph representation, and achieve balanced classification of links through focus loss and self-pruning contrastive loss.
[0094] The link prediction module is used to train the subgraph extraction module, the node labeling module, and the symbol classification module, and to perform symbol link prediction using the trained subgraph extraction module, node labeling module, and symbol classification module.
[0095] For the specific implementation process of each module, please refer to the description of the method of the present invention above.
[0096] Another embodiment of the present invention provides a computer device (computer, server, smartphone, etc.) including a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the steps of the method of the present invention.
[0097] Another embodiment of the present invention provides a computer-readable storage medium (such as ROM / RAM, disk, optical disk) storing a computer program that, when executed by a computer, implements the various steps of the method of the present invention.
[0098] Although the specific details, implementation algorithms, and accompanying drawings of the present invention have been disclosed for illustrative purposes to aid in understanding and implementing the invention, those skilled in the art will understand that various substitutions, variations, and modifications are possible without departing from the spirit and scope of the invention and the appended claims. The invention should not be limited to the content disclosed in the preferred embodiments and accompanying drawings; the scope of protection claimed by the invention is defined by the claims.
Claims
1. A subgraph-based symbolic link prediction method, characterized in that, Includes the following steps: Preprocess the graph data to obtain the adjacency matrix of the symbolic graph; An importance-based subgraph extraction module is constructed, which selects global neighbor nodes and extracts a subgraph for each target node in the network. A symbol-aware node labeling module is constructed. The node labeling module centers on the target node and uses relative distance encoding to encode the graph structure of the subgraph to obtain a feature vector representing the structure, thereby realizing the knowledge embedding of neighbor information. A self-balancing symbol classification module is constructed. The symbol classification module inputs the encoded subgraph into a graph neural network, extracts features from the subgraph information using graph convolution and graph pooling operations, obtains the subgraph representation, and achieves balanced classification of links through focus loss and self-pruning contrastive loss. The subgraph extraction module, the node labeling module, and the symbol classification module are trained. Symbol link prediction is performed using the trained subgraph extraction module, node labeling module, and symbol classification module. The symbol classification module uses a graph convolutional network (GNN) to learn link representations. Then The input is fed into the link classifier, where focus loss is used for symbol prediction; simultaneously, another RGCN is created through network pruning operations to obtain another link representation. By comparison and By employing self-pruning contrastive loss, the weight of negative links is implicitly increased, resulting in a more balanced link representation for symbolic link prediction tasks. The self-pruning contrast loss is defined as: in, This represents the similarity measurement function. Indicates an indicator function, and Representing the link respectively and link representation The representation of the i-th link in the middle, It is a link representation The representation of the r-th link in the middle, This represents the training set of links.
2. The method according to claim 1, characterized in that, The subgraph extraction module uses a personalized PageRank algorithm to calculate the importance scores of global neighbor nodes. Based on these importance scores, it performs subgraph sampling on the target nodes, forming a subgraph that provides rich and crucial graph structure knowledge for each target node in the network. The subgraph is divided into regular subgraphs based on the symbols of the links. and negative graph .
3. The method according to claim 1, characterized in that, The node marking module uses a relative distance marking strategy to locate the position of each node in the extracted subgraph; the relative distance marking strategy focuses on the target node. Calculate other nodes and shortest distance ,in After that The data is converted into one-hot vector form as the initial structural attribute. Based on the relative distance to the target node pair, the relative distance labeling strategy is used to obtain node labels with positive and negative properties for the positive and negative subgraphs, respectively. Then, the one-hot encoding of the node labels is used as the node feature input to the downstream graph neural network (GNN).
4. The method according to claim 1, characterized in that, The relational graph convolutional network comprises multiple graph convolutional layers and a final graph pooling layer; the graph convolutional layers are designed to perform neighbor aggregation and message propagation operations on all nodes in the subgraph; the graph pooling layer is designed to learn a comprehensive representation of the entire subgraph to better characterize the target node.
5. The method according to claim 4, characterized in that, The graph pooling layer calculates the average output of the feature representations of all nodes in the subgraph, and concatenates it with the feature representation of the target node pair to obtain the target node pair. The final node representation : in, Subgraph The set of all nodes and Target nodes and Feature representation after graph convolution and residual concatenation Subgraph Middle node The characteristics are represented.
6. A subgraph-based symbolic link prediction system, characterized in that, The method of any one of claims 1 to 5 comprises: The preprocessing module is used to preprocess the graph data to obtain the adjacency matrix of the symbolic graph; The importance-based subgraph extraction module is used to select global neighbor nodes and extract subgraphs for each target node in the network. The symbol-aware node labeling module is used to encode the graph structure of the subgraph with the target node as the center using relative distance encoding, so as to obtain the feature vector representing the structure and realize the knowledge embedding of neighbor information; The self-balancing symbol classification module is used to input the encoded subgraph into the graph neural network, extract features from the subgraph information using graph convolution and graph pooling operations to obtain the subgraph representation, and achieve balanced classification of links through focus loss and self-pruning contrastive loss. The link prediction module is used to train the subgraph extraction module, the node labeling module, and the symbol classification module, and to perform symbol link prediction using the trained subgraph extraction module, node labeling module, and symbol classification module.
7. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the method of any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a computer, implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Link symbol prediction method based on linear optimization closed subgraph coding
CN116155755A
Link prediction method based on global path perception graph neural network model
CN116306834A