Fair federal learning training method and device and medium

By evaluating the performance differences of the local model on the test set and the dataset, and dynamically allocating gradient parameter rewards, the problems of inaccurate evaluation and unfair allocation of user contributions in federated learning are solved, thereby improving the fairness and overall performance of the model.

CN120930732APending Publication Date: 2025-11-11CHINA SOUTHERN AIRLINES CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511130048.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing federated learning methods cannot accurately assess user contributions in heterogeneous data scenarios, which affects the motivation of high-contributing users and results in unfair allocation of model parameters.

Method used

By evaluating the performance difference between the local model on the test set of the central server and the local dataset, gradient parameters are dynamically allocated as contribution rewards to ensure fairness among clients.

Benefits of technology

It enables accurate assessment of each client's contribution and fair reward distribution, incentivizing high-contribution clients to participate and improving the overall model's performance and fairness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120930732A_ABST
    Figure CN120930732A_ABST
Patent Text Reader

Abstract

The invention discloses a fair federal learning training method and device and a medium, and the method comprises the steps: receiving local model information fed back by each client in a current communication round; according to the local data volume of each client, performing weighted aggregation on all the local correction gradients to obtain a global gradient; obtaining the contribution increment of the client in the current communication round based on the performance similarity of the trained local model parameters on different data sets; performing smoothing operation on the contribution increment through the contribution degree of the client in the previous communication round to obtain the contribution degree of the client in the current communication round; and based on the contribution degree of the current communication round, selecting a gradient parameter of a corresponding reward number from the global gradient as a contribution reward, and issuing the contribution reward to the client. According to the method, the contribution degree of each client can be effectively evaluated, and the gradient parameters of the corresponding reward number are dynamically allocated as contribution rewards, so that the fairness among the clients is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of federated learning technology, and in particular to a fair federated learning training method, apparatus, and computer-readable storage medium. Background Technology

[0002] In the context of the rapid development of information technology, federated learning, as a distributed machine learning technology that can protect data privacy, has received widespread attention. Unlike traditional centralized learning methods, federated learning does not require uploading user data to a central server. Instead, it trains models locally and only exchanges model parameters, thereby achieving collaborative learning and effectively protecting user data privacy.

[0003] In practical applications, due to the non-independent and identically distributed nature of user data and limitations in communication resources, existing federated learning methods often assign the same model to each user, ignoring the differences in user (client) contributions to the global model. Existing methods mainly include evaluation and reward allocation strategies based on gradient similarity, data size, and label diversity. However, they still suffer from insufficient fairness in heterogeneous data scenarios; that is, they cannot accurately evaluate the true contributions of different users, nor can they reasonably allocate model parameters, thus affecting the motivation of high-contributing users. Therefore, in heterogeneous data scenarios, designing a federated learning algorithm that can effectively evaluate user contributions and fairly allocate model parameters has become a pressing challenge. Summary of the Invention

[0004] The purpose of this invention is to provide a fair federated learning training method, apparatus, and computer-readable storage medium. By assessing the difference in performance between the local model on the test set of the central server and the local dataset, the contribution of each client is evaluated, and gradient parameters with corresponding reward amounts are dynamically allocated as contribution rewards based on the contribution, thereby effectively ensuring fairness among the clients.

[0005] A first aspect of the present invention provides a fair federated learning training method, executed by a central server, comprising:

[0006] In the current communication round, local model information is received from each client; wherein, the local model information includes: trained local model parameters and local corrected gradients after data preprocessing;

[0007] Based on the amount of local data for each client, all the local correction gradients are weighted and aggregated to obtain the global gradient;

[0008] Based on the performance similarity of the trained local model parameters on different datasets, the contribution increment of the client in the current communication round is obtained; wherein, the dataset includes: the validation set of the central server or the local dataset of the client;

[0009] The contribution increment is smoothed by the contribution of the client in the previous communication round to obtain the contribution of the client in the current communication round.

[0010] Based on the contribution of the current communication round, a gradient parameter with a corresponding reward amount is selected from the global gradient as a contribution reward and sent to the client, so that the client can update the local model parameters before training in the next communication round according to the sent gradient parameter.

[0011] Optionally, the locally corrected gradient is obtained through the following steps:

[0012] In the current communication round, gradient clipping and normalization operations are performed on the local original gradient of the model update to obtain the local corrected gradient.

[0013] Optionally, the global gradient is calculated using the following formula:

[0014]

[0015] Where, Δθ (t) The global gradient is aggregated by the central server in the t-th communication round; M is the number of clients; d i Let be the local data volume of the i-th client; This is the locally corrected gradient uploaded by the i-th client in the t-th communication round.

[0016] Optionally, the incremental contribution of the client in the current communication round is calculated using the following formula:

[0017]

[0018] in, The contribution increment for the i-th client in the t-th communication round; and The accuracy and loss are respectively obtained by testing the local model parameters trained on the i-th client through the validation set of the central server in the t-th communication round; Let be the loss of the local model parameters trained on the i-th client in the t-th communication round, as represented by the local dataset; KL represents the KL divergence.

[0019] Optionally, the client's contribution in the current communication round is calculated using the following formula:

[0020]

[0021] in, The contribution of the i-th client in the t-th communication round; is the contribution increment of the i-th client in the t-th communication round; r is a hyperparameter representing the smoothing coefficient.

[0022] Optionally, the reward amount is calculated using the following formula:

[0023]

[0024] in, Let be the reward number of gradient parameters received by the i-th client in the t-th communication round; D is the total number of parameters in the global model; tanh(·) is the hyperbolic tangent function; KL represents the KL divergence; Let Γ be the contribution of the i-th client in the t-th communication round; Γ is the set of client IDs. Let k be the contribution of the client with ID k in the t-th communication round; Let $\frac{i}{t}$ be the loss of the local model parameters trained by the $i$ client in the $t$-th communication round, as represented by the validation set on the central server. Let α be the loss of the local model parameters trained on the i-th client in the t-th communication round, as represented by the local dataset; α is a hyperparameter with a range of (0,1).

[0025] Optionally, selecting gradient parameters with corresponding reward amounts from the global gradient as contribution rewards includes:

[0026] Based on the preset sorting order of the absolute values ​​of each parameter in the global model, all gradient parameters in the global gradient are sorted to obtain the corresponding gradient parameter sequence.

[0027] When the preset sorting order is from largest to smallest, the gradient parameters with the corresponding reward quantity are selected from the gradient parameter sequence as contribution rewards from front to back.

[0028] When the preset sorting order is from smallest to largest, the gradient parameters with the corresponding reward quantity are selected from the back to the front in the gradient parameter sequence as contribution rewards.

[0029] Optionally, in the next communication round, the local model parameters prior to training are updated by the client using the following formula:

[0030]

[0031] in, These are the local model parameters of the i-th client before training in the (t+1)th communication round; These are the local model parameters of the i-th client before training in the t-th communication round; The central server distributes the contribution reward generated by the client in the t-th communication round.

[0032] A second aspect of the present invention provides a fair federated learning training apparatus, comprising:

[0033] The local information receiving module is used to receive local model information fed back by each client in the current communication round; wherein, the local model information includes: trained local model parameters and local corrected gradients after data preprocessing;

[0034] The global gradient acquisition module is used to perform weighted aggregation of all the local modified gradients based on the amount of local data of each client to obtain the global gradient;

[0035] The contribution increment acquisition module is used to obtain the contribution increment of the client in the current communication round based on the performance similarity of the trained local model parameters on different datasets; wherein, the dataset includes: the validation set of the central server or the local dataset of the client;

[0036] The contribution acquisition module is used to smooth the contribution increment by using the contribution of the client in the previous communication round, so as to obtain the contribution of the client in the current communication round.

[0037] The contribution reward distribution module is used to select gradient parameters with a corresponding reward amount from the global gradient as contribution rewards based on the contribution level of the current communication round, and distribute them to the client so that the client can update the local model parameters before training in the next communication round according to the distributed gradient parameters.

[0038] A third aspect of the present invention provides a computer-readable storage medium comprising a stored computer program; wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the fair federated learning training method described in any of the first aspects above.

[0039] Compared with existing technologies, embodiments of the present invention provide a fair federated learning training method, apparatus, and computer-readable storage medium. The method includes: receiving local model information from each client in the current communication round; weighting and aggregating all local correction gradients according to the amount of local data of each client to obtain a global gradient; obtaining the contribution increment of the client in the current communication round based on the performance similarity of the trained local model parameters on different datasets; smoothing the contribution increment by using the client's contribution in the previous communication round to obtain the client's contribution in the current communication round; and selecting gradient parameters with a corresponding reward amount from the global gradient as contribution rewards based on the contribution in the current communication round, and distributing them to the clients. The present invention can evaluate the contribution of each client by the difference in performance between the local model on the test set of the central server and the local dataset, and dynamically allocate gradient parameters with a corresponding reward amount as contribution rewards based on the contribution, thereby effectively ensuring fairness among the clients. Attached Figure Description

[0040] Figure 1 This is a flowchart illustrating an embodiment of the fair federated learning training method provided by the present invention;

[0041] Figure 2 This is a flowchart illustrating another embodiment of the fair federated learning training method provided by the present invention;

[0042] Figure 3 This is a schematic diagram of yet another embodiment of the fair federated learning training method provided by the present invention;

[0043] Figure 4 This is a schematic diagram of an embodiment of the fair federated learning training device provided by the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] To better understand the technical solutions in the embodiments of the present invention, please refer to Table 1, which is a symbolic explanation of some key parameters involved in the embodiments of the present invention.

[0046] Table 1. Symbol Explanation of Key Parameters

[0047]

[0048] The technical concepts involved in this invention will be explained in detail below:

[0049] (1) Federated learning: A privacy-preserving distributed machine learning method. Its system typically consists of multiple clients and a central server. It aims to minimize the weighted average loss of all clients by collaboratively training a global model while protecting data privacy.

[0050]

[0051] Where θ represents the model parameters; M represents the number of clients; G i (θ) is the loss function for the i-th client (user); q i Let be the weight of the i-th client, and the sum of the weights of all clients is 1.

[0052] (2) Fairness measurement: The model trained by each client using only local data represents its contribution, while the model obtained after participating in federated learning represents its reward. The Pearson correlation coefficient is used to evaluate the linear relationship between contribution and reward. When the reward is positively correlated with the contribution, the correlation coefficient is close to 1; when they are negatively correlated, the correlation coefficient is close to -1. The higher the correlation, the better the fairness.

[0053] See Figure 1 This is a flowchart illustrating an embodiment of the fair federated learning training method provided by the present invention.

[0054] A first aspect of the present invention provides a fair federated learning training method, executed by a central server, comprising steps S1 to S5, as detailed below:

[0055] Step S1: In the current communication round, receive local model information from each client; wherein, the local model information includes: trained local model parameters and local corrected gradients after data preprocessing;

[0056] Step S2: Based on the amount of local data for each client, perform weighted aggregation on all the local corrected gradients to obtain the global gradient;

[0057] Step S3: Based on the performance similarity of the trained local model parameters on different datasets, obtain the contribution increment of the client in the current communication round; wherein, the dataset includes: the validation set of the central server or the local dataset of the client;

[0058] Step S4: Smooth the contribution increment by using the client's contribution in the previous communication round to obtain the client's contribution in the current communication round;

[0059] Step S5: Based on the contribution of the current communication round, select the gradient parameters with the corresponding reward amount in the global gradient as the contribution reward and send them to the client so that the client can update the local model parameters before training in the next communication round according to the sent gradient parameters.

[0060] It should be noted that the trained local model parameters consist of the original local model parameters before training and the original local gradients used for model updates.

[0061] In practice, the central server first receives local model information uploaded by all clients. Next, it performs a weighted aggregation of all received local correction gradients; the weighting coefficients are calculated based on the amount of local data for each client, thus comprehensively considering the impact of different clients' data scales on global model training. Then, the performance similarity (or difference) between each client's local model on the central server's validation set and its local dataset is used as the contribution increment for the corresponding client in the current communication round, effectively evaluating the differentiated contributions of clients and accurately identifying high-contribution users / clients. Then, to maintain the stability of contribution calculation, the current contribution increment is adjusted using the contribution level from the previous communication round (i.e., smoothing the contribution) to obtain the client's contribution level in the current communication round. Finally, the central server selects gradient parameters corresponding to the contribution level (i.e., the number of rewards) from the global gradients and distributes them as contribution rewards to the clients, ensuring that the rewards received by each client (user) are significantly different, thereby achieving fair cooperation among clients. After receiving the reward gradient parameters, the client uses them to update its local model parameters before the start of training in the next communication round. Based on this, the embodiments of the present invention, through adaptive contribution calculation (i.e., steps S3 and S4) and dynamic reward allocation (i.e., step S5), can not only incentivize high-contribution clients to actively participate in federated learning, but also enhance the fairness of federated learning and effectively improve the performance of the overall model.

[0062] See Figure 2 This is a flowchart illustrating another embodiment of the fair federated learning training method provided by the present invention.

[0063] In an optional embodiment, the locally corrected gradient is obtained through the following steps:

[0064] In the current communication round, gradient clipping and normalization operations are performed on the local original gradient of the model update to obtain the local corrected gradient.

[0065] like Figure 2 As shown, the server first initializes the global model, that is, it initializes the global model parameters θ when the number of communication rounds t = 0. (t) (i.e., θ)(0) This allows each client to communicate with the central server starting from round 1, receiving the initial global model. Then, the client performs local training, meaning it trains on the local dataset across the M participating clients to obtain the original local gradients for model updates. Next, the client uploads the updated gradients. That is, in the t-th communication round, the client uploads the gradients that have undergone gradient clipping and normalization (locally corrected gradients). Send the data to the server, and simultaneously upload the local model parameters before training in the t-th communication round. and the local original gradient In other words, you can also directly upload the trained local model parameters. (Right now Subsequently, the server calculates contributions and distributes rewards. Finally, the client updates its local model using the rewards; that is, after the t-th communication round, the client downloads the rewards from the server that match its contributions. And used to update the model parameters in the next round. Specific implementation examples are as follows:

[0066] In the next communication round, the local model parameters before training are updated by the client using the following formula:

[0067]

[0068] in, These are the local model parameters of the i-th client before training in the (t+1)th communication round; These are the local model parameters of the i-th client before training in the t-th communication round; The central server distributes the contribution reward generated by the client in the t-th communication round.

[0069] See Figure 3 This is a schematic diagram of another embodiment of the fair federated learning training method provided by the present invention.

[0070] In an optional embodiment, the global gradient is calculated using the following formula:

[0071]

[0072] Where, Δθ (t) The global gradient is aggregated by the central server in the t-th communication round; M is the number of clients; d i Let be the local data volume of the i-th client; This is the locally corrected gradient uploaded by the i-th client in the t-th communication round.

[0073] like Figure 3 As shown, in the t-th communication round, the central server will receive the locally corrected gradients uploaded by each client. and use the client's local data volume d i We perform weighted aggregation to calculate the global gradient Δθ. (t) .

[0074] In an optional embodiment, the incremental contribution of the client in the current communication round is calculated using the following formula:

[0075]

[0076] in, The contribution increment for the i-th client in the t-th communication round; and The accuracy and loss are respectively obtained by testing the local model parameters trained on the i-th client through the validation set of the central server in the t-th communication round; Let be the loss of the local model parameters trained on the i-th client in the t-th communication round, as represented by the local dataset; KL represents the KL divergence.

[0077] It should be noted that during the adaptive contribution calculation process on the server, each client model (i.e., the parameters of the trained local model) is first tested using the server's validation set Val. ), to obtain the corresponding accuracy and loss Right now Then, the loss on the server's validation set is calculated using KL (Kullback-Leibler) divergence. Loss on the client's local dataset The similarity between them is used to further measure the incremental contribution of the client in this round.

[0078] It is worth noting that the incremental contribution of the client in this round is obtained by dividing the accuracy by the loss similarity metric. This indicates that embodiments of the present invention tend to reward clients that not only perform well on the validation set, but also have similar loss performance on the local and validation sets (i.e., local models with good generalization ability).

[0079] In an optional embodiment, the client's contribution in the current communication round is calculated using the following formula:

[0080]

[0081] in, The contribution of the i-th client in the t-th communication round; is the contribution increment of the i-th client in the t-th communication round; r is a hyperparameter representing the smoothing coefficient.

[0082] It should be noted that, in order to maintain the stability of contribution calculation, the contribution level from the previous communication round is used. Adjust the current contribution increment (i.e., smoothed contribution / weighted calculation) to obtain the client's contribution in the current communication round. This avoids drastic changes in client contributions due to abnormal fluctuations in a single round, and helps improve the stability and reliability of model updates in federated learning. Furthermore, r is a hyperparameter (representing a smoothing coefficient) between 0 and 1, used to balance the contribution increment in the current round. and historical contribution Regarding the current results The impact.

[0083] In an optional embodiment, the reward amount is calculated using the following formula:

[0084]

[0085] in, Let be the reward number of gradient parameters received by the i-th client in the t-th communication round; D is the total number of parameters in the global model; tanh(·) is the hyperbolic tangent function; KL represents the KL divergence; Let Γ be the contribution of the i-th client in the t-th communication round; Γ is the set of client IDs. Let k be the contribution of the client with ID k in the t-th communication round; The loss is calculated as the loss of the local model parameters trained by the i-th client in the t-th communication round, as represented by the validation set on the central server. Let α be the loss of the local model parameters trained on the i-th client in the t-th communication round, as represented by the local dataset; α is a hyperparameter with a range of (0,1).

[0086] It should be noted that the parameters in the global model include the weights and biases of each neuron. α is used to adjust the degree of influence of the contribution on the result; a larger α value can increase the influence of the contribution. tanh(·) is the hyperbolic tangent function, used to avoid instability caused by excessively large contribution values. This represents the maximum contribution across all clients after hyperbolic tangent processing, used for normalization to ensure that the parameter allocation ratio does not exceed the total number of parameters. Including the KL divergence as part of the denominator serves two purposes: firstly, it penalizes models with inconsistent local and validation losses, reducing the impact of unstable models during global model training; secondly, it encourages clients with consistent performance to receive more reward resources.

[0087] Based on this, the embodiments of the present invention dynamically allocate the number of model parameters according to the client's contribution, which can better utilize the better performing clients and improve the overall performance and convergence speed of the federated learning model.

[0088] In an optional embodiment, selecting gradient parameters with corresponding reward amounts from the global gradient as contribution rewards includes:

[0089] Based on the preset sorting order of the absolute values ​​of each parameter in the global model, all gradient parameters in the global gradient are sorted to obtain the corresponding gradient parameter sequence.

[0090] When the preset sorting order is from largest to smallest, the gradient parameters with the corresponding reward quantity are selected from the gradient parameter sequence as contribution rewards from front to back.

[0091] When the preset sorting order is from smallest to largest, the gradient parameters with the corresponding reward quantity are selected from the back to the front in the gradient parameter sequence as contribution rewards.

[0092] It should be noted that by using the preset sorting order of the absolute values ​​of the parameters in the global model, the gradient parameters that contribute the most to the model can be determined. These gradient parameters will be preferentially allocated to the client, thereby improving the overall learning efficiency. Based on the preset sorting order, the gradient parameters are assigned to the client based on the global gradient Δθ. (t) In the sequence of gradient parameters, select the parameter whose absolute value is first. The gradient parameters are used as contribution rewards. Send it to the client.

[0093] See Figure 4 This is a schematic diagram of an embodiment of the fair federated learning training device provided by the present invention.

[0094] A second aspect of the present invention provides a fair federated learning training apparatus for implementing the fair federated learning training method described in any of the first aspects of the present invention, the apparatus comprising:

[0095] The local information receiving module 11 is used to receive local model information fed back by each client in the current communication round; wherein, the local model information includes: trained local model parameters and local corrected gradients after data preprocessing;

[0096] The global gradient acquisition module 12 is used to perform weighted aggregation of all the local modified gradients based on the amount of local data of each client to obtain the global gradient;

[0097] The contribution increment acquisition module 13 is used to obtain the contribution increment of the client in the current communication round based on the performance similarity of the trained local model parameters on different datasets; wherein, the dataset includes: the validation set of the central server or the local dataset of the client;

[0098] The contribution acquisition module 14 is used to smooth the contribution increment by using the contribution of the client in the previous communication round to obtain the contribution of the client in the current communication round.

[0099] The contribution reward distribution module 15 is used to select gradient parameters with a corresponding reward amount from the global gradient as contribution rewards based on the contribution level of the current communication round, and distribute them to the client so that the client can update the local model parameters before training in the next communication round according to the distributed gradient parameters.

[0100] It should be noted that the fair federated learning training device provided in the second aspect embodiment of the present invention can realize all the processes of the fair federated learning training method described in the first aspect embodiment. The functions and technical effects of each module in the device are the same as the functions and technical effects of the fair federated learning training method described in the first aspect embodiment, and will not be repeated here.

[0101] A third aspect of the present invention provides a computer-readable storage medium comprising a stored computer program; wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the fair federated learning training method described in any of the first aspects above.

[0102] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A fair federated learning training method, characterized in that, Executed by the central server, including: In the current communication round, local model information is received from each client; wherein, the local model information includes: trained local model parameters and local corrected gradients after data preprocessing; Based on the amount of local data for each client, all the local corrected gradients are weighted and aggregated to obtain the global gradient; Based on the performance similarity of the trained local model parameters on different datasets, the contribution increment of the client in the current communication round is obtained; wherein, the dataset includes: the validation set of the central server or the local dataset of the client; The contribution increment is smoothed by the contribution of the client in the previous communication round to obtain the contribution of the client in the current communication round. Based on the contribution of the current communication round, a gradient parameter with a corresponding reward amount is selected from the global gradient as a contribution reward and sent to the client, so that the client can update the local model parameters before training in the next communication round according to the sent gradient parameter.

2. The fair federated learning training method as described in claim 1, characterized in that, The locally corrected gradient is obtained through the following steps: In the current communication round, gradient clipping and normalization operations are performed on the local original gradient of the model update to obtain the local corrected gradient.

3. The fair federated learning training method as described in claim 1, characterized in that, The global gradient is calculated using the following formula: Where, Δθ (t) The global gradient is aggregated by the central server in the t-th communication round; M is the number of clients; d i Let be the local data volume of the i-th client; This is the locally corrected gradient uploaded by the i-th client in the t-th communication round.

4. The fair federated learning training method as described in claim 1, characterized in that, The incremental contribution of the client in the current communication round is calculated using the following formula: in, The contribution increment for the i-th client in the t-th communication round; and The accuracy and loss are respectively obtained by testing the local model parameters trained on the i-th client through the validation set of the central server in the t-th communication round; Let be the loss of the local model parameters trained on the i-th client in the t-th communication round, as represented by the local dataset; KL represents the KL divergence.

5. The fair federated learning training method as described in claim 1, characterized in that, The client's contribution in the current communication round is calculated using the following formula: in, The contribution of the i-th client in the t-th communication round; is the contribution increment of the i-th client in the t-th communication round; r is a hyperparameter representing the smoothing coefficient.

6. The fair federated learning training method as described in claim 1, characterized in that, The amount of the reward is calculated using the following formula: in, Let be the reward number of gradient parameters received by the i-th client in the t-th communication round; D is the total number of parameters in the global model; tanh(·) is the hyperbolic tangent function; KL represents the KL divergence; Let Γ be the contribution of the i-th client in the t-th communication round; Γ is the set of client IDs. Let k be the contribution of the client with ID k in the t-th communication round; Let $\frac{i}{t}$ be the loss of the local model parameters trained by the $i$ client in the $t$-th communication round, as represented by the validation set on the central server. Let α be the loss of the local model parameters trained on the i-th client in the t-th communication round, as represented by the local dataset; α is a hyperparameter with a range of (0,1).

7. The fair federated learning training method as described in claim 1, characterized in that, The step of selecting gradient parameters with corresponding reward amounts from the global gradient as contribution rewards includes: Based on the preset sorting order of the absolute values ​​of each parameter in the global model, all gradient parameters in the global gradient are sorted to obtain the corresponding gradient parameter sequence. When the preset sorting order is from largest to smallest, the gradient parameters with the corresponding reward quantity are selected from the gradient parameter sequence as contribution rewards from front to back. When the preset sorting order is from smallest to largest, the gradient parameters with the corresponding reward quantity are selected from the back to the front in the gradient parameter sequence as contribution rewards.

8. The fair federated learning training method as described in claim 1, characterized in that, In the next communication round, the local model parameters before training are updated by the client using the following formula: in, These are the local model parameters of the i-th client before training in the (t+1)th communication round; These are the local model parameters of the i-th client before training in the t-th communication round; The central server distributes the contribution reward generated by the client in the t-th communication round.

9. A fair federated learning training device, characterized in that, include: The local information receiving module is used to receive local model information fed back by each client in the current communication round; wherein, the local model information includes: trained local model parameters and local corrected gradients after data preprocessing; The global gradient acquisition module is used to perform weighted aggregation of all the local modified gradients based on the amount of local data of each client to obtain the global gradient; The contribution increment acquisition module is used to obtain the contribution increment of the client in the current communication round based on the performance similarity of the trained local model parameters on different datasets; wherein, the dataset includes: the validation set of the central server or the local dataset of the client; The contribution acquisition module is used to smooth the contribution increment by using the contribution of the client in the previous communication round, so as to obtain the contribution of the client in the current communication round. The contribution reward distribution module is used to select gradient parameters with a corresponding reward amount from the global gradient as contribution rewards based on the contribution level of the current communication round, and distribute them to the client so that the client can update the local model parameters before training in the next communication round according to the distributed gradient parameters.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program; wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the fair federated learning training method as described in any one of claims 1 to 9.