Value gain-based contribution evaluation method and system in federated learning
By calculating the contribution index of each round of communication in federated learning and the distance between the global model and the warm-up model, dynamically adjusting the client contribution weight, solving the problems of inaccurate contribution evaluation and high computational complexity in the existing technology, and realizing the A more equitable and efficient contribution assessment.
Patent Information
- Application Number
- CN202411445077.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The existing contribution evaluation method in federated learning ignores the performance benefits of the global model compared to the previous rounds, resulting in inaccurate assessment of the true contribution to each client, high computational complexity, and relies on test datasets and large amounts of computing resources.
By calculating the contribution index of each round of communication and the distance between the global model and the warm-up model as the global model performance gain, the contribution weight of each client is dynamically adjusted, reducing the computational complexity does not depend on the test dataset.
It realizes that while reducing computing complexity and resource overhead, it carefully evaluates the contribution of each client in each round of communication, improving the fairness and accuracy of the evaluation method.
Smart Images

Figure CN119443308A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of federated learning, and in particular to a contribution evaluation method and system based on value gain in federated learning. Background Art
[0002] Existing methods for evaluating customer contributions mainly include schemes based on heuristic Shapley values and parameter correlation. Methods based on heuristic Shapley values evaluate contributions by calculating the benefit of each participant to the collective marginal value, taking into account factors such as data volume, test accuracy, and data diversity. Although they are theoretically attractive, their computational complexity makes them unsuitable for large-scale customer participation. Another is a method based on model parameter correlation, which calculates the distance between local gradients and global gradients. The closer the distance, the greater the customer's contribution. This type of method significantly reduces the computational complexity and eliminates the dependence on the test dataset, but compared with centralized training, current methods based on parameter correlation ignore the salient features of federated learning. Specifically, the global model gradually converges through iterative communication rounds, each of which requires the participation of a large number of customers. Existing methods only consider the positive impact of participants on the collective, while ignoring the performance benefits of the global model compared to previous rounds. This oversight leads to a situation where participants appear to have made significant contributions despite almost negligible collective benefits, thus hindering the accurate evaluation of each customer's true contribution. For example, even if the performance gain of the global model is almost zero, the correlation between local and global model parameters still exists, which can still be regarded as a contribution and may even appear stronger than the previous communication round.
[0003] In order to maintain the fairness of the algorithm while reducing the communication cost, the present invention fully studies the performance improvement of the global model in each communication round while controlling the computational complexity. The client's contribution is finely adjusted according to the performance gain of the global model in each communication round, thereby improving the fairness of the evaluation method. However, there is a difficulty in implementing this method: how to quantify the performance gain of each round of communication of the global model while managing resource overhead. This function determines whether the evaluation algorithm can finely evaluate the contribution of each client in each round of communication. At present, there is a lack of a unified quantitative benchmark for evaluating model performance, and most methods rely on test data sets and a large amount of computing resources. Therefore, it is necessary to design a method to quantify the performance gain of the global model while minimizing resource overhead. Summary of the invention
[0004] The present invention provides a contribution evaluation method and system based on value gain in federated learning. Without introducing additional computing resources and test data sets, the change range of weight parameters is used as an indicator to measure the performance gain of the model. When evaluating the contribution of a client, the contribution index of the current round of communication is first calculated based on the correlation between the local model and the global model parameters. Then, the distance between the global model after each round of aggregation and the preheating model is calculated as the performance gain of the global model, and the contribution of each client in each communication round is dynamically adjusted according to the gain of the global model performance.
[0005] In order to solve the above problems, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present invention provides a contribution evaluation method based on value gain in federated learning, comprising:
[0007] Step S1. Calculate the correlation between each client local model and the global model in the tth round based on the contribution evaluation index of the correlation between the multi-dimensional computing models;
[0008] Step S2. Calculate the distance between the parameters of the global model and the preheating model in the tth round based on the dynamic adjustment mechanism and perform normalization operation to obtain the contribution weight of each communication round of the participating clients;
[0009] Step S3. Calculate the actual contribution value of the client based on the correlation between the local model of each client and the global model in the tth round in step 1 and the contribution weight of each communication round of the participating client in step 2.
[0010] Furthermore, the calculation method of the correlation between each client local model and the global model in the tth round in step 1 is:
[0011]
[0012] Among them, sim(i) t represents the correlation between the local model of client i and the global model in round t, represents the parameter matrix of the local model of client i in round t, W t+1 represents the parameter matrix of the global model at the t+1th round, num is the scale of the model parameters; |||| represents the bi-norm; ∑ represents the sum.
[0013] Furthermore, the step 2 includes the following sub-steps:
[0014] S21. Pre-training: Pre-training is performed based on the initialization model given by the central server when starting federated training to obtain a preheated model;
[0015] S22. Model training: The server sends the initialized global model, i.e., the preheated model; each participant receives the global model and uses the local data set to train on the global model, obtains the local model update and uploads it to the central server; the central server receives the local model updates of each participating client and aggregates them into a new global model to obtain a new global model; the above steps are repeated until the global model converges or reaches the predefined training round;
[0016] S23. Contribution weight calculation: quantify the changes in the global model based on the preheating model, calculate the parameter distance between the global model and the preheating model in the tth round and perform normalization operations to obtain the contribution weight of each communication round of the participating clients.
[0017] Furthermore, the preheating model in step S21 is:
[0018]
[0019] Among them, W pre is the warm-up model parameter matrix, W init is the initialization model parameter matrix given by the central server when starting federated training, η is the learning rate, N is the total number of clients, n is the number of warm-up rounds, is the warm-up training loss function, where is the parameter matrix of the local model of client i in round t, ∑ represents the sum, D i is the number of local data samples held by client i.
[0020] Furthermore, the step S22 includes:
[0021] (1) Initialization of global model and local model
[0022] At the beginning of the tth round of training in federated learning, the central server maintains a global model, and the initial value of the local model of each client i in each round is the parameter value of the global model in the previous round:
[0023] W pre =W 0
[0024]
[0025] Among them, W pre is the warm-up model parameter matrix, W 0 is the initial value of the global model; W t-1 is the global model parameter matrix for round t-1, is the parameter matrix of the local model of client i in round t;
[0026] (2) Local training process: gradient descent update
[0027] After receiving the global model parameters, each client uses its own local data to train the model. Each client updates its model parameters through gradient descent:
[0028]
[0029] in, is the parameter matrix of the local model of client i in the t+1th round, η is the learning rate, represents the loss function of client i in round t, is the loss function with respect to the parameter The gradient of
[0030] By continuously performing gradient updates, client i improves local model parameters based on its local data;
[0031] (3) Local model aggregation:
[0032] After local training is completed, each client sends its updated model parameters back to the central server. The central server aggregates the updates from multiple participating clients into a new global model through the federated averaging method. The update formula of the aggregated global model is:
[0033]
[0034] Where m is the number of clients participating in the training in the current round, N is the total number of clients, and W t+1 is the global model parameter matrix of round t+1.
[0035] Furthermore, the loss function of client i in round t is:
[0036]
[0037] in, The loss function calculates the loss between the sample prediction value and the true value during the local client training process. W represents the global model received by the client. is the predicted value of the parameter matrix of the local model of client i in the tth round when the input is x, and y is the true value of the parameter matrix of the local model of client i in the tth round when the input is x.
[0038] Furthermore, the contribution weight φ(t) of each communication round of the participating clients in step S23 is:
[0039]
[0040] Among them, cor(W t ,W pre ) is the global model W of the tth roundt With the preheating model W pre The distance between parameters;
[0041]
[0042] Among them, k is the subscript of the model parameter matrix, num is the model parameter scale, is the kth element of the global model parameter matrix of the tth round, is the kth element of the warmup model parameter matrix.
[0043] Furthermore, the actual contribution value con(i) of the client in step S3 is:
[0044]
[0045] Among them, sim(i) t represents the correlation between the local model of client i and the global model in the tth round, φ(t) is the contribution weight of the participating clients in each communication round, m is the total number of participating clients in each round, T is the total number of iterations, and ∑ represents the sum.
[0046] In another aspect, the present invention provides a contribution evaluation system based on value gain in federated learning, comprising:
[0047] The first module is used to calculate the correlation between each client local model and the global model in the tth round based on the contribution evaluation index of the correlation between the multi-dimensional computing models;
[0048] The second module is used to calculate the distance between the parameters of the global model and the preheating model in the tth round based on the dynamic adjustment mechanism and perform normalization operation to obtain the contribution weight of each communication round of the participating clients;
[0049] The third module is used to calculate the true contribution value of the client based on the correlation between the local model of each client and the global model in the tth round and the contribution weight of the participating clients in each communication round.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] 1. In the field of client contribution evaluation, this method effectively reduces the computational complexity and does not depend on the measured data set.
[0052] 2. When a small number of clients participate, the comparative benchmark experiment proves that the present invention still has a fairer evaluation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 A flow chart of a contribution evaluation method based on value gain in federated learning provided by an embodiment of the present invention;
[0055] Figure 2 It is a comparative schematic diagram of the contribution calculated by FedCA using MNIST in different scenarios in Example 1 of the present invention;
[0056] Figure 3 Schematic diagram of comparison of contribution calculated by FedCA using Fashion-MNIST in different scenarios in Example 1 of the present invention;
[0057] Figure 4 Schematic diagram of comparison of contributions calculated by FedCA using CIFAR-10 in different scenarios in Example 1 of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] It should be noted that, in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0060] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0061] Example 1
[0062] Combine the following Figure 1 The contribution evaluation method based on value gain in federated learning provided by an embodiment of the present invention is described, including:
[0063] Step S1. Calculate the correlation between each client local model and the global model in the tth round based on the contribution evaluation index of the correlation between the multi-dimensional computing models;
[0064] Single-dimensional measurement methods (such as cos, -norm, etc.) to calculate the correlation between local model and global model parameters, which causes too much loss of correlation information between model parameters. The cosine similarity between weights is difficult to represent the correlation between models, leading to other problems such as inaccurate evaluation.
[0065] In this implementation step S1, a contribution evaluation index sim(i) for the correlation between multi-dimensional computing models is proposed, which strives to accurately calculate the correlation between models and improve the accuracy of the evaluation. The current federated learning training mechanism is manifested in that multiple clients use the local data they hold to train local models. The parameter matrices of local and global models change continuously with model training. From the process point of view, the parameter matrix is a high-dimensional vector. It can be abstracted that each client participating in the aggregation contributes a thrust to the global model in the high-dimensional solution space. This thrust is not only important in terms of pushing distance, but also in terms of pushing direction. Therefore, the calculation method of the correlation between each client's local model and the global model in the tth round in step 1 is;
[0066]
[0067] Among them, sim(i) t represents the correlation between the local model of client i and the global model in round t, represents the parameter matrix of the local model of client i in round t, W t+1represents the parameter matrix of the global model in the t+1th round, num is the scale of the model parameters; |||| represents the second norm; ∑ represents the sum. The similarity between the local and global optimization directions and the distance between the optimal solutions are comprehensively considered. The greater the similarity, the more consistent the optimization direction between the local and global models.
[0068] Step S2. Calculate the distance between the parameters of the global model and the preheating model in the tth round based on the dynamic adjustment mechanism and perform normalization operation to obtain the contribution weight of each communication round of the participating clients;
[0069] The core of the contribution evaluation algorithm in this embodiment is to dynamically increase the contribution of each client according to the performance gain of the global model as the communication rounds iterate. Traditional model performance evaluation schemes rely on indicators such as accuracy, recall, F1 score, and AUC-ROC on the validation set, which require additional data sets and computing resources. To reduce these overheads, we can evaluate the performance gain by observing the change range of the model weight parameters. This method can effectively reflect the optimization effect of the model and reduce the computing cost without introducing additional data sets.
[0070] Specifically include:
[0071] S21. Pre-training: Pre-training is performed based on the initialization model given by the central server when starting federated training to obtain a preheated model;
[0072] The contribution of the participants in the current communication round is not only perceived by the aggregated global model, but also the improvement of the performance of the aggregated global model compared to the global model in the previous round. First, we conduct specific pre-training to perceive all data sets, with the aim of roughly determining the global optimization direction and the goal of the global optimal solution in the solution space;
[0073] The preheating model in step S21 is:
[0074]
[0075] Among them, W pre is the warm-up model parameter matrix, W init is the initialization model parameter matrix given by the central server when starting federated training, η is the learning rate, N is the total number of clients, n is the number of warm-up rounds, is the warm-up training loss function, where is the parameter matrix of the local model of client i in round t, ∑ represents the sum, D i is the number of local data samples held by client i.
[0076] S22. Model training: The server sends the initialized global model, i.e., the preheated model; each participant receives the global model and uses the local data set to train on the global model, obtains the local model update and uploads it to the central server; the central server receives the local model updates of each participating client and aggregates them into a new global model to obtain a new global model; the above steps are repeated until the global model converges or reaches the predefined training round;
[0077] Step S22 includes:
[0078] (1) Initialization of global model and local model
[0079] At the beginning of the tth round of training in federated learning, the central server maintains a global model, and the initial value of the local model of each client i in each round is the parameter value of the global model in the previous round:
[0080] W pre =W 0
[0081]
[0082] Among them, W pre is the warm-up model parameter matrix, W 0 is the initial value of the global model; W t-1 is the global model parameter matrix for round t-1, is the parameter matrix of the local model of client i in round t;
[0083] (2) Local training process: gradient descent update
[0084] After receiving the global model parameters, each client uses its own local data to train the model. Each client updates its model parameters by gradient descent. The goal is to train the model by minimizing the loss function:
[0085]
[0086] in, is the parameter matrix of the local model of client i in the t+1th round, η is the learning rate, represents the loss function of client i in round t, is the loss function with respect to the parameter The gradient of
[0087] The loss function of client i in round t is:
[0088]
[0089] in, The loss function calculates the loss between the sample prediction value and the true value during the local client training process. W represents the global model received by the client. is the predicted value of the parameter matrix of the local model of client i in the tth round when the input is x, and y is the true value of the parameter matrix of the local model of client i in the tth round when the input is x.
[0090] By continuously performing gradient updates, client i improves local model parameters based on its local data;
[0091] (3) Local model aggregation:
[0092] After local training is completed, each client sends its updated model parameters back to the central server. The central server aggregates the updates from multiple participating clients into a new global model through the federated averaging method. The update formula of the aggregated global model is:
[0093]
[0094] Where m is the number of clients participating in the training in the current round, N is the total number of clients, and W t+1 is the global model parameter matrix of round t+1.
[0095] S23. Contribution weight calculation: quantify the changes in the global model based on the preheating model, calculate the parameter distance between the global model and the preheating model in the tth round and perform normalization operations to obtain the contribution weight of each communication round of the participating clients.
[0096] The contribution weight φ(t) of each communication round of the participating clients in step S23 is:
[0097]
[0098] Among them, cor(W t ,W pre ) is the global model W of the tth round t With the preheating model W prd The distance between parameters;
[0099]
[0100] Among them, k is the subscript of the model parameter matrix, num is the model parameter scale, is the kth element of the global model parameter matrix of the tth round, is the kth element of the warmup model parameter matrix.
[0101] This weighted average algorithm ensures that clients with more data contribute more to the global model update, thereby effectively reflecting the differences in data distribution and ensuring that the global model can better adapt to the data of all clients.
[0102] Step S3. Calculate the actual contribution value of the client based on the correlation between the local model of each client and the global model in the tth round in step 1 and the contribution weight of each communication round of the participating client in step 2.
[0103] Based on the above theoretical basis, it is observed that the performance of the global model is almost monotonically increasing. The parameter matrix of the global model represents the optimal solution and optimization direction of the training process. Therefore, the greater the distance between the weight parameters of the global models, the greater the change of the global model. The improvement of the global model performance is almost monotonically increasing, and it is deduced that the greater the improvement of the global model on the performance curve;
[0104] The actual contribution value con(i) of the client in step S3 is:
[0105]
[0106] Among them, sim(i) t represents the correlation between the local model of client i and the global model in the tth round, φ(t) is the contribution weight of the participating clients in each communication round, m is the total number of participating clients in each round, T is the total number of iterations, and ∑ represents the sum.
[0107] WPre is a warm-up model, which aims to roughly determine the optimal solution in the parameter space under all data and use W pre quantify the change of the global model for the benchmark, that is, the learning of the global model on each local data feature. cor(W t , W pre ) represents the distance in parameters between the global model of the tth round and the preheated model. φ(t) represents the contribution weight assigned to the training of the tth round after the normalization operation, indicating how much the current round of training helps improve the performance of the global model. We quantified the performance gain of the global model in each round, and on this basis proposed a dynamic adjustment mechanism φ(t) to fine-grainedly evaluate the contribution of participants in each communication round. In summary, the FedCA algorithm uses the parameter correlation between multi-dimensional computing models as the basic indicator to measure contribution (the degree of closeness between the local optimum of the current round and the global optimum of the current round), and calculates the real driving force of the local contribution parameters on the global model approaching the global optimal solution through a dynamic adjustment mechanism (the distance between the global optimum of the current round and the global optimal solution), accurately evaluates the contribution of the client, and can adapt to the complex training environment of FL.
[0108] Various neural network structures and datasets are used to verify the performance of the FedCA algorithm. I use convolutional neural networks (CNN) for the MNIST and Dashonin-MNIST datasets, and residual networks (ResNet) for the CIFAR-10 dataset. The detailed parameters of the experimental settings are listed in Table 1 below.
[0109] TABLE 1.DETAILS OF PARAMETERS.
[0110]
[0111] In the image classification task, in order to comprehensively evaluate the sensitivity of the FedCA algorithm to abnormal states of user data, we carefully designed the following four experimental scenarios: 1) normal scenario, 2) impulse noise scenario, 3) Gaussian noise scenario, and 4) label confusion scenario. By running the FedCA algorithm in these scenarios, we calculated the contribution of each client participating in FL on three classic image classification datasets, namely MNIST, Fashion-MNIST, and CIFAR-10. Figure 2-Figure 4 A comparison of the contributions calculated by FedCA in different scenarios is shown in Figure 2, visualizing the sensitivity of the algorithm to various data anomalies. In the FL experiments, we first randomly and equally distribute the dataset to 10 local clients without any specific treatment, ensuring that all participate in each round of training with a fixed participation ratio of 1.0. Using the FedCA algorithm, we find uniform client contributions, with each client contributing about 10% in standard training rounds of the MNIST, FasdionMNIST, and CIFAR-10 datasets. To further explore the effectiveness of the algorithm, we respond to data quality changes by introducing impulse noise (random black and white dots) and Gaussian noise (random brightness changes) to the datasets of the last two clients. In the experiments, a small amount of impulse noise is added to the datasets of the last two clients to simulate the image quality degradation caused by sensor failure or signal transmission errors in real applications. The results show that these clients get lower contribution evaluations, illustrating FedCA's sensitivity to data quality and its ability to distinguish between minor and more complex noise effects. Finally, in an experiment simulating label confusion caused by mislabeling of the last two customers’ data, normal data produced a higher contribution rate, while interrupted data significantly reduced customer contribution, confirming the effectiveness of FedCA in identifying and assessing the quality and accuracy of data provided by each customer.
[0112] In the contribution evaluation comparison test of the federated learning image classification task, three different experimental scenarios were designed. These scenarios include 1) normal scenario, i.e., standard FL setting; 2) random noise scenario, in which we introduce random noise to simulate data contamination; 3) mislabeled scenario, which is used to test the robustness of the algorithm in the presence of mislabeled data. In order to verify the accuracy of the FedCA algorithm in federated contribution evaluation, its performance is compared with two existing methods: the Shapley value method based on game theory and the FedCM algorithm. The Shapley value method, although theoretically rigorous, requires a lot of computing resources and offline calculations. The comparability of experimental data is ensured by maintaining consistent conditions for all methods. The detailed results are shown in the table below, highlighting the performance of the FedCA algorithm in three different scenarios.
[0113]
[0114] Example 2
[0115] This embodiment provides a contribution evaluation system based on value gain in federated learning, including:
[0116] The first module is used to calculate the correlation between each client local model and the global model in the tth round based on the contribution evaluation index of the correlation between the multi-dimensional computing models;
[0117] The second module is used to calculate the distance between the parameters of the global model and the preheating model in the tth round based on the dynamic adjustment mechanism and perform normalization operation to obtain the contribution weight of each communication round of the participating clients;
[0118] The third module is used to calculate the true contribution value of the client based on the correlation between the local model of each client and the global model in the tth round and the contribution weight of the participating clients in each communication round.
[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A contribution evaluation method based on value gain in federated learning, characterized in that: include: Step S1. Calculate the correlation between each client local model and the global model in the tth round based on the contribution evaluation index of the correlation between the multi-dimensional computing models; Step S2. Calculate the distance between the parameters of the global model and the preheating model in the tth round based on the dynamic adjustment mechanism and perform normalization operation to obtain the contribution weight of each communication round of the participating clients; Step S3. Calculate the actual contribution value of the client based on the correlation between the local model of each client and the global model in the tth round in step 1 and the contribution weight of each communication round of the participating client in step 2.
2. The contribution evaluation method based on value gain in federated learning according to claim 1, characterized in that: The calculation method of the correlation between each client local model and the global model in the tth round in step 1 is: Among them, sim(i) t represents the correlation between the local model of client i and the global model in round t, represents the parameter matrix of the local model of client i in round t, W t+1 represents the parameter matrix of the global model at the t+1th round, num is the scale of the model parameters; |||| represents the bi-norm; ∑ represents the sum.
3. The contribution evaluation method based on value gain in federated learning according to claim 1, characterized in that: The step 2 includes the following sub-steps: S21. Pre-training: Pre-training is performed based on the initialization model given by the central server when starting federated training to obtain a preheated model; S22. Model training: The server sends the initialized global model, i.e., the preheated model; each participant receives the global model and uses the local data set to train on the global model, obtains the local model update and uploads it to the central server; the central server receives the local model updates of each participating client and aggregates them into a new global model to obtain a new global model; the above steps are repeated until the global model converges or reaches the predefined training round; S23. Contribution weight calculation: quantify the changes in the global model based on the preheating model, calculate the parameter distance between the global model and the preheating model in the tth round and perform normalization operations to obtain the contribution weight of each communication round of the participating clients.
4. The contribution evaluation method based on value gain in federated learning according to claim 3, characterized in that: The preheating model in step S21 is: Among them, W pre is the warm-up model parameter matrix, W init is the initialization model parameter matrix given by the central server when starting federated training, η is the learning rate, N is the total number of clients, n is the number of warm-up rounds, is the warm-up training loss function, where is the parameter matrix of the local model of client i in round t, ∑ represents the sum, D i is the number of local data samples held by client i.
5. The contribution evaluation method based on value gain in federated learning according to claim 3, characterized in that: The step S22 comprises: (1) Initialization of global model and local model At the beginning of the tth round of training in federated learning, the central server maintains a global model, and the initial value of the local model of each client i in each round is the parameter value of the global model in the previous round: IN pre =In 0 IN i t =In t-1 Among them, W pre is the warm-up model parameter matrix, W 0 is the initial value of the global model; W t-1 is the global model parameter matrix for round t-1, W i t is the parameter matrix of the local model of client i in round t; (2) Local training process: gradient descent update After receiving the global model parameters, each client uses its own local data to train the model. Each client updates its model parameters through gradient descent: IN i t+1 =In i t -ηΔL i (IN i t ) Among them, W i t+1 is the parameter matrix of the local model of client i in the t+1th round, η is the learning rate, L i (W i t ) represents the loss function of client i in round t, ΔL i (W i t ) is the loss function relative to the parameter W i t The gradient of By continuously performing gradient updates, client i improves local model parameters based on its local data; (3) Local model aggregation: After local training is completed, each client sends its updated model parameters back to the central server. The central server aggregates the updates from multiple participating clients into a new global model through the federated averaging method. The update formula of the aggregated global model is: Where m is the number of clients participating in the training in the current round, N is the total number of clients, and W t+1 is the global model parameter matrix of round t+1.
6. The contribution evaluation method based on value gain in federated learning according to claim 5, characterized in that: The loss function of client i in round t is: in, The loss function calculates the loss between the sample prediction value and the true value during the local client training process. W represents the global model received by the client. f(x; W i t ) is the predicted value of the parameter matrix of the local model of client i in the tth round when the input is x, and y is the true value of the parameter matrix of the local model of client i in the tth round when the input is x.
7. The contribution evaluation method based on value gain in federated learning according to claim 6, characterized in that: The contribution weight φ(t) of each communication round of the participating clients in step S23 is: Among them, cor(W t ,W pre ) is the global model W of the tth round t With the preheating model W pre The distance between parameters; Among them, k is the subscript of the model parameter matrix, num is the model parameter scale, is the kth element of the global model parameter matrix of the tth round, is the kth element of the warmup model parameter matrix.
8. The contribution evaluation method based on value gain in federated learning according to claim 1, characterized in that: The actual contribution value con(i) of the client in step S3 is: Among them, sim(i) t represents the correlation between the local model of client i and the global model in the tth round, φ(t) is the contribution weight of the participating clients in each communication round, m is the total number of participating clients in each round, T is the total number of iterations, and ∑ represents the sum.
9. A contribution evaluation system based on value gain in federated learning, characterized in that: include: The first module is used to calculate the correlation between each client local model and the global model in the tth round based on the contribution evaluation index of the correlation between the multi-dimensional computing models; The second module is used to calculate the distance between the parameters of the global model and the preheating model in the tth round based on the dynamic adjustment mechanism and perform normalization operation to obtain the contribution weight of each communication round of the participating clients; The third module is used to calculate the true contribution value of the client based on the correlation between each client's local model and the global model in the tth round and the contribution weight of each client participating in each communication round; The value-gain-based contribution assessment system in federated learning is used to execute the steps in the value-gain-based contribution assessment method in federated learning described in any one of claims 1-7.
Citation Information
Patent Citations
Personalized federal learning method based on cooperative game and knowledge distillation
CN115577804A
Method for evaluating contribution degree of participant in horizontal federated learning
CN116187474A
Method, system and device for evaluating contribution of participant in federated learning, and medium
CN116776971A
Federal learning client selection method based on constraint factors
CN117217328A
Method, system and apparatus for federated learning
WO2022169136A1