Novel fair federal learning contribution measurement method

By broadcasting global models, local training and server aggregation in federated learning, combined with Shapley value evaluation and new aggregation weights, the accuracy and computational overhead of contribution evaluation under No-IID data is solved, and a more fair and efficient client is achieved Contribution metrics stimulate the enthusiasm of the client.

CN119128726APending Publication Date: 2024-12-13XINJIANG UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411257370.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing federated learning contribution evaluation scheme has problems of reduced accuracy and increased computing overhead when processing No-IID data, and lacks a fair compensation mechanism, which makes it difficult to stimulate the enthusiasm of clients.

Method used

A fair federated learning contribution measurement method is proposed to evaluate client contributions through broadcasting global models, local training, server aggregation and contribution evaluation steps, combined with Shapley values, and use new aggregation weights and gradient multiplexing techniques to reduce computational pressure and increase Assess accuracy.

Benefits of technology

Improve the accuracy and fairness of client contribution metrics, reduce computing overhead, enhance client motivation, and mitigate the impact of data heterogeneity through gradient multiplexing and new aggregation weights.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128726A_ABST
    Figure CN119128726A_ABST
Patent Text Reader

Abstract

The invention discloses a novel fair federal learning contribution measurement method. The invention discloses a novel fair federal learning contribution measurement method, which can reduce the influence of data heterogeneity of a client and reduce the calculation amount of a contribution evaluation process, and specifically comprises the following steps of: (1) broadcasting a global model: firstly, assuming global category distribution by a server, and then, broadcasting the global model; broadcasting an initial global model and global category distribution information to all clients; (2) local training: the client uses the received model to train a local model, calculates a local category distribution difference, and uploads the local model and the local category distribution difference to a server; (3) aggregation: the server receives the local model of each client and calculates gradient information corresponding to each client; calculating a new aggregation weight update global model by the server according to the local category distribution difference of the client and the corresponding data set proportion; and (4) contribution evaluation: the server performs client contribution evaluation by using a Shapley value, and in order to reduce the calculation amount, the stored client gradient information is used to reconstruct a model for evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of fair federated learning. Background Art

[0002] Federated learning is an effective way to protect data privacy and security, enabling machine learning to run in a distributed environment and promoting its development. However, how to encourage clients to actively participate in federated learning is an urgent problem to be solved. Shapley value is a classic concept in cooperative game theory and has been used for data evaluation in machine learning services. However, existing numerical evaluation schemes based on Shapley values ​​are impractical because they require additional model training, resulting in increased communication overhead. In addition, the client's data may exhibit No-IID characteristics, which poses a significant challenge to evaluating the client's contribution. No-IID data greatly affects the accuracy of the global model, weakens the marginal effect of the client, and leads to an underestimated measurement of the client's contribution. Current work often ignores the impact of the heterogeneity of model aggregation.

[0003] Federated learning (FL) has received widespread attention in recent years as a new AI model training paradigm for dealing with data silos. FL extends the machine learning training process from a single device to multiple devices or computing nodes, and achieves parallel processing and model synchronization through the distributed nature of data and computing. This shift can improve training efficiency, scalability, and robustness, and provide better solutions in terms of privacy protection.

[0004] In the currently widely used federated learning contribution evaluation scheme, evaluating individual utility through changes in model output often requires retraining multiple ML models, which poses a great challenge to the aggregation server. The server must allocate additional computing resources for model retraining, which in turn affects the convergence speed of the model.

[0005] In classic federated learning scenarios, the performance of models often depends on the availability of extensive and diverse datasets, which are traditionally assumed to be independent and equally distributed. Assuming that data has the same probability distribution and is independently distributed (IID) is a classic setting for machine learning, but this is unrealistic. In federated learning, it is often necessary to address the challenge of heterogeneity, which refers to the No-IID (non-independent and identically distributed) challenge caused by unbalanced data distribution related to data labels and data volume. Existing literature shows that No-IID data may lead to significantly lower accuracy in federated learning compared to IID data. FedAvg is an effective method commonly used to deal with data heterogeneity in federated learning, which performs weighted averaging based on the amount of data on the client. However, according to the Pareto principle, especially in the case of data heterogeneity, it is usually not enough to use only one-dimensional data volume to obtain an aggregated global model.

[0006] The performance of federated learning systems relies heavily on the continuous participation of local users, high-quality data input, and authentic local training. Of course, not everyone is eager to share their data authentically without any incentive. Therefore, for a viable federation, all clients should contribute high-quality data and receive corresponding rewards regularly. However, a key challenge lies in determining a fair compensation mechanism for these local data providers. Therefore, it is necessary to design a fair contribution measurement method that also serves as a client evaluation scheme to more efficiently quantify the client's contribution, more effectively achieve fair distribution, and stimulate the enthusiasm of the client. Summary of the invention

[0007] Based on the above situation, the main purpose of the present invention is to propose a new and fair federated learning contribution measurement method to solve the above technical problems.

[0008] The method of the present invention to solve the above technical problems is: a novel and fair federated learning contribution measurement method, comprising the following steps:

[0009] Broadcasting the global model: The trusted server first assumes a global category distribution, and then broadcasts an initial global model and the global category distribution information to all clients participating in federated learning;

[0010] Local training: All clients use local data to train a local model on the received model, and use their own local category distribution to calculate the difference between the local model and the global category, and then upload the local model and the local category distribution difference to the trusted server;

[0011] Server aggregation: The server receives the local models of each client and calculates the gradient information corresponding to each client. The server combines the local category distribution differences of each client and the client dataset ratio to calculate a new aggregation weight to replace the single dataset ratio weight used by the FedAvg algorithm for model aggregation and train a new global model.

[0012] Contribution evaluation: The server uses Shapley values ​​to evaluate the client's contribution. During the evaluation, the server uses the stored client gradient information to reconstruct the model used for evaluation, reducing the computational pressure.

[0013] In the novel federated learning contribution measurement method described above, in step (1), the global model broadcasting stage is mainly that the server broadcasts the model and global category distribution to all clients. The specific process is:

[0014] server:

[0015] The server first assumes a global category distribution , the global category distribution is defined as a uniform distribution of each data category and a consistent number of categories. The server then initializes the global model and compares the model with the global category distribution Sent to each client together.

[0016] In the novel federated learning contribution measurement method described above, in step (2), the local training phase is mainly for all clients to calculate the local model and local category distribution differences. The specific process is:

[0017] Client:

[0018] In round t, the client uses its local data Perform local training on the global model sent by the server to obtain a local model ;

[0019] At the same time, the participants calculate their own category distribution differences locally , and then calculate the KL difference between the global category distribution ; Then upload these two information to the trusted server.

[0020] In the novel federated learning contribution measurement method described above, in step (3), the server aggregation stage is mainly for the server to update the model using the information uploaded by the client. The specific process is:

[0021] The server receives information from each client and uses this information to calculate the corresponding gradient information , and store these gradient information together with the cycle information for subsequent global model updates. At the same time, the client's category distribution difference is combined with the client's data set ratio to form a new aggregation weight , update the global model and generate a new global model.

[0022] In the novel federated learning contribution measurement method described above, in step (4), the contribution evaluation phase is mainly for the server to evaluate the contribution of each client to the model. The specific process is as follows:

[0023] The server uses Shapley value to evaluate the contribution of the participants. During the evaluation, the server uses a sampling evaluation method to approximately reconstruct the contribution of the client: a subset S is randomly selected from all the client sets (the client to be evaluated is included in S), and the server uses a sampling evaluation method to approximately reconstruct the contribution of the client. and To approximately reconstruct the client contribution; in order to reduce unnecessary sub-model retraining, we use the stored client-related gradient information to reconstruct the model and reduce computational pressure.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] 1. In the process of using Shapley function for contribution measurement, gradient reuse is performed: we use gradient approximation to reconstruct the model, saving a lot of time. The reconstructible model can be more conveniently used to evaluate its performance.

[0026] 2. Considering the heterogeneity of data distribution, a new aggregation weight is adopted to alleviate the impact of data heterogeneity on contribution measurement and improve the accuracy of client contribution measurement.

[0027] 3. A new method for measuring client contribution in federated learning is proposed. This method effectively alleviates the problem of data heterogeneity by introducing new aggregation weights, making the evaluation of client contribution levels in the federated learning process more fair. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is the overall flow chart of the present invention.

[0029] Figure 2 It is a system framework diagram of the present invention. Specific implementation plan

[0030] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0031] like Figure 1 As shown in the figure, a novel fair federated learning contribution measurement method includes the following steps:

[0032] Broadcasting the global model: The trusted server first assumes a global category distribution, and then broadcasts an initial global model and the global category distribution information to all clients participating in federated learning;

[0033] Local training: All clients use local data to train a local model on the received model, and use their own local category distribution to calculate the difference between the local model and the global category, and then upload the local model and the local category distribution difference to the trusted server;

[0034] Server aggregation: The server receives the local models of each client and calculates the gradient information corresponding to each client. The server combines the local category distribution differences of each client and the client dataset ratio to calculate a new aggregation weight to replace the single dataset ratio weight used by the FedAvg algorithm for model aggregation and train a new global model.

[0035] Contribution evaluation: The server uses Shapley values ​​to evaluate the client contribution. During the evaluation, the server uses the stored client gradient information to reconstruct the model used for evaluation.

[0036] like Figure 2 As shown, Figure 2 The system framework diagram of the present invention includes two entities: a trusted server and a client. The trusted server is responsible for aggregating the collected local models and distributing the latest global model. The client first calculates the difference between the local category distribution and the global category distribution, then updates the local model, and then sends the updated local model and the local category distribution difference to the server. The specific method steps are as follows:

[0037] Step 1: The server sets a global category distribution in the first round (The global category distribution is defined as a uniform distribution of each data category and a consistent number of categories), then initialize the global model And send it to each client.

[0038] Step 2: Client uses local category distribution information , calculate the difference between itself and the global category distribution Then use your own local data to train the initial model sent by the server locally, and use the trained local model The difference between the local class distribution and the local class distribution is uploaded to the server.

[0039] Step 3: After receiving this information, the server calculates the gradient information of each client: , and store these gradient information together with the cycle information for subsequent global model updates. Then, use Combined with the client dataset ratio, a new aggregation weight that combines distribution differences is calculated: (here , indicating the proportion of the amount of data owned by the client to the total data). By adjusting this aggregation weight, we can assign a smaller weight to clients with large differences in local category distribution to reduce their impact on the model and improve the accuracy of the model. Then, we use this new aggregation weight to update the global model: . Finally, the global model is sent to each client again.

[0040] Step 4: The server evaluates the contribution level of each client in each epoch: To relieve the computing pressure on the server, we did the following: randomly select a client subset S from all clients and train and To approximately reconstruct the client contribution; when evaluating the performance of the sub-model, in order to reduce unnecessary sub-model retraining, we use the gradient information to reconstruct the sub-model: .

[0041] Step 5: Evaluate the client's final contribution: .

Claims

1. A novel fair federated learning contribution measurement method, characterized by: The method comprises the following steps: Step 1: Broadcast the global model; the trusted server first assumes a global category distribution, and then broadcasts an initial global model and the global category distribution information to all clients participating in federated learning; Step 2: Local training: All clients use local data to train a local model on the received model, and use their own local category distribution to calculate the difference with the global category, and then upload the local model and the local category distribution difference to the trusted server; Step 3: Server aggregation; The server receives the local models of each client and calculates the gradient information corresponding to each client. The server combines the local category distribution differences of each client and the client dataset ratio to calculate a new aggregation weight to replace the single dataset ratio weight used by the FedAvg algorithm for model aggregation and train a new global model. Step 4: Contribution evaluation: The server uses Shapley value to evaluate the client contribution. During the evaluation, the server uses the stored client gradient information to reconstruct the model used for evaluation to reduce the computational pressure.

2. A novel fair federated learning contribution measurement method according to claim 1, characterized in that: In step 1, the global model broadcasting phase mainly involves the trusted server distributing the global category distribution information and the initial model to all clients; the specific process is as follows: The server sets a global category distribution in the first round (Global category distribution is defined as uniform distribution of each data category and the same number of categories), then initialize the global model And send it to each client.

3. A novel fair federated learning contribution measurement method according to claim 2, characterized in that: In step 2, the local model stage mainly calculates the local category distribution difference and uses the initial model to train the local model; the specific process is: Client uses local category distribution information , calculate the difference between itself and the global category distribution Then use your own local data to locally train the initial model sent by the server, and use the trained local model The difference between the local class distribution and the local class distribution is uploaded to the server.

4. A novel fair federated learning contribution measurement method according to claim 3, characterized in that: In step 3, the server aggregation phase mainly calculates a new aggregation weight, uses the aggregation weight to update the global model, and distributes the global model; the specific process is as follows: After receiving this information, the server calculates the gradient information of each participant: , and store these gradient information together with the cycle information for subsequent global model updates; then, use Combined with the client dataset ratio, a new aggregation weight that combines distribution differences is calculated: (here ), and use this new aggregate weight to update the global model: ; Finally, the global model is sent to each client again.

5. A novel fair federated learning contribution measurement method according to claim 4, characterized in that: In step 4, the contribution measurement phase is mainly for the calculation server to calculate the round contribution of each participant; the specific process is: The server evaluates each client's contribution level at each epoch: ; To relieve the computing pressure on the server, we did the following: randomly select a client subset S from all clients, and train and To approximately reconstruct the client contribution; when evaluating the performance of the sub-model, in order to reduce unnecessary sub-model retraining, we use the gradient information stored in the server to reconstruct the sub-model. The reconstruction formula is: .

6. A novel fair federated learning contribution measurement method according to claim 4, characterized in that: In step 4, the final contribution level of the client is calculated, mainly the server calculates the final contribution of each client after multiple rounds of training; the specific process is: Evaluate the client's final contribution: .

7. A novel fair federated learning contribution measurement method, characterized in that: The system applies a novel fair federated learning contribution measurement method as described in any one of claims 1 to 5 above, and the system comprises: Broadcasting the global model: The trusted server first assumes a global category distribution, and then broadcasts an initial global model and this global category distribution information to all clients participating in federated learning.

8. Local training: All clients use local data to train a local model on the received model, and use their own local category distribution to calculate the difference with the global category, and then upload the local model and the local category distribution difference to the trusted server.

9. Server aggregation: The server receives the local models of each client and calculates the gradient information corresponding to each client. The server combines the local category distribution differences of each client and the client dataset ratio to calculate a new aggregation weight to replace the single dataset ratio weight used by the FedAvg algorithm for model aggregation and train a new global model. By adjusting this aggregation weight, we can assign a smaller weight to clients with large differences in local category distribution to reduce the impact of clients with heterogeneous data on the global model, improve the accuracy of the model, and thus improve the accuracy of the client's contribution measurement.

10. Contribution evaluation: The server uses Shapley value to evaluate the client contribution. During the evaluation, the server uses sampling method to approximately reconstruct the client contribution. At the same time, the server uses the stored client gradient information to reconstruct the sub-model used for evaluation. The above method can greatly save server computing resources and accelerate the convergence of the model.

Citation Information

Patent Citations

  • Federal learning method based on Shapley value

    CN116205311A

  • Fair privacy calculation method based on federated node contribution

    CN116306910A

  • Clustering federal learning method based on contribution perception

    CN116796204A

  • Fair federated learning method based on contribution and income collaborative balance

    CN117933422A