Federal heterogeneous graph representation learning method and system based on pseudo element path generation

By generating and clustering pseudo-element paths in federated heterogeneous graph representation learning, the problem of missing information across client graph structure is solved, and the effect of improving model performance is achieved while protecting data privacy.

CN119005300AActive Publication Date: 2024-11-22SHANDONG UNIV

Patent Information

Application Number
CN202411076055.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-11-22
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

The existing federated heterogeneous graph representation learning method is not effective in the problem of missing graph structure information across clients, and there is a risk of data privacy leakage, so it is impossible to effectively restore metapath information across clients.

Method used

Using a method based on pseudo-element path generation, the client generates pseudo-nodes and pseudo-element paths, and through the clustering and allocation mechanism of the central server, the graph structure information across clients is restored, combined with the differential privacy federated averaging method, the model performance is improved and the model is protected. Data privacy.

Benefits of technology

The graph structure information across clients is effectively restored, the model performance is improved, and the overall performance of federated heterogeneous graph representation learning is improved while protecting client data privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005300A_ABST
    Figure CN119005300A_ABST
Patent Text Reader

Abstract

The invention relates to a federal heterogeneous graph representation learning method and system based on pseudo-element path generation, and belongs to the technical field of federal heterogeneous graph representation learning. By introducing pseudo-element path generation, federal heterogeneous graph fusion and federal parameter aggregation methods, the heterogeneous graph representation learning method is well fused into a federal learning architecture, and the learning efficiency is improved. And the model performance is improved through a federated learning architecture. According to the method, the problem of cross-client structure information missing in federal heterogeneous graph representation learning is solved through client pseudo element path generation. According to the method, the local data privacy of the client can be guaranteed by sharing the pseudo element path instead of local real data, the local real heterogeneous graph of each client cannot be acquired by other clients or a central server, the model performance is well improved, and meanwhile, the real heterogeneous graph of each client is not acquired by other clients or a central server. And the protection capability of local data privacy of the client in a federal heterogeneous graph representation learning method is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a federated heterogeneous graph representation learning method and system based on pseudo meta-path generation, belonging to the technical field of federated heterogeneous graph representation learning. Background Art

[0002] Heterogeneous graphs are widely used to model the complex interactions between various entities in reality. Heterogeneous graph representation learning refers to learning appropriate embeddings for heterogeneous graphs in a low-dimensional vector space to better serve further tasks such as recommendation and prediction. Graph Neural Networks (GNNs), which can effectively mine deep relationships between graph nodes, are often used in the field of heterogeneous graph representation learning. However, the performance of GNNs often depends on the number and structural integrity of graphs. Heterogeneous graph representation learning models designed for centrally stored graphs cannot directly achieve the same good performance on distributedly stored graphs. Therefore, federated learning has been introduced into graph representation learning for multi-institutional collaboration. Federated heterogeneous graph representation learning methods improve overall model performance by aggregating the model parameters of each participant while protecting the privacy of each institution's local data.

[0003] Currently, most research on federated graph representation learning focuses on homogeneous graphs. While these approaches address the performance degradation caused by distributed graph data storage through federated learning, they are not suitable for learning the complex structures of heterogeneous graphs. Some research has focused on federated heterogeneous graph representation learning, but most methods are specifically designed for recommender systems. These methods are applicable only to the specialized structure of user-item recommendation graphs and are not applicable to heterogeneous graphs with more complex structures. To learn complex relationships in heterogeneous graphs, some heterogeneous graph representation learning models use meta-paths to mine the heterogeneous neighbors of nodes and use this meta-path-based neighbor information to enhance node representation and learn the global structure of heterogeneous graphs. However, direct application of these methods to federated learning is not ideal. In federated learning scenarios, since data cannot be shared across clients, some cross-client connections between nodes are severed, resulting in some cross-client meta-paths being unreachable. In this scenario, each client's data can be viewed as a subgraph lacking global structural information, and these incomplete subgraphs can degrade model performance. Therefore, recovering the global information contained in these missing meta-paths across clients is crucial for federated heterogeneous graph representation learning.

[0004] Some research has addressed the issue of missing subgraph information across clients in heterogeneous graphs in federated learning, but each approach has its limitations. Some methods supplement missing information by providing encrypted local data to central servers and other clients, but this carries the risk of leaking sensitive local data. Other approaches use federated learning to train a generator to generate pseudo-nodes to supplement information. However, this approach requires the generated pseudo-nodes to be closer to the local node, and therefore still cannot supplement cross-client information, let alone recover information about unreachable meta-paths across clients. Summary of the Invention

[0005] In response to the deficiencies of the above-mentioned prior art, the present invention provides a federated heterogeneous graph representation learning method and system based on pseudo meta-path generation. Previous federated heterogeneous graph representation learning methods either failed to recover the missing information of subgraphs across clients or had the risk of data privacy leakage. Compared with previous federated heterogeneous graph representation learning methods, the present invention recovers the structural information across clients in a privacy-protecting manner, and can make full use of meta-paths to mine potential relationships between nodes, thereby improving performance. Specifically, the present invention designs a relationship-based pseudo meta-path generation method, and uses the generated pseudo meta-path to transmit information across clients. In addition, the present invention also proposes a federated graph fusion and pseudo meta-path allocation method, which can help recover the missing meta-path information of heterogeneous subgraphs. The present invention integrates the proposed new method module into the federated learning framework, which improves the performance of federated graph representation learning, while well protecting the local data privacy of the client.

[0006] Explanation of terms:

[0007] A heterogeneous graph is a graph structure that contains more than one type of nodes and edges. For a node type set V = {v1,…,v m} and edge type set E={e1,…,e n}, if m>1 or n>1, then G is called a heterogeneous graph.

[0008] A subgraph is a graph structure obtained by removing some nodes or edges from the original graph. Given a graph G = (V, E), G sub =(V ′ ,E ′ ) is a subgraph of G if and only if and

[0009] A meta-path is a path pattern that describes nodes and edges arranged in a specific order in a heterogeneous graph. It can be defined by the types of nodes and edges and the specific order. A meta-path Φ can be expressed as (v1, e1, v2…v i-1 ,e j ,v i …v k-1,e l ,v k ), where i, j ≤ max (m, n), k ≤ m, l ≤ n. In the meta-path Φ, v1 is called the starting node, and the final destination is v k is called the target node, and the v in the path i is called the intermediate node, the target node v k It is the neighbor node of the starting node v0 based on the meta-path.

[0010] Federated learning is a learning framework that enables collaborative model training across multiple institutions. Federated learning involves multiple clients and a central server. In a classic federated learning framework, each client trains a local model using local data and uploads the model parameters to the central server. The central server aggregates these local model parameters to form global model parameters, which are then sent to each client. The client then uses the global model parameters to update its local model. The goal of federated learning is to optimize the global model while protecting client data privacy, ultimately improving the performance of each client's model.

[0011] The technical solutions of the present invention are as follows:

[0012] A federated heterogeneous graph representation learning method based on pseudo meta-path generation includes the following steps:

[0013] ST1: Datasets of different sizes are selected from publicly available heterogeneous graph datasets and distributed to each client participating in federated learning in uneven proportions. Cross-client edges are cut off to obtain each client's local heterogeneous subgraph dataset. The client divides the local heterogeneous subgraph dataset into training, validation, and test sets. All clients follow the same learning task on the local heterogeneous subgraph dataset and use the same heterogeneous graph structure to represent the learning model. All clients also use the same defined meta-path to perform local learning tasks.

[0014] ST2: The client constructs a relationship-based pseudo-neighbor node generator based on the local heterogeneous subgraph dataset, builds a loss function, and optimizes the generated pseudo-neighbor nodes to make them close to the representation of real neighbor nodes;

[0015] ST3: Using a relationship-based pseudo-neighbor node generator, the client uses the real nodes in the local heterogeneous subgraph as the starting nodes according to the node relationship order in the meta-path defined by all clients, generates some pseudo nodes, and connects the starting nodes and the generated pseudo nodes in sequence to form a pseudo meta-path. The client then adds the generated pseudo meta-path to the local heterogeneous subgraph training set to form a local supplementary subgraph.

[0016] Each client follows the same defined metapath to perform learning tasks. This same metapath is often a convention used in certain datasets. For example, in paper datasets, the commonly used metapath is "author-paper-topic-paper-author" or "author-paper-author." Most learning tasks on paper datasets use this defined metapath. Because this solution is based on federated learning, each client must follow this same defined metapath.

[0017] ST4: The client uploads all pseudo nodes and their topological structures in the locally generated pseudo meta-path to the central server. The central server receives the pseudo nodes and topological structures of each client and constructs a similarity matrix for every two nodes with the same topological position from different clients.

[0018] ST5: The central server constructs similar node evaluation rules, clusters similar nodes based on the similar node evaluation rules, and assigns the same pseudo-meta-path structure to similar nodes from different clients;

[0019] ST6: The central server sends the pseudo nodes and pseudo meta-path structures added by each client to the corresponding client. The client receives the newly added pseudo nodes and pseudo meta-path structures from other clients and adds them to the local supplementary subgraph to form a federated supplementary subgraph.

[0020] ST7: Based on the local training set, the client builds a pseudo-label predictor and a pseudo-label prediction objective function to optimize the predicted pseudo-labels to be close to the true labels.

[0021] ST8: The client uses the pseudo-label predictor to predict the newly added pseudo-node labels, further improving the label set of the federated supplementary subgraph. The federated supplementary subgraph and all its labels are used as training data for the heterogeneous graph representation learning model.

[0022] ST9: The client locally trains a heterogeneous graph representation learning model. This model is based on a heterogeneous graph attention network structure, uses attention mechanisms at both the node and semantic levels, and leverages meta-paths to learn complex relationships between nodes. By setting hyperparameters to weigh the weights of different components, the optimal local target model expression and local model parameters are obtained.

[0023] ST10: The client uploads the optimal local model parameters to the central server. The central server receives the local model parameters from different clients and aggregates them using the differential privacy federated averaging method to form the global model parameters.

[0024] ST11: The central server sends the global model parameters to each client. The client receives the global model parameters and uses them to update the local model, that is, replacing the local model parameters with the received global model parameters.

[0025] ST12: The client further fine-tunes the updated local model on the real local heterogeneous subgraph training set (fine-tuning is to train a model that has been trained on a certain dataset with another dataset), and then uploads the new local model parameters to the central server;

[0026] ST13: The central server and client repeat the above process of parameter aggregation, sending global model parameters, local fine-tuning, and uploading local model parameters until the global model performance reaches convergence;

[0027] ST14: The client uses the optimal local heterogeneous graph representation learning model expression to represent the real local heterogeneous subgraph to be learned, learns the embedded representation of the nodes in the graph, and further applies it to downstream tasks such as node classification.

[0028] Preferably, in ST3, the relationship-based pseudo neighbor node generator is trained based on the structure of a fully connected neural network. Specifically, the fully connected neural network takes the embedding representation of the starting node based on the selected relationship, the embedding representation of the selected relationship, and the embedding representation of the neighbor node based on the relationship as input, and finally outputs the generated pseudo neighbor node embedding representation;

[0029] Under the guidance of the meta-path, the client generates pseudo-neighbor nodes based on the pseudo-neighbor node generation algorithm based on the relationship, thereby forming a pseudo-meta-path to supplement the local heterogeneous subgraph;

[0030] The process of the pseudo neighbor node generation algorithm based on relationship is:

[0031] Randomly select some starting nodes according to a certain ratio, and use the relationship-based pseudo neighbor node generator to generate pseudo neighbor nodes for the specific relationship one by one according to the order of the relationship set defined by the specific meta-path, until a complete pseudo meta-path is formed;

[0032] The meta-path contains multiple nodes. Starting from the starting node, they are generated one node at a time in sequence. All the pseudo nodes generated eventually form a pseudo-meta-path. The relationship-based pseudo-neighbor node generation algorithm can be mainly seen as two steps: 1) "Relationship-based pseudo-neighbor node generation algorithm" (only one type of pseudo node can be generated at a time): input a certain type of node and a certain relationship (i.e., the type of edge), and use the "relationship-based pseudo-neighbor node generator" to generate a specific type of node to which the input node is connected through the input edge. For example, if the input node type is "author" and the input relationship type is "writing", then the neighbor node generated by the "author" node based on the "writing" relationship is the "paper" node. Because the "paper" node is generated by the generator and does not really exist, it is "pseudo". 2) "Meta-path guided" (obtaining a pseudo-meta-path): The meta-path provides the node sequence, generates pseudo nodes multiple times, and connects them in sequence to obtain a pseudo-meta-path.

[0033] The method for generating pseudo neighbor nodes is as follows: a certain type of node and a certain type of relationship are used as input, and a fully connected neural network is used to generate pseudo neighbor nodes of the input node based on the input relationship; the generated pseudo neighbor nodes are the output of the fully connected neural network, and for each different combination of input node type and input relationship type, a different relationship-based pseudo neighbor node generator is used to correspondingly generate each corresponding pseudo neighbor node.

[0034] Preferably, in ST2, the relationship-based pseudo neighbor node generator uses Adam as the optimizer, ReLU as the activation function, and Dropout to prevent overfitting, and uses the hidden layer inside the network to learn the mapping relationship between inputs;

[0035] In order to make the embedding representation of the generated pseudo neighbor nodes as close as possible to the real nodes, MSE is used as the loss function to measure the generated pseudo neighbor node embedding The distance from the true neighbor node embedding Y; the MSE loss function is shown in formula (I):

[0036]

[0037] In formula (I), n represents the dimension of node embedding, y i is the specific value of the real neighbor node embedding Y in the i-th dimension, is the pseudo neighbor node embedding The specific value in the i-th dimension;

[0038] As local pseudo neighbor nodes are generated and pseudo meta-paths are formed, the client adds the generated pseudo meta-paths to the local heterogeneous subgraph training set, and finally forms a local supplementary subgraph.

[0039] Preferably, in ST4, the client screens out credible pseudo meta-paths from the local pseudo meta-paths. A credible pseudo meta-path refers to a pseudo meta-path whose topology is completely composed of generated nodes and structures and does not include the real starting node from which the pseudo meta-path is generated. After screening out all credible pseudo meta-paths locally, the client uploads these credible pseudo meta-paths to the central server.

[0040] The central server receives the trusted pseudo meta-path from each client. For each type of pseudo node in these pseudo meta-paths, the central server calculates the similarity between every two pseudo nodes from different clients that have the same topological position and the same type in the pseudo meta-path to form a pseudo node similarity matrix.

[0041] Preferably, Manhattan distance is used to measure the similarity between each pair of nodes; the Manhattan distance between nodes is calculated as shown in formula (II):

[0042]

[0043] In formula (II), Emb i and Emb j Represent the node embeddings from two different clients i and j, specifically, Emb i =(x1,x2,…,x n ) and Emb j =(y1,y2,…,y n );Use S i,j Represents the similarity between node i and node j. The similarity is calculated as shown in formula (III):

[0044]

[0045] From formula (III), we can see that the smaller the Manhattan distance between nodes, the greater the similarity between nodes;

[0046] The central server constructs similar node evaluation rules based on the similarity between nodes and some constraints, and clusters similar nodes based on this evaluation rule, so as to find the most similar pseudo nodes from other clients for each client's pseudo node.

[0047] Preferably, the constraints include a node similarity threshold τ and a maximum number of similarities. Specifically, only when the similarity of two nodes is greater than the given threshold τ, the two nodes will be considered similar. The maximum number of similar nodes for each node is set to k, that is, after sorting from high to low similarity, a maximum of k similar nodes will be retained, and V similar Represents the set of nodes similar to a certain node, |V similar | represents the number of nodes in the set; the constraint condition is shown in formula (IV):

[0048]

[0049] The central server clusters the most similar pseudo nodes that meet the requirements of formula (IV), that is, the top k nodes sorted by similarity from high to low. This is to restore the situation where the same node appears on different clients. The next step of the relationship between these pseudo nodes based on the pseudo meta-path in different clients is the "missing relationship between subgraphs" that needs to be supplemented. Therefore, the central server assigns the same connection relationship to these similar pseudo nodes, allowing the pseudo nodes to connect to the neighboring nodes of the most similar pseudo nodes on other clients, thereby increasing the pseudo meta-path across clients.

[0050] For each intermediate node in each pseudo meta-path of each client, the central server cyclically performs the above clustering and adding connection operations. Ultimately, the pseudo meta-paths from different clients that were originally independent of each other in the central server form an interconnected fusion graph.

[0051] The central server checks the newly added connection relationship of each client's pseudo node and sends these newly added pseudo meta-paths and their structural relationships from other clients to the corresponding clients.

[0052] Preferably, in ST7, based on the idea of ​​semi-supervised learning, to ensure the availability of pseudo meta-path data during the training process, the pseudo nodes in the pseudo meta-path need to have some pseudo labels. Therefore, the client constructs a pseudo label predictor based on the local training set obtained by partitioning the original local heterogeneous subgraph dataset to predict some pseudo labels for the locally generated pseudo nodes and the pseudo nodes supplemented by the federation, thereby achieving effective data expansion.

[0053] A fully connected neural network is used as the pseudo-label predictor, and the ReLU activation function and Adam optimizer are selected. At the same time, the objective function of pseudo-label prediction is constructed by minimizing the cross-entropy loss. The goal is to make the predicted pseudo-label as close as possible to the true label. The training loss is shown in formula (V):

[0054]

[0055] In formula (V), y p Represents the output of the neural network, Label r represents the true label, y p [Label r ] represents vector y p Corresponding to the true label Label r The component, ∑ i exp(y p [i]) where i represents all possible category indices, y p[i] represents vector y p The component corresponding to the category with index number i in ∑ i exp(y p [i]) represents the sum of the predicted components of all categories after exponential operation;

[0056] In ST9, the client trains a heterogeneous graph representation learning model on a new training dataset. The new training set contains: a local true subgraph training set, locally supplemented pseudo meta-paths, federated supplemented pseudo meta-paths, a local true label set, and a pseudo label set predicted by a label predictor.

[0057] The heterogeneous graph representation learning model uses meta-paths to learn the complex relationships between nodes in heterogeneous graphs. The model uses an attention mechanism to measure the different importance of meta-paths and neighboring nodes.

[0058] Based on the idea and network structure of Heterogeneous Graph Attention Network (HAN), attention mechanisms are used at the node level and semantic level respectively;

[0059] Node-level attention is used to learn the importance of the node's neighbor nodes based on meta-paths. In addition to the real nodes, these neighbor nodes also include pseudo neighbors based on pseudo meta-paths added during local supplementation and federated supplementation. The node embedding representation is updated based on node-level attention as shown in Formula (VI):

[0060]

[0061] In formula (VI), Emb i represents the embedding representation of node i, Φ represents the unified definition of a meta-path, Indicates that node i is based on a real meta-path The set of real neighbor nodes of Indicates that node i is based on a pseudo meta-path The pseudo neighbor node set of represents the weight coefficient, Sig(·) is the Sigmoid activation function, and || is the connection operation;

[0062] Semantic-level attention is used to measure the importance of different meta-paths, where |Φ| represents the number of meta-paths defined differently. Represents the meta-path Φ i The nodes in which the embedding representation has been learned, q T is a semantic-level attention vector; the embedding representation of the node is updated based on the semantic-level attention, as shown in formula (VII):

[0063]

[0064] In formula (VII), W represents the weight matrix, b represents the bias vector, and tanh(W·Emb i +b) means embedding the node i Perform affine transformation and then perform nonlinear mapping through the hyperbolic tangent activation function tanh; where W and b are continuously updated as the model is trained;

[0065] During the client-side training phase for the local heterogeneous graph representation learning model, the Adam optimizer and cross-entropy loss function are used. Dropout and early stopping strategies are also introduced to prevent overfitting. After training is complete, the client obtains the currently optimal local model.

[0066] Preferably, in ST10, a weighted average parameter aggregation method is adopted, wherein the client c i Weight It depends on the amount of data of the classification target nodes it contains, as shown in formula (VIII):

[0067]

[0068] In formula (VIII), Client represents the set of all clients participating in federated learning. Represents client c i The set of all target nodes in , Represents client c i The number of all target nodes in ;

[0069] Based on the idea of ​​differential privacy, to further improve privacy protection, randomly generated Gaussian noise is added to the aggregated global model parameters, which conforms to the normal distribution shown in formula (IX):

[0070]

[0071] In formula (IX), u represents the mean, σ represents the standard deviation; u = 0 and the random variable x that obeys the normal distribution is the added noise, which is expressed as X~N(0,σ 2 ), the degree of noise added can be controlled by controlling the size of σ, but a proper trade-off between privacy protection and model utility is required;

[0072] The central server implements a "differential privacy federated averaging" parameter aggregation method, as shown in formula (X):

[0073]

[0074] In formula (X), Param global Represents global model parameters, Param local Represents the client local model parameters;

[0075] In ST12, the specific method of fine-tuning is as follows: the training set divided from the local heterogeneous subgraph dataset is used as the training set to train the updated local model.

[0076] In ST13, whether the global model has converged can be judged by the parameter change of the global model in each round of federated training. The specific judgment method is as follows: the central server monitors the parameter change of the global model in each round. If the parameter change of the global model is less than a certain set threshold in several consecutive rounds of training, the global model is considered to have converged.

[0077] A federated heterogeneous graph representation learning system based on pseudo meta-path generation is characterized in that it is used to implement the above-mentioned federated heterogeneous graph representation learning method based on pseudo meta-path generation, including:

[0078] The pseudo meta-path generation unit is configured to: generate some pseudo nodes based on the nodes and relationships in the local real heterogeneous graph, and then form some pseudo meta-paths according to the meta-path pattern;

[0079] The federated heterogeneous graph fusion unit is configured to: cluster the pseudo nodes uploaded by the client by the central server, and add new pseudo meta-path structures for similar nodes to obtain a mutually connected fused heterogeneous graph composed of pseudo meta-paths;

[0080] The heterogeneous graph representation learning unit is configured as follows: the client uses a model based on meta-path and attention mechanism to learn the embedding representation of nodes in the local heterogeneous graph;

[0081] The federated parameter aggregation unit is configured as follows: the central server aggregates model parameters from different clients using a method based on differential privacy and federated averaging to obtain global model parameters.

[0082] A computer device includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, it implements the steps of the above-mentioned federated heterogeneous graph representation learning method based on pseudo meta-path generation.

[0083] A computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the above-mentioned federated heterogeneous graph representation learning method based on pseudo meta-path generation are implemented.

[0084] Where the present invention is not exhaustive, please refer to the prior art.

[0085] The beneficial effects of the present invention are:

[0086] 1. This invention introduces a complete solution for heterogeneous graph representation learning for multi-institutional collaboration. By introducing pseudo-meta-path generation, federated heterogeneous graph fusion, and federated parameter aggregation methods, the heterogeneous graph representation learning method is well integrated into the federated learning architecture. The model performance is improved through the federated learning architecture, providing a beneficial idea and feasible solution for the field of federated heterogeneous graph representation learning.

[0087] 2. By generating pseudo meta-paths on the client side, this invention solves the problem of missing cross-client structural information in federated heterogeneous graph representation learning. Specifically, under the coordination of the central server, clients can use the generated pseudo meta-paths to transmit important structural information from their local heterogeneous graph to other clients. Each client can then leverage this cross-client structural information when training its local model, thereby improving the performance of the client's local heterogeneous graph representation model.

[0088] 3. By sharing pseudo-meta-paths instead of local real data, the present invention can protect the client's local data privacy. The local real heterogeneous graph of each client will not be obtained by other clients or central servers. This technology can greatly improve the protection ability of the client's local data privacy in the federated heterogeneous graph representation learning method while greatly improving the model performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] The drawings in the specification, which constitute a part of this application, are used to provide further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute improper limitations on this application.

[0090] Figure 1 Schematic diagram of the process of the federated heterogeneous graph representation learning method based on pseudo meta-path generation of the present invention;

[0091] Figure 2 Schematic diagram of the process of generating pseudo meta-path for the client;

[0092] Figure 3 Schematic diagram of the process of fusing pseudo meta-paths for the central server. DETAILED DESCRIPTION

[0093] In order to enable people in this technical field to better understand the technical solutions in this specification, the technical solutions in the embodiments of the present invention are clearly and completely described below in conjunction with the drawings in the implementation of this specification, but are not limited to this. Anything not fully described in the present invention shall be based on the conventional technology in this field.

[0094] Example 1

[0095] A federated heterogeneous graph representation learning method based on pseudo meta-path generation includes the following steps:

[0096] ST1: Datasets of different sizes are selected from publicly available heterogeneous graph datasets and distributed to each client participating in federated learning in uneven proportions. Cross-client edges are cut off to obtain each client's local heterogeneous subgraph dataset. The client divides the local heterogeneous subgraph dataset into training, validation, and test sets. All clients follow the same learning task on the local heterogeneous subgraph dataset and use the same heterogeneous graph structure to represent the learning model. All clients also use the same defined meta-path to perform local learning tasks.

[0097] ST2: The client constructs a relation-based pseudo neighbor node generator based on the local heterogeneous subgraph dataset, builds a relation-based pseudo neighbor node generation loss function, and optimizes the generated pseudo neighbor nodes to make them close to the representation of real neighbor nodes;

[0098] ST3: Using a relationship-based pseudo-neighbor node generator, the client uses the real node in the local heterogeneous subgraph as the starting node according to the node relationship order in the meta-path defined by all clients. It generates some pseudo nodes and connects the starting real node and the generated pseudo nodes in sequence to form a pseudo meta-path. The client then adds the generated pseudo meta-path to the local heterogeneous subgraph training set to form a local supplementary subgraph.

[0099] ST4: The client uploads all pseudo nodes and their topological structures in the locally generated pseudo meta-path to the central server. The central server receives the pseudo nodes and their topological structures from each client and constructs a similarity matrix for every two nodes with the same topological position from different clients.

[0100] ST5: The central server constructs similar node evaluation rules, clusters similar nodes based on these evaluation rules, and assigns the same pseudo-meta-path structure to similar nodes from different clients;

[0101] ST6: The central server sends the pseudo nodes and pseudo meta-path structures added by each client to the corresponding client. The client receives the newly added pseudo nodes and pseudo meta-path structures from other clients and adds them to the local supplementary subgraph to form a federated supplementary subgraph.

[0102] ST7: Based on the local training set, the client builds a pseudo-label predictor and a pseudo-label prediction objective function to optimize the predicted pseudo-labels to be close to the true labels.

[0103] ST8: The client uses the pseudo-label predictor to predict the newly added pseudo-node labels, further improving the label set of the federated supplementary subgraph. The federated supplementary subgraph and all its labels are used as training data for the heterogeneous graph representation learning model.

[0104] ST9: The client locally trains a heterogeneous graph representation learning model. This model is based on a heterogeneous graph attention network structure, uses attention mechanisms at both the node and semantic levels, and leverages meta-paths to learn complex relationships between nodes. By setting hyperparameters to weigh the weights of different components, the client obtains the optimal local target model expression and local model parameters.

[0105] ST10: The client uploads the optimal local model parameters to the central server. The central server receives the local model parameters from different clients and aggregates them using the differential privacy federated averaging method to form the global model parameters.

[0106] ST11: The central server sends the global model parameters to each client. The client receives the global model parameters and uses them to update the local model, that is, replacing the local model parameters with the received global model parameters.

[0107] ST12: The client further fine-tunes the updated local model on the local real heterogeneous subgraph training set, and then uploads the new local model parameters to the central server;

[0108] ST13: The central server and client repeat the above process of parameter aggregation, sending global model parameters, local fine-tuning, and uploading local model parameters until the global model reaches convergence;

[0109] ST14: The client uses the optimal local heterogeneous graph representation learning model expression to learn the local real heterogeneous subgraph to learn, learns the embedded representation of the nodes in the graph, and further applies it to downstream tasks such as node classification.

[0110] In the present invention, first, the client locally trains a pseudo-node generator based on relationships, generates pseudo-nodes based on the relationships between local nodes, obtains local pseudo-meta-paths, and uses them to supplement the local heterogeneous graph; secondly, the client uploads the local pseudo-meta-paths to the central server, and the central server fuses the pseudo-meta-paths from different clients by adding the same connection relationships to similar nodes to obtain a federated fusion graph; then, the client further supplements the local heterogeneous graph with the newly added pseudo-meta-paths sent by the central server, and supplements the labels of the pseudo-nodes using the locally trained pseudo-label generator, and then trains a heterogeneous graph representation learning algorithm based on meta-paths and attention on the supplemented local heterogeneous graph. model; then, the client uploads the local optimal model parameters, and the central server aggregates these parameters using the differential privacy federated averaging method to obtain the global model parameters, and sends the global model parameters to the client; then, the client updates the local model with the global model parameters, and fine-tunes it on local real data, and uploads the fine-tuned local optimal model parameters again, and repeats the cycle of the central server updating the global model parameters and the client updating the local model parameters until the global model converges; finally, the client uses the final optimal local model to learn the heterogeneous graph representation of local data, and further uses the learned heterogeneous graph embedding representation for downstream tasks such as node classification.

[0111] Example 2

[0112] A federated heterogeneous graph representation learning method based on pseudo meta-path generation is as described in Example 1, with the following differences:

[0113] Under the guidance of the meta-path, the client generates pseudo-neighbor nodes based on relationships through the meta-path-guided relationship-based pseudo-neighbor node generation algorithm designed by the present invention, thereby forming a pseudo-meta-path to supplement the local heterogeneous subgraph.

[0114] A meta-path-guided, relation-based pseudo-neighbor node generation algorithm is designed: starting nodes are randomly selected according to a certain ratio. Based on the order of the relationship set defined by a specific meta-path, a relation-based pseudo-neighbor node generator is used to generate pseudo-neighbor nodes for each node for a specific relationship, one by one, until a complete pseudo-meta-path is formed. The relation-based pseudo-neighbor node generation method is as follows: a certain type of node and a certain type of relationship are used as input, and a fully connected neural network is used to generate pseudo-neighbor nodes for the input node based on the input relationship. This generated pseudo-neighbor node is the output of this fully connected neural network, which is the relation-based pseudo-neighbor node generator. For each different combination of input node type and input relationship type, a different relation-based pseudo-neighbor node generator is used to generate each corresponding pseudo-neighbor node.

[0115] The relation-based pseudo neighbor node generator is trained based on a fully connected neural network. Specifically, the network takes as input the embedding representation of the starting node based on the selected relation, the embedding representation of the selected relation, and the embedding representation of the neighbor nodes based on this relation, and ultimately outputs the generated pseudo neighbor node embedding representation.

[0116] The relationship-based pseudo neighbor node generator uses Adam as the optimizer, ReLU as the activation function, and Dropout to prevent overfitting, and uses the hidden layer inside the network to learn the mapping relationship between inputs.

[0117] In order to make the embedding representation of the generated pseudo neighbor nodes as close as possible to the real nodes, MSE is used as the loss function to measure the generated pseudo neighbor node embedding The distance from the true neighbor node embedding Y; the MSE loss function is shown in formula (I):

[0118]

[0119] In formula (I), n represents the dimension of node embedding, y i is the specific value of the real neighbor node embedding Y in the i-th dimension, is the pseudo neighbor node embedding The specific value in the i-th dimension.

[0120] As local pseudo neighbor nodes are generated and pseudo meta-paths are formed, the client adds the generated pseudo meta-paths to the local heterogeneous subgraph training set, and finally forms a local supplementary subgraph.

[0121] The client uploads the pseudo meta-path, the central server merges the pseudo meta-path, and the central server distributes the pseudo meta-path, including:

[0122] The client selects trusted pseudo meta-paths from the local pseudo meta-paths. A trusted pseudo meta-path is one whose topology consists entirely of generated nodes and structures, excluding the actual starting node from which the pseudo meta-path was generated. After selecting all local trusted pseudo meta-paths, the client uploads them to the central server.

[0123] The central server receives trusted pseudo-meta-paths from each client. For each type of pseudo-node in these pseudo-meta-paths, the central server calculates the similarity between every two pseudo-nodes from different clients that have the same topological position and the same type in the pseudo-meta-path to form a pseudo-node similarity matrix.

[0124] Manhattan distance is used to measure the similarity between each pair of nodes; the Manhattan distance between nodes is calculated as shown in formula (II):

[0125]

[0126] In formula (II), Emb i and Emb j Represent the node embeddings from two different clients i and j, specifically, Emb i =(x1,x2,…,x n ) and Emb j =(y1,y2,…,y n ). Use S i,j Represents the similarity between node i and node j. The similarity is calculated as shown in formula (III):

[0127]

[0128] From formula (III), we can see that the smaller the Manhattan distance between nodes, the greater the similarity between nodes;

[0129] The central server constructs similar node evaluation rules based on the similarity between nodes and some constraints, and clusters similar nodes based on this evaluation rule, so as to find the most similar pseudo nodes from other clients for each client's pseudo node;

[0130] The proposed constraints include the node similarity threshold and the maximum number of similarities. Specifically, only when the similarity of two nodes is greater than the given threshold τ, the two nodes will be judged to be similar. In addition, the maximum number of similar nodes for each node is set to k, which means that after sorting from high to low similarity, at most k similar nodes will be retained; using V similar Represents the set of nodes similar to a certain node |V similar | represents the number of nodes in the set. The constraint condition is shown in formula (IV):

[0131]

[0132] The central server clusters the most similar pseudo nodes that meet the requirements of formula (IV), namely the top k nodes sorted by similarity from high to low. This is to restore the situation where the same node appears on different clients. The next step of the relationship between these pseudo nodes based on the pseudo meta-path in different clients is the "missing relationship between subgraphs" that needs to be supplemented. Therefore, the central server assigns the same connection relationship to these similar pseudo nodes, allowing the pseudo nodes to connect to the neighboring nodes of the most similar pseudo nodes on other clients, thereby increasing the pseudo meta-path across clients.

[0133] For the intermediate nodes in each pseudo meta-path of each client, the central server cyclically performs the above clustering and adding connection operations. Ultimately, the pseudo meta-paths from different clients that were originally independent of each other in the central server form an interconnected fusion graph.

[0134] The central server checks the newly added connection relationship of each client's pseudo node and sends these newly added pseudo meta-paths and their structural relationships from other clients to the corresponding clients.

[0135] The client supplements the local subgraph with newly added pseudo meta-paths from other clients, thereby recovering the missing structural information across clients. The client then builds a pseudo label predictor to further improve the federated supplemented subgraph data, including:

[0136] The client receives the newly added pseudo nodes and pseudo meta-path structures from other clients and adds them to the local supplementary subgraph containing the locally generated pseudo meta-path to form a federated supplementary subgraph.

[0137] Based on the concept of semi-supervised learning, to ensure the availability of pseudo-meta-path data during training, pseudo-nodes in the pseudo-meta-path need to have some pseudo-labels. Therefore, the client constructs a pseudo-label predictor based on the local training set obtained by partitioning the original local heterogeneous subgraph dataset. This predicts pseudo-labels for locally generated pseudo-nodes and pseudo-nodes supplemented by the federation, achieving effective data expansion.

[0138] A fully connected neural network is used as the classifier, with the ReLU activation function and the Adam optimizer. The objective function for pseudo-label prediction is constructed by minimizing the cross-entropy loss, with the goal of making the predicted pseudo-labels as close as possible to the true labels. The training loss is shown in Equation (V):

[0139]

[0140] In formula (V), y p Represents the output of the neural network, Label r represents the true label, y p [Label r ] represents vector y p Corresponding to the true label Label r The component, ∑ i exp(y p [i]) where i represents all possible category indices, y p [i] represents vector y p The component corresponding to the category with index number i in ∑ i exp(y p[i]) represents the sum of the predicted components of all categories after exponential operation.

[0141] The client adds the predicted pseudo labels to the label set of the federated supplementary subgraph, and uses the federated supplementary subgraph and its label set as the training dataset for the heterogeneous graph representation learning model.

[0142] The client trains a heterogeneous graph representation learning model on a new training dataset. This new training set consists of: a local ground-truth subgraph training set, locally supplemented pseudo meta-paths, federated pseudo meta-paths, a local ground-truth label set, and a pseudo-label set predicted by a label predictor. The heterogeneous graph representation learning model utilizes meta-paths to learn the complex relationships between nodes in the heterogeneous graph; the model uses an attention mechanism to weigh the importance of meta-paths and neighboring nodes.

[0143] Based on the idea and network structure of Heterogeneous Graph Attention Network (HAN), attention mechanisms are used at the node level and semantic level respectively.

[0144] Node-level attention is used to learn the importance of the node's neighbor nodes based on meta-paths. In addition to the real nodes, these neighbor nodes also include pseudo neighbors based on pseudo meta-paths added during local supplementation and federated supplementation. The node embedding representation is updated based on node-level attention as shown in Formula (VI):

[0145]

[0146] In formula (VI), Emb i represents the embedding representation of node i, Φ represents the unified definition of a meta-path, Indicates that node i is based on a real meta-path The set of real neighbor nodes of Indicates that node i is based on a pseudo meta-path The set of pseudo neighbor nodes. represents the weight coefficient, Sig(·) is the Sigmoid activation function, and || is the connection operation.

[0147] Semantic-level attention is used to measure the importance of different meta-paths. |Φ| represents the number of meta-paths defined differently. Represents the meta-path Φ i The nodes in which the embedding representation has been learned, q T Is a semantic-level attention vector. The embedding representation of the node is updated based on the semantic-level attention, as shown in formula (VII):

[0148]

[0149] In formula (VII), W represents the weight matrix, b represents the bias vector, and tanh(W·Embi +b) means embedding the node i An affine transformation is performed, and then a nonlinear mapping is performed through the hyperbolic tangent activation function tanh; where W and b are continuously updated as the model is trained.

[0150] Furthermore, preferably, during the client-side training phase of the local heterogeneous graph representation learning model, the Adam optimizer and cross-entropy loss function are used, while dropout and early stopping strategies are also introduced to prevent overfitting. After training is complete, the client obtains the currently optimal local model.

[0151] Through multiple rounds of model parameter exchanges between the client and the central server, the global model parameters and the client's local model parameters are continuously updated. Ultimately, each client obtains the optimal local model, including:

[0152] The client uploads the current optimal local model parameters obtained through local training to the central server.

[0153] After the central server receives the local model parameters uploaded by all clients participating in the federated training, it aggregates these model parameters from different clients to obtain a global model parameter.

[0154] The weighted average parameter aggregation method is adopted, where the client c i Weight It depends on the amount of data of the classification target nodes it contains, as shown in formula (VIII):

[0155]

[0156] In formula (VIII), Client represents the set of all clients participating in federated learning. Represents client c i The set of all target nodes in , Represents client c i The number of all target nodes in ;

[0157] Based on the idea of ​​differential privacy, to further improve privacy protection, randomly generated Gaussian noise is added to the aggregated global model parameters, which conforms to the normal distribution shown in formula (IX):

[0158]

[0159] In formula (IX), u represents the mean and σ represents the standard deviation. The random variable x with u = 0 and a normal distribution is the added noise, which is expressed as X~N(0,σ 2 ), the degree of noise added can be controlled by controlling the size of σ, but a proper trade-off between privacy protection and model utility is required.

[0160] In general, the central server implements a "differential privacy federated averaging" parameter aggregation method, as shown in formula (X):

[0161]

[0162] In formula (X), Param global Represents global model parameters, Param local Represents the client local model parameters, and |Param| indicates the number of parameters in the model.

[0163] The central server sends the global model parameters to each client participating in the federated training.

[0164] After receiving the global model parameters, the client updates the local model with the global model parameters, that is, replaces the local model parameters with the received global model parameters.

[0165] The client fine-tunes the updated local model parameters on the local real heterogeneous subgraph training set, that is, the training set of each client's original local heterogeneous subgraph dataset, so that the model can further adapt to the local data distribution; the specific method of fine-tuning is as follows: the training set divided from the local heterogeneous subgraph dataset is used as the training set, and the local model is trained on this training set. The local model parameters to be trained are those previously updated with the global model parameters; then the fine-tuned new optimal local model parameters are uploaded to the central server.

[0166] The central server receives the updated local model parameters uploaded by the client, and then the central server and the client repeat the above process of parameter aggregation, the central server sending the global model parameters, the client local fine-tuning and uploading the local model parameters until the global model reaches convergence; whether the global model converges can be judged by the parameter change of the global model in each round of federated training. The specific judgment method is as follows: the central server monitors the change in the global model parameters in each round. If the parameter change of the global model is less than a set threshold in several consecutive rounds of training, the global model is considered to have converged.

[0167] The client uses the optimal local heterogeneous graph representation learning model expression after federated training on the local real heterogeneous subgraph to learn, learns the embedded representation of the nodes in the graph, and further applies it to downstream tasks such as node classification.

[0168] Through the above steps, this method not only improves the performance of the final local model of each client in federated heterogeneous graph representation learning, but also can well protect the privacy of the client's local private data.

[0169] By adopting the method of the present invention, the participating clients of federated learning can transmit the structural information of heterogeneous graphs by generating and uploading pseudo meta-paths, thereby realizing the supplementation and recovery of missing structural information across clients while protecting the privacy of local client data, thereby improving model performance.

[0170] Example 3

[0171] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the federated heterogeneous graph representation learning method based on pseudo meta-path generation described in embodiment 1 or 2 are implemented.

[0172] Example 4

[0173] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the federated heterogeneous graph representation learning method based on pseudo meta-path generation described in embodiment 1 or 2 are implemented.

[0174] Example 5

[0175] A federated heterogeneous graph representation learning method system based on pseudo meta-path generation, comprising:

[0176] The pseudo meta-path generation unit is configured to: generate some pseudo nodes based on the nodes and relationships in the local real heterogeneous graph, and then form some pseudo meta-paths according to the meta-path pattern;

[0177] The federated heterogeneous graph fusion unit is configured to: cluster the pseudo nodes uploaded by the client by the central server, and add new pseudo meta-path structures for similar nodes to obtain a mutually connected fused heterogeneous graph composed of pseudo meta-paths;

[0178] The heterogeneous graph representation learning unit is configured as follows: the client uses a model based on meta-path and attention mechanism to learn the embedding representation of nodes in the local heterogeneous graph;

[0179] The federated parameter aggregation unit is configured as follows: the central server aggregates model parameters from different clients using a method based on differential privacy and federated averaging to obtain global model parameters.

[0180] This paper addresses the problem of missing graph structure information across clients in federated heterogeneous graph representation learning and proposes a federated heterogeneous graph representation learning method based on pseudo meta-path generation. This method can use the generated pseudo meta-paths to restore the missing graph structure information across clients, thereby improving model performance. This paper primarily considers the superior information mining capabilities of meta-paths in heterogeneous graph representation learning and the method's ability to protect the privacy of client-side local data. Therefore, the method uses a method whereby clients generate pseudo meta-paths, which are then integrated and distributed by a central server. This method further supplements each client's local heterogeneous graph, ensuring both privacy protection and performance improvements.

[0181] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A federated heterogeneous graph representation learning method based on pseudo meta-path generation, characterized in that: The steps include: ST1: Select datasets of different sizes from public heterogeneous graph datasets and distribute them to each client participating in federated learning in proportion. At the same time, cut off the edges across clients to obtain each client's local heterogeneous subgraph dataset. The client divides the local heterogeneous subgraph dataset into training set, validation set and test set. All clients follow the same learning task on the local heterogeneous subgraph dataset and use the heterogeneous graph with the same structure to represent the learning model. All clients use the same defined meta-path to perform local learning tasks. ST2: The client constructs a relationship-based pseudo neighbor node generator based on the local heterogeneous subgraph dataset, builds a loss function, and optimizes the generated pseudo neighbor nodes to make them close to the representation of the real neighbor nodes; ST3: Using the relationship-based pseudo neighbor node generator, the client takes the real nodes in the local heterogeneous subgraph as the starting nodes according to the node relationship order in the meta-path defined by all clients, generates some pseudo nodes, and connects the starting nodes and the generated pseudo nodes in sequence to form a pseudo meta-path. The client adds the generated pseudo meta-path to the local heterogeneous subgraph training set to form a local supplementary subgraph. ST4: The client uploads all pseudo nodes and their topological structures in the locally generated pseudo meta-path to the central server. The central server receives the pseudo nodes and topological structures of each client and constructs a similarity matrix for every two nodes in the same topological position from different clients. ST5: The central server constructs similar node evaluation rules, clusters similar nodes based on the similar node evaluation rules, and assigns the same pseudo-meta-path structure to similar nodes from different clients; ST6: The central server sends the pseudo nodes and pseudo meta-path structures added by each client from other clients to the corresponding client. The client receives the newly added pseudo nodes and pseudo meta-path structures from other clients and adds them to the local supplementary subgraph to form a federated supplementary subgraph. ST7: Based on the local training set, the client builds a pseudo-label predictor and a pseudo-label prediction objective function to optimize the predicted pseudo-label to be close to the true label. ST8: The client uses the pseudo-label predictor to predict the newly added pseudo-node labels, further improves the label set of the federated supplementary subgraph, and uses the federated supplementary subgraph and all its labels as training data for the heterogeneous graph representation learning model; ST9: The client locally trains a heterogeneous graph representation learning model. The heterogeneous graph representation learning model is based on the heterogeneous graph attention network structure. It uses attention mechanisms at the node level and semantic level, and uses meta-paths to learn the complex relationships between nodes. By setting hyperparameters to weigh the weights of different parts, the optimal local target model expression and local model parameters are obtained. ST10: The client uploads the optimal local model parameters to the central server. The central server receives the local model parameters from different clients and aggregates these local model parameters through the differential privacy federated averaging method to form the global model parameters. ST11: The central server sends the global model parameters to each client. The client receives the global model parameters and uses them to update the local model. ST12: The client further fine-tunes the updated local model on the real local heterogeneous subgraph training set, and then uploads the new local model parameters to the central server; ST13: The central server and the client repeat the above process of parameter aggregation, sending global model parameters, local fine-tuning, and uploading local model parameters until the global model performance reaches convergence; ST14: The client uses the optimal local heterogeneous graph representation learning model expression to learn the real local heterogeneous subgraph to learn, learns the embedded representation of the nodes in the graph, and further applies it to downstream tasks.

2. The federated heterogeneous graph representation learning method based on pseudo meta-path generation according to claim 1, characterized in that: In ST3, the relation-based pseudo neighbor node generator is trained based on the structure of a fully connected neural network. The fully connected neural network takes the embedding representation of the starting node based on the selected relation, the embedding representation of the selected relation, and the embedding representation of the neighbor node based on this relation as input, and finally outputs the generated pseudo neighbor node embedding representation; Under the guidance of the meta-path, the client generates pseudo-neighbor nodes based on the pseudo-neighbor node generation algorithm based on the relationship, and then forms a pseudo-meta-path to supplement the local heterogeneous subgraph; The process of the pseudo neighbor node generation algorithm based on relationship is: Some starting nodes are randomly selected according to a certain ratio, and pseudo neighbor nodes of nodes for specific relationships are generated one by one using a pseudo neighbor node generator based on relationships according to the order of the relationship set defined by the meta-path, until a complete pseudo meta-path is formed; The method for generating pseudo neighbor nodes is as follows: taking a certain type of node and a certain type of relationship as input, a fully connected neural network is used to generate pseudo neighbor nodes of the input node based on the input relationship.

3. The federated heterogeneous graph representation learning method based on pseudo meta-path generation according to claim 1, characterized in that: In ST2, the relationship-based pseudo-neighbor node generator uses Adam as the optimizer, ReLU as the activation function, and Dropout to prevent overfitting, and uses the hidden layer inside the network to learn the mapping relationship between inputs; Use MSE as the loss function to measure the generated pseudo neighbor node embedding The distance from the real neighbor node embedding Y; the MSE loss function is shown in formula (I): In formula (I), n represents the dimension of node embedding, y i is the specific value of the real neighbor node embedding Y in the i-th dimension, is the pseudo neighbor node embedding The specific value in the i-th dimension.

4. The federated heterogeneous graph representation learning method based on pseudo meta-path generation according to claim 3 is characterized in that: In ST4, the client screens out the trusted pseudo meta-paths in the local pseudo meta-paths. The trusted pseudo meta-paths refer to the completely generated nodes and structures in the topological structure of the pseudo meta-paths, which do not contain the real starting node for generating the pseudo meta-paths. After screening out all the local trusted pseudo meta-paths, the client uploads these trusted pseudo meta-paths to the central server. The central server receives the trusted pseudo-meta-path from each client. For each type of pseudo-node in these pseudo-meta-paths, the central server calculates the similarity between every two pseudo-nodes from different clients that have the same topological position and the same type in the pseudo-meta-path to form a pseudo-node similarity matrix. Preferably, Manhattan distance is used to measure the similarity between each pair of nodes; the Manhattan distance between nodes is calculated as shown in formula (II): In formula (II), Emb i and Emb j Represent the node embeddings from two different clients i and j, respectively. i =(x1,x2,…,x n ) and Emb j =(y1,y2,…,y n );Use S i,j Represents the similarity between node i and node j. The similarity is calculated as shown in formula (III): The smaller the Manhattan distance between nodes, the greater the similarity between nodes; The central server constructs similar node evaluation rules according to the similarity and constraints between nodes, and clusters similar nodes based on this evaluation rule, so as to find the most similar pseudo nodes from other clients for each client's pseudo node.

5. The federated heterogeneous graph representation learning method based on pseudo meta-path generation according to claim 4 is characterized in that: The constraints include the node similarity threshold τ and the maximum number of similar nodes; the maximum number of similar nodes for each node is set to k, that is, after sorting from high to low similarity, at most k similar nodes will be retained, using V similar Represents the set of nodes similar to a certain node, |V similar | represents the number of nodes in the set; the constraint condition is shown in formula (IV): The central server clusters the most similar pseudo nodes that meet the requirements of formula (IV), that is, the first k nodes sorted from high to low in similarity; For each intermediate node in each pseudo-meta-path of each client, the central server cyclically performs clustering operations. Eventually, the pseudo-meta-paths from different clients that were originally independent of each other in the central server form an interrelated fusion graph. The central server checks the newly added connection relationship of each client's pseudo node, and sends these newly added pseudo meta-paths and their structural relationships from other clients to the corresponding clients.

6. The federated heterogeneous graph representation learning method based on pseudo meta-path generation according to claim 5, characterized in that: In ST7, the client constructs a pseudo-label predictor based on the local training set obtained by partitioning the original local heterogeneous subgraph dataset to predict some pseudo-labels for the locally generated pseudo-nodes and the pseudo-nodes supplemented by the federation, thus achieving effective data expansion; A fully connected neural network is used as the pseudo-label predictor, and the ReLU activation function and Adam optimizer are selected. At the same time, the objective function of pseudo-label prediction is constructed by minimizing the cross entropy loss, so that the predicted pseudo-label is as close to the real label as possible; the training loss is shown in formula (V): In formula (V), y p Represents the output of the neural network, Label r represents the true label, y p [Label r ] represents the vector y p Corresponding to the true label Label r The weight, ∑ i exp(y p [i]) where i represents all possible category indices, y p [i] represents vector y p The component corresponding to the category with index number i in ∑ i exp(y p [i]) represents the sum of the predicted components of all categories after exponential operation; In ST9, the client trains a heterogeneous graph representation learning model on a new training dataset. The new training set includes: a local true subgraph training set, a locally supplemented pseudo meta-path, a federated supplemented pseudo meta-path, a local true label set, and a pseudo label set predicted by a label predictor. Node-level attention is used to learn the importance of the node’s neighbor nodes based on the meta-path; updating the node embedding representation based on the node-level attention is shown in formula (VI): In formula (VI), Emb i represents the embedding representation of node i, Φ represents the unified definition of a meta-path, Indicates that node i is based on a real meta-path The real neighbor node set of Indicates that node i is based on a pseudo-meta path The set of pseudo neighbor nodes, represents the weight coefficient, Sig(·) is the Sigmoid activation function, and || is the connection operation; Semantic-level attention is used to measure the importance of different meta-paths, and |Φ| represents the number of meta-paths with different definitions. Represents the meta-path Φ i The nodes in which the embedding representation has been learned, q T is a semantic-level attention vector; the embedding representation of the node is updated based on the semantic-level attention, as shown in formula (VII): In formula (VII), W represents the weight matrix, b represents the bias vector, and tanh(W·Emb i +b) means embedding the node i Perform an affine transformation, and then perform nonlinear mapping through the hyperbolic tangent activation function tanh; where W and b are continuously updated as the model is trained; When training the local heterogeneous graph representation learning model on the client, the Adam optimizer and cross entropy loss function are used. At the same time, the Dropout and early stopping strategies are introduced to avoid overfitting. After the training is completed, the client obtains the current optimal local model.

7. The federated heterogeneous graph representation learning method based on pseudo meta-path generation according to claim 5, characterized in that: In ST10, a weighted average parameter aggregation method is adopted, where client c i Weight It depends on the amount of data of the classified target nodes it contains, as shown in formula (VIII): In formula (VIII), Client represents the set of all clients participating in federated learning. Represents client c i The set of all target nodes in , Represents client c i The number of all target nodes in ; Based on the idea of ​​differential privacy, in order to further improve privacy protection, randomly generated Gaussian noise is added to the aggregated global model parameters, which conforms to the normal distribution shown in formula (IX): In formula (IX), u represents the mean, σ represents the standard deviation; u = 0 and the random variable x that obeys the normal distribution is the added noise, which is expressed as X~N(0,σ 2 ), the degree of noise added can be controlled by controlling the size of σ; The central server implements a "differential privacy federated average" parameter aggregation method, as shown in formula (X): In formula (X), Param global Represents the global model parameters, Param local Represents the client local model parameters; In ST12, the specific method of fine-tuning is as follows: the training set divided from the local heterogeneous subgraph dataset is used as the training set to train the updated local model; In ST13, whether the global model has converged is determined by the parameter change of the global model in each round of federated training. The specific judgment method is as follows: the central server monitors the change in the global model parameters in each round. If the parameter change of the global model is less than a set threshold in several consecutive rounds of training, the global model is considered to have converged.

8. A federated heterogeneous graph representation learning system based on pseudo meta-path generation, characterized in that: The method for learning a federated heterogeneous graph representation based on pseudo meta-path generation according to any one of claims 1 to 7 is used to implement the method, comprising: The pseudo meta-path generation unit is configured to: the client generates pseudo nodes based on nodes and relationships in the local real heterogeneous graph, and then forms a pseudo meta-path according to the meta-path mode; The federated heterogeneous graph fusion unit is configured as follows: the central server clusters the pseudo nodes uploaded by the client, and adds a new pseudo meta-path structure to similar nodes to obtain a mutually connected fused heterogeneous graph composed of pseudo meta-paths; The heterogeneous graph representation learning unit is configured as follows: the client uses a model based on meta-path and attention mechanism to learn the embedding representation of nodes in the local heterogeneous graph; The federated parameter aggregation unit is configured as follows: the central server aggregates model parameters from different clients using a method based on differential privacy and federated averaging to obtain global model parameters.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the federated heterogeneous graph representation learning method based on pseudo meta-path generation described in any one of claims 1-7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the federated heterogeneous graph representation learning method based on pseudo meta-path generation described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method for building blockchain-based secure aggregation in federated learning with data removal

    US20240256900A1

  • Optimization method for modeling based on federated learning, and electronic device, storage medium and program product

    WO2023092792A1

Cited By

  • Traffic state data interpolation method and device, electronic equipment and readable storage medium

    CN119811094A