Enhanced federal heterogeneous graph client selection method and device
By building client state space and action space, using active learning and reinforcement learning methods to optimize client selection, the challenge of client selection in federated heterogeneous graph learning is solved, and the model performance and privacy protection capabilities are improved.
Patent Information
- Application Number
- CN202510173249.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-02-17
AI Technical Summary
The existing technology is difficult to effectively select a client in the federated heterogeneous graph learning scenario, resulting in data heterogeneity and resource constraints issues, affecting model performance and privacy protection.
By building client state space and action space, active learning agents are used to filter high-active score samples, combining heterogeneous graph neural networks and reinforcement learning, optimizing client selection, introducing cross-client prototype alignment mechanism, optimizing training losses, and dynamically selecting high-contribution clients.
It improves the robustness and model performance of federated learning, reduces communication overhead, enhances privacy protection, and adapts to heterogeneous graph data training in complex topological scenarios.
Smart Images

Figure CN120297434A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of federated learning, and in particular, to a method and device for enhancing client selection in federated heterogeneous graphs. Background Art
[0002] Federated heterogeneous graph learning (FHGL), as a combination of federated learning (FL) and heterogeneous graph neural networks (HGNN), aims to solve the problems that traditional HGNN depends on massive data but is limited by hardware resources and data privacy. Its core idea is to collaboratively train a global model through distributed clients while maintaining the privacy of local heterogeneous information network (HIN) data. HIN consists of multiple node and edge types with a complex topological structure. High-order features need to be extracted through HGNN, and FHGL allows each client to locally process such heterogeneous data and achieve global model aggregation through a federated mechanism. In this scenario, client selection becomes crucial: an efficient client selection mechanism needs to balance geographical distribution differences, HIN structure heterogeneity, and resource limitations to optimize global model performance, reduce communication overhead, and enhance privacy protection. However, the existing technologies face significant challenges: First, traditional client selection algorithms are mostly designed for Euclidean data (such as images, texts), and it is difficult to adapt to the diversity of node / edge types and complex topological structures in HIN, resulting in biased evaluation of client contributions; Second, the data heterogeneity of HIN (large distribution differences between clients, complex topological combinations) exacerbates the contradiction between convergence and generalization in federated learning. Existing methods lack robustness when weighing the two, and may cause model performance fluctuations due to dynamic combinations of node / edge types; In addition, in resource-constrained scenarios (such as edge devices), existing algorithms are difficult to efficiently screen clients that can provide rich topological information and reduce communication costs, further limiting the actual deployment effect. These problems stem from the mismatch between the graph structure characteristics of HGN and traditional federated optimization goals, and there is an urgent need to develop a client selection strategy that takes into account the dynamic characteristics of graph neural networks, accurate contribution evaluation metrics, and heterogeneity robustness to achieve a double improvement in privacy protection and model performance. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method and device for enhancing client selection in federated heterogeneous graphs to eliminate or improve one or more defects existing in the prior art and solve the problem of client and data selection in the scenario of federated learning of heterogeneous graph neural networks.
[0004] A method for enhancing client selection in federated heterogeneous graphs according to the present invention is jointly executed by multiple clients and a global server. Each client maintains local independent heterogeneous graph data and conducts federated learning in combination with the global server. The method includes the following steps:
[0005] The client loads an active learning agent, constructs a client state space, and constructs a local active state based on the node centrality, information entropy, and information density of each node in the local independent heterogeneous graph data; constructs a client action space, collects data samples in the independent heterogeneous graph data using a fixed batch size, calculates the active scores of the data samples, selects the top first set number of data samples with the highest active scores to participate in local training, and calculates the statistical features of the active scores of the data samples participating in training; the local training process uses the selected data samples to train a heterogeneous graph neural network combined with a node classifier, and a first loss is established by combining the node classification results with the labels in the data samples; the local data prototype of the local independent heterogeneous graph data is calculated using the heterogeneous graph neural network for the hidden layer representation.
[0006] The global server is used to aggregate and update the global model for the parameters of the heterogeneous graph neural network and the node classifier trained by each client; obtains the local data prototypes of the currently participating clients to obtain a global prototype set, and redistributes the global prototype set to the currently participating clients; at the same time, obtains the corresponding statistical features of the currently participating clients for combination as the global state to construct a global state space; constructs a global action space with the selection of clients participating in the next round of training as the action.
[0007] The client identifies the target client closest to its local data prototype, introduces a regularization term by minimizing the distance between its local data prototype and the target client, and adds it to the first loss function to update the parameters of the client's local training.
[0008] Combines the local training performance metrics of the client and the global model performance metrics of the global server to calculate the first reward; combines the global model performance metrics with the target accuracy to calculate the second reward value; based on the form of reinforcement learning, with maximizing the first reward and the second reward value as the optimization direction, selects the clients participating in the next round of training and their local participating training data samples.
[0009] In some embodiments, the method further includes calculating the contribution of different types of edges to the centrality based on degree-based centrality, quantifying the node centrality, and the calculation formula is:
[0010] C D (v)=∑ t∈T ω t ·deg t (v);
[0011] where, C D (v) is the degree centrality of node v; T represents the set of edge types; deg t(v) represents the degree of node v on edge type t; ω t represents the weight of the edge type.
[0012] In some embodiments, the method further includes:
[0013] quantifying the corresponding information entropy by using the classification probability of the node by the node classifier;
[0014] quantifying the information density by using the norm, sparsity index, or diversity index of the hidden layer representation of each node after feature extraction by the heterogeneous graph neural network; wherein, the sparsity index is the proportion of zero elements, and the diversity index is the Simpson diversity index;
[0015] Based on parameter n q , taking the th percentile of the active score as the corresponding statistical feature.
[0016] In some embodiments, calculating a first reward by combining the local training performance metric of the client and the global model performance metric of the global server, and the calculation formula is:
[0017]
[0018] wherein, represents the first reward, B L represents the first exponential base, represents the global model performance metric at time step t, and the global model performance metric is the classification accuracy based on the global test dataset, represents the local training performance metric at time step t, and the local training performance metric is the classification accuracy based on the local test dataset.
[0019] In some embodiments, calculating a second reward value by combining the global model performance metric and the target accuracy, and the calculation formula is:
[0020]
[0021] wherein, r global represents the second reward, B G represents the second exponential base, represents the global model performance metric at time step t, and the global model performance metric is the classification accuracy based on the global test dataset, Acc T represents the target accuracy.
[0022] In some embodiments, calculating a local data prototype by using the hidden layer representation of the local independent heterogeneous graph data by the heterogeneous graph neural network, and the calculation formula is:
[0023]
[0024] Among them, C k represents the local data prototype of the k-th client, and f k represents the heterogeneous graph neural network on the k-th client local, and D k represents the independent heterogeneous graph data on the k-th client local.
[0025] In some embodiments, the client identifies the target client closest to its local data prototype, and introduces a regularization term by minimizing the distance between its local data prototype and the target client. The calculation formula of the regularization term is:
[0026]
[0027] Among them, represents the local data prototype of the client closest to the local data prototype of the k-th client.
[0028] On the other hand, the present invention also provides a reinforcement federated heterogeneous graph client selection device, including a plurality of clients and a global server. When the computer program / instructions are executed, the device implements the steps of the above method.
[0029] On the other hand, the present invention also provides a computer-readable storage medium, on which computer program / instructions are stored. When the computer program / instructions are executed by a processor, the steps of the above method are implemented.
[0030] On the other hand, the present invention also provides a computer program product, including computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the above method are implemented.
[0031] The beneficial effects of the present invention are at least:
[0032] The method and device for enhancing the selection of clients in a federated heterogeneous graph according to the present invention solve the problem of balancing data privacy and model performance in heterogeneous graph data through the collaborative optimization of clients and a global server. On the client side, first, a local state space for quantifying data activity is constructed based on node centrality, information entropy, and information density. An active learning agent is used to screen heterogeneous graph samples with high active scores to train a local model, generating local prototypes representing the characteristics of data distribution. At the same time, a cross-client prototype alignment mechanism is introduced, and the training loss is optimized by minimizing a regularization term for the distance to the target client prototype, alleviating data heterogeneity. On the server side, the client model parameters are aggregated to update the global model, a global prototype library is constructed by integrating the prototypes of each client, and a reinforcement learning framework is designed based on the global state space combining the statistical characteristics of combined clients and the action space of the client selection strategy. An optimization mechanism is established by combining a first reward regarding the local training accuracy of the client and a second reward regarding the convergence progress of the global model. By maximizing the double reward value, the high-contribution clients and their data samples participating in the next round are dynamically selected, achieving multi-objective optimization of communication efficiency, richness of topological information, and privacy protection. This method combines heterogeneous graph feature quantization, prototype alignment, and reinforcement decision-making, improving the robustness of federated learning in complex topological scenarios.
[0033] Additional advantages, objects, and features of the present invention will be partially described in the following description and will become partially apparent to those of ordinary skill in the art after studying the following. Or they can be learned from the practice of the present invention. The objects and other advantages of the present invention can be realized and obtained through the structures specifically pointed out in the specification and the drawings.
[0034] Those skilled in the art will understand that the objects and advantages that can be achieved by the present invention are not limited to the above specifically described, and the above and other objects that the present invention can achieve will be more clearly understood according to the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and do not limit the present invention. In the drawings:
[0036] Figure 1 It is a logical structure diagram of the method for enhancing the selection of clients in a federated heterogeneous graph according to an embodiment of the present invention.
[0037] Figure 2 It is a structural diagram of the device for enhancing the selection of clients in a federated heterogeneous graph according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] To make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with the embodiments and the accompanying drawings. Herein, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but do not limit the present invention.
[0039] Herein, it should also be noted that in order to avoid obscuring the present invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the present invention are shown in the drawings, while other details less related to the present invention are omitted.
[0040] It should be emphasized that the term "comprising / including" when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0041] First, several concepts involved in the present invention will be explained.
[0042] Federated learning is a distributed machine learning framework that allows multiple devices (such as smartphones, edge devices, etc.) to jointly train a model while maintaining local data privacy. The model is trained locally on each client, and after local updates, the model parameters are transmitted to the central server for aggregation in an encrypted manner, avoiding the direct transmission of data.
[0043] A federated graph is a graph data structure extended under the federated learning framework, aiming to handle the training tasks of distributed graph data. In this scenario, the graph data is stored on multiple different clients, and each client has local graph data. Through federated learning, the clients can jointly train a graph model, utilize the graph structure information for effective knowledge sharing and model improvement, without sharing the original graph data.
[0044] A federated heterogeneous graph refers to the graph data used in federated learning, where the nodes, edges or attribute types in the graph are different from each other (i.e., "heterogeneous"). In this scenario, the data of each client may be a different type of graph, with different nodes, edges and attributes. Federated heterogeneous graph learning faces challenges such as data heterogeneity, inconsistent node types and edge types, and requires efficient training and aggregation while ensuring privacy.
[0045] Reinforcement learning is a machine learning method that learns the optimal decision-making strategy by interacting with the environment. The agent observes the environmental state, selects actions, and obtains rewards or punishments according to the selected actions, thereby adjusting the strategy to maximize the long-term reward.
[0046] Active learning is a machine learning method in which the learning system improves learning efficiency by selecting the most valuable training samples, rather than relying entirely on randomly selected samples. In active learning, the model actively selects samples that it is uncertain about or that are informative for annotation, thereby reducing the amount of samples that need to be annotated and improving model performance.
[0047] Similar to other neural networks, a large amount of data can significantly improve the performance of heterogeneous graph neural networks (HGNNs). However, in practical applications, due to hardware limitations or privacy issues from multiple data sources, collecting a large amount of data for training is usually a challenging task. Federated learning (FL), as an effective method for co-training models, does not require the exchange of raw data and is particularly suitable for training machine learning models on distributed devices. Therefore, federated graph learning (FGL) has gradually become a research hotspot, and federated heterogeneous graph learning (FHGL) allows local clients to maintain heterogeneous information network (HIN) data and can handle multiple node and edge types.
[0048] In federated learning, client data is usually distributed across multiple geographical locations and there is data heterogeneity. The client selection mechanism can significantly affect the training efficiency and performance of the global model. Especially in the scenario of federated heterogeneous graph learning, the client data not only has geographical distribution heterogeneity, but also involves the complex structure of heterogeneous information networks (HINs) - the combination of different node types and edge types makes data heterogeneity more prominent. Through effective client selection, clients that contribute more to the global model can be preferentially selected, thereby improving the training efficiency of the global model, reducing communication overhead, and wasting computational resources. The topological structures in heterogeneous information networks are complex and diverse, and the types of nodes and edges are numerous, making it difficult for traditional client selection methods to handle this complex information. In federated heterogeneous graph learning, how to fully consider node and edge heterogeneity during the client selection process so that the selected clients can effectively provide rich topological information for the global model is the key to improving model performance. Therefore, studying a client selection method that can adapt to the characteristics of heterogeneous graphs can help select clients that contain more useful information, thus better enhancing the generalization ability and accuracy of the model. A core advantage of federated learning is to protect data privacy, and client local data is not directly transmitted to the server. Through effective client selection, unnecessary communication overhead can be reduced, and only those clients that can contribute more information to the model are selected for global aggregation. This can not only improve communication efficiency but also avoid redundant data transmission, further enhancing the system's privacy protection ability. In many practical application scenarios, federated learning faces problems such as limited hardware resources and restricted network bandwidth. For example, in resource-constrained environments such as smartphones and edge computing devices, training a global model requires an efficient client selection mechanism to ensure efficient model training with limited resources. In addition, with the increasing severity of data privacy and security issues, how to ensure effective protection of data privacy through reasonable client selection while optimizing the performance of the model has become an important research requirement in federated heterogeneous graph learning.
[0049] Although existing client selection (CS) algorithms have been widely studied in Euclidean data scenarios, applying these algorithms to federated heterogeneous graph learning has not received enough attention. In addition, the unique characteristics of heterogeneous information networks and the complexity of graph neural networks make it extremely difficult to accurately evaluate client contributions and select appropriate clients for aggregation in the FHGL scenario.
[0050] In the FHGL scenario, the client selection faces two major challenges. On the one hand, the multiple node and edge types in the heterogeneous information network introduce complex topological information, which requires the adoption of more advanced graph neural network architectures to handle more complex tasks. Existing client selection algorithms rely on model information and performance metrics, but this evaluation method is prone to bias and it is difficult to accurately select the clients that contribute the most to the global model aggregation. On the other hand, due to the existence of data heterogeneity, existing client selection algorithms often face a trade-off between convergence and generalization. The complexity and diversity of the heterogeneous information network further exacerbate data heterogeneity, and the data distributions among clients may vary greatly. The complex node and edge combinations create topological information that is difficult to handle, which challenges the robustness of federated learning in managing data heterogeneity. Traditional client selection algorithms may exacerbate the contradiction between convergence and accuracy in this scenario.
[0051] Existing federated learning dynamic client selection methods mainly determine which clients participate in the training of the global model by evaluating factors such as the performance, data distribution, computing power, communication cost, and contribution degree of the clients. Common strategies include selection based on the local training progress or data representativeness of the clients, dynamically adjusting client selection through reinforcement learning to adapt to different training needs, optimizing client selection based on communication overhead to reduce bandwidth consumption, and selecting representative groups to participate in training after grouping the clients through clustering algorithms. In addition, game theory has also been introduced to design client selection strategies to optimize the global training effect by promoting cooperation or competition among clients. However, the multiple node and edge types in the heterogeneous information network introduce complex topological information, which requires the adoption of more advanced graph neural network architectures to handle more complex tasks. Existing client selection algorithms rely on model information and performance metrics, but this evaluation method is prone to bias and it is difficult to accurately select the clients that contribute the most to the global model aggregation.
[0052] In view of this, a method for enhancing federated heterogeneous graph client selection of the present invention is executed collaboratively by multiple clients and a global server. Each client maintains local independent heterogeneous graph data and conducts federated learning jointly with the global server. The method includes the following steps S101 to S104:
[0053] Step S101: The client loads the active learning agent, constructs the client state space, and constructs the local active state based on the node centrality, information entropy, and information density of each node in the local independent heterogeneous graph data; constructs the client action space, collects data samples in the independent heterogeneous graph data using a fixed batch size, calculates the active scores of the data samples, and selects the top first set number of data samples with the highest active scores to participate in local training, and calculates the statistical features of the active scores of the data samples participating in training; in the local training process, the selected data samples are used to train the heterogeneous graph neural network combined with the node classifier, and the node classification results are combined with the labels in the data samples to establish the first loss; the local data prototype is calculated using the heterogeneous graph neural network for the hidden layer representation of the local independent heterogeneous graph data.
[0054] Step S102: The global server is used to aggregate and update the global model for the parameters of the heterogeneous graph neural network and the node classifier trained by each client; obtains the local data prototypes of the currently participating clients to get the global prototype set, and redistributes the global prototype set to the currently participating clients; at the same time, obtains the corresponding statistical features of the currently participating clients for combination as the global state to construct the global state space; constructs the global action space with the selection of the clients participating in the next round of training as the action.
[0055] Step S103: The client identifies the target client closest to its local data prototype, introduces a regularization term by minimizing the distance between its local data prototype and the target client, and adds it to the first loss function to update the parameters of the client's local training.
[0056] Step S104: Calculate the first reward by combining the local training performance metrics of the client and the global model performance metrics of the global server; calculate the second reward value by combining the global model performance metrics and the target accuracy; based on the form of reinforcement learning, with maximizing the first reward and the second reward value as the optimization direction, select the clients participating in the next round of training and their local data samples participating in training.
[0057] The present invention solves the challenges of client selection and data heterogeneity in federated heterogeneous graph learning (FHGL) through three core logics: client local optimization, global collaborative aggregation, and reinforcement learning dynamic decision-making.
[0058] Based on the federated learning structure, the client and the global server perform local learning using independent heterogeneous graph data distributed across each client, and parameter aggregation is carried out through the global server. At the client side, based on the active learning agent, the client constructs a local active state through node centrality, information entropy, and information density, quantifies the importance and information density of nodes in the heterogeneous graph data, filters samples with high active scores to participate in training, and preferentially utilizes local topological data with a large amount of information. A heterogeneous graph neural network (HGNN) is used to extract hidden layer representations, generating local data prototypes that characterize the distribution characteristics of local data, providing a basis for subsequent cross-client alignment. By identifying the target client closest to the local prototype, a cross-client prototype distance minimization constraint (regularization term) is introduced into the loss function to reduce feature drift caused by data heterogeneity and improve the generalization of the model.
[0059] In the global collaborative aggregation process, the global server aggregates the HGNN and node classifier parameters of each client, updates the global model, and realizes the basic collaboration of federated learning. The local prototypes of all clients are integrated to form a global prototype set, which is redistributed to the clients to provide a global data distribution view and assist in local training alignment. The statistical features (such as the active score distribution) of each client are combined into a global state to dynamically characterize the overall training state of the federated system, providing a basis for reinforcement learning decisions.
[0060] Reinforcement learning dynamic decision-making is introduced simultaneously at the client and global server sides to select participating clients and data nodes during each training process. At the client side, the client dynamically filters high-value samples according to the active scores, reducing redundant calculations. A first reward is introduced based on the client's local training performance (such as classification accuracy) and the global model performance (such as the accuracy after aggregation) to encourage the client to improve the quality of local training. At the global server side, based on the global state, the next round of participating clients is selected through a reinforcement learning strategy (such as Q-learning or policy gradient). A second reward is introduced to dynamically adjust through the gap between the global model performance and the target accuracy, guiding the system to optimize in the direction of efficient convergence.
[0061] Through the closed-loop logic of local feature quantization, global prototype sharing, and reinforcement dynamic decision-making, this solution deeply integrates the characteristics of heterogeneous graph data, the federated collaboration mechanism, and the reinforcement learning strategy. Under the premise of protecting privacy, it solves the core problems of client selection and heterogeneity management in FHGL, and finally realizes efficient and robust global model training.
[0062] In step S101, in order to introduce reinforcement learning and active learning to select high-quality samples, it is first necessary to construct a state space and an action space to select data samples with better effects. In the present invention, the local active state is constructed using the node centrality, information entropy, and information density of each node in the local independent heterogeneous graph data.
[0063] The method calculates the contribution of different types of edges to centrality based on degree centrality, quantifies node centrality, and the calculation formula is:
[0064] C D (v)=∑ t∈T ω t ·deg t (v);
[0065] Where, C D (v) is the degree centrality of node v; T represents the set of edge types; deg t (v) represents the degree of node v on edge type t; ω t represents the weight of the edge type.
[0066] In some embodiments, the method further includes: using a node classifier to quantify the corresponding information entropy of the classification probability of the node; using the norm, sparsity index or diversity index of the hidden layer representation after feature extraction by each node through a heterogeneous graph neural network to quantify information density; where the sparsity index is the proportion of zero elements, and the diversity index is the Simpson diversity index. Based on the parameter n q , the th percentile of the active score is used as the corresponding statistical feature.
[0067] Furthermore, after weighted summation of the node centrality, information entropy, and information density of each node included in the data sample, accumulation is performed to obtain the active score of the data sample.
[0068] In step S102, on the basis of performing federated learning parameter aggregation, a global state space and a global action space are constructed to perform client selection. The global server aggregates the parameters of the heterogeneous graph neural network (HGNN) and the node classifier trained by each client (such as the FedAvg algorithm) to update the global model. By integrating the local knowledge of multiple clients, the generalization ability of the global model is improved, and the model deviation caused by data limitations of a single client is avoided. The global model is updated after each federated round to ensure that all clients perform the next round of local training based on a unified knowledge benchmark.
[0069] Collect the local data prototypes of each client (i.e., the central points of the hidden layer feature representations) to form a global prototype set. The global prototype library depicts the commonalities of the data distributions of all clients in the federated system and provides a reference for subsequent feature alignment between clients. The global prototype library is sent to the clients participating in the training to guide the clients to align with the global distribution through a regularization term (step S103) during local training, reducing feature drift caused by data heterogeneity.
[0070] The global server aggregates the active score statistical features reported by each client (such as the 25th, 50th, and 75th percentiles) to construct a global state space. Quantify the overall data distribution characteristics of the federated system. For example, the concentration of high percentiles (such as P75) reflects that most clients have high-value samples. The discreteness of low percentiles exposes the insufficient data quality of some clients.
[0071] In this process, only the model parameters and prototypes (instead of the original data) are transmitted, reducing the communication overhead while protecting privacy. Through global state analysis, subsequent reinforcement learning can preferentially select clients with high data quality (such as P90 active score) to avoid inefficient participation.
[0072] In some embodiments, a heterogeneous graph neural network is used to calculate the local data prototype for the hidden layer representation of local independent heterogeneous graph data. The calculation formula is:
[0073]
[0074] Among them, C k represents the local data prototype of the k-th client, and f k represents the heterogeneous graph neural network of the k-th client locally, and D k represents the local independent heterogeneous graph data of the k-th client.
[0075] In step S103, the client identifies the target client closest to its local data prototype, and introduces a regularization term by minimizing the distance between its local data prototype and the target client's local data prototype. The calculation formula of the regularization term is:
[0076]
[0077] Among them, represents the local data prototype of the client closest to the local data prototype of the k-th client.
[0078] By minimizing the distance between the local data prototype and the target client's data prototype, the regularization term can constrain the training direction of the client, preventing the client from relying too much on its own local data and falling into a local optimal solution. This constraint mechanism helps to enhance the cooperation between clients, making the training results of each client closer to the expectations of the global model, thereby improving the overall performance and generalization ability of the entire federated learning system. At the same time, the regularization term can also reduce the overfitting phenomenon in the client training process to a certain extent, ensuring the adaptability of the local model to the global data distribution.
[0079] In step S104, the first reward is calculated by combining the local training performance index of the client and the global model performance index of the global server. The calculation formula is:
[0080]
[0081] Among them, represents the first reward, B L represents the first exponential base, represents the global model performance metric at time step t. The global model performance metric is the classification accuracy based on the global test dataset. represents the local training performance metric at time step t. The local training performance metric is the classification accuracy based on the local test dataset.
[0082] In some embodiments, the second reward value is calculated by combining the global model performance metric with the target accuracy. The calculation formula is:
[0083]
[0084] Among them, r global represents the second reward, B G represents the second exponential base, represents the global model performance metric at time step t. The global model performance metric is the classification accuracy based on the global test dataset, Acc T represents the target accuracy.
[0085] On the other hand, the present invention also provides a reinforcement federated heterogeneous graph client selection device, including a plurality of clients and a global server. When the computer program / instructions are executed, the device implements the steps of the above method.
[0086] On the other hand, the present invention also provides a computer-readable storage medium, on which computer program / instructions are stored. When the computer program / instructions are executed by a processor, the steps of the above method are implemented.
[0087] On the other hand, the present invention also provides a computer program product, including computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the above method are implemented.
[0088] The present invention will be described below in conjunction with a specific embodiment:
[0089] This embodiment provides a Federated Heterogeneous Graph Client Selection Method based on Reinforcement Learning and Active Learning (RAFHGL). This method combines the advantages of reinforcement learning (RL) and active learning (AL), aiming to improve the client selection performance in federated heterogeneous graph learning. The RAFHGL algorithm can dynamically adapt to changes in the client scenario, providing an effective client selection method that can ensure convergence in the short term while also contributing to the optimization of the global model in the long term. By leveraging the ability of reinforcement learning to handle delayed rewards, RAFHGL enables clients to make intelligent decisions, thereby not only optimizing local models but also enhancing the performance of the entire federated learning framework.
[0090] The structure of this embodiment is as Figure 1 shown. By actively learning to evaluate the quality of client data, samples that are more informative for the model are selected. Using the distribution of valid samples as an indicator to evaluate client quality can reduce interference from other factors while ensuring data privacy. The proposed architecture mainly relies on two different agents: the Local Active Learning Agent (ALA) and the Global Client Selection Agent (CSA), which help the server accurately evaluate client information and select the most informative clients to promote the convergence of the global model. At the same time, the active selection of these two agents may introduce biases in the training data, so a data prototype-based correction method is proposed to mitigate the over-personalized development of local models.
[0091] For a federated environment with K clients and one server, the k-th client maintains its own independent heterogeneous graph data D k =(G k , X k , Y k ), where X k and Y k are the feature matrix and label matrix respectively, and G k =(V k , E k , A k , R k ) represents a heterogeneous graph data.
[0092] Client Local Active Learning Agent ALA: On the local client, the ALA calculates the active scores of samples based on the local state. It preferentially selects nodes with higher scores to participate in the training of the local heterogeneous graph neural network. Meanwhile, the statistical features of the active scores are transmitted to the server. Since the result of local active learning is an important input for the global reinforcement learning state, it is crucial to generate stable and accurate active learning results. The reinforcement algorithm can adaptively adjust the sample selection strategy to cope with different usage scenarios and the evolving global model. To achieve this goal, the active learning process on the client is instantiated as a Markov decision process. The ALA on the k-th client can be represented as a tuple M k =(S k , U k , r k ), where S k represents the set of local states, U k represents the set of actions, specifically the probability distribution of output selection, and r k represents the reward associated with the selected action.
[0093] States. The local active state S k includes three key aspects: Node centrality, which reflects the importance of nodes in the data network and is effectively calculated using the PageRank algorithm. Information entropy measures the difficulty of the classifier to accurately classify node embeddings. High entropy helps to learn fuzzy information, while low entropy reinforces existing knowledge. In this invention, the classification probability of the local classifier is used as information entropy. Information density is related to active learning on the client, selecting samples with the highest training priority instead of creating a core set for annotation. Since the traditional method relying on core set distance calculation is difficult to apply, this invention uses the hidden layer representation of nodes to evaluate the information density of sample embeddings.
[0094] Actions. Based on the state of local nodes, the ALA calculates the active scores of all local samples using a fixed batch size. The top B s samples with the highest active scores are selected to participate in local training. Meanwhile, the statistical features of the active scores are calculated.
[0095] Rewards. The goal of local AL can be summarized as improving the performance of the model, specifically reflected in two aspects: local training performance Acc L and global model performance Acc G . It should be noted that improving global performance is the primary task; therefore, the change in global performance is calculated and exponentially amplified with an exponential base B L . To ensure that samples with low or even negative local performance changes but may contribute to improving global performance are not overlooked, local performance is given a linear weight.
[0096]
[0097] Among them, represents the first reward, B L represents the first exponential base, represents the global model performance metric at time step t. The global model performance metric is the classification accuracy based on the global test dataset, represents the local training performance metric at time step t. The local training performance metric is the classification accuracy based on the local test dataset.
[0098] Server - client selects proxy CSA: On the global server side, CSA constructs a global state on the global server derived from the aggregated statistical features of all clients' active scores. Subsequently, the server identifies the clients most likely to make a significant contribution to the global model for model aggregation. Therefore, in each round of federated communication, CSA is used to select K s devices to participate in training. The specific design of the CSA proxy is as follows:
[0099] State. The selection state of global clients can be represented as a vector s G ={u1, u2,..., u Ks}, where u k represents the statistical feature of the active score result of the k - th client. For a given parameter n q , the statistical feature corresponds to the -th percentile of the evaluation result.
[0100] Action. The action space is defined as {1, 2,..., K}, where a = k means selecting the k - th device to participate in federated training.
[0101] Reward. The reward design aims to motivate the proxy to approach the target accuracy Acc T , thus achieving higher accuracy. The specific formula is as follows:
[0102]
[0103] Among them, r global represents the second reward, B G represents the second exponential base, represents the global model performance metric at time step t. The global model performance metric is the classification accuracy based on the global test dataset, Acc T represents the target accuracy.
[0104] Data Drift Correction Based on Data Prototypes: Due to the data selection process on the client side and the server side, the global model in each aggregation round is only affected by a part of the distinctive data. This may cause the global model to converge to a local optimum and exacerbate the client drift phenomenon. To address this issue, the present invention proposes a mitigation strategy based on data prototypes. This strategy aims to restrict local training, thereby preventing abnormal samples from having too much influence on the model and ensuring the stability of training. Specifically, each client initially calculates the local data prototype C k from the hidden layer representation of its local dataset D k .
[0105]
[0106] where C k represents the local data prototype of the k-th client, f k represents the heterogeneous graph neural network of the k-th client locally, and D k represents the independent heterogeneous graph data of the k-th client locally. Among them, f k is the local heterogeneous graph neural network model.
[0107] Subsequently, the central server collects all client prototypes to obtain the global prototype set P = {C1, C2,..., C K}, and then distributes it to the clients. During this process, the server does not aggregate these prototypes, but introduces a regularization term to penalize those nodes whose hidden layer features deviate from the entire federated system.
[0108]
[0109] where represents the client local data prototype that is closest to the local data prototype of the k-th client.
[0110] The purpose of adding the regularization term is to mitigate the client drift caused by the repeated active selection of the client between the client side and the server side. However, excessive punishment may limit the exploration speed of the client in the solution space, resulting in a reduced convergence speed. Therefore, we intuitively choose the local prototype with the smallest deviation from its respective local client for correction instead of calculating the global prototype.
[0111] Corresponding to the above method, the present invention also provides a device / system, which includes a computer device. The computer device includes a processor and a memory. The memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device / system implements the steps of the method described above.
[0112] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the foregoing edge computing server deployment method are implemented. The computer-readable storage medium may be a tangible storage medium, such as random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium well-known in the art.
[0113] In summary, for the method and device for enhancing federated heterogeneous graph client selection according to the present invention, the balance between heterogeneous graph data privacy and model performance is solved through the collaborative optimization of the client and the global server. On the client side, first, a local state space for quantifying data activity is constructed based on node centrality, information entropy, and information density. An active learning agent is used to screen heterogeneous graph samples with high activity scores to train the local model, generating local prototypes that characterize the data distribution characteristics. At the same time, a cross-client prototype alignment mechanism is introduced, and the training loss is optimized by minimizing the regularization term of the distance from the target client prototype, alleviating data heterogeneity. On the server side, the client model parameters are aggregated to update the global model, the global prototype library is constructed by integrating the prototypes of each client, and a reinforcement learning framework is designed based on the global state space of the combined client statistical features and the action space of the client selection strategy. An optimization mechanism is established by combining the first reward regarding the local training accuracy of the client and the second reward regarding the convergence progress of the global model. By maximizing the double reward value, the high-contribution clients and their data samples participating in the next round are dynamically selected, achieving multi-objective optimization of communication efficiency, topological information richness, and privacy protection. This method combines heterogeneous graph feature quantization, prototype alignment, and reinforcement decision-making, improving the robustness of federated learning in complex topological scenarios.
[0114] Those of ordinary skill in the art should understand that the various exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Specifically, whether to implement in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave on a transmission medium or a communication link.
[0115] It should be clear that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present invention.
[0116] In the present invention, features described and / or illustrated for one embodiment can be used in the same or similar manner in one or more other embodiments, and / or combined with the features of other embodiments or replace the features of other embodiments.
[0117] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, various changes and modifications can be made to the embodiments of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for enhancing the selection of clients in a federated heterogeneous graph, characterized in that, The method is collaboratively executed by multiple clients and a global server. Each client maintains local independent heterogeneous graph data and jointly performs federated learning with the global server. The method includes the following steps: The client loads an active learning agent, constructs a client state space, and constructs a local active state based on the node centrality, information entropy, and information density of each node in the local independent heterogeneous graph data; constructs a client action space, collects data samples in the independent heterogeneous graph data using a fixed batch size, calculates the active scores of the data samples, selects the first set number of data samples with the highest active scores to participate in local training, and calculates the statistical features of the active scores of the data samples participating in training; in the local training process, the selected data samples are used to train a heterogeneous graph neural network combined with a node classifier, and a first loss is established by combining the node classification result with the label in the data sample; the hidden layer representation of the local independent heterogeneous graph data is calculated using the heterogeneous graph neural network to obtain a local data prototype; The global server is used to aggregate and update the global model with the parameters of the heterogeneous graph neural network and the node classifier trained by each client; obtains the local data prototypes of the currently participating clients to obtain a global prototype set, and redistributes the global prototype set to the currently participating clients; at the same time, obtains the corresponding statistical features of the currently participating clients for combination as the global state to construct a global state space; constructs a global action space with the selection of clients participating in the next round of training as the action; The client identifies the target client closest to its local data prototype, introduces a regularization term by minimizing the distance between its local data prototype and the target client, and adds it to the first loss function to update the parameters of the client's local training; Calculate a first reward by combining the local training performance index of the client and the global model performance index of the global server; calculate a second reward value by combining the global model performance index with the target accuracy; based on the form of reinforcement learning, with maximizing the first reward and the second reward value as the optimization direction, select the clients participating in the next round of training and their local data samples participating in training.
2. The enhanced federated heterogeneous graph client selection method according to claim 1, characterized in that, The method further includes calculating the contribution of different types of edges to the centrality based on degree centrality, quantifying the node centrality, and the calculation formula is: C D (v) = ∑ t∈T ω t ·deg t (v); Among them, C D (v) is the degree centrality of node v; T represents the set of edge types; deg t (v) represents the degree of node v on edge type t; ω t represents the weight of the edge type.
3. The enhanced federated heterogeneous graph client selection method according to claim 1, characterized in that The method further includes: Quantifying the corresponding information entropy by using the node classifier to calculate the classification probability of the node; Quantifying the information density by using the norm, sparsity index, or diversity index of the hidden layer representation of each node after feature extraction by the heterogeneous graph neural network; where the sparsity index is the proportion of zero elements, and the diversity index is the Simpson diversity index; Based on the parameter n q , take the -th percentile of the active score as the corresponding statistical feature.
4. The enhanced federated heterogeneous graph client selection method according to claim 1, wherein Calculate a first reward by combining the local training performance index of the client and the global model performance index of the global server, and the calculation formula is: Among them, represents the first reward, B L represents the first exponential base, represents the global model performance metric at the t-th time step, and the global model performance metric is the classification accuracy based on the global test dataset, represents the local training performance metric at the t-th time step, and the local training performance metric is the classification accuracy based on the local test dataset.
5. The enhanced federated heterogeneous graph client selection method according to claim 1, wherein Calculate a second reward value by combining the global model performance index with the target accuracy, and the calculation formula is: where r global represents the second reward, B G represents the second exponential base, represents the global model performance metric at time step t, and the global model performance metric is the classification accuracy based on the global test dataset, Acc T represents the target accuracy.
6. The enhanced federated heterogeneous graph client selection method according to claim 1, wherein Calculate the local data prototype of the local independent heterogeneous graph data by using the heterogeneous graph neural network, and the calculation formula is: Among them, C k represents the local data prototype of the k-th client, and f k represents the heterogeneous graph neural network on the k-th client local, and D k represents the independent heterogeneous graph data on the k-th client local.
7. The enhanced federated heterogeneous graph client selection method according to claim 6, wherein The client identifies the target client closest to its local data prototype, and introduces a regularization term by minimizing the distance between its local data prototype and the target client. The calculation formula of the regularization term is: Among them, represents the client local data prototype that is closest to the local data prototype of the k-th client.
8. An enhanced federated heterogeneous graph client selection device, characterized in that It includes multiple clients and a global server, and the clients and the global server are used to execute the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having computer programs / instructions stored thereon, characterized in that, When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Client selection and personalized privacy protection method in asynchronous federated edge learning
CN117252253A
Client selection and adaptive model aggregation method and system based on reinforcement learning in federated learning
CN117459570A
Multi-task graph classification model construction method and system oriented to Non-IID graph data
CN117688425A
Multi-task processing system for realizing graph federation transfer learning based on graph subtree difference
CN118036706A
Method and apparatus for identifying heterogeneous graph and property of molecular space structure and computer device
US20210043283A1