Heterogeneous graph representation learning method based on neighbor and high-order sub-graph aggregation learning
By adopting the attribute completion mechanism and subgraph segmentation technology of the encoder-decoder architecture in heterogeneous graphs, the problems of missing node attributes and insufficient information mining in heterogeneous graphs are solved, and stronger model expression capabilities and downstream task performance are achieved.
Patent Information
- Application Number
- CN202510031154.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-05-06
AI Technical Summary
Node attributes are often missing in heterogeneous graphs, and existing methods fail to fully mine node attribute information, resulting in limited performance of the model in downstream tasks.
The attribute completion mechanism based on the encoder-decoder architecture is adopted to generate node embedding representations through the encoder and reconstruct the complete attributes by the decoder to solve the problem of missing node attributes; at the same time, the heterogeneous graph is divided into neighbors and higher-order subgraphs, and the information of the graph is learned from local and higher-order perspectives respectively, and the information in the heterogeneous graph is fully explored.
It effectively completes the missing attributes of nodes in heterogeneous graphs, improves the model's expression ability and performance in downstream tasks, especially when dealing with local and higher-order semantic information of heterogeneous graphs.
Smart Images

Figure CN119940401A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of heterogeneous graph neural network, and in particular to a heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning. Background Art
[0002] Real-world datasets are often modeled as graph structures, where nodes represent entities and edges represent relationships between entities. Heterogeneous graphs have attracted attention because they can represent different types of entities and their complex interactions (such as social networks and knowledge graphs). However, their complex structures and rich semantics bring challenges to information mining. Researchers have proposed heterogeneous graph neural networks (HGNNs) to capture different types of associations and semantic information. Although some progress has been made, there are still two major problems.
[0003] Problem 1: Node attributes are missing.
[0004] In practical applications, the node attributes of heterogeneous graphs are often incomplete due to reasons such as high data acquisition costs and privacy protection, which significantly reduces the performance of the model in downstream tasks. To this end, researchers have proposed a variety of completion strategies, such as the HGNN-AC model proposed by Jin et al., which learns topological embeddings and completes missing attributes through pre-trained models. These methods have achieved certain success, but there are still limitations. In particular, the topological embeddings learned by pre-training methods are not necessarily optimal. Therefore, there is still room for improvement in node attribute completion.
[0005] Problem 2: Failure to fully explore node attribute information.
[0006] After obtaining the complete node attributes, how to effectively use this information to enhance the expressive power of HGNN is an important topic. Existing HGNN methods have limitations. For example, the HAN proposed by Wang et al. learns high-order information based on meta-paths and ignores local heterogeneous node information; the ie-HGCN proposed by Yang et al. can handle different types of node associations, but it is easy to be over-smoothed when the number of network layers is large, and it is difficult to capture high-order semantics when the number of layers is small. Therefore, it is particularly necessary to develop a method that can fully learn local and high-order semantic information. Summary of the invention
[0007] The purpose of the present invention is to provide a heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning. It adopts an encoder-decoder architecture and reconstructs the missing attributes of the node by utilizing the existing node attributes and graph structure information, effectively addressing the problem of missing node attributes; at the same time, by dividing the heterogeneous graph into multiple neighbors and high-order subgraphs, the local and high-order information of the graph are comprehensively learned from different perspectives, ensuring that the rich information in the heterogeneous graph is fully mined.
[0008] To achieve the above object, the present invention provides a heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning, comprising the following steps:
[0009] S1. Design an attribute completion mechanism based on heterogeneous graph encoder-decoder. The encoder encodes the initial attributes of the node to generate an embedded representation containing the node structure and relationship attributes. Then the decoder reconstructs the complete attributes of the node to complete the missing node attributes.
[0010] S2, subgraph segmentation, based on meta-paths, the heterogeneous graph is segmented into two types of subgraphs, including neighbor subgraphs and high-order subgraphs. The neighbor subgraph focuses on the first-order neighbor information and captures the local relationship between nodes; while the high-order subgraph focuses on the long-distance neighbor information and enhances the model's understanding of global isomorphic semantics;
[0011] S3, intra-subgraph aggregation, based on normalized convolution and self-attention mechanism, the nodes in the neighbor subgraph and high-order subgraph are aggregated;
[0012] S4, subgraph out-aggregation, out-aggregating neighbor subgraphs and high-order subgraphs based on the cross-attention mechanism;
[0013] S5. Joint training and optimization: The loss of node attribute completion is jointly trained with the loss of downstream tasks, and back propagation and gradient descent algorithms are used to iteratively optimize model parameters during the training process.
[0014] Preferably, the specific steps of S1 are as follows:
[0015] S11. Map different types of node features to a common feature space through feature projection, as shown in formula (1.1). For nodes with missing attributes, use one-hot vectors to initialize node attributes.
[0016]
[0017] Among them, x i represents the initial node feature, h i represents the node features after projection, represents a learnable projection matrix;
[0018] S12. Design a heterogeneous graph encoder and use R-GCN to encode the initial features of the nodes to generate an embedded representation containing node structure and relationship information, as shown in formula (1.2):
[0019]
[0020] Among them, σ() represents the activation function, represents the node feature of node i at the (l+1)th layer, R is a set of different relationship types in the heterogeneous graph, r represents one of the relationship types, t represents the neighbor node under relationship r, V represents the set of nodes in the graph, represents the neighbor set of node i under relationship r, l represents the number of encoder layers, is the convolution weight matrix corresponding to the relation r, is the weight matrix of the self-connection;
[0021] S13, the embedding representation h generated by the encoder l In the input decoder, the decoder performs weighted aggregation on the first-order neighbors through the self-attention mechanism to obtain the completed attributes of the node;
[0022] S14. Concatenate the completed attributes with the existing node attributes to obtain a complete node attribute matrix for in The completed attributes of nodes representing unknown attributes, Indicates the initial attributes of an existing node, V - Represents a set of nodes with unknown attributes, V + Represents a collection of nodes with known properties.
[0023] Preferably, the specific steps of S13 polymerization are:
[0024] S131. Given a node pair (i, j), calculate the importance e of node j to the attribute-missing node i using formula (1.3) i,j ;
[0025]
[0026] Among them, a is a learnable parameterized attention vector, || represents the vector concatenation operation;
[0027] S132, through formula (1.4) i,j Normalize to get the attention weight coefficient α i.j ;
[0028]
[0029] in, represents the first-order neighbors of node i, exp() represents the exponential function with base e;
[0030] S133, attention weight coefficient α calculated based on formula (1.4) i.j, the decoder aggregates the features of the first-order neighbor nodes through formula (1.5). Due to the scale-free nature of heterogeneous graphs, the graph data often exhibits high variance. The multi-head attention mechanism is used to alleviate the high variance of the graph data and improve the stability of model training, as shown in formula (1.6);
[0031]
[0032]
[0033] in, represents the attribute representation of node i after completion, and E is the number of attention heads.
[0034] Preferably, the specific steps of S2 are as follows:
[0035] S21. Use a meta-path-based approach to split the original graph into neighbors and high-order subgraphs, as shown in formula (2.1):
[0036] p m =p b , b∈{h e ,h o} (2.1)
[0037] Among them, p represents the meta-path, p m represents the meta-path after division, b represents the constraint condition, and its value range is the set {h e ,h o}, p b represents the meta-path under a specific condition b, h e represents the meta-path that can generate a neighbor subgraph, h o represents a meta-path that can generate a higher-order subgraph;
[0038] S22. Generate corresponding neighbors and high-order subgraphs according to different categories of meta-paths, as shown in formula (2.2):
[0039]
[0040] Among them, G he represents the generated neighbor subgraph, G ho Represents the generated high-order subgraph.
[0041] Preferably, the specific steps of S3 are as follows:
[0042] S31. For high-order subgraphs, since the nodes are of the same type, a method based on normalized graph convolution is used to aggregate the features of neighboring nodes.
[0043] S32. For the neighbor subgraph, since the neighbor nodes of the target node belong to different node types or have different relationship types with the target node, the self-attention mechanism is used to aggregate the neighbor nodes in the neighbor subgraph.
[0044] Preferably, the specific method of S31 is as follows:
[0045] S311, firstly, the adjacency matrix A of the subgraph ho Normalization is performed to reduce the impact of node degree differences on the aggregation process, as shown in formula (3.1):
[0046]
[0047] in, is the normalized adjacency matrix of the high-order subgraph, D ho is the degree matrix, A ho is the adjacency matrix;
[0048] S312: Aggregate neighbor nodes in the high-order subgraph through graph convolution to obtain the feature representation of the aggregation in the high-order subgraph As shown in formula (3.2);
[0049]
[0050] in, is the normalized matrix after adding self-connection, W is the trainable weight matrix, is the node feature set in the high-order subgraph.
[0051] Preferably, the specific method of S32 is as follows:
[0052] S321, using the self-attention mechanism to aggregate the neighbor nodes in the neighbor subgraph, given the neighbor subgraph G he The node pair (u, v) in G, where (u, v)∈G he , calculate the normalized attention weight coefficient β between node u and node v by formula (3.3) uv ;
[0053]
[0054] Among them, p is a learnable parameterized attention vector, Y u Represents the neighbor nodes of node u;
[0055] S322, calculate the attention weight β uv Finally, the features of neighbor nodes are aggregated through formula (3.4), and after the training process of the multi-head attention mechanism to balance and stabilize the model, the feature representation of the aggregation in the neighbor subgraph is obtained. As shown in formula (3.5);
[0056]
[0057]
[0058] Preferably, the specific steps of S4 are as follows:
[0059] S41. Perform external aggregation on the subgraphs through the cross-attention mechanism, and calculate the cross-attention coefficient A through formula (4.1) cross :
[0060]
[0061] Among them, d k Represents the dimension of the key vector, the query vector Key Vector W q , W k is the corresponding projection matrix;
[0062] S42. Using the cross attention coefficient A cross The value vector V is weighted and summed using formula (4.2) to generate the fused comprehensive representation:
[0063] H final =A cross ·V (4.2)
[0064] Among them, H final is a comprehensive representation that combines the neighbor subgraph and high-order subgraph information. The value vector W v is the corresponding projection matrix.
[0065] Preferably, the specific steps of S5 are as follows:
[0066] S51. For the node attribute completion task, the mean square error (MSE) is used as the loss function of attribute completion to measure the error between the true attribute and the reconstructed attribute of the node, and a masking mechanism is introduced to calculate the MSE loss only on nodes with known true attributes.
[0067] S52. For downstream tasks, select cross entropy as the loss function;
[0068] S53. By merging the node attribute completion loss and the downstream task loss, a joint loss function is obtained, and the back propagation and gradient descent algorithms are used to iteratively optimize the model parameters during the training process.
[0069] Preferably, the formulas of the loss functions in S5 are as follows:
[0070]
[0071] in, is the loss function of mean square error MSE, N is the number of nodes, is the attribute vector of the i-th node predicted by the model, X i is the true attribute vector of the i-th node, and M is the mask matrix;
[0072]
[0073] in, is the cross entropy loss function, y L represents a collection of nodes with labels, represents the true label of the node, represents the node embedding vector output by the model, and C represents the parameters of the classifier;
[0074]
[0075] in, is the joint loss function, and λ is a hyperparameter used to balance the relative weights of the two parts of the loss.
[0076] Therefore, the present invention adopts the above-mentioned heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning, which has the following beneficial effects:
[0077] (1) The node attribute completion strategy proposed in this paper is different from the previous technology. It does not rely on the pre-training process. The encoder encodes the node attributes into a low-dimensional embedding vector and captures the structural information of the graph. Then, the decoder reconstructs the complete attributes of the node, solving the problem of missing attributes in heterogeneous graphs.
[0078] (2) A subgraph aggregation learning mechanism is designed to segment the original graph into multiple neighborhood and high-order subgraphs based on a meta-path approach. This allows the model to capture semantic information comprehensively from both local and high-order perspectives, effectively solving the problem of insufficient mining of heterogeneous information.
[0079] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 The present invention is a flowchart of a heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning. DETAILED DESCRIPTION
[0081] The following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0082] Example
[0083] like Figure 1 As shown, the present invention provides a heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning, comprising the following steps:
[0084] S1. Design an attribute completion mechanism based on heterogeneous graph encoder-decoder. The encoder encodes the initial attributes of the node to generate an embedded representation containing the node structure and relationship attributes. The decoder then reconstructs the complete attributes of the node to complete the missing node attributes.
[0085] S11. When processing heterogeneous graphs, due to the diversity of node types in heterogeneous graphs, different types of nodes often have different feature dimensions and meanings. Direct processing may make it difficult for the model to learn uniformly. In order to cope with the challenges brought by node heterogeneity, a feature matrix projection mechanism is introduced. Through feature projection, different types of node features are mapped to a common feature space, as shown in formula (1.1). For nodes with missing attributes, one-hot vectors are used to initialize node attributes.
[0086]
[0087] Among them, x i represents the initial node feature, h i represents the node features after projection, represents a learnable projection matrix.
[0088] S12. Design of heterogeneous graph encoder. R-GCN is a model that extends the traditional GCN. By designing an independent weight matrix for each relationship type, it can effectively capture the structural information of different types of nodes and edges in the graph. Therefore, R-GCN is used to encode the initial features of the nodes to generate an embedded representation containing node structure and relationship information, as shown in formula (1.2):
[0089]
[0090] Among them, σ() represents the activation function, represents the node feature of node i at the (l+1)th layer, R is a set of different relationship types in the heterogeneous graph, r represents one of the relationship types, t represents the neighbor node under relationship r, V represents the set of nodes in the graph, represents the neighbor set of node i under relationship r, l represents the number of encoder layers, is the convolution weight matrix corresponding to the relation r, is the weight matrix of the self-connection.
[0091] S13, the embedding representation h generated by the encoder l In the input decoder, the decoder performs weighted aggregation of the first-order neighbors through the self-attention mechanism to obtain the completed attributes of the node.
[0092] S131. Given a node pair (i, j), calculate the importance e of node j to the attribute-missing node i using formula (1.3) i,j ;
[0093]
[0094] Among them, a is a learnable parameterized attention vector, and || represents the vector concatenation operation.
[0095] S132, through formula (1.4) i,j Normalize to get the attention weight coefficient α i.j ;
[0096]
[0097] in, represents the first-order neighbors of node i, and exp() represents the exponential function with base e.
[0098] S133, attention weight coefficient α calculated based on formula (1.4) i.j , the decoder aggregates the features of the first-order neighbor nodes through formula (1.5). Due to the scale-free nature of heterogeneous graphs, the graph data often exhibits high variance. The multi-head attention mechanism is used to alleviate the high variance of the graph data and improve the stability of model training, as shown in formula (1.6);
[0099]
[0100]
[0101] in, represents the attribute representation of node i after completion, and E is the number of attention heads.
[0102] S14. Concatenate the completed attributes with the existing node attributes to obtain a complete node attribute matrix for in The completed attributes of nodes representing unknown attributes, Indicates the initial attributes of an existing node, V- Represents a set of nodes with unknown attributes, V + Represents a collection of nodes with known properties.
[0103] S2. Subgraph segmentation: Based on meta-paths, heterogeneous graphs are segmented into two types of subgraphs, including neighbor subgraphs and high-order subgraphs. The neighbor subgraph focuses on the first-order neighbor information and captures the local relationship between nodes; while the high-order subgraph focuses on the long-distance neighbor information and enhances the model's understanding of global isomorphic semantics.
[0104] S21. Use a meta-path-based approach to split the original graph into neighborhood and high-order subgraphs. Since the generated subgraphs have two types, the meta-paths also need to be divided into two types as shown in formula (2.1):
[0105] p m =p b , b∈{h e ,h o} (2.1)
[0106] Among them, p represents the meta-path, p m represents the meta-path after division, b represents the constraint condition, and its value range is the set {h e ,h o}, p b represents the meta-path under a specific condition b, h e represents the meta-path that can generate a neighbor subgraph, h o represents a meta-path that can generate a higher-order subgraph;
[0107] S22. Generate corresponding neighbors and high-order subgraphs according to different categories of meta-paths, as shown in formula (2.2):
[0108]
[0109] Among them, G he represents the generated neighbor subgraph, G ho Represents the generated high-order subgraph.
[0110] S3, intra-subgraph aggregation, based on normalized convolution and self-attention mechanism, the nodes in the neighbor subgraph and high-order subgraph are aggregated respectively.
[0111] S31. For high-order subgraphs, since the nodes are of the same type, a method based on normalized graph convolution is used to aggregate the features of neighbor nodes.
[0112] S311, firstly, the adjacency matrix A of the subgraph ho Normalization is performed to reduce the impact of node degree differences on the aggregation process, as shown in formula (3.1):
[0113]
[0114] in, is the normalized adjacency matrix of the high-order subgraph, D ho is the degree matrix, A ho is the adjacency matrix.
[0115] S312: Aggregate neighbor nodes in the high-order subgraph through graph convolution to obtain the feature representation of the aggregation in the high-order subgraph As shown in formula (3.2);
[0116]
[0117] in, is the normalized matrix after adding self-connection, W is the trainable weight matrix, is the node feature set in the high-order subgraph.
[0118] S32. For the neighbor subgraph, since the neighbor nodes of the target node belong to different node types or have different relationship types with the target node, the self-attention mechanism is used to aggregate the neighbor nodes in the neighbor subgraph.
[0119] S321, using the self-attention mechanism to aggregate the neighbor nodes in the neighbor subgraph, given the neighbor subgraph G he The node pair (u, v) in G, where (u, v)∈G he , calculate the normalized attention weight coefficient β between node u and node v by formula (3.3) uv ;
[0120]
[0121] Among them, p is a learnable parameterized attention vector, Y u Represents the neighbor nodes of node u.
[0122] S322, calculate the attention weight β uv Then, the features of neighbor nodes are aggregated through formula (3.4) to obtain the aggregated feature representation in the neighbor subgraph After the multi-head attention mechanism balances and stabilizes the model training process, the feature representation of the aggregation in the neighbor subgraph is obtained As shown in formula (3.5);
[0123]
[0124]
[0125] S4, subgraph out-aggregation, out-aggregating neighbor subgraphs and high-order subgraphs based on the cross-attention mechanism.
[0126] S41. The subgraphs are aggregated externally through the cross-attention mechanism to achieve efficient integration of subgraph information from different perspectives, so that the model can have better generalization ability when processing different types of heterogeneous graphs. The cross-attention coefficient A is calculated by formula (4.1): cross :
[0127]
[0128] Among them, d k Represents the dimension of the key vector, the query vector Key Vector W q , W l is the corresponding projection matrix;
[0129] S42. Using the cross attention coefficient A cross The value vector V is weighted and summed using formula (4.2) to generate the fused comprehensive representation:
[0130] H final =A cross ·V (4.2)
[0131] Among them, H final The value vector is a comprehensive representation that combines the neighbor subgraph and high-order subgraph information and is used as the final node embedding representation of the model for use as input for downstream tasks. W v is the corresponding projection matrix.
[0132] S5. Joint training and optimization: The loss of node attribute completion is jointly trained with the loss of downstream tasks. During the training process, back propagation and gradient descent algorithms are used to iteratively optimize the model parameters, so that the model can learn jointly in attribute completion and downstream tasks.
[0133] S51. For the node attribute completion task, the mean square error (MSE) is used as the loss function of attribute completion to measure the error between the true attributes of the node and the reconstructed attributes. A masking mechanism is introduced to calculate the MSE loss only on nodes with known true attributes. The specific formula is shown in (5.1).
[0134]
[0135] in, is the loss function of mean square error MSE, N is the number of nodes, is the attribute vector of the i-th node predicted by the model, X i is the true attribute vector of the i-th node, and M is the mask matrix.
[0136] S52. For downstream tasks, cross entropy is selected as the loss function. The formula is as follows:
[0137]
[0138] in, is the cross entropy loss function, y L represents a collection of nodes with labels, represents the true label of the node, represents the node embedding vector output by the model, and C represents the parameters of the classifier.
[0139] S53. By merging the node attribute completion loss and the downstream task loss, the joint loss function is obtained. The formula is shown in (5.3). During the training process, the back propagation and gradient descent algorithms are used to iteratively optimize the model parameters, so as to minimize the overall loss of the model.
[0140]
[0141] in, is the joint loss function, and λ is a hyperparameter used to balance the relative weights of the two parts of the loss.
[0142] In order to fully verify the feasibility and performance advantages of the method, this embodiment designed and carried out relevant experimental research. The experiment selected three public datasets (ACM, IMDB, DBLP) that are widely used in the field of heterogeneous graph representation learning to evaluate the actual effect.
[0143] At the same time, eight existing advanced methods (GCN, GAT, HAN, GTN, ie-HGCN, MAGNN, HGNN-AC, HOAE) were selected for comparative experiments.
[0144] The method proposed in this embodiment was compared with eight other methods on three public data sets to evaluate its actual effect in the semi-supervised node classification task. During the experiment, the nodes in the heterogeneous graph were divided into training sets (20%, 40%, 60%, 80%), validation sets (10%) and test sets (remaining nodes) according to corresponding proportions, and the test set data was used to verify the effect of the model. Macro-F1 and Micro-F1 were selected as the evaluation indicators of the model. The experimental results are shown in Table 1. Judging from the results of the comprehensive comparative experiments, this embodiment has good performance, which proves that the end-to-end attribute completion strategy is effective, and the structural information and semantic associations between nodes can be fully captured through neighbor subgraphs and high-order subgraphs, which effectively improves the performance of the model in downstream tasks.
[0145] Table 1 Experimental results of node classification task (%)
[0146]
[0147] Therefore, the present invention adopts the above-mentioned heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning. First, a node attribute completion strategy is proposed to complete the missing attributes of the node through the encoder-decoder architecture; then, a subgraph learning mechanism is designed to divide the heterogeneous graph into multiple neighbors and high-order subgraphs, and a special node aggregation method is given for different types of subgraphs to capture richer local and global information; finally, the subgraphs from different perspectives are fused based on the cross-attention mechanism to generate the final node representation for downstream tasks; and experiments show that the performance of the method proposed in the present invention on three real data sets is better than that of the existing advanced methods, showing better performance.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning, characterized in that: The following steps are involved: S1. Design an attribute completion mechanism based on heterogeneous graph encoder-decoder. The encoder encodes the initial attributes of the node, and then the decoder reconstructs the complete attributes of the node to complete the missing node attributes. S2, subgraph segmentation, divides the heterogeneous graph into two types of subgraphs based on meta-paths, including neighbor subgraphs and high-order subgraphs; S3, intra-subgraph aggregation, based on normalized convolution and self-attention mechanism, the nodes in the neighbor subgraph and high-order subgraph are aggregated; S4, subgraph out-aggregation, out-aggregating neighbor subgraphs and high-order subgraphs based on the cross-attention mechanism; S5. Joint training and optimization: The loss of node attribute completion is jointly trained with the loss of downstream tasks, and back propagation and gradient descent algorithms are used to iteratively optimize model parameters during the training process.
2. According to claim 1, a heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning is characterized in that: The specific steps of S1 are as follows: S11, map different types of node features to a common feature space through feature projection, and use one-hot vectors to initialize node attributes for nodes with missing attributes; Among them, x i represents the initial node feature, h i represents the node features after projection, represents a learnable projection matrix; S12. Design a heterogeneous graph encoder and use R-GCN to encode the initial features of the nodes to generate an embedded representation that contains node structure and relationship information. Among them, σ() represents the activation function, represents the node feature of node i at the (l+1)th layer, R is the set of different relationship types in the heterogeneous graph, r represents one of the relationship types, t represents the neighbor node under relationship r, V represents the set of nodes in the graph, V i r represents the neighbor set of node i under relationship r, l represents the number of encoder layers, is the convolution weight matrix corresponding to the relation r, is the weight matrix of the self-connection; S13, the embedding representation h generated by the encoder l In the input decoder, the decoder performs weighted aggregation of first-order neighbors through the self-attention mechanism to obtain the completed attributes of the node; S14. Concatenate the completed attributes with the existing node attributes to obtain a complete node attribute matrix for in The completed attributes of nodes representing unknown attributes, Indicates the initial attributes of an existing node, V - Represents a set of nodes with unknown attributes, V + Represents a collection of nodes with known properties.
3. According to claim 2, a heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning is characterized in that: The specific steps of S13 polymerization are: S131. Given a node pair (i, j), calculate the importance e of node j to the attribute-missing node i using formula (1.3) i,j ; Among them, a is a learnable parameterized attention vector, || represents the vector concatenation operation; S132, through formula (1.4) for e i,j Normalize to get the attention weight coefficient α i.j ; in, represents the first-order neighbors of node i, exp() represents the exponential function with base e; S133, the decoder aggregates the features of the first-order neighbor nodes through formula (1.5), and then uses the multi-head attention mechanism to alleviate the situation where the graph data exhibits high variance, thereby improving the stability of model training; in, represents the attribute representation of node i after completion, and E is the number of attention heads.
4. According to claim 1, a heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning is characterized in that: The specific steps of S2 are as follows: S21, split the original graph into neighbors and high-order subgraphs using a meta-path-based approach; p m =p b ,b∈{h e ,h o } (2.1) Among them, p represents the meta-path, p m represents the meta-path after division, b represents the constraint condition, and its value range is the set {h e ,h o }, p b represents the meta-path under a specific condition b, h e represents the meta-path that can generate a neighbor subgraph, h o represents a meta-path that can generate a higher-order subgraph; S22, generating corresponding neighbors and high-order subgraphs according to different categories of meta-paths; Among them, G he represents the generated neighbor subgraph, G ho Represents the generated high-order subgraph.
5. According to claim 1, a heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning is characterized in that: The specific steps of S3 are as follows: S31. For high-order subgraphs, a method based on normalized graph convolution is used to aggregate the features of neighbor nodes. S32. For the neighbor subgraph, a self-attention mechanism is used to aggregate the neighbor nodes in the neighbor subgraph.
6. A heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning according to claim 5, characterized in that: The specific method of S31 is as follows: S311, first of all, the adjacency matrix A of the subgraph ho Normalization is performed to reduce the impact of node degree differences on the aggregation process; in, is the normalized adjacency matrix of the high-order subgraph, D ho is the degree matrix, A ho is the adjacency matrix; S312: Aggregate neighbor nodes in the high-order subgraph through graph convolution to obtain the feature representation of the aggregation in the high-order subgraph in, is the normalized matrix after adding self-connection, W is the trainable weight matrix, is the node feature set in the high-order subgraph.
7. A heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning according to claim 5, characterized in that: The specific method of S32 is as follows: S321, using the self-attention mechanism to aggregate the neighbor nodes in the neighbor subgraph, given the neighbor subgraph G he The node pair (u, v) in G, where (u, v)∈G he , calculate the normalized attention weight coefficient β between node u and node v by formula (3.3) uv ; Among them, p is a learnable parameterized attention vector, Y u Represents the neighbor nodes of node u; S322, calculate the attention weight β uv Finally, the features of neighbor nodes are aggregated through formula (3.4), and after the training process of the multi-head attention mechanism to balance and stabilize the model, the feature representation of the aggregation in the neighbor subgraph is obtained.
8. The heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning according to claim 1 is characterized in that: The specific steps of S4 are as follows: S41. Perform external aggregation on the subgraphs through the cross-attention mechanism, and calculate the cross-attention coefficient A through formula (4.1) cross : Among them, d k Represents the dimension of the key vector, the query vector Key Vector W q , W k is the corresponding projection matrix; S42. Using the cross attention coefficient A cross The value vector V is weighted and summed using formula (4.2) to generate the fused comprehensive representation: H final =A cross ·In (4.2) Among them, H final is a comprehensive representation that combines the neighbor subgraph and high-order subgraph information. The value vector W v is the corresponding projection matrix.
9. The heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning according to claim 1 is characterized in that: The specific steps of S5 are as follows: S51. For the node attribute completion task, the mean square error (MSE) is used as the loss function of attribute completion to measure the error between the true attribute and the reconstructed attribute of the node, and a masking mechanism is introduced to calculate the MSE loss only on nodes with known true attributes. S52. For downstream tasks, select cross entropy as the loss function; S53. By merging the node attribute completion loss and the downstream task loss, a joint loss function is obtained, and the back propagation and gradient descent algorithms are used to iteratively optimize the model parameters during the training process.
10. A heterogeneous graph representation learning method based on neighbor and high-order subgraph aggregation learning according to claim 9, characterized in that: The formulas for each loss function in S5 are as follows: in, is the loss function of mean square error MSE, N is the number of nodes, is the attribute vector of the i-th node predicted by the model, X i is the true attribute vector of the i-th node, and M is the mask matrix; in, is the cross entropy loss function, y L represents a collection of nodes with labels, represents the true label of the node, represents the node embedding vector output by the model, and C represents the parameters of the classifier; in, is the joint loss function and λ is a hyperparameter.