A method for evaluating the contribution of participants in horizontal federated learning

Through the multi-factor contribution evaluation method and Shapley value prediction model, the unfairness and high complexity of the contribution evaluation of participants in federated learning are solved, and fair and efficient contribution evaluation is achieved.

CN116187474BActive Publication Date: 2025-09-23XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310211598.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-07
Publication Date
2025-09-23
Estimated Expiration
2043-03-07

AI Technical Summary

Technical Problem

Existing methods for evaluating the contributions of federated learning participants suffer from problems of unfairness and high computational complexity. Single resource consumption evaluation ignores the impact of the global model, and the high computational complexity of the Shapley value leads to increased system overhead.

Method used

A multi-factor contribution evaluation method is adopted, including data contribution, calculation contribution and model contribution, combined with the Shapley value prediction model, and a three-layer neural network is used to predict the contribution of participants, reducing the time complexity of the evaluation.

Benefits of technology

It realizes the contribution of participants in fairness assessment, reduces the evaluation time complexity, improves the evaluation accuracy, and reduces the computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116187474B_ABST
    Figure CN116187474B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for evaluating the contribution of participants in horizontal federated learning, comprising the following steps: Step 1: an aggregation server initializes a global model and distributes it to each participant; Step 2: each participant performs model training using its own local data and the received global model; Step 3: each participant uploads the trained local model parameters and the consumption parameters of the training process to the aggregation server; Step 4: the aggregation server aggregates the local models uploaded by each participant and distributes the aggregated global model to each participant; Step 5: the aggregation server calculates the contribution of each participant using a contribution evaluation method based on the resource consumption parameters uploaded by each participant, the local model, and the aggregated global model data, and records the relevant parameters and corresponding model contribution values ​​of each participant in this iteration in a database on the aggregation server. The present invention can ensure reliable and fair evaluation results and reduce evaluation costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of cyberspace security technology, and specifically relates to a method for evaluating the contributions of participants in a horizontal federated learning system. Background Art

[0002] Federated Learning is a distributed machine learning paradigm proposed in recent years. Its characteristic is that multiple participants use their own data to collaboratively train machine learning models with the cooperation of a server. Each participant first trains the model using its local data; the trained local model is then uploaded to the server. The server then aggregates the received local models using a certain aggregation rule to obtain a global model for all participants to share. This machine learning paradigm achieves joint modeling without sharing the data of each party, thereby protecting the privacy of all parties. In the commercialization of federated learning, in addition to data privacy considerations, the fairness of the federated learning system is also a difficult issue that concerns academia and industry. To ensure fairness, the contributions of the participants should be directly linked to the compensation they receive. Therefore, an effective method is needed to evaluate the contribution of each participant during model training.

[0003] Existing methods for assessing the contribution of federated learning participants can be divided into two main categories. The first uses the resource consumption (computing and communication resources, as well as the participant's own data resources) consumed during the federated learning process as a factor in assessing the participant's contribution, using a participant resource consumption model proposed by scholars both domestically and internationally to calculate the participant's contribution. According to this model, reliable and unreliable participants who contribute the same resources would receive the same contribution evaluation results, which is unreasonable. The second category uses the marginal benefit a participant brings to the global model as the criterion for assessing the participant's contribution. The most common approach is to use the participant's Shapley value (SV) in the federated learning system as the participant's contribution. The Shapley value reflects the average marginal benefit of the system members. This SV-based contribution assessment method has been widely accepted by scholars, but due to its O(n!) computational complexity, the server requires a significant amount of time to calculate the result, significantly increasing system overhead when the number of participants reaches a certain scale. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the above-mentioned prior art and provide a method for evaluating the contribution of participants in a horizontal federated learning system.

[0005] To achieve the above object, the technical solution of the present invention is:

[0006] A method for evaluating the contribution of participants in horizontal federated learning, including:

[0007] Step 1: The aggregation server initializes the global model and sends it to each participant;

[0008] Step 2: Each participant uses its own local data and the received global model to train the model;

[0009] Step 3: The participants upload the trained local model parameters and the consumption parameters of the training process to the aggregation server;

[0010] Step 4: The aggregation server aggregates the local models uploaded by each participant and sends the aggregated global model to each participant;

[0011] Step 5: The aggregation server calculates the contribution of each participant using the contribution evaluation method based on the resource consumption parameters, local models, and aggregated global model data uploaded by each participant, and records the relevant parameters and corresponding model contribution values ​​of each participant in this iteration in the aggregation server database;

[0012] Repeat steps 2 to 5 above until the model converges or the predefined number of iterations is reached.

[0013] Furthermore, the contribution evaluation method divides the total contribution of the participants into three parts: data contribution, calculation contribution and model contribution. The calculation method is formally described as formula (1):

[0014]

[0015] Among them, Φ i Represents participant P i The final contribution of , T represents the number of global iteration rounds, Represents participant P i The data contribution during the tth round of iteration, Indicates P i The computational contribution during the tth iteration is, Indicates P i The model contribution during the tth iteration.

[0016] Furthermore, a participant P i Shapley value SV i The calculation method is expressed as formula (4):

[0017]

[0018] Among them, ω is a constant, P represents the set of all participants, U(x) is the benefit function, the parameter x here is a machine learning model, and the value of U(x) represents the accuracy of model x on the test set.

[0019] Furthermore, the step 2 specifically includes:

[0020] Assume that participant P i The size of the local training dataset used for federated learning is s i , the total dataset size of n participants is Federated learning minimizes the i The local loss function Optimize the global loss function by taking a weighted average over its local dataset Expressed as formula (5):

[0021]

[0022] Among them, f x (M) is the loss function for a sample x on the local dataset; each participant calculates the local gradient to minimize the local loss Update the local model in the direction of

[0023] Furthermore, in step 4, the polymerization process is as shown in formula (6):

[0024]

[0025] in, For participant P i The local model obtained in the tth round of training.

[0026] Furthermore, the data contribution includes:

[0027] In the federated learning process, each participant uses local data to train a local model. Assume that participant P i The size of the dataset used for local model training in the tth round of global iteration is Considering that the unit value of data of different types and qualities is also different, P i Contribution to the data in the tth round of global iteration It is expressed as formula (7):

[0028]

[0029] Among them, l i P i The unit data value.

[0030] Furthermore, the calculation contribution includes:

[0031] During each round of iteration, participants consume their own device resources to perform local model training and parameter upload. The contribution of this process mainly includes the computing energy consumption of model training and the communication energy consumption of model upload. Therefore, the participant P i The computational contribution in the tth global iteration Expressed as formula (8):

[0032]

[0033] Among them, l e is the unit energy consumption value, and P i The computational energy and communication energy consumed for local model training during the tth global iteration.

[0034] Furthermore, the model contribution includes:

[0035] The model contribution of each participant is evaluated based on its Shapley value, as shown in formula (9):

[0036]

[0037] Among them, ω is the model contribution parameter.

[0038] Furthermore, the evaluation process of the model contribution includes:

[0039] After the aggregation server initializes and updates the global model and sends it to each participant, it begins to evaluate the model contribution of each participant;

[0040] For participants who upload in timeout, their model contribution in this round is recorded as 0, that is,

[0041] For the participants who have successfully uploaded the model parameters, the aggregation server first determines whether it has the participant Shapley value prediction model. If so, the prediction model is directly used to calculate the Shapley value of each participant; otherwise, the SV is calculated according to formula (4); the participant Shapley value prediction model is a machine learning model obtained by the aggregation server through machine learning model training based on the participant information it obtains; after the model training is completed, the aggregation server can use the model to directly predict the participant's Shapley value without using formula (4) to calculate the Shapley value.

[0042] Furthermore, the Shapley value prediction model of the participants is constructed in the following manner:

[0043] Starting from the t0th iteration, the aggregation server starts to train the SV prediction model and calculates the SV based on the prediction model. The SV prediction model uses a three-layer neural network model. The input of the model includes the number of local samples of the participants, the proportion of data volume, the accuracy of the local model, the predefined number of global iteration rounds and the accuracy of the global model. The output is the SV corresponding to the participant. After the prediction model training is completed, the aggregation server can use the model to predict the SV of each participant, and then calculate the participant's P based on the SV. i Model contribution under the current global iteration number t

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

[0045] The present invention evaluates the contributions of participants from three aspects: data resource input, computing resource consumption, and model benefit improvement of the federated learning system, reducing the unfair impact brought by a single evaluation factor. In addition, a method for predicting the contribution of participants is proposed, which reduces the time complexity of contribution evaluation while maintaining evaluation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a diagram of the horizontal federated learning system architecture provided by an embodiment of the present invention;

[0047] Figure 2 A framework diagram of a method for evaluating the contribution of participants in horizontal federated learning provided by an embodiment of the present invention;

[0048] Figure 3 Contribute to the model evaluation flow chart;

[0049] Figure 4 It is the structure diagram of the neural network model;

[0050] Figure 5 The relationship between the prediction starting round number (t0) and the prediction accuracy under different numbers of participants;

[0051] Figure 6 Line graph of the ratio of different prediction starting rounds and prediction accuracy under different global iteration rounds DETAILED DESCRIPTION

[0052] Example:

[0053] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.

[0054] Federated learning can complete joint modeling without sharing data. When evaluating the contribution of each participant, if the contribution of the participant is evaluated only based on the resources contributed, the impact on the global model may be ignored, resulting in unfairness; although the contribution evaluation scheme that introduces the Shapley value can calculate the marginal benefit of each participant to the global model, it will increase additional computing costs. In response to the above problems, the present invention proposes a multi-factor participant contribution evaluation scheme, which evaluates the contribution of the participant from three aspects: the data resources contributed by the participant to the federated learning system, the computing resource consumption, and the improvement of the model efficiency, thereby reducing the unfairness caused by a single evaluation factor. In addition, a participant contribution prediction method is proposed, which reduces the time complexity of the contribution evaluation while maintaining the evaluation accuracy.

[0055] Figure 1 The system architecture of horizontal federated learning considered in this paper is presented. The federated learning system consists of an aggregation server and several participants. The tasks of each system entity are described as follows:

[0056] Aggregation Server: This server is primarily responsible for receiving the local models uploaded by each participant, aggregating them using certain aggregation rules, and distributing the resulting global model to the participants. Furthermore, the aggregation server uses its own test dataset to test the accuracy of the local and global models uploaded by the participants, calculating and recording each participant's contribution, along with their identity information and their behavior during the iteration process.

[0057] Participants are primarily responsible for training local models using their own local data. They then upload local model parameters and training behavior information to the aggregation server. This behavior information includes parameters such as computing resources consumed during training, communication resources, and the size of local training data. To protect privacy, participants do not share their data.

[0058] The contribution evaluation scheme for participants in horizontal federated learning proposed in this invention has the following assumptions about the horizontal federated learning system:

[0059] (1) The aggregation server is honest and trustworthy.

[0060] (2) All parties involved are rational and greedy, and there will be no communication or collusion between the parties.

[0061] (3) The aggregation server has a public dataset and can use this dataset to calculate the accuracy of the local model and the global model in each iteration.

[0062] Before specifically introducing the participant contribution evaluation scheme proposed in the present invention, the relevant theories and technologies of horizontal federated learning and Shapley value involved in the present invention are first explained.

[0063] (1) Resource consumption model of federated learning participants

[0064] In a horizontal federated learning system, n participants with the same data structure jointly train a model with the assistance of an aggregation server. During the iteration process, participants need to consume their own resources to train local models and upload model parameters. Assume that each participant P i The local data sample size used to participate in the federated learning task is s i , the CPU cycle frequency is f i , the number of CPU cycles required to perform training on one data sample is c i Then P i The energy consumption of one iteration is expressed as Where ζ is the effective capacitance parameter of the computing chipset of the participant. Assume P i The local model accuracy is ε i , then P i The number of iterations of local training can be expressed as Then in one round of global iteration P i The computational resource consumption can be expressed as formula (2).

[0065]

[0066] After local training is completed, the participants need to upload the local model parameters to the aggregation server, which will incur communication overhead. i Upload its local model information via wireless communication, the transmission rate Where B represents the transmission bandwidth, ρ i is the transmission power, h i It's P i The channel gain coefficient between the aggregation server and N0 is the background noise. Assuming that the position of the participants is fixed when transmitting the local model parameters, and the size of the uploaded information is σ, the transmission time of the local model is Then in one round of global iteration P i The transmission resource consumption can be expressed as formula (3).

[0067]

[0068] (2) Shapley value

[0069] The Shapley value (SV) is mainly used to solve the problem of interest distribution among the parties in the cooperative game. This value reflects the average marginal contribution of the members in the alliance to the alliance. i Shapley value SV i The calculation method can be expressed as formula (4), where ω is a constant, P represents the set of all participants, U(x) is the benefit function, the parameter x here is a machine learning model, the value of U(x) represents the accuracy of model x on the test set, M S Represents a model formed by aggregating the local models of the participants in the set S.

[0070]

[0071] In this application, the symbols used in the contribution evaluation scheme of participants in the horizontal federated learning proposed by the present invention are shown in Table 1.

[0072] Table 1 Symbols

[0073]

[0074]

[0075] The framework diagram of the contribution evaluation method proposed in this invention is as follows: Figure 2 As shown, it consists of five stages:

[0076] Step 1: Initialization phase, the aggregation server initializes the global model M 0 and distribute it to all participants;

[0077] Step 2: In the local training phase, each participant uses its own local data and a corresponding machine learning algorithm (such as stochastic gradient descent) to train the global model issued by the aggregation server to obtain a local model.

[0078] Step 3: During the parameter upload phase, participants upload their local model parameters, as well as data such as computing resource consumption, communication resource consumption, and training data size during training, to the aggregation server.

[0079] Step 4: In the model aggregation phase, the aggregation server aggregates the local models uploaded by each participant according to the corresponding algorithm (such as the federated averaging algorithm) and sends the latest aggregated global model to each participant;

[0080] Step 5: In the contribution evaluation phase, the aggregation server calculates the contribution of each participant based on the parameters uploaded by each participant and the global model generated by aggregation, using the contribution evaluation scheme designed by the present invention, and records the relevant parameters and corresponding contribution values ​​of each participant in this round of iteration on the aggregation server.

[0081] The above steps 2 to 5 are repeated until the global model converges or the training reaches the specified number of iterations.

[0082] In order to evaluate the contributions of participants from multiple perspectives, ensure the reliability and fairness of the results, and minimize the additional costs incurred by evaluating the contributions of participants, the contribution evaluation scheme in step 5 above is a multi-factor-based horizontal federated learning participant contribution evaluation scheme. The contribution of each participant includes three parts: computing contribution, data contribution, and model contribution. The calculation method can be formally described as formula (1).

[0083]

[0084] where Φ i Represents participant P i The final contribution of , T represents the number of global iteration rounds, Represents participant P i The data contribution during the tth round of iteration, Indicates P i The computational contribution during the tth iteration is, Indicates P i The model contribution during the tth iteration. The contribution evaluation scheme proposed in this paper takes into account both the input of the participants (data resources and computing power) and the overall model benefits. A contribution prediction scheme is also proposed for evaluating model contributions, which reduces the additional costs incurred by evaluating participant contributions while maintaining evaluation accuracy.

[0085] In a specific embodiment, the above step 2 specifically includes:

[0086] Assume that participant P i The size of the local training dataset used for federated learning is s i , the total dataset size of n participants is Federated learning minimizes the i The local loss function Optimize the global loss function by taking a weighted average over its local dataset This goal can be expressed as formula (5), where f x (M) is the loss function of a sample x on the local dataset. Each participant calculates the local gradient according to the optimization algorithm agreed by the system (such as stochastic gradient descent) and the training sample, and minimizes the local loss. Update the local model in the direction of

[0087]

[0088] In one embodiment, in step 4 above, the polymerization process is as shown in formula (6), where For participant P i The local model obtained in the tth round of training.

[0089]

[0090] Specifically, the contribution evaluation method described in step 5 divides the total contribution of the participants into three aspects: data contribution, calculation contribution and model contribution.

[0091] (1) Data Contribution

[0092] In the federated learning process, each participant uses local data to train a local model. Assume that participant P i The size of the dataset used for local model training in the tth round of global iteration is Considering that the unit value of data of different types and qualities is also different, P i Contribution to the data in the tth round of global iteration Expressed as formula (7), where l i P i The unit data value.

[0093]

[0094] (2) Calculating contribution

[0095] During each round of iteration, participants consume their own device resources to perform local model training and parameter upload. The contribution of this process mainly includes the computing energy consumption of model training and the communication energy consumption of model upload. i The computational contribution in the tth global iteration It can be expressed as formula (8), where l e is the unit energy consumption value, and P i The computational energy and communication energy consumed for local model training during the tth global iteration.

[0096]

[0097] (3) Model contribution

[0098] The ultimate goal of federated learning is to obtain a shared global model. A participant's model contribution is reflected in the improvement in the global model's effectiveness after joining the federated learning system, specifically in terms of increased accuracy or value. The Shapley value reflects the average contribution of a member of an alliance to the alliance's effectiveness and is often used to allocate the total benefits generated by all participants in cooperative games. This paper evaluates a participant's model contribution based on their Shapley value, as shown in formula (9), where ω is the model contribution parameter.

[0099]

[0100] Figure 3 This is a flow chart for model contribution evaluation. The contribution of each participant includes three parts: computational contribution, data contribution, and model contribution. After the aggregation server updates the global model and sends it to each participant, it begins to evaluate the model contribution of each participant. For participants whose uploads have timed out, their model contribution in this round is recorded as 0, i.e. For participants who successfully upload model parameters, the aggregation server first determines whether they possess a participant Shapley value prediction model. If so, the prediction model is used to directly calculate each participant's Shapley value. Otherwise, the SV is calculated according to formula (4). The participant Shapley value prediction model is a machine learning model trained by the aggregation server based on the participant information it obtains. After the model training is completed, the aggregation server can use this model to directly predict the participant's Shapley value, eliminating the need to calculate the Shapley value using formula (4), thereby significantly reducing the computational complexity of the participant model contribution.

[0101] The following is a detailed description of the construction method of the Shapley value prediction model for participants. Starting from the t0th iteration of the system, the aggregation server begins to train the SV prediction model and calculates the SV based on the prediction model. The SV prediction model of the present invention adopts a three-layer neural network model. The input of the model includes the number of local samples of the participants, the proportion of data volume, the accuracy of the local model, the predefined number of global iteration rounds and the accuracy of the global model, and the output is the SV corresponding to the participant. After the prediction model training is completed, the aggregation server can use the model to predict the SV of each participant, and then calculate the participant P based on the SV. i Model contribution under the current global iteration number t

[0102] When the training is completed, the aggregation server will i The model contribution during each iteration is used to calculate the participant P i Model contribution Then, the computational contribution and data contribution are calculated according to the scheme given above, and finally the global contribution of the participant is calculated as Φ i, ending the contribution evaluation process.

[0103] The effectiveness of the present invention is verified by experiments below.

[0104] The experiment was run on a 64-bit Windows 10.0.19042.928 operating system, using Python 3.9.0. The processor used was an Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz and 8.00GB of RAM. Each participant's local model had a learning rate of 0.01, a training batch size of 64, and 10 iterations. Each participant trained their local model using the logistic regression algorithm, and the aggregation server aggregated the local models using the federated averaging algorithm. The aggregation weight was the proportion of the local dataset size, and the benefit function was U(M) = 100 * A(M), where A(M) represents the accuracy of model M. Other experimental parameter settings are shown in Table 2.

[0105] Table 2 Experimental parameters

[0106]

[0107] The experiment was conducted on the MNIST dataset, a handwritten digit recognition dataset divided into 10 categories. It contains 70,000 28x28 images of handwritten digits ranging from 0 to 9, with 7,000 images per category, of which 60,000 are used for training and 10,000 for testing. We selected 20 data points per category from the test set as a public test set, and randomly selected 100 to 200 different samples from the training set as local training samples for each participant.

[0108] In the experiment, a three-layer neural network prediction model was selected as the SV prediction model. Figure 4 The following is a diagram of the neural network model. The input layer input_size is 5, representing the number of participant training samples, data volume percentage, local model accuracy, global iteration number, and global model accuracy, respectively. The hidden layer hidden_size is set to 200, and the output layer output_size is the corresponding SV. The training batch size is 32, the learning rate is 0.01, the number of iterations is 200, and the prediction error is ±0.3*actual value. Figure 4 The figure shows the relationship between the prediction starting position (t0) and the accuracy of the prediction model when there are 5, 7, and 10 participants in the system, where the horizontal axis is the number of prediction starting rounds and the vertical axis is the accuracy of the SV prediction model.

[0109] from Figure 5It can be seen that prediction accuracy increases with the number of prediction rounds, and changes in the number of participants have little impact on this upward trend. Regardless of the number of participants, the aggregation server collects the same amount of historical data from the same participant at the time of the prediction round, so changes in the number of participants have little impact on prediction accuracy. However, as the number of prediction rounds increases, the aggregation server collects more historical data from each participant during prediction model training, which in turn increases the prediction accuracy of the resulting SV prediction model. Therefore, the larger the value of the prediction round, the more reliable the prediction results of the SV prediction model. Overall, when the number of prediction rounds is greater than 35, the prediction accuracy reaches over 80%.

[0110] Table 3 shows the training set size ratio, local model accuracy, and contribution value calculated based on SV for each participant under different number of participants under the above parameter environment when the number of prediction starting rounds is 37. and the contribution value Φ calculated by the present invention i The normalized results are compared, and the calculation methods are (10) and (11) respectively.

[0111]

[0112]

[0113] Table 3 Comparison of contributions under different numbers of participants

[0114] Table 3.1 Number of participants = 5

[0115]

[0116]

[0117] Table 3.2 Number of participants = 7

[0118]

[0119] Table 3.3 Number of participants = 10

[0120]

[0121] By comparing the contribution values ​​obtained by different calculation methods for each participant in Table 3, it can be seen that the contribution calculated according to the Shapley value is not much different from the contribution value calculated by the present invention. There are 2 participants with an error of more than 0.02, 6 participants with an error between 0.01 and 0.02, and the errors obtained by the remaining participants are all less than 0.01. And we can also clearly see that both contribution calculation methods give lower contribution values ​​to participants with a low proportion of training set size and poor local model accuracy. This also shows that the accuracy of the contribution calculation of the present invention can reach a relatively high level.

[0122] Table 4 compares the total time (in seconds) required to complete federated learning training when the Shapley value is calculated using formula (4) throughout the model training process and when the model contribution prediction method proposed in the present invention is used.

[0123] Table 4 Comparison of total time consumed

[0124]

[0125] The experimental results above show that the total time required to complete federated learning increases linearly with the increase in the number of prediction starting rounds, when calculating the model contribution using the proposed solution. When the prediction accuracy is above 80%, compared to the case where the contribution prediction model is not used, the total time is reduced by 213.86 seconds (22.62%) when the number of participants is 5; by 1781.16 seconds (32.12%) when the number of participants is 7; and by 18106.42 seconds (29.97%) when the number of participants is 10. These experimental results demonstrate that the present invention can reduce the time overhead of calculating participant contributions while ensuring the reliability of the prediction results.

[0126] Figure 6 The relationship between the ratio of the prediction start number to the global iteration number and the SV prediction model accuracy is shown for different global iteration numbers. The figure shows that, for the same ratio, the SV prediction model accuracy increases with increasing global iteration numbers. When the global iteration number is 10, the SV prediction model's maximum accuracy is only 0.6. However, when the global iteration number is 30 or higher, increasing the ratio of the prediction start number to the global iteration number can increase the SV prediction model's accuracy to above 0.8.

[0127] The above description is merely a preferred embodiment of the present invention and is not intended to impose any limitation on the technical solution of the present invention. Those skilled in the art should understand that, without departing from the spirit and principles of the present invention, the technical solution can also be subjected to a number of simple modifications and replacements (including but not limited to increasing the contribution evaluation factor, replacing the structure of the SV prediction model, changing parameters, etc.), and these modifications and replacements are also within the scope of protection covered by the claims.

Claims

1. A method for evaluating the contribution of participants in horizontal federated learning, characterized in that: include: Step 1: The aggregation server initializes the global model and sends it to each participant; Step 2: Each participant uses its own local data and the received global model to train the model; Step 3: The participants upload the trained local model parameters and the consumption parameters of the training process to the aggregation server; Step 4: The aggregation server aggregates the local models uploaded by each participant and sends the aggregated global model to each participant; Step 5: The aggregation server calculates the contribution of each participant using the contribution evaluation method based on the resource consumption parameters, local models, and aggregated global model data uploaded by each participant, and records the relevant parameters and corresponding model contribution values ​​of each participant in this iteration in the aggregation server database; Repeat steps 2 to 5 above until the model converges or reaches a predefined number of iterations; The contribution evaluation method divides the total contribution of the participants into three parts: data contribution, calculation contribution and model contribution. Its calculation method is formally described as formula (1): Among them, Φ i Represents participant P i The final contribution of , T represents the number of global iteration rounds, Represents participant P i The data contribution during the tth round of iteration, Indicates P i The computational contribution during the tth iteration is, Indicates P i Model contribution during the tth iteration; The data contributions include: In the federated learning process, each participant uses local data to train the local model; assuming that the participant P i The size of the dataset used for local model training in the tth round of global iteration is The dataset is a picture of handwritten digits; Considering that the unit value of data of different types and qualities is also different, P i Contribution to the data in the tth round of global iteration Expressed as formula (7): Among them, l i P i The unit data value of The computational contributions include: During each round of iteration, participants consume their own device resources to perform local model training and parameter upload. The contribution of this process mainly includes the computing energy consumption of model training and the communication energy consumption of model upload. Therefore, the participant P i The computational contribution in the tth global iteration Expressed as formula (8): Among them, l e is the unit energy consumption value, and P i The computational and communication energy consumption used for local model training during the tth global iteration; The model contributions include: The model contribution of each participant is evaluated based on its Shapley value, as shown in formula (9): Among them, ω is the model contribution parameter.

2. The method for evaluating the contribution of participants in horizontal federated learning according to claim 1, wherein: A participant P i Shapley value SV i The calculation method is expressed as formula (4): Among them, ω is a constant, P represents the set of all participants, U(x) is the benefit function, the parameter x here is a machine learning model, and the value of U(x) represents the accuracy of model x on the test set, M S Represents a model formed by aggregating the local models of the participants in the set S.

3. The method for evaluating the contribution of participants in horizontal federated learning according to claim 1, wherein: The step 2 specifically includes: Assume that participant P i The size of the local training dataset used for federated learning is s i , the total dataset size of n participants is Federated learning minimizes the i The local loss function l i (M) is weighted averaged over its local dataset to optimize the global loss function l(M), which is expressed as formula (5): in Among them, f x (M) is the loss function of a sample x on the local dataset; each participant calculates the local gradient to minimize the local loss l i Update the local model in the direction of (M).

4. The method for evaluating the contribution of participants in horizontal federated learning according to claim 1, wherein: In step 4, the polymerization process is shown in formula (6): in, For participant P i The local model obtained in the tth round of training.

5. The method for evaluating the contribution of participants in horizontal federated learning according to claim 1, wherein: The evaluation process of the model contribution includes: After the aggregation server initializes and updates the global model and sends it to each participant, it begins to evaluate the model contribution of each participant; For participants who upload in timeout, their model contribution in this round is recorded as 0, that is, For the participants who have successfully uploaded the model parameters, the aggregation server first determines whether it has the participant Shapley value prediction model. If so, the prediction model is directly used to calculate the Shapley value of each participant; otherwise, the SV is calculated according to formula (4); the participant Shapley value prediction model is a machine learning model obtained by the aggregation server through machine learning model training based on the participant information it obtains; after the model training is completed, the aggregation server can use the model to directly predict the participant's Shapley value without using formula (4) to calculate the Shapley value.

6. The method for evaluating the contribution of participants in horizontal federated learning according to claim 5, wherein: The participant Shapley value prediction model is constructed in the following way: Starting from the t0th iteration, the aggregation server starts to train the SV prediction model and calculates the SV based on the prediction model. The SV prediction model uses a three-layer neural network model. The input of the model includes the number of local samples of the participants, the proportion of data volume, the accuracy of the local model, the predefined number of global iteration rounds and the accuracy of the global model. The output is the SV corresponding to the participant. After the prediction model training is completed, the aggregation server can use the model to predict the SV of each participant, and then calculate the participant's P based on the SV. i Model contribution under the current global iteration number t

Citation Information

Patent Citations

  • Method and device for determining contribution degree of participant

    CN110717671A

  • Data set contribution degree evaluation method, device, equipment and readable storage medium

    CN111652381A