A federated heterogeneous graph representation learning method and system based on pseudo meta-path generation
By generating pseudo-meta-paths and pseudo-nodes, and combining them with a federated learning framework, the problem of missing structural information across clients is solved, improving model performance and protecting data privacy. This achieves effective information recovery and privacy protection in federated heterogeneous graph representation learning.
Patent Information
- Application Number
- CN202411076055.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Existing federated heterogeneous graph representation learning methods cannot effectively recover missing meta-path information across clients and pose a risk of data privacy leakage, leading to a decline in model performance.
A pseudo-meta path generation method is adopted, which generates pseudo nodes and pseudo-meta paths through the client, uses the central server to perform similar node clustering and pseudo-label prediction, and combines differential privacy federated averaging to restore cross-client structural information and improve model performance.
While protecting data privacy, it effectively restored cross-client structural information, improved the performance of federated heterogeneous graph representation learning, enhanced the overall performance of the model, and ensured the security of client data.
Smart Images

Figure CN119005300B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a federated heterogeneous graph representation learning method and system based on pseudo meta-path generation, and belongs to the technical field of federated heterogeneous graph representation learning. BACKGROUND
[0002] Heterogeneous graphs are widely used to model complex interaction relationships between various entities in reality. Heterogeneous graph representation learning refers to learning suitable embeddings of heterogeneous graphs in a low-dimensional vector space to better serve further recommendation and prediction tasks. Graph Neural Networks (GNNs) that can effectively mine deep relationships between graph nodes are often applied in the field of heterogeneous graph representation learning. However, the performance of GNNs often depends on the number and completeness of the graph structure, and heterogeneous graph representation learning models designed for centrally stored graphs cannot achieve the same good performance on distributedly stored graphs. Therefore, federated learning is introduced into graph representation learning for multi-institution cooperation. Federated heterogeneous graph representation learning methods improve the overall model performance by aggregating model parameters from each participant while protecting the privacy of each institution's local data.
[0003] At present, most of the research on federated graph representation learning focuses on homogeneous graphs. Although these methods solve the performance degradation problem caused by distributed storage of graph data through federated learning, they are not suitable for learning the complex structure of heterogeneous graphs. Some research focuses on federated heterogeneous graph representation learning, but most of the methods are designed specifically for recommendation systems. These methods are only suitable for "user-item" recommendation graphs with special structures, and are not suitable for general heterogeneous graphs with more complex structures. To learn the complex relationships in heterogeneous graphs, some heterogeneous graph representation learning models use meta-paths to mine the heterogeneous neighbors of nodes and use meta-path-based neighbor information to enhance the representation ability of nodes to learn the global structure information of heterogeneous graphs. However, the effect of these methods directly applied in federated learning is not ideal, because in the federated learning scenario, due to the inability to share data across clients, some cross-client connection relationships of nodes will be cut off, which in turn leads to the unreachability of some cross-client meta-paths. In this case, the data of each client can be regarded as a subgraph that lacks global structure information, and the incompleteness of these subgraphs will reduce the model performance. Therefore, it is very important for federated heterogeneous graph representation learning to recover the global information contained in the missing meta-paths across clients.
[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] Wherein each client follows the same defined meta path to perform the learning task, and the same defined meta path is generally a convention on certain data sets. For example, in the paper data set, the commonly used meta path is "author-paper-topic-paper-author" or "author-paper-author", and the learning task performed on the paper data set mostly uses this defined meta path. Since the scheme in this paper is based on federated learning, each client needs to follow this same defined meta path.
[0017] ST4: The client uploads all the pseudo nodes and their topologies in the locally generated pseudo meta path to the center server, the center server receives the pseudo nodes and topologies of each client, and for each two nodes in the same topological position from different clients, constructs a similarity matrix;
[0018] ST5: The center server constructs a similar node evaluation rule, clusters similar nodes based on the similar node evaluation rule, and assigns the same pseudo meta path structure to similar nodes from different clients;
[0019] ST6: The center server sends the pseudo nodes and pseudo meta path structures added by each client from other clients to the corresponding client, and the client receives the 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 constructs a pseudo label predictor, constructs a pseudo label prediction objective function, and optimizes the predicted pseudo label and the real label to be close;
[0021] ST8: The client predicts the label of the added pseudo node using the pseudo label predictor, further perfects the label set of the federated supplementary subgraph, and takes the federated supplementary subgraph and all its labels as the training data of the heterogeneous graph representation learning model;
[0022] ST9: The client locally trains a heterogeneous graph representation learning model, the heterogeneous graph representation learning model is based on a heterogeneous graph attention network structure, uses attention mechanism at node level and semantic level respectively, and uses meta path to learn the complex relationship between nodes. By setting the hyperparameters to balance the weights of different parts, the optimal local model parameter expression and local model parameter are obtained;
[0023] ST10: The client uploads the optimal local model parameter to the center server, and the center 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 parameter;
[0024] ST11: The center server sends the global model parameters to each client, and the client receives the global model parameters and updates the local model using the global model parameters, i.e., replaces 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 data set with another data set), and then uploads the new local model parameters to the center server;
[0026] ST13: The center server and the client repeat the above parameter aggregation, send global model parameters, local fine-tuning, and upload local model parameter processes until the global model performance reaches convergence;
[0027] ST14: The client expresses the real local heterogeneous subgraph to be learned through the optimal local heterogeneous graph representation learning model expression, learns the embedding representation of the nodes in the graph, and further applies it to the downstream task of node classification.
[0028] Preferably, in ST3, the pseudo-neighbor node generator based on the relationship is trained based on a structure of a fully connected neural network. Specifically, the fully connected neural network takes the starting node embedding representation based on the selected relationship, the selected relationship embedding representation, and the neighbor node embedding representation 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 pseudo-neighbor node generator 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.
[0030] The process of the pseudo-neighbor node generation algorithm based on the relationship is as follows:
[0031] Some starting nodes are randomly selected according to a certain proportion, and according to the order of the relationship set defined by the specific meta-path, the pseudo-neighbor nodes of the nodes for the specific relationship are generated one by one using the pseudo-neighbor node generator based on the relationship, until a complete pseudo-meta-path is formed.
[0032] The meta-path contains multiple nodes, which are generated one by one in sequence from the starting node, and all the pseudo nodes finally generated form a pseudo meta-path. The pseudo neighbor node generation algorithm based on the relationship can mainly be regarded as two steps: 1) "pseudo neighbor node generation algorithm based on the relationship" (only one type of pseudo node can be generated each time): input a certain type of node and a certain relationship (i.e. the type of edge), and generate a certain specific type of node connected to the input node through the input edge by using the "pseudo neighbor node generator based on the relationship". For example, if the input node type is "author" and the input relationship type is "writing", the neighbor node generated by the "author" node based on the "writing" relationship is the "paper" node. Since the "paper" node is generated by the generator and does not exist in reality, it is "pseudo". 2) "meta-path guided" (pseudo meta-path is obtained): the meta-path provides the node sequence, and the pseudo node is generated multiple times to obtain the pseudo meta-path in sequence.
[0033] 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; 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 pseudo neighbor node generator based on the relationship is used to correspondingly generate each corresponding pseudo neighbor node.
[0034] Preferably, in the ST2, the pseudo neighbor node generator based on the relationship uses Adam as the optimizer, uses ReLU as the activation function, and uses Dropout to prevent overfitting, and uses the hidden layer inside the network to learn the mapping relationship between the inputs;
[0035] In order to make the embedding representation of the generated pseudo neighbor nodes as close as possible to the real nodes, the MSE is used as the loss function to measure the distance between the embedding of the generated pseudo neighbor nodes and the embedding Y of the real neighbor nodes; the MSE loss function is shown in formula (I):
[0036]
[0037] In formula (I), n represents the dimension of the node embedding, y i is the specific value of the real neighbor node embedding Y at the i-th dimension, is the specific value of the pseudo neighbor node embedding at the i-th dimension;
[0038] With the generation of local pseudo neighbor nodes and the formation of pseudo meta-paths, 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 the ST4, the client filters out the trusted pseudo-node paths in the local pseudo-node paths, the trusted pseudo-node path refers to the topology of the pseudo-node path which is completely generated nodes and structures, and does not contain the real starting node which starts to generate the pseudo-node path; after filtering out all the trusted pseudo-node paths in the local, the client uploads these trusted pseudo-node paths to the central server;
[0040] The central server receives the trusted pseudo-node paths from each client, and for each type of pseudo-node in these pseudo-node paths, the central server calculates the similarity of each pair of pseudo-nodes from different clients which have the same topology position in the pseudo-node path and the same type, to form a pseudo-node similarity matrix;
[0041] Preferably, the 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 embedding from two different clients i and j, specifically, Emb i =(x1,x2,…,x n ) and Emb j =(y1,y2,…,y n ); S i,j denotes the similarity between node i and node j, and the similarity is calculated as shown in formula (III):
[0044]
[0045] As can be seen from formula (III), the smaller the Manhattan distance between nodes, the greater the similarity between nodes;
[0046] The central server constructs a similar node evaluation rule according to 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 similar nodes, specifically, only when the similarity between two nodes is greater than a given threshold τ, the two nodes are determined to be similar. The maximum number of similar nodes for each node is set to k, that is, after sorting in descending order of similarity, at most k similar nodes are retained, and V similar denotes the set of similar nodes of a certain node, and |V similar | represents the number of nodes in the set; the constraint is shown in formula (IV):
[0048]
[0049] The central server clusters the top k nodes of the found most similar pseudo nodes satisfying the requirements in formula (IV) from high to low similarity, aiming to restore the same node appearing in different clients, and the next step relationship of these pseudo nodes in different clients based on the pseudo meta-path is the "inter-subgraph missing relationship" that needs to be supplemented. Therefore, the central server assigns the same connection relationship to these similar pseudo nodes, so that the pseudo nodes can be connected to the neighbor nodes of the most similar pseudo nodes in other clients, thereby increasing the pseudo meta-paths across clients;
[0050] For each intermediate node in each pseudo meta-path of each client, the central server performs the above clustering and connection increasing operation in a loop, and finally, the pseudo meta-paths from different clients that are originally independent of each other in the central server form a mutually related fusion graph;
[0051] The central server checks the added connection relationship of the pseudo nodes of each client, and sends these added pseudo meta-paths from other clients and their structural relationships 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 in the training process, the pseudo nodes in the pseudo meta-path need to have some pseudo labels, therefore, the client uses the local training set divided based on the original local heterogeneous subgraph data set to construct a pseudo label predictor to predict some pseudo labels for the locally generated pseudo nodes and the federated supplemented pseudo nodes, realizing effective expansion of data.
[0053] A fully connected neural network is used as the pseudo label predictor, and ReLU activation function and Adam optimizer are selected, and at the same time, the objective function of pseudo label prediction is constructed by minimizing the cross-entropy loss, aiming to make the predicted pseudo labels as close as possible to the real labels; the loss of training is shown in formula (V):
[0054]
[0055] In formula (V), y p represents the output of the neural network, Label r represents the real label, y p [Label r ] indicates the component of the vector y p corresponding to the real label Label r , i in ∑ i exp(y p [i]) indicates all possible class indices, and y p[i] represents a vector y p the component corresponding to the category with index number i in the middle, ∑ i exp(y p [i]) represents the sum of the predicted components of all categories after the exponential operation;
[0056] In ST9, the client trains a heterogeneous graph representation learning model on a new training data set, which contains: a local real subgraph training set, a local supplemented pseudo meta path, a federated supplemented pseudo meta path, a local real label set and a pseudo label set predicted by the label predictor;
[0057] The heterogeneous graph representation learning model learns to learn the complex relationships between nodes in the heterogeneous graph using meta paths; the model uses an attention mechanism to measure the different importance of meta paths and neighbor nodes;
[0058] Based on the idea and network structure of heterogeneous graph attention network (HAN), attention mechanism is used at node level and semantic level respectively;
[0059] Node-level attention is used to learn the importance of meta path-based neighbor nodes of the node, which includes pseudo neighbors based on pseudo meta paths added in the local supplement and federated supplement process in addition to real nodes; the node embedding representation is updated based on the 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, represents the real neighbor node set of node i based on a real meta path , and represents the pseudo neighbor node set of node i based on a pseudo meta path , 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, |Φ| represents the number of different defined meta paths, represents the nodes whose embedding representations have been learned in the meta path Φ i , 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 a weight matrix, b represents a bias vector, tanh(W·Emb i +b) represents an affine transformation on node embedding Emb i , and then a nonlinear mapping is performed through a hyperbolic tangent activation function tanh; wherein W and b are constantly updated with the training of the model.
[0065] In the stage of training the local heterogeneous graph representation learning model at the client side, the Adam optimizer and the cross-entropy loss function are selected, and the Dropout and early stopping strategies are also introduced to avoid overfitting; after the training is completed, the client obtains the current optimal local model.
[0066] Preferably, in ST10, a weighted average parameter aggregation method is adopted, wherein the weight i of each client c depends on the amount of data of the target nodes contained in the client, as shown in formula (VIII):
[0067]
[0068] In formula (VIII), Client represents a set of all clients participating in federated learning, represents a set of all target nodes in the client c i , represents the number of all target nodes in the client c i .
[0069] Based on the idea of differential privacy, to further improve privacy protection, random generated Gaussian noise is added to the aggregated global model parameters, which conforms to the normal distribution as shown in formula (IX):
[0070]
[0071] In formula (IX), u represents the mean, and σ represents the standard deviation; a random variable x that satisfies u = 0 and is subject to a normal distribution is the added noise, which is represented as X ~ N(0, σ 2 ), the degree of added noise can be controlled by controlling the size of σ, but a proper trade-off between privacy protection and model utility needs to be made;
[0072] The center server performs a "differential privacy federated average" parameter aggregation method, as shown in formula (X):
[0073]
[0074] In formula (X), Param global represents the global model parameters, and Param local represents the local model parameters of the client;
[0075] In ST12, the specific method of fine tuning is as follows: the training set divided by the local heterogeneous subgraph dataset is used as the training set to train the updated local model.
[0076] In ST13, whether the global model converges can be judged by the parameter variation of the global model in each round of federated training, and the specific judgment method is as follows: the center server monitors the parameter variation of the global model in each round, and if the parameter variation of the global model is less than a certain set threshold in continuous several rounds of training, it is considered that the global model has converged.
[0077] A federated heterogeneous graph representation learning system based on pseudo meta-path generation, characterized in that it is used to implement the above-mentioned federated heterogeneous graph representation learning method based on pseudo meta-path generation, comprising:
[0078] A 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 pattern of meta-paths;
[0079] A federated heterogeneous graph fusion unit is configured to cluster the pseudo nodes uploaded by the clients, and add new pseudo meta-path structures to similar nodes to obtain a fused heterogeneous graph composed of pseudo meta-paths connected to each other;
[0080] A heterogeneous graph representation learning unit is configured to use a model based on meta-paths and attention mechanisms to learn the embedding representation of nodes in the local heterogeneous graph;
[0081] A federated parameter aggregation unit is configured to use a method based on differential privacy and federated averaging to aggregate model parameters from different clients to obtain global model parameters.
[0082] A computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the above-mentioned federated heterogeneous graph representation learning method based on pseudo meta-path generation when executing the computer program.
[0083] A computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the above-mentioned federated heterogeneous graph representation learning method based on pseudo meta-path generation.
[0084] The details of the present application can be referred to the prior art.
[0085] The beneficial effects of the present application are:
[0086] 1、The application introduces a complete solution for multi-agency cooperation heterogeneous graph representation learning, which well integrates the heterogeneous graph representation learning method into the federated learning architecture by introducing pseudo meta path generation, federated heterogeneous graph fusion and federated parameter aggregation method, and improves the model performance through the architecture of federated learning, thereby providing a beneficial idea and feasible solution for the field of federated heterogeneous graph representation learning.
[0087] 2、Through client pseudo meta path generation, the application solves the problem of missing cross-client structure information in federated heterogeneous graph representation learning. Specifically, under the coordination of the center server, the client can pass important structure information in the local heterogeneous graph to other clients through the generated pseudo meta path, and each client can utilize the cross-client structure information when training the model locally, so that the performance of the local heterogeneous graph representation model of the client is improved.
[0088] 3、By sharing pseudo meta paths instead of local real data, the application can protect the privacy of the local data of the client, and the local real heterogeneous graph of each client will not be obtained by other clients or the center server, so that the model performance can be improved while the protection ability of the local data privacy of the federated heterogeneous graph representation learning method is greatly improved. BRIEF DESCRIPTION OF DRAWINGS
[0089] The drawings accompanying the specification of the present application serve to provide a further understanding of the present application, the illustrative embodiments of the present application and their descriptions serve to explain the present application, and do not constitute an improper limitation on the present application.
[0090] Figure 1 A flowchart of the federated heterogeneous graph representation learning method based on pseudo meta path generation of the application;
[0091] Figure 2 A flowchart of generating pseudo meta paths for clients;
[0092] Figure 3 A flowchart of fusing pseudo meta paths for the center server. DETAILED DESCRIPTION
[0093] In order to enable the persons skilled in the art to better understand the technical solutions in the specification, the technical solutions in the embodiments of the specification will be described clearly and completely in conjunction with the drawings in the specification, but not limited thereto, and the application not described in detail is in accordance with the conventional technology in the art.
[0094] Embodiment 1
[0095] A federated heterogeneous graph representation learning method based on pseudo meta path generation, comprising the following steps:
[0096] ST1: Select different scale datasets from the public heterogeneous graph dataset, and allocate them to each client participating in federated learning in an uneven ratio, while cutting off the edges across clients to obtain a local heterogeneous subgraph dataset for each client, and the client divides the local heterogeneous subgraph dataset into a training set, a validation set and a test set; wherein all clients follow the same learning task on the local heterogeneous subgraph dataset, and use the same structure of heterogeneous graph representation learning model, and all clients use the same defined meta path to perform the local learning task;
[0097] ST2: The client constructs a relationship-based pseudo neighbor node generator based on the local heterogeneous subgraph dataset, builds a relationship-based pseudo neighbor node generation loss function, and optimizes the generated pseudo neighbor nodes to approach the representation of the real neighbor nodes;
[0098] ST3: Using the relationship-based pseudo neighbor node generator, the client generates some pseudo nodes in the order of node relationship in the same defined meta path followed by all clients, using the real nodes in the local heterogeneous subgraph as starting nodes, and connects the starting real nodes and the generated pseudo nodes in order to form pseudo meta paths, and the client adds the generated pseudo meta paths 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 paths to the center server, and the center server receives the pseudo nodes and their topological structures from each client, and constructs a similarity matrix for each two nodes from different clients in the same topological position;
[0100] ST5: The center server constructs a similar node evaluation rule, clusters similar nodes based on the evaluation rule, and assigns the same pseudo meta path structure to similar nodes from different clients;
[0101] ST6: The center server sends the pseudo nodes and pseudo meta path structures from other clients added by each client to the corresponding client, and the client receives the 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 constructs a pseudo label predictor, constructs a pseudo label prediction target function, and optimizes the predicted pseudo label and the real label to approach each other;
[0103] ST8: The client predicts the label of the added pseudo node using the pseudo label predictor, further perfects 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;
[0104] ST9: The client trains a heterogeneous graph representation learning model locally, the heterogeneous graph representation learning model is based on a heterogeneous graph attention network structure, uses attention mechanism at node level and semantic level respectively, and uses meta path to learn the complex relationship between nodes, and sets the hyperparameters to balance the weights of different parts, and 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 center server, the center server receives the local model parameters from different clients, aggregates these local model parameters through the differential privacy federated average method to form global model parameters;
[0106] ST11: The center server sends the global model parameters to each client, and the client receives the global model parameters and updates the local model using the global model parameters, that is, replaces 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 center server;
[0108] ST13: The center server and the client repeat the above parameter aggregation, send global model parameters, local fine-tuning and upload local model parameters process until the global model converges;
[0109] ST14: The client learns the embedding representation of the nodes in the graph through the optimal local heterogeneous graph representation learning model expression of the local real heterogeneous subgraph to be learned, and further applies it to the downstream task of node classification.
[0110] In the present application, first, the client locally trains a relation-based pseudo-node generator, generates pseudo-nodes based on the local inter-node relationship, obtains local pseudo-meta paths, and supplements the local heterogeneous graph with them; second, the client uploads the local pseudo-meta paths to the central server, the central server fuses the pseudo-meta paths from different clients by adding the same connection relationship 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 model based on meta paths and attention on the supplemented local heterogeneous graph; then, the client uploads the local optimal model parameters, the central server aggregates these parameters using the differential privacy federated averaging method to obtain global model parameters, and sends the global model parameters to the client; then, the client updates the local model with the global model parameters, fine-tunes on the local real data, uploads the fine-tuned local optimal model parameters again, and repeats the cycle of updating the global model parameters by the central server and updating the local model parameters by the client until the global model converges; finally, the client uses the optimal local model obtained to perform heterogeneous graph representation learning on the local data, and further uses the learned heterogeneous graph embedding representation for downstream tasks such as node classification.
[0111] Embodiment 2
[0112] A federated heterogeneous graph representation learning method based on pseudo-meta path generation, as described in Embodiment 1, differs in that:
[0113] The client generates pseudo-neighbor nodes based on the relationship under the guidance of the meta path, and then forms a pseudo-meta path to supplement the local heterogeneous subgraph.
[0114] A meta path guided relation-based pseudo-neighbor node generation algorithm is designed: some starting nodes are randomly selected according to a certain proportion, and based on the order of the relationship set defined by the specific meta path, the pseudo-neighbor nodes of the node for the specific relationship are generated one by one using the relation-based pseudo-neighbor node generator, until a complete pseudo-meta path is formed. The method of generating pseudo-neighbor nodes based on relationships 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. The generated pseudo-neighbor node is the output of this fully connected neural network, and this fully connected neural network 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 correspondingly generate each corresponding pseudo-neighbor node.
[0115] The relation-based pseudo-neighbor node generator is trained based on a fully connected neural network structure. Specifically, the network takes a selected relation-based starting node embedding representation, a selected relation embedding representation, and a neighbor node embedding representation based on the relation as input, and finally outputs a generated pseudo-neighbor node embedding representation.
[0116] The relation-based pseudo-neighbor node generator uses Adam as the optimizer, uses ReLU as the activation function, and uses Dropout to prevent overfitting, and uses the hidden layers inside the network to learn the mapping relationship between the inputs.
[0117] In order to make the embedding representation of the generated pseudo-neighbor node as close to the real node as possible, the MSE is used as the loss function to measure the distance between the generated pseudo-neighbor node embedding and the real neighbor node embedding Y; the MSE loss function is shown in formula (I):
[0118]
[0119] In formula (I), n represents the dimension of the node embedding, y i is the specific value of the real neighbor node embedding Y at the i-th dimension, is the specific value of the pseudo-neighbor node embedding at the i-th dimension.
[0120] With the generation of local pseudo-neighbor nodes and the formation of pseudo-meta-paths, the client adds the generated pseudo-meta-paths to the local heterogeneous subgraph training set, and finally forms a local supplementary subgraph.
[0121] Through the client uploading pseudo-meta-paths, the center server fusing pseudo-meta-paths, and the center server assigning pseudo-meta-paths, including:
[0122] The client screens out trusted pseudo-meta-paths in the local pseudo-meta-paths. The trusted pseudo-meta-path refers to a pseudo-meta-path whose topological structure is completely generated nodes and structures, and does not contain the real starting node that starts to generate the pseudo-meta-path. After screening out all trusted pseudo-meta-paths locally, the client uploads these trusted pseudo-meta-paths to the center server.
[0123] The center server receives trusted pseudo-meta-paths from each client, and for each type of pseudo-node in these pseudo-meta-paths, the center server calculates the similarity of each pair of pseudo-nodes from different clients that have the same topological position in the pseudo-meta-path and the same type, to form a pseudo-node similarity matrix.
[0124] The 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] Emb i and Emb j respectively 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 ). Let S i,j denote the similarity between node i and node j, which is calculated as shown in equation (III):
[0127]
[0128] It can be obtained from equation (III) that the smaller the Manhattan distance between nodes, the greater the similarity between nodes;
[0129] The center server constructs a similar node evaluation rule according to the similarity between nodes and some constraints, and clusters similar nodes based on the evaluation rule, so as to find the most similar nodes from other clients for each client's pseudo node;
[0130] The proposed constraints include a node similarity threshold and a maximum number of similar nodes. Specifically, only two nodes are determined to be similar if the similarity between the two nodes is greater than a given threshold τ. In addition, the maximum number of similar nodes for each node is set to k, which means that after sorting in descending order of similarity, at most k similar nodes will be retained; let V similar denote the set of nodes similar to a certain node, and |V similar | denote the number of nodes in the set. The constraints are shown in equation (IV):
[0131]
[0132] The center server clusters the most similar pseudo nodes found in equation (IV) that meet the requirements, that is, the first k nodes sorted in descending order of similarity, in order to restore the situation that the same node appears in different clients. The next step relationship based on the pseudo meta-path in these pseudo nodes in different clients is the "inter-subgraph missing relationship" that needs to be supplemented. Therefore, the center server assigns the same connection relationship to these similar pseudo nodes, so that the pseudo nodes can be connected to the neighbor nodes of the most similar pseudo nodes in other clients, thereby increasing the cross-client pseudo meta-path.
[0133] For each intermediate node in each pseudo meta-path of each client, the center server performs the above clustering and adding connection operations in a loop, and finally, the pseudo meta-paths from different clients that were originally independent of each other in the center server form a mutually associated fusion graph.
[0134] The center server checks the added connection relationship of the pseudo node of each client, and sends the added pseudo meta-paths from other clients and their structural relationship to the corresponding client.
[0135] The client supplements the local subgraph with the added pseudo meta-paths from other clients, thereby recovering the missing structural information across clients, and then the client constructs a pseudo label predictor to further refine the federated supplemented subgraph data, including:
[0136] The client receives the added pseudo nodes and pseudo meta-path structures from other clients and adds them to the local supplemented subgraph containing the locally generated pseudo meta-paths to form a federated supplemented subgraph.
[0137] Based on the idea of semi-supervised learning, to ensure the availability of pseudo meta-path data in 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 dividing the original local heterogeneous subgraph dataset, to predict some pseudo labels for the locally generated pseudo nodes and the federated supplemented pseudo nodes, realizing effective expansion of data.
[0138] A fully connected neural network is used as a classifier, and ReLU activation function and Adam optimizer are selected. At the same time, the objective function for pseudo label prediction is constructed by minimizing the cross-entropy loss, the purpose being to make the predicted pseudo labels as close as possible to the real labels; the loss of training is shown in formula (V):
[0139]
[0140] In formula (V), y p represents the output of the neural network, Label r represents the real label, y p [Label r ] indicates the component in the vector y p corresponding to the real label Label r , ∑ i exp(y p [i]) indicates all possible class indices, and y p [i] indicates the component in the vector y p corresponding to the class with index i, ∑ i exp(y p[i]) represents the sum of the exponential operation on the predicted components of all categories.
[0141] The client adds the predicted pseudo-labels to the label set of the federated augmented subgraph, and takes the federated augmented subgraph and its label set as the training data set of the heterogeneous graph representation learning model.
[0142] The client trains a heterogeneous graph representation learning model on the new training data set, which includes the local real subgraph training set, the local augmented pseudo meta path, the federated augmented pseudo meta path, the local real label set and the pseudo label set predicted by the label predictor. The heterogeneous graph representation learning model learns the complex relationships between nodes in the heterogeneous graph by using meta paths; the model uses an attention mechanism to measure the different importance of meta paths and neighbor nodes.
[0143] Based on the idea and network structure of the heterogeneous graph attention network (HAN), an attention mechanism is used at the node level and the semantic level.
[0144] The node-level attention is used to learn the importance of the neighbor nodes of the node based on the meta path, and these neighbor nodes include the pseudo neighbor nodes based on the pseudo meta path added in the local augmentation and federated augmentation process in addition to the real nodes; the node embedding representation is updated based on the 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, represents the real neighbor node set of node i based on a real meta path , and represents the pseudo neighbor node set of node i based on a pseudo meta path . represents the weight coefficient, Sig(·) is the Sigmoid activation function, and || is the concatenation operation.
[0147] The semantic-level attention is used to measure the importance of different meta paths. |Φ| represents the number of different defined meta paths, represents the nodes whose embedding representations have been learned in the meta path Φ i , and 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) represents the node embedding Emb i affine transformation and then a nonlinear mapping by a hyperbolic tangent activation function tanh; wherein W and b are constantly updated as the model is trained.
[0150] Further preferably, in the client training local heterogeneous graph representation learning model stage, the Adam optimizer and cross-entropy loss function are selected, and Dropout and early stopping strategies are also introduced to avoid overfitting. After training, the client obtains the current optimal local model.
[0151] Through multiple rounds of model parameter exchange between the client and the center server, the global model parameters and the client local model parameters are constantly updated, and finally each client obtains the optimal local model, including:
[0152] The client uploads the current optimal local model parameters obtained by local training to the center server.
[0153] After the center server receives the local model parameters uploaded by all clients participating in 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, wherein the weight i of the client c depends on the amount of data of the classification target node it contains, as shown in formula (VIII):
[0155]
[0156] In formula (VIII), Client represents the set of all clients participating in federated learning, represents the set of all target nodes in the client c i , represents the number of all target nodes in the client c i .
[0157] Based on the idea of differential privacy, to further improve privacy protection, random generated Gaussian noise is added to the aggregated global model parameters, which conforms to the normal distribution as shown in formula (IX):
[0158]
[0159] In formula (IX), u represents the mean and σ represents the standard deviation. The random variable x that satisfies u=0 and normal distribution is the added noise, denoted as X~N(0,σ 2 ), the degree of added noise can be controlled by controlling the size of σ, but a proper trade-off between privacy protection and model utility needs to be made.
[0160] In general, the center server performs a "differential privacy federated average" parameter aggregation method, as shown in formula (X):
[0161]
[0162] In formula (X), Param global represents the global model parameters, Param local represents the local model parameters of the client, and |Param| represents the number of parameters in the model.
[0163] The center server sends the global model parameters to each client participating in federated training.
[0164] After the client receives the global model parameters, the local model is updated with the global model parameters, that is, the local model parameters are replaced 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 the original local heterogeneous subgraph data set of each client, 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 by the local heterogeneous subgraph data set is used as the training set, and the local model is trained on this training set. The local model parameters to be trained are the updated ones. Next, the fine-tuned new optimal local model parameters are uploaded to the center server.
[0166] The center server receives the updated local model parameters uploaded by the client, and then the center server and the client repeat the above parameter aggregation, center server sending global model parameters, client local fine-tuning and uploading local model parameters process until the global model converges. Whether the global model converges can be determined by the parameter change amount of the global model in each round of federated training. The specific determination method is as follows: the center server monitors the parameter change amount of the global model in each round. If the parameter change amount of the global model is less than a certain set threshold in several consecutive training rounds, it is considered that the global model has converged.
[0167] The client learns the embedding representation of the nodes in the graph through the optimal local heterogeneous graph representation learning model expression of the local real heterogeneous subgraph to be learned after federated training, 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 local private data of the client.
[0169] According to the method, participating clients of federated learning can pass structural information of heterogeneous graphs by generating and uploading pseudo meta-paths, so that the supplement and recovery of cross-client missing structural information are realized under the premise of protecting local data privacy of the clients, and model performance is improved.
[0170] Embodiment 3
[0171] A computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the federated heterogeneous graph representation learning method based on pseudo meta-path generation in the embodiment 1 or 2 when executing the computer program.
[0172] Embodiment 4
[0173] A computer readable storage medium stores a computer program, and the computer program implements the steps of the federated heterogeneous graph representation learning method based on pseudo meta-path generation in the embodiment 1 or 2 when executed by a processor.
[0174] Embodiment 5
[0175] A federated heterogeneous graph representation learning method system based on pseudo meta-path generation comprises:
[0176] A pseudo meta-path generation unit is configured to generate some pseudo nodes based on nodes and relations in a local real heterogeneous graph, and then form some pseudo meta-paths according to the mode of meta-paths;
[0177] A federated heterogeneous graph fusion unit is configured to cluster the pseudo nodes uploaded by the clients, and add new pseudo meta-path structures to similar nodes to obtain a fused heterogeneous graph composed of pseudo meta-paths and connected to each other;
[0178] A heterogeneous graph representation learning unit is configured to learn the embedding representation of nodes in the local heterogeneous graph by using a model based on meta-paths and attention mechanisms;
[0179] A federated parameter aggregation unit is configured to aggregate model parameters from different clients by using a method based on differential privacy and federated averaging to obtain global model parameters.
[0180] The present application aims at the cross-client graph structure information missing problem existing in federated heterogeneous graph representation learning, and proposes a federated heterogeneous graph representation learning based on pseudo meta-path generation. The generated pseudo meta-path can be used to recover the missing graph structure information across clients, thereby improving the model performance. The present application mainly considers the good information mining ability of meta-path in heterogeneous graph representation learning, and considers the privacy protection ability of the method to the local data of the client, thereby adopting the way of generating pseudo meta-path by the client, fusing and distributing the pseudo meta-path by the center server, to further supplement the local heterogeneous graph of each client, and ensure the protection of privacy while improving the performance.
[0181] The above is the preferred embodiment of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should also be considered within the scope of protection of the present application.
Claims
1. A federated heterogeneous graph representation learning method based on pseudo meta-path generation, characterized by: The steps include: ST1: Datasets of different sizes are selected from publicly available heterogeneous graph datasets and distributed proportionally to each client participating in federated learning. 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. 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; 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. 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. 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 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-labels to be close to the true labels. 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. 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. 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. 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 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 to learn the model expression of 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 is 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 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 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, thereby forming a pseudo-meta-path to supplement the local heterogeneous subgraph; The process of the pseudo neighbor node generation algorithm based on relationship is: 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 specific relationships one by one 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 is 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. It uses the hidden layer within 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 true 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 selects the trusted pseudo meta-paths from the local pseudo meta-paths. A trusted pseudo meta-path is a pseudo meta-path whose topology is completely generated nodes and structures and does not contain the actual starting node where the pseudo meta-path is generated. After selecting all 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 Represents the node embeddings from two different clients i and j, 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): The smaller the Manhattan distance between nodes, the greater the similarity between nodes; The central server constructs similar node evaluation rules based on 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 similarity; The central server cyclically performs clustering operations on the intermediate nodes in each pseudo meta-path of each client. Ultimately, the pseudo meta-paths from different clients that were originally independent of each other in the central server form an interconnected 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 builds 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. 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): 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; 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. Node-level attention is used to learn the importance of a node’s neighboring nodes based on the meta-path. The node embedding representation is updated based on the node-level attention as 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 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; 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): 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; During the client-side training of 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 avoid overfitting. After training is completed, the client obtains the currently 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 classification 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, 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 averaging" parameter aggregation method, as shown in formula (X): In formula (X), Param global Represents 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 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.
8. A federated heterogeneous graph representation learning system based on pseudo meta-path generation, characterized by: A federated heterogeneous graph representation learning method based on pseudo meta-path generation for implementing any one of claims 1 to 7, comprising: The pseudo meta-path generation unit is configured to: generate pseudo nodes based on the nodes and relationships in the local real heterogeneous graph, and then form a pseudo meta-path according to the meta-path pattern; 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; 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 to 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 according to 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