A Fair Federated Learning Method for Cross-Domain Social Network Node Classification Tasks
By introducing a local optimization objective function based on proportional fairness and Nash bargaining solutions, as well as a class-balanced reweighted loss function, into federated graph learning, the performance unfairness caused by client data heterogeneity in cross-domain social network node classification tasks is addressed, achieving a balance between model fairness and performance.
Patent Information
- Application Number
- CN202311224985.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-09-21
AI Technical Summary
Existing federated graph learning methods have failed to effectively address the performance unfairness caused by heterogeneous client data in cross-domain social network node classification tasks, and existing fair federated learning methods perform poorly under graph-specific properties.
We construct a local optimization objective function using the concept of proportional fairness and Nash bargaining solution, and introduce a class-balanced reweighted loss function. Through local model training on the client and aggregation of server parameters, we optimize the global model to achieve a balance between fairness and performance.
Without sacrificing too many performance metrics, the fairness metrics of the model are significantly improved, ensuring that the performance of different clients meets the proportional fairness requirements, alleviating the class imbalance problem caused by data heterogeneity, and improving the generalization performance of the model.
Smart Images

Figure CN117235331B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graph structure data processing, and in particular to a fair federated learning method for cross-domain social network node classification tasks. Background Technology
[0002] Graph Neural Networks (Graph Neural Networks) are a class of deep learning models that process graph-structured data. Thanks to their powerful graph representation learning capabilities, Graph Neural Networks have recently been widely applied in numerous scenarios such as drug discovery, fraud detection, recommender systems, and social network analysis. For example, in node classification tasks, Graph Neural Networks extract neighbor node information from the topology to generate more representative node feature representations, which can significantly improve the prediction performance of node attributes. However, most current Graph Neural Networks employ a centralized training model, which is difficult to implement in distributed, multi-user scenarios: due to privacy concerns, users may be unwilling to share their data. The "data silo" problem has become a key factor restricting the development of Graph Neural Networks in distributed scenarios.
[0003] As a representative distributed machine learning solution, Federated Learning (FL) has received widespread attention in both academia and industry. Federated Learning is designed for distributed, multi-user scenarios, where each client has its own dataset. Traditional centralized learning requires uploading user data to a server for model training. Federated Learning, however, eliminates the need to collect user data. Instead, users train their local models locally and upload their local model parameters to the server. The server then aggregates these parameters according to specific rules to form a global model, which is distributed to participating clients. Federated Learning can leverage distributed data for collaborative learning while protecting data privacy, achieving better performance than local training and alleviating the data silo problem without violating privacy. Federated Learning also provides an effective solution for training graph neural networks on isolated graphs, namely Federated Graph Learning.
[0004] While federated learning can effectively utilize multi-party data without violating privacy, the heterogeneity of multi-user data presents new challenges to improving its performance. Because user-collected data in federated learning scenarios comes from different regions and domains, its feature and category distributions are often non-independently and identically distributed (non-IID), leading to significant discrepancies in the weights / gradients trained locally among different users. Furthermore, the commonly used federated learning algorithm, FedAvg, uses the number of user samples as the weight for gradient aggregation, naturally resulting in a global model that favors users with larger sample sizes. Therefore, the global model may overfit some clients at the expense of others, which is considered unfair treatment of participating clients. Unlike traditional machine learning, fairness in federated learning is not only reflected in the protection of sensitive attribute-based groups but also in the different clients and their interactions. From the perspective of the federated learning clients, model performance fairness should ensure that clients with similar data distributions or sample sizes have comparable performance. Some recently proposed fair federated learning algorithms focus on designing global or local optimization objective functions to meet specific fairness constraints. Agnostic Federated Learning (AFL) optimizes for any (unaware) target distribution formed by clients with different distributions, achieving maximum-minimum fairness by minimizing the loss of the worst-performing client. Inspired by fair resource allocation in wireless communication networks, q-Fair Federated Learning reweights the aggregate loss by assigning higher weights to clients with higher losses using the parameter q; adjusting the parameter q can achieve different levels of fairness. Ditto, based on personalized multi-task federated learning, aims to improve both the fairness and robustness of the model. After optimizing the global objective function, Ditto allows clients to fine-tune their local personalized models on their local datasets, and adds a regularization term to constrain the deviation between the global model and the local personalized model.
[0005] However, current work rarely addresses the fairness issue in federated graph learning, and directly applying existing fair federated learning methods faces challenges posed by the unique properties of graphs. Unlike the relatively independent structural relationships between images, the node features of a graph are closely related to its topological structure. For example, the underlying community structure in a social network influences the distribution of node features; according to graph homogeneity theory, nodes within the same community are more tightly connected and have more similar properties. Based on the message passing and feature aggregation mechanisms of graph neural networks, the node feature embedding applied to node-level tasks implicitly contains the graph's topological information. In federated scenarios, subgraphs collected by different clients often have heterogeneous node features and topological distributions, making the design of fairness algorithms for federated graph node classification scenarios even more challenging. Summary of the Invention
[0006] The purpose of this invention is to provide a fair federated learning method for cross-domain social network node classification tasks, ensuring that the performance of the federated learning model meets the requirement of proportional fairness across different clients, that is, significantly improving the fairness index of the model without sacrificing too much performance.
[0007] The objective of this invention can be achieved through the following technical solutions:
[0008] The algorithmic framework of this invention utilizes the concept of proportional fairness. Proportional fairness is a form of fairness that lies between utilitarianism and egalitarianism; under the constraint of proportional fairness, the average relative benefit cannot be further improved. Intuitively, proportional fairness means that the benefits (quantifiable as model performance) gained by the client from federated learning should be proportional to the client's contribution. Ultimately, it can improve performance fairness while maintaining a comparable average performance.
[0009] This invention provides a fair federated learning method for cross-domain social network node classification tasks. Each client possesses a subgraph that cannot be accessed by the central server or other clients. The subgraph contains several nodes, some of which are labeled. Each client trains a graph neural network to predict the labels of the remaining unknown nodes. By iteratively training the client's local model and aggregating server parameters, an optimal global model is obtained and distributed to the clients.
[0010] Specifically, the client-side local model training is as follows: at the start of each round of global iteration, the server randomly selects a portion of the client set as the client set for this round of training, and distributes the initialized global model to the client. The client uses the subgraph data it has locally to update the graph neural network parameters. At the same time, it constructs a local optimization objective function based on the Nash bargaining solution and introduces a class-balanced reweighted loss function to optimize the local model.
[0011] The server parameter aggregation is specifically as follows: after the local model training is completed, the clients participating in this round of training upload the trained local model to the central server. The server performs weighted aggregation of the local models according to the weights of different clients to obtain the global model. The aggregated global model is then distributed to the clients for the next round of client local model training.
[0012] The local optimization objective function is:
[0013]
[0014] in, It is k Personalized benefit benchmarks for each client It is k Local loss function for each client.
[0015] The overall optimization objective of the local model training is to minimize the weighted sum of the loss functions of each client.
[0016] The overall optimization objective for the local model training is expressed as:
[0017]
[0018] in, K The number of clients participating in the training. p k Indicates the first k The aggregate weight of each client's local model is specifically the ratio of the amount of data on the local client to the total amount of data.
[0019] The class-balanced reweighted loss function is constructed by introducing class-balanced weights into the focal loss function.
[0020] The category-balanced reweighted loss function is:
[0021]
[0022] Where C represents the number of categories, For class-balanced weights, β is the class reweighting hyperparameter, and n yγ represents the number of samples labeled y, and γ is a hyperparameter in Focal Loss that measures the difficulty of classifying a sample.
[0023]
[0024] in, This represents the category logits of the linear layer output.
[0025] The learning of the graph neural network includes two stages: message propagation and neighbor node aggregation. In this process, each node aggregates its own features and the features of its neighbor nodes to update its node feature representation.
[0026] The formalized description of the graph neural network is as follows:
[0027]
[0028]
[0029] in, L The number of layers in a graph neural network. It is the first node v l Layer feature representation, These are node attribute features. AGG represents the neighboring nodes of node v. ) represents an aggregate function. Represents the learnable feature transformation weights. The function that concatenates the self-embedding and neighbor node embeddings of node v.
[0030] The server performs weighted aggregation of the local model based on the weights of different clients, using a weighted aggregation mode based on the client sample size.
[0031]
[0032] in, Indicates client Subgraphs held The set of nodes, K The number of clients participating in the training. Indicates the first k A local model.
[0033] The iteration termination condition for the two steps of client-side local model training and server parameter aggregation is reaching a limited number of global iteration rounds or the required target performance.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] (1) This invention is aimed at the task of classifying nodes in federated graphs in cross-domain social networks. It proposes a fair federated learning method based on the idea of proportional fairness, which can solve the problem of data heterogeneity of federated learning clients to a certain extent and achieve a better balance between average client performance and client performance fairness.
[0036] (2) In the proportional fairness federated learning method proposed in this invention, the connection between the definition of proportional fairness and the Nash bargaining model in game theory is used to construct a local optimization objective function based on the Nash bargaining solution strategy for the client, and finally the federated learning model can meet the requirements of proportional fairness.
[0037] (3) In view of the heterogeneity of data distribution among different clients in the federated graph node classification scenario, this invention designs a class-balanced reweighted loss function and adopts a cost-sensitive reweighting strategy to handle class imbalance samples within the client, alleviate overfitting to specific classes in local training, and improve the generalization performance of the model. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0039] Figure 2 This is a comparison chart of the performance metrics of the method of this invention with other methods on the dataset;
[0040] Figure 3 This is a comparison chart of fairness metrics between the method of this invention and other methods on the dataset;
[0041] Figure 4 This is a comparison chart of the accuracy of the method of the present invention with other methods on different clients;
[0042] Figure 5 This is a comparison chart of the worst client accuracy of the method of the present invention with and without class balance loss;
[0043] Figure 6 This is a comparison chart of the model accuracy of the worst-performing client under different benchmark settings for the method of this invention. Detailed Implementation
[0044] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0045] This embodiment provides a fair federated learning method for cross-domain social network node classification tasks, such as... Figure 1As shown in the diagram, the federated learning system in the proposed algorithm framework consists of a central server and several clients. Each client possesses a subgraph, which cannot be accessed by the central server or other clients. The subgraph contains several nodes, some of which are labeled. Each client trains a graph neural network to predict the labels of the remaining unknown nodes. Through collaboration between the server and clients, federated learning can fully utilize multi-party data while protecting user data privacy, ultimately training a powerful global model that is distributed to the clients. The learning process can be broadly divided into two steps: client-side local model training and server parameter aggregation. These two steps iterate until specific requirements are met (reaching a limited number of global iteration rounds or the required target performance), at which point the optimal global model is trained and distributed to the clients.
[0046] Step 1) Local model training on the client side
[0047] At the start of each global iteration, the server retrieves data from the client collection. I Randomly select a portion This serves as the client set for this round of training, distributing the initialized global model to the clients. Each client then uses its locally available subgraph data to update the graph neural network parameters. Simultaneously, a local optimization objective function is constructed based on the Nash bargaining solution, and a class-balanced reweighted loss function is introduced to optimize the local model.
[0048] The learning of a graph neural network typically involves two stages: message propagation and neighbor aggregation. During this process, each node aggregates its own features and the features of its neighbors to update its node feature representation. An L-layer graph neural network can be formally described as follows:
[0049]
[0050]
[0051] in It is the first node v l Layer feature representation, in particular, These are node attribute features. AGG represents the neighboring nodes of node v. ) represents the aggregation function (which varies depending on the GNN model). Represents the learnable feature transformation weights. The function that concatenates the self-embedding and neighbor node embeddings of node v.
[0052] To meet the requirement of proportional fairness, this invention designs a local optimization objective function based on the Nash Bargaining Solution (NBS) and introduces a class-balanced reweighted loss function to mitigate the class imbalance caused by data distribution heterogeneity.
[0053] a. Local optimization objective function based on Nash negotiation solution
[0054] To reflect the requirement of proportional fairness in federated learning algorithms, this invention first transforms the problem of solving proportional fairness schemes into an objective optimization problem of Nash bargaining solutions, and then designs a client-side optimization objective function based on Nash bargaining solutions. This embodiment first introduces the relevant concepts of proportional fairness and Nash bargaining solutions, and then describes the design details of the local optimization objective function.
[0055] make For the set of all possible model parameters, I This represents the set of clients for federated learning. This represents a benefit function that describes the choice of a parameter. The benefits that client i gains from federated learning. A model parameter. It is proportionally fair, provided that other parameters are satisfied.
[0056]
[0057] in Indicates when the model parameters are changed from... Transform into The relative benefits received by customers at that time, proportional fairness indicates that under optimal parameters Under these conditions, the sum of relative benefits for clients cannot be increased further. Previous work has proven that proportionally fair solutions can be solved using the Nash bargaining solution (NBS). The Nash bargaining solution actually solves the following objective optimization problem:
[0058]
[0059] in This is called the Nash product. When the benefit function is a convex set, a proportionally fair solution always exists, which is equivalent to maximizing the Nash product. When the benefit function set is non-convex, the existence of a proportionally fair solution is not guaranteed. If a proportionally fair solution exists, it is still equivalent to maximizing the Nash product. Nash bargaining solutions satisfy four classic fairness properties: Pareto optimality, scale invariance, symmetry, and independence.
[0060] Based on the above concepts, this invention considers applying the Nash bargaining solution to the design of the client-side local optimization objective to meet the requirement of proportional fairness. In the classic FedAvg algorithm, the overall optimization objective is to minimize the weighted sum of the loss functions of each client:
[0061]
[0062]
[0063] in, K The number of clients participating in the training. p k Indicates the first k The aggregate weight of each client-side local model is specifically the ratio of the amount of data on the local client to the total amount of data. Indicates client k The j Loss function on each sample, n k Indicates client k The sample size.
[0064] Taking the negative logarithm of the optimization objective for the Nash bargaining solution yields a form similar to the FedAvg optimization objective.
[0065]
[0066] To ensure the objective function is optimizable, a reasonable approach is to modify the client benefit function. Defined as a related term of the local loss. It is generally believed that the training loss on the local dataset is negatively correlated with model performance; the smaller the training loss, the better the model fits the local data. Model performance can be seen as a direct benefit gained by the client participating in federated learning. Therefore, the client benefit function is defined as... ,in It is k Personalized benefit benchmarks for each client It is k The local loss function for each client. The optimization objective of FedAvg:
[0067]
[0068] In contrast, this invention proposes a local optimization objective based on Nash negotiation solutions, defined as follows: The overall optimization objectives are as follows:
[0069]
[0070] To ultimately achieve the optimization goal of proportional fairness while ensuring stable convergence of the algorithm, the algorithm framework specifically considers two implementation techniques. First, it notes... When the value of is relatively small, this term can be approximated by a first-order Taylor expansion as follows:
[0071]
[0072] Therefore, when Less than the threshold At that time, Replace with / This avoids negative numbers during the logarithm calculation. Another benefit of this operation is to ensure a more stable convergence process. This is especially important in the early stages of training. When the value is small, for The resulting gradient will be very large, which is not conducive to achieving stable gradient descent. Secondly, by setting client-related benefit benchmarks... This approach prioritizes different clients. Given the high heterogeneity of graph node data across client features, the loss functions for local data will vary significantly between clients. Setting personalized benefit benchmarks for different clients, rather than a uniform absolute benchmark, reflects the principle of proportional fairness: "distributing benefits proportionally to contribution."
[0073] b. Class-balanced reweighted loss function
[0074] In distributed scenarios, federated learning clients come from different regions and institutions, and the graph data they collect often originates from different domains, exhibiting strong non-independent and identically distributed characteristics in feature distribution and topology. For example, the main users of different social media platforms may come from different age groups, and the social network data of each age group often show significant differences in the distribution of node attributes representing user preferences and the topological distribution representing user interaction patterns. Data heterogeneity between clients manifests internally as an imbalance in class distribution; for instance, class A may cover most of the nodes in the client's graph data, while only a small portion belong to class B. Previous work has shown that models trained on imbalanced data tend to be heavily biased towards the class with more samples. Under the federated learning framework, the global model obtained by server aggregation is also likely to exhibit bias towards specific classes, performing relatively poorly on client data where these classes constitute the majority of samples, thus affecting performance fairness among different clients.
[0075] Inspired by cost-sensitive class reweighting strategies, this invention designs a class balancing loss function to address the class imbalance problem in cross-domain node classification tasks. The class balancing loss consists of two parts: First, it introduces focal loss, commonly used in the vision domain, to reduce the weight of easily classified samples, guiding the model to pay more attention to difficult-to-classify samples. This represents the category logits of the linear layer output, where C represents the number of categories. Focal loss is a hyperparameter in Focal Loss that measures the difficulty of classifying samples. Focal loss can be expressed as follows:
[0076]
[0077]
[0078] Secondly, a class balancing weight is added to the focal loss. This weight is numerically equal to the negative frequency of the effective sample count for each class. The effective sample count is a smoothed version of the negative frequency weight commonly used in reweighting strategies. By accurately quantifying the impact of data overlap, it can better handle the class imbalance problem. In summary, the class-balanced reweighted loss involved in this invention is as follows:
[0079]
[0080] β is the class reweighting hyperparameter, n y This represents the number of samples labeled y.
[0081] Step 2) Server parameter aggregation
[0082] After the local model training is complete, the clients participating in this round of training upload the trained local model (or gradient) to the central server. The server then processes the local model according to the weights assigned to different clients. We obtain the global model by performing weighted aggregation. The aggregated global model is distributed to the client for the next round of client-side local model training.
[0083] This embodiment uses a weighted aggregation mode based on customer sample size:
[0084]
[0085] in, Indicates client Subgraphs held The set of nodes, K The number of clients participating in the training. Indicates the first k A local model.
[0086] This invention proposes a proportionally fair federated learning algorithm for cross-domain social network node classification tasks. Based on the Nash bargaining solution in game theory, the algorithm constructs a local optimization objective function that meets proportional fairness constraints for different clients in the federated learning process. Furthermore, considering the heterogeneous feature distribution of subgraphs across different clients in distributed cross-domain social network scenarios, this invention employs a class balance loss function based on a cost-sensitive reweighting strategy to alleviate overfitting of the model to specific classes and improve generalization performance under imbalanced class distributions. Results show that the proposed algorithm can significantly mitigate the unfair performance of the federated learning model across different clients caused by the heterogeneous distribution of subgraph features from different clients, effectively improving the model's fairness index without sacrificing too much average performance.
[0087] This embodiment tests the algorithm's performance on two classic node classification task datasets: Cora and Citeseer, both in the citation network domain. The Cora dataset contains 2708 nodes, each representing a scientific publication; 5429 edges, with edges between nodes indicating mutual citations; and seven categories of node labels representing seven domains: case-based, genetic algorithm, neural network, probabilistic method, reinforcement learning, rule learning, and theory. Each node is represented by a 1433-dimensional bag-of-words vector, where each element's value (0 / 1) indicates the occurrence of the corresponding word in the paper. The Citeseer dataset contains 3312 nodes and 4732 edges. Each document node is represented by a 3703-dimensional bag-of-words vector, and six categories of node labels representing six domains: agent, artificial intelligence, database, information retrieval, machine learning, and human-computer interaction. For dataset partitioning, 100 nodes from each category are sampled as the training set, 500 nodes are randomly sampled as the validation set, and the remaining nodes are used as the test set. To quantify the heterogeneity of data label distribution across different clients, the experiment employed the Latent Dirichlet Allocation (LDA) method from the visual domain, partitioning the subgraph according to node labels. Specifically, for J clients, node data with label k follows a symmetric Dirichlet distribution. The data is divided into J partitions. Each partition corresponding to each class constitutes all node samples for client j. Note that the degree of heterogeneity in node labels can be determined by… Control, smaller This will result in stronger data heterogeneity.
[0088] In the experiment, the local training method and several other widely used federated learning algorithms were selected for performance comparison with the algorithm proposed in this invention. The local training method refers to each client independently training a graph neural network based on its private subgraph data and testing it on its private subgraph, without any collaborative interaction with other clients. For federated learning algorithms, FedAvg is a classic algorithm that uses parameter weighting aggregation based on client sample size; FedProx alleviates the heterogeneity of client systems and data distribution by adding a regularization term between the local and global models; and Ditto proposed a multi-task framework based on the idea of personalized federated learning to simultaneously improve the robustness and fairness of the model. The experiment compared the proportionally fair federated learning algorithm proposed in this invention with these three algorithms, where the latter two belong to the category of fair federated learning algorithms.
[0089] In setting the evaluation metrics, this invention considers both the efficiency and fairness of the federated learning algorithm. The fairness of the algorithm (specifically, the fairness of model performance) is quantified as the standard deviation of the model's accuracy on different client test sets and the model's accuracy on the worst-performing client. The efficiency of the algorithm is quantified as the average accuracy of the model on different clients. The proportionally fair federated learning algorithm proposed in this invention is implemented based on the PyTorch deep learning framework and the FederatedScope federated learning framework. A two-layer Graph Convolution Network (GCN) is selected as the backbone model for the local clients, with a dropout probability of 0.5 after each GCN layer. All related experiments were conducted on a host equipped with two NVIDIA 3090 GPUs, running Ubuntu 22.04. To ensure simplicity and uniformity of experimental standards, five local clients were set up in the federated learning system, all participating in federated learning. The clients had consistent local training learning rates and local iteration rounds. The global iteration rounds were set to 125 and 28 on the Cora and Citeseer datasets, respectively. The parameters of the Dirichlet distribution are... The default value is set to 0.5. The optimal local training learning rate and local iteration epochs are obtained through grid search, with the candidate learning rate set being {0.05, 0.1, 0.25, 0.5} and the candidate local iteration epochs set being {1, 4, 8}. In the class balancing strategy, the hyperparameter γ of the focal loss is uniformly set to 2, and the class correlation weight hyperparameter β in the class balancing loss is set to 0.9 on Cora and 0.3 on Citeseer.
[0090] This invention first compares the performance and fairness metrics of the proportionally fair federated learning algorithm and other federated learning algorithms on two datasets. Specific results are as follows: Figure 2 and Figure 3As shown, the proportionally fair federated learning algorithm achieves state-of-the-art results in both accuracy standard deviation and worst-performing client accuracy: the worst-performing client accuracy on Cora and Citeseer datasets is 80.34% and 66.25%, respectively, representing improvements of 1.42 and 0.62 percentage points compared to the FedAvg baseline algorithm. The accuracy standard deviations on the Cora and Citeseer datasets are 1.90% and 4.74%, respectively, representing decreases of 0.90 and 0.24 percentage points compared to the FedAvg baseline algorithm. Implementation results demonstrate that the proportionally fair federated learning algorithm proposed in this invention, by constructing an optimization objective function that maximizes the Nash product, can effectively improve the model's accuracy on the worst-performing client, while also making the distribution of client accuracy more uniform to some extent (reducing the accuracy standard deviation). On the other hand, in federated learning models that learn a single global model, simultaneously improving model performance and model fairness in practical implementation is quite difficult because there is a certain trade-off between the two dimensions of metrics. The implementation results also show that the proportionally fair federated learning algorithm did not achieve the best average accuracy, but rather reached an average accuracy comparable to other algorithms. On the Cora and Citeseer datasets, it reduced accuracy by 0.9 percentage points and improved it by 0.22 percentage points compared to the FedAvg baseline algorithm, respectively. Theoretically, applying the Nash bargaining solution does not necessarily improve model performance (average accuracy), but rather achieves a better balance between fairness and performance. In the experimental results, this is specifically reflected in achieving a more equitable performance distribution across different clients without sacrificing too much of the model's average performance. An example demonstrating client performance fairness is... Figure 4 As shown, compared with FedAvg, the proportional fairness algorithm proposed in this invention can achieve a more equitable distribution of client accuracy, which is reflected in a smoother distribution curve.
[0091] Furthermore, experimental results show that the local learning method performs the worst in both efficiency and fairness metrics, thus confirming the performance improvement brought by federated learning for cross-domain node classification tasks. Under local training, each client can only use its limited private data for training, easily leading to overfitting of the model on local data. Federated learning utilizes model gradient aggregation to fully utilize data from multiple parties while protecting data privacy, improving the model's generalization performance to some extent. Building upon this, this invention specifically considers the adverse effects of heterogeneous data distribution on client performance fairness in a distributed cross-domain environment, and proposes a proportionally fair federated learning algorithm to alleviate the performance bias of the global model towards certain clients.
[0092] To verify the significance of the class balancing loss function for performance fairness in cross-domain node classification tasks, this invention conducted an ablation study to test the fairness metrics of the proportionally fair federated learning algorithm with and without class balancing loss. Compared to not using class balancing loss, using class loss reduced the standard deviation of accuracy on Cora and Citeseer by 0.30 and 0.16 percentage points, respectively, while improving the accuracy of the worst-performing client by 0.85 and 0.94 percentage points, respectively. The test results indicate that class balancing loss, by increasing the weight of the minority class when calculating the loss, alleviates the overfitting of the model to the majority class under class imbalance conditions and also helps the proportionally fair optimization objective to play a greater role in the distribution of non-IID data across different clients.
[0093] This invention further investigates the impact of class balance loss on performance fairness under different levels of data heterogeneity, comparing the worst-performing client accuracy with and without class balance loss. Figure 5 As shown, when the node categories of the client subgraph are extremely non-independent and identically distributed ( Each client may only have node samples of one class, and the class balancing loss has very limited performance improvement. When the node classes in the client subgraph are not highly independent and identically distributed (i.e.,...), This means that each client may have nodes of all categories, but the samples of different categories exhibit a long-tailed distribution. The class balance loss significantly improves the model performance of the worst-performing client. When the node categories of the client subgraph are slightly non-independent and identically distributed (i.e., ...), ... The worst-case client accuracy improved by 1.91 percentage points with class balance loss. This improvement occurred when the node classes in the client subgraph tended to be independent and identically distributed. 10) The class balance loss actually led to a performance decrease. In practice, it was also found that the accuracy of the worst client did not change monotonically with the level of data heterogeneity. The potential correlation between the node feature heterogeneity and topological structure heterogeneity of the client subgraph needs to be further explored.
[0094] Finally, this invention explores the personalized benefit benchmark in the client-side local optimization objective. Regarding the role of proportional fairness algorithms, personalized benefit benchmarks are adopted for different clients in specific implementations. Using the same fixed benefit baseline M for all clients (where the fixed benefit baselines are 1, 2, 3, 4, and 5), the model accuracy of the worst-performing client under two different settings was compared. The test results are as follows: Figure 6As shown, the performance metrics using a personalized benefit benchmark outperform those using a fixed benefit benchmark. Furthermore, the accuracy of the worst-performing client fluctuates significantly with changes in the fixed benefit benchmark M. On the Cora dataset, the accuracy of the worst-performing client remains stable when M < 3, but decreases significantly when M > 3. On the Citeseer dataset, the accuracy of the worst-performing client shows a monotonically decreasing trend with increasing M. These analyses demonstrate that a personalized benefit benchmark models the relative gains obtained by different clients, which is helpful in achieving the optimization objective of proportional fairness and reduces the time cost of debugging the optimal fixed benefit benchmark.
[0095] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A fair federated learning method for cross-domain social network node classification tasks, characterized in that, Each client possesses a subgraph, inaccessible to the central server and other clients. This subgraph contains several nodes, some of which are labeled. Each client trains a graph neural network to predict the labels of the remaining unknown nodes. Through iterative training of the client's local model and aggregation of server parameters, an optimal global model is obtained and distributed to other clients. Specifically, the client-side local model training is as follows: at the start of each round of global iteration, the server randomly selects a portion of the client set as the client set for this round of training, and distributes the initialized global model to the client. The client uses the subgraph data it has locally to update the graph neural network parameters. At the same time, it constructs a local optimization objective function based on the Nash bargaining solution and introduces a class-balanced reweighted loss function to optimize the local model. The server parameter aggregation is specifically as follows: after the local model training is completed, the clients participating in this round of training upload the trained local model to the central server. The server performs weighted aggregation of the local models according to the weights of different clients to obtain the global model. The aggregated global model is distributed to the clients for the next round of client local model training. The local optimization objective function is as follows: in, It is the first k Personalized benefit benchmarks for each client It is the first k The local loss function for each client; The overall optimization objective for the local model training is expressed as: in, K The number of clients participating in the training. p k Indicates the first k Aggregated weights of each client-side local model; The category-balanced reweighted loss function is: Where C represents the number of categories, For class balancing weights, β is the class reweighting hyperparameter, and n y This represents the number of samples labeled y, and γ is a hyperparameter in Focal Loss that measures how difficult a sample is to classify. in, This represents the category logits of the linear layer output.
2. The fair federated learning method for cross-domain social network node classification tasks according to claim 1, characterized in that, The overall optimization objective of the local model training is to minimize the weighted sum of the loss functions of each client.
3. The fair federated learning method for cross-domain social network node classification tasks according to claim 1, characterized in that, The class-balanced reweighted loss function is constructed by introducing class-balanced weights into the focal loss function.
4. The fair federated learning method for cross-domain social network node classification tasks according to claim 1, characterized in that, The learning of the graph neural network includes two stages: message propagation and neighbor node aggregation. In this process, each node aggregates its own features and the features of its neighbor nodes to update its node feature representation.
5. The fair federated learning method for cross-domain social network node classification tasks according to claim 1, characterized in that, The formalized description of the graph neural network is as follows: in, L The number of layers in a graph neural network. It is the first node v l Layer feature representation, AGG represents the neighboring nodes of node v. ) represents an aggregate function. Represents the learnable feature transformation weights. This function represents the concatenation function of node v's own embedding and the embeddings of its neighboring nodes.
6. The fair federated learning method for cross-domain social network node classification tasks according to claim 1, characterized in that, The server performs weighted aggregation of the local model based on the weights of different clients, using a weighted aggregation mode based on the client sample size. in, Indicates client Subgraphs held The set of nodes, K The number of clients participating in the training. Indicates the first k A local model.
7. A fair federated learning method for cross-domain social network node classification tasks according to claim 1, characterized in that, The iteration termination condition for the two steps of client-side local model training and server parameter aggregation is reaching a limited number of global iteration rounds or the required target performance.
Citation Information
Patent Citations
Game theory-based task allocation method in crowd sensing
CN110009233A
Federal map learning method and system based on clustering
CN115391576A