A method, system, device, and medium for participant contribution assessment in federated learning

By evaluating the projection and angle relationship between the local model updates of participants and the convergence direction of the global model in federated learning, the problems of high computational complexity and test dataset requirements in existing technologies are solved, and efficient and fair contribution evaluation is achieved.

CN116776971BActive Publication Date: 2026-02-17XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310767210.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2026-02-17
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

Existing methods for evaluating participant contributions in federated learning suffer from high computational complexity, require test datasets, and do not meet the needs of real-world scenarios.

Method used

From the perspective of model update similarity, the contribution value is calculated by the projection size and angle relationship of the local model update of the participants on the convergence direction of the global model. This includes the contribution of the participants' data and model training, and forms a normalized result of the contribution percentage.

Benefits of technology

It achieves efficient contribution evaluation without requiring test datasets, reduces computational complexity, is applicable to both centralized and decentralized federated learning environments, and provides a fair incentive mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116776971B_ABST
    Figure CN116776971B_ABST
Patent Text Reader

Abstract

A method, system, device and medium for evaluating the contribution of participants in federated learning, the method evaluates the contribution of participant updates to the convergence of the global model from the perspective of model update similarity, uses the projection size and the included angle relationship of the local model update of the participant in the convergence direction of the global model to calculate the contribution value of a participant at a certain training round; the contribution is an evaluation of the uploaded model of the participant, including the data contribution and model training contribution of the participant, obtaining the contribution percentage normalization result of each participant in this federated learning, and forming a result vector evaluation result to provide a basis for constructing an incentive mechanism to ensure the fairness of federated learning; the system, device and medium based on the projection for evaluating the contribution of participants in federated learning, realize reasonable evaluation of the contribution of participants, and do not need test data set, have the advantages of simple and efficient evaluation, high precision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of network space security, and particularly relates to a method, system, device and medium for contribution evaluation of participants in federated learning. BACKGROUND

[0002] Federated learning is a distributed machine learning framework used to solve the data island problem caused by privacy security. It replaces the original data aggregation method with model aggregation to train machine learning models. In the actual application scenario of federated learning, different participants usually have different data distribution, data volume, data quality and other differences. These differences may cause the aggregated model to be biased. In order to better encourage high-quality participants to participate in federated learning, their contributions need to be reasonably evaluated. Through contribution evaluation, the characteristics and limitations of different participants can be better understood, providing a basis for optimizing federated learning models and coordinating cooperation between participants, and ensuring the fairness of federated learning.

[0003] Currently, federated learning mainly evaluates the contribution of participants through the Shapley value method, which considers the marginal contribution of participants to ensure the fairness of contribution. The marginal contribution refers to the incremental benefit generated by the contribution of a participant in a joint decision. In federated learning, model accuracy or loss value is often used as a measure of benefit, i.e., the benefit function, which requires the coordinator of federated learning to have a test data set, which often does not match the reality. Moreover, the time complexity of calculating marginal contribution reaches an exponential level, and as the number of participants grows, the computational complexity also grows exponentially with the number of participants. In [Jia, Ruoxi, et al. "Towards efficient data valuation based on the shapley value." The 22nd International Conference on Artificial Intelligence and Statistics. PMLR, 2019.], the Shapley value method is used to evaluate the value of data from each party, which analyzes that the calculation of the Shapley value method requires exponential time to complete, and proposes an effective method to approximate the Shapley value. The theoretical complexity of this method is low, but the actual approximation effect is poor. In [Fan, Zhenan, et al. "Improving fairness for data valuation in horizontal federated learning." 2022IEEE 38th International Conference on Data Engineering (ICDE). IEEE, 2022.], the Shapley value method is used to evaluate the contribution of participants in the horizontal federated learning scenario, and the test accuracy is used as the benefit function for evaluation. Participants are sampled, and low-rank matrix completion is used to reduce the computational cost. Although the computational complexity is reduced to O(n 2 logn), it still requires a test data set to calculate the accuracy, which often does not match the reality. SUMMARY

[0004] To overcome the shortcomings of the prior art, the purpose of the present application is to provide a method, system, device and medium for evaluating the contribution of participants in federated learning, which judges the contribution of participant updates to the convergence of the global model based on the similarity of model updates (parameters / gradient), and uses the projection size and angle relationship of participant local model updates in the convergence direction of the global model to calculate the contribution value of a participant in a certain training round. The contribution of participants can be reasonably evaluated efficiently without the need for a test data set, and the operation is simple and efficient.

[0005] To achieve the above object, the present application adopts the following technical solutions:

[0006] A method for evaluating the contribution of participants in federated learning, which evaluates the contribution of participant updates to the convergence of the global model from the perspective of model update (parameters / gradient) similarity, uses the projection size and angle relationship of the local model update of the participant in the convergence direction of the global model to calculate the contribution value of a participant at a certain training round; The contribution is an evaluation of the uploaded model of the participant, which includes the data contribution and model training contribution of the participant, obtains the contribution percentage normalization result of each participant in this federated learning, and forms a result vector.

[0007] A method for evaluating the contribution of participants in federated learning, specifically comprising the following steps:

[0008] S1. System initialization: the server negotiates with each participant the machine learning model structure adopted by the federated learning, the server aggregation rule and the related hyperparameters of model training, etc., to determine the initialized global model;

[0009] S2. Model training: first, the server issues the initialized global model; then, each participant receives the global model and trains on the global model using the local data set to obtain the local model update and upload it to the central server; then, the server receives the local model updates of each participant, aggregates each local model according to the aggregation rule to obtain a new global model; repeat the above steps until the global model converges or reaches the predefined training round;

[0010] S3. Contribution evaluation: the server uses the local model information uploaded by each participant and the global model information obtained by aggregation to calculate the local model update vector and the global model convergence direction, and evaluates the specific contribution of each participant in federated learning according to the projection and angle relationship between the local model update vector and the global model convergence direction.

[0011] The above method for evaluating the contribution of participants in federated learning is based on the following system assumptions:

[0012] 1) Participants are honest and trustworthy, and perform the model training process according to the negotiation in the system initialization, and submit the training results;

[0013] 2) The central server is honest and trustworthy, and performs model aggregation and issues the global model according to the aggregation rule in the system initialization; it evaluates the contribution of each participant in the open and transparent principle.

[0014] The specific method of step S3 is:

[0015] S301. Calculate the sensitivity of each layer in the model using the model compression method, and select the layers with high sensitivity to participate in the contribution evaluation according to the layer sensitivity ranking and contribution percentage;

[0016] S302. Assuming that the system conducts T rounds of federated learning, the participants u i The global model received at the tth round of federated learning is The generated local model is The global model aggregated in this round is The final global model is

[0017] The local model update vector of the participant u i is calculated by formula (2) The change vector between the current round model and the last round model is calculated by formula (3) The change vector between the global model in each round of federated learning and the final global model during the federated learning model training process is

[0018]

[0019]

[0020] The contribution calculation method of the participant is: according to the projection size of the local model update vector of the participant u i in the tth round of federated learning in the global model convergence direction and the included angle between the two vectors to measure the contribution of the participant u i in the tth round of federated learning, as shown in formula (6); formula (7) is used to calculate the contribution of the participant u i in the whole federated learning process:

[0021]

[0022]

[0023]

[0024]

[0025] Wherein, represents the included angle between the local model update vector and the global model convergence direction of the participant u i in the tth round of federated learning, and its calculation method is shown in formula (4); represents the projection size of the local model update vector in the global model convergence direction of the participant u i in the tth round of federated learning, as shown in formula (5).

[0026] The model update in step S302 can be either parameter update or gradient update.

[0027] The specific method for step S301 is as follows:

[0028] a) Grouping of model parameters

[0029] The model structure is grouped according to the order of the model structure, and the first layer in each group is selected as the representative layer. In the residual connection or dense connection neural network structure, the parameter changes between adjacent layers are similar. The parameters are evaluated in groups according to the order of the model structure, and the relative relationship between groups is calculated according to the representative of each group to reduce the time consumption of the layer selection part.

[0030] b) Layer sensitivity calculation

[0031] Define layer sensitivity: The convergence direction of the global model is represented by v. g ={v g,1 ,v g,2 ,…,v g,L}, here v g,k This represents the change vector of the k-th layer in the model structure, with a total of L layers of model parameters; in the t-th round, the global model convergence direction is represented as... The change in the k-th layer is denoted as:

[0032]

[0033] The parameter variation δ in each layer is called layer sensitivity, where p k It is the number of parameters in the k-th layer of the model structure. It is v g,k The value of the p-th element in the dataset;

[0034] Based on the above sensitivity definition, calculate the sensitivity of each group representative layer. Obtain the layer sensitivity dictionary

[0035]

[0036] Where, para k This represents the name of the parameter in the k-th layer. This represents the layer sensitivity of the k-th layer parameters, and group represents the number of members within the group of model parameter layers.

[0037] C) Selection of Assessment Level

[0038] Sort the sensitivity dictionary in descending order of value, and record the corresponding parameter names after sorting in descending order to obtain the sensitivity descending parameter list para_list. t =[para k| k = 1, 2,..., L / group], wherein para k represents the name of the kth parameter layer; the top percent of parameter layers in the descending list are selected to form the evaluation list selected_list t = [para k | k = 1, 2,..., L·percent / group] ;

[0039] d) Calculation of participant contribution value

[0040] Using the parameters in the evaluation list selected_list t , the participant's reconstructed local model update vector and the reconstructed global model convergence direction are generated, and the participant's contribution value u i in the tth round of federated learning is calculated according to formula (6)

[0041] After the last round of learning is completed, the total contribution φ i of each participant is calculated according to formula (7)

[0042] e) Result processing

[0043] Coarse-grained evaluation results: the total contribution values of each participant calculated in step d) are sorted to obtain the sorting vector contri_sort;

[0044] Fine-grained evaluation results: after the last round of learning is completed, the total contribution of each participant is normalized according to formula (9) to obtain the contribution value of each participant,

[0045]

[0046] obtain the contribution percentage normalization result φ i_norm of each participant in this federated learning, and form the result vector contri norm = {φ i_norm |i∈P}.

[0047] The above method for evaluating the contribution of participants in federated learning is based on the following system assumptions:

[0048] 1) The participants are honest and trustworthy, and perform model training according to the agreement in system initialization, and submit training results;

[0049] 2) The central server is honest and trustworthy, and performs model aggregation according to the aggregation rule in system initialization and issues the global model; and evaluates the contribution of each participant in accordance with the principles of openness and transparency.

[0050] A system of a method for evaluating the contribution of participants in federated learning, comprising:

[0051] A system initialization module for the server to negotiate with each participant in step S1 the machine learning model structure adopted by the federated learning, the server aggregation rule and the related hyperparameters of model training, etc., to determine the initialized global model;

[0052] A model training module for the federated learning training process described in step S2;

[0053] A contribution evaluation module for the server to evaluate the specific contribution of each participant in federated learning according to the projection and angle relationship between the local model update vector and the convergence direction of the global model in step S3.

[0054] An apparatus for a method for evaluating the contribution of participants in federated learning, comprising:

[0055] A memory for storing a computer program;

[0056] A processor for executing the computer program to implement the method for evaluating the contribution of participants in federated learning described in steps S1 to S3.

[0057] A computer-readable storage medium for storing a computer program, which can implement the method for evaluating the contribution of participants in federated learning described in steps S1 to S3 when executed by a processor.

[0058] Compared with the prior art, the present application has the following advantages:

[0059] 1. The present application proposes a projection-based evaluation scheme for the contribution of participants in federated learning, which uses the projection size of the local model update vector of the participant on the convergence direction of the global model and the angle between them as the basis to determine the contribution of the participant in the current training round, and considering the trend of large models as future development, an optimization scheme for contribution calculation is designed to reduce the time overhead.

[0060] 2. Compared with the scheme that needs to rely on a test data set for contribution evaluation, the present application does not need the server to have an additional test data set, and is more in line with the needs of real scenarios.

[0061] 3. The present application does not need a test data set and has very low computational complexity, which will not bring additional burden to federated learning.

[0062] 4. The present application can evaluate the contribution in units of each aggregation round, allows participants to join or exit the training process at any time, and can be applied to both centralized and decentralized federated learning environments.

[0063] In conclusion, the application has the advantages of simple evaluation, time saving, high efficiency and high precision. BRIEF DESCRIPTION OF DRAWINGS

[0064] Figure 1 is a federal learning system structure diagram.

[0065] Figure 2 is a contribution calculation scheme of a participant in federal learning.

[0066] Figure 3 is a time consumption comparison of the application and the shapley value scheme.

[0067] Figure 4 is the influence of the parameter layer proportion of the application on the evaluation result (L1 norm distance), wherein, Figure 4 (a) is the curve change condition when the node number n = 5, Figure 4 (b) is the curve change condition when the node number n = 10.

[0068] Figure 5 is the influence of the parameter layer proportion of the application on the evaluation result (PCC correlation), wherein, Figure 5 (a) is the curve change condition when the node number n = 5, Figure 5 (b) is the curve change condition when the node number n = 10. DETAILED DESCRIPTION

[0069] The application will be further described in detail below with reference to the drawings.

[0070] The theoretical and technical basis of the vector projection involved in the application is:

[0071] Vector projection is a basic operation in linear algebra and has applications in many fields. Assuming that there are two non-zero vectors u and v, the inner product of which is represented as u·v, the projection of vector u on vector v proj v u (also known as the component of vector u on vector v) can be calculated by formula (1).

[0072]

[0073] where |v| represents the modulus length (also known as the length or norm of the vector) of vector v, and the vector projection can be regarded as the process of decomposing vector u into the part parallel to vector v and the part perpendicular to vector v.

[0074] In the definition of vector projection, the numerator u·v represents the inner product between vectors u and v, represents the projection length of vector u on vector v, The unit vector in the direction of vector v is represented, and the projection of vector u on vector v can be obtained by calculating the product of the two, that is, the component of vector u in the direction of vector v. In addition, when the angle between vector u and vector v is 90°, the projection of vector u on vector v is zero, because at this time the two vectors are perpendicular and have no overlapping part.

[0075] The geometric meaning of vector projection is to decompose a vector into two parts parallel and perpendicular to another vector, and obtain the projection length in the direction of another vector. This geometric meaning is often used in calculation and modeling in the fields of physics, engineering and computer graphics. The model structure is a high-dimensional matrix, and each layer parameter is a dimension in the matrix, and each dimension is orthogonal to each other, so the model can be regarded as the resultant of the orthogonal decomposition of each component. Therefore, the contribution of each local update to the global model convergence can be quantified by projecting the local model update in the direction of the global model convergence.

[0076] The method for evaluating the contribution of participants in federated learning judges the contribution of participant updates to the convergence of the global model from the perspective of model update (parameter / gradient) similarity, calculates the contribution value of a participant at a certain training round by using the projection size and the included angle relationship of the participant's local model update in the direction of the global model convergence; the contribution is an evaluation of the participant's uploaded model, which includes the data contribution and model training contribution of the participant, obtains the contribution percentage normalization result of each participant in this federated learning, and forms a result vector; the evaluation result provides a basis for constructing an incentive mechanism to ensure the fairness of federated learning.

[0077] A method for evaluating the contribution of participants in federated learning, specifically comprising the following steps:

[0078] S1. System initialization: the server and each participant negotiate the machine learning model structure used in federated learning, the server aggregation rule and the related hyperparameters of model training, etc., to determine the initialized global model;

[0079] S2. Model training: first, the server issues the initialized global model; then, each participant receives the initialized global model and trains on the initialized global model using the local data set to obtain the local model update and upload it to the central server; then, the server receives the local model updates of each participant, aggregates the local models according to the aggregation rule to obtain a new global model; repeat the above steps until the global model converges or reaches the predefined training round;

[0080] S3. Contribution evaluation: the server calculates the local model update vector and the global model convergence direction using the local model information uploaded by each participant and the global model information aggregated, and evaluates the specific contribution of each participant in federated learning according to the projection and included angle relationship between the local model update vector and the global model convergence direction;

[0081] S301. The method of using model compression calculates the sensitivity of each layer in the model, and according to the layer sensitivity ranking and the contribution percentage, selects the layer with high sensitivity to participate in the contribution evaluation;

[0082] The specific method is:

[0083] a) Model parameter grouping

[0084] Group the model structure layers according to the model structure order, and select the first layer in each group as the representative layer; in the neural network structure with residual connection or dense connection, the parameter change between adjacent layers is similar, so the parameters are grouped and evaluated according to the model structure order, and the relative relationship between groups is calculated according to the group representatives to reduce the time consumption of the layer screening part;

[0085] b) Layer sensitivity calculation

[0086] Definition of layer sensitivity: the global model convergence direction is represented as v g ={v g,1 , v g,2 ,..., v g,L}, where v g,k represents the change vector of the kth layer in the model structure, and the model parameters have L layers; in the tth round, the global model convergence direction is represented as The change of the kth layer is recorded as:

[0087]

[0088] The parameter change amount δ of each layer is called layer sensitivity, where p k is the number of parameters of the kth layer in the model structure, is the value of the pth element in v g,k ;

[0089] According to the above sensitivity definition, the sensitivity of the representative layer of each group is calculated The layer sensitivity dictionary is obtained

[0090]

[0091] Where, para k represents the name of the kth layer parameter, represents the layer sensitivity of the kth layer parameter, and group represents the number of members in the model parameter layer group.

[0092] C) Evaluation of hierarchical selection

[0093] Sort the sensitivity dictionary in descending order of value, record the corresponding parameter name in descending order of value, and obtain the sensitivity descending parameter list para_list t = [para k | k = 1, 2,..., L / group], where para k represents the name of the kth parameter layer; select the top percent of parameter layers in the descending list to form the evaluation list selected_list t = [para k | k = 1, 2,..., L·percent / group];

[0094] d) Calculation of participant contribution value

[0095] Using the parameters in the evaluation list selected_list t , generate the participant's reconstructed local model update vector and the reconstructed global model convergence direction and calculate the participant's contribution u i in the tth round of federated learning according to formula (6)

[0096] After the last round of learning, calculate the total contribution φ i of each participant according to formula (7)

[0097] e) Result processing

[0098] Coarse-grained evaluation results: sort the total contribution values of each participant calculated in step d) to obtain the sorting vector contri_sort

[0099] Fine-grained evaluation results: after the last round of learning, normalize the total contribution of each participant to the contribution value of each participant according to formula (9)

[0100]

[0101] obtain the contribution percentage normalization result φ i_norm of each participant in this federated learning, and form the result vector contri norm = {φ i_norm |i ∈ P}.

[0102] S302. Assuming that the system conducts T rounds of federated learning, the participant u i receives the global model at the tth round of federated learning The resulting local model is The global model obtained from this round of aggregation is: The final global model is

[0103] Calculate the participant u using formula (2) i Local model update vector The update vector refers to the change vector between the current model and the previous model, and the convergence direction of the global model is calculated by formula (3). The convergence direction of the global model refers to the change vector between the global model in each round of training and the final global model during the federated learning model training process:

[0104]

[0105]

[0106] The method for calculating the contributions of participating parties is as follows: Figure 2 As shown, according to participant u i The magnitude of the projection of the local model update vector in round t onto the global model convergence direction and the angle between the two vectors are used to measure the participation of u. i The contribution generated in the t-th round of federated learning is shown in Equation (6); Equation (7) is used to calculate the contribution of the participants u. i Contributions made throughout the federated learning process:

[0107]

[0108]

[0109]

[0110]

[0111] in, Indicates the participation of party u i The angle between the local model update vector and the global model convergence direction in the t-th round of federated learning is calculated as shown in formula (4); Indicates the participation of party u i The projection of the local model update vector onto the global model convergence direction in the t-th round of federated learning is shown in Equation (5);

[0112] The model update can be performed using either parameter updates or gradient updates.

[0113] The method for evaluating participant contributions in federated learning is based on the following system assumptions:

[0114] 1) Participants are honest and credible, and perform model training process according to the agreement in system initialization, and submit training results;

[0115] 2) The central server is honest and credible, and performs model aggregation and issues global model according to the aggregation rule in system initialization; and evaluates the contribution of each participant in the light of the principle of openness and transparency.

[0116] A system of a method for evaluating the contribution of participants in federated learning, comprising:

[0117] A system initialization module for the server to negotiate with each participant the machine learning model structure adopted by federated learning, the server aggregation rule and the related hyperparameters of model training, etc. in step S1, to determine the initialized global model;

[0118] A model training module for the federated learning training process in step S2;

[0119] A contribution evaluation module for the server to evaluate the specific contribution of each participant in federated learning according to the projection and included angle relationship of the local model update vector and the convergence direction of the global model in step S3.

[0120] An apparatus for a method of evaluating the contribution of participants in federated learning, comprising:

[0121] A memory for storing a computer program;

[0122] A processor for executing the computer program to implement the method for evaluating the contribution of participants in federated learning in steps S1 to S3.

[0123] A computer readable storage medium for storing a computer program, which is executed by a processor to implement the method for evaluating the contribution of participants in federated learning in steps S1 to S3.

[0124] The following table is the symbols used in the present application and their meanings:

[0125]

[0126] The following sections verify the rationality, efficiency and performance improvement of the present application through simulation experiments. The experimental environment is shown in Table 1, and federated learning uses MNIST handwritten character set and CIFAR10 as data sets for training. The MNIST data set has 60000 training samples, and the test set has 10000 sample data. Each image of the data set is a 28x28 grayscale image. The CIFAR10 data set contains 10 classes of color images, each class contains 6000 images with a size of 32x32.

[0127] Table 1 experimental environment

[0128] Operating system Ubuntu 18.04 LTS CPU 2*Intel(R)4210R Memory 5*32G Graphics card (video memory) GTX 1650 (4G) Simulation environment Python 3.8.10, Pytorch 1.9.0

[0129] (1) The rationality of the evaluation scheme

[0130] By designing the data characteristics of different participants, the contribution evaluation is carried out by using the scheme, so as to verify the rationality of the contribution evaluation scheme proposed in the application.

[0131] Table 2 participant data characteristic mode

[0132]

[0133] Table 3 participant contribution evaluation results under different data distribution

[0134]

[0135]

[0136] Table 2 is the participant data characteristic mode considered in the experiment, and CIFAR10 data set is used for experiment for the five modes. Under the same experimental setting, the results of experiments for different modes are shown in Table 3, it can be seen that the scheme can reasonably evaluate the contribution of participants in federated learning. In Pattern 1, the data of the participants is in the state of independent and identically distributed, and the remaining training settings remain unchanged. The contribution distribution of each participant in federated learning is relatively balanced, and the evaluation result is consistent with the actual situation. In Pattern 2, each participant has different number of data samples, and the normalized result of participant contribution evaluation is positively correlated with the data amount. In Pattern 3 and Pattern 4, each participant has different number of data categories, and the more the number of data categories, the more the amount of data, so its contribution should be more than that of the one with less number of data categories. In Pattern 5, each participant has different categories of data, and the total amount of data is the same, but the contribution of the participant is not only judged by the amount of data. The training of the model for a certain category of data can achieve good learning effect when the amount of data reaches a certain limit, and the effect of the trained model is similar to the effect of the training that reaches the limit. The evaluation result is also in line with the expectation.

[0137] (2) The efficiency of the evaluation scheme

[0138] Under the settings of Table 4, simulation experiments are carried out for the CIFAR10 dataset and the MNIST dataset, different model structures are used for federated learning, and the direction projection method (proj) and the Shapley value method (sv) are used for contribution evaluation respectively, and the results are shown in Table 5. Under the same setting, the evaluation results of the two are not much different, the sorting vectors of the coarse-grained evaluation nodes are completely consistent, and the Hamming distance d is 0; the fine-grained contribution proportion results have a slight difference, but the L1 norm distance of the evaluation results is about 0.1, and the Pearson correlation coefficient calculation result can reach 0.99, which reflects that the application can achieve similar results to the Shapley value in the evaluation effect, and the time consumed is much less than the Shapley value scheme.

[0139] Table 4 High-efficiency experiment setting

[0140] Setting Dataset Number of nodes Network structure Setting1 MNIST 5 MLP Setting2 MNIST 5 CNN Setting3 CIFAR10 5 CNN Setting4 CIFAR10 5 Resnet18

[0141] Table 5 Evaluation result comparison

[0142]

[0143] Figure 3 Figure 1 is a time consumption comparison chart of the direction projection method and the Shapley value method for contribution evaluation in the process of federated learning simulation experiment on the CIFAR10 dataset. The experiment is set with 5 and 10 participants under the condition that the global iteration round is 6, and LeNet network and ResNet18 network are used for learning respectively. It can be seen that under the same setting, the calculation time of the Shapley value method for evaluating the contribution is much higher than that of the direction projection method. This is because the Shapley value method considers the marginal benefit of the participants, and needs to consider the marginal benefit brought by the participants to different alliances, so the calculation time of the contribution of a participant needs O(2 n ) time complexity. The direction projection scheme takes the model uploaded by the participant as the benchmark, calculates the update vector, determines the contribution of the participant according to the projection and angle relationship of the local model update vector in the global model convergence direction, and does not consider the marginal benefit. But in effect, the direction projection method can approximately achieve similar results to the Shapley value.

[0144] Figure 4 and Figure 5The ResNet series model is trained on the CIFAR10 dataset. For different numbers of participants, different proportions of parameter layers are used to evaluate their contributions. The L1 norm distance between the fine-grained evaluation results and the evaluation results of all parameter layers, and the Pearson correlation coefficient (PCC) correlation results are calculated. As the proportion of selected parameter layers decreases, the L1 norm distance of evaluation results gradually increases, and the PCC value decreases. The number of participants has little effect on the proportion of selected parameter layers. When the number of nodes is 5 and 10, the curves start to fluctuate sharply from a parameter layer proportion of 30% or less.

[0145] The optimal parameter proportion refers to the similarity between the evaluation results of the selected parameter layers in descending order of layer sensitivity and the evaluation results of all parameter layers in the Pearson correlation coefficient level of 0.999. Table 6 is the layer sensitivity calculation using two values of group in the grouping calculation combined with the proportion selection of the parameter layers to be evaluated, and compared with the baseline method of contribution evaluation using all layers. When the number of nodes is small, the sensitivity calculation of the two group values improves the efficiency of the contribution evaluation scheme by more than 60%, and the efficiency improvement of the grouping calculation (group = 3) is 10% higher than the layer-by-layer calculation (group = 1). When the number of nodes is large, the layer-by-layer calculation using group = 1 is more accurate, and the efficiency improvement is also more than 55% (\ refers to the evaluation results under the corresponding setting cannot meet the requirements of the optimal parameter proportion).

[0146] Table 6 ResNet101 using grouping method to select parameter to be evaluated

[0147]

Claims

1. A method for participant contribution evaluation in federated learning, characterized in that, The federal learning adopts MNIST handwritten character set and CIFAR10 as data sets for training; the contribution of the participant update to the convergence of the global model is judged from the perspective of model update similarity, and the projection size and the included angle relationship of the local model update of the participant in the convergence direction of the global model are used to calculate the contribution value of the participant at a certain training round; The contribution is an evaluation of the model uploaded by the participant, which includes the data contribution and model training contribution of the participant, obtains the contribution percentage normalization result of each participant in this federal learning, and forms a result vector; specifically comprising the following steps: S1. System initialization: the server negotiates with each participant the machine learning model structure adopted by the federal learning, the server aggregation rule and the related hyperparameters of model training, and determines the initialized global model; S2. Model training: first, the server issues the initialized global model; then, each participant receives the global model and trains on the global model using the local data set to obtain the local model update and upload it to the central server; then, the server receives the local model updates of each participant, aggregates the local models according to the aggregation rule to obtain a new global model; repeat the above steps until the global model converges or reaches the predefined training round; S3. Contribution evaluation: the server uses the local model information uploaded by each participant and the global model information obtained by aggregation to calculate the local model update vector and the global model convergence direction, and evaluates the specific contribution of each participant in the federal learning according to the projection and included angle relationship of the local model update vector and the global model convergence direction, and the specific method is: S301. Use the model compression method to calculate the sensitivity of each layer in the model, select the layers with high sensitivity according to the layer sensitivity ranking and contribution percentage for contribution evaluation; the specific method is: a) Model parameter grouping Group the model structure layers according to the model structure order, and select the first layer in each group as the representative layer; in the residual connection or dense connection neural network structure, the parameter change between adjacent layers is similar, so the parameters are grouped and evaluated according to the model structure order, and the relative relationship between groups is calculated according to the group representative to reduce the time consumption of the layer selection part; b) Layer sensitivity calculation Definition of layer sensitivity: the global model convergence direction is represented as , where represents the change vector of the th layer in the model structure, and the model parameters are common across layers; in the th round, the global model convergence direction is represented as ; the change of the th layer is recorded as: the amount of parameter variation of each layer , called layer sensitivity, where is the number of parameters of the layer in the model structure, is the value of the th element in the th layer According to the sensitivity definition above, the sensitivity of each group representative layer is calculated , resulting in a layer sensitivity dictionary wherein, represents the name of the layer parameter, represents the layer sensitivity of the layer parameter, represents the number of members within a group of model parameter layers; C) Evaluation layer selection Sort the sensitivity dictionary in descending order of value, record the corresponding parameter name in descending order of value, and obtain a sensitivity descending parameter list , wherein represents the name of the th parameter layer; the first parameter layers in the descending list are selected to form an evaluation list ; d) Participant contribution value calculation Use the list to be evaluated The parameters in the code generate the local model update vectors for the participating parties. and reconstructing the convergence direction of the global model And calculate the participants according to formula (6). In the Contributions in rounds of federated learning ; After the last round of learning, the total contribution of each participant is calculated according to formula (7) ; e) Result processing Coarse-grained evaluation result: The contribution ranking is performed according to the total contribution values of the participants calculated in step d), resulting in a ranking vector ; Fine-grained evaluation results: After the end of the last round of learning, the total contribution of each participant is normalized according to formula (9) to obtain the contribution value of each participant, obtain the contribution percentage normalization result of each participant in the federated learning and form a result vector ; S302. Assuming that the system jointly conducts T federated learning, the participants In the first round of federated learning, the global model received is , the generated local model is , the global model obtained by aggregation in this round is , and the final global model is ; The local model update vector of the participant is calculated by formula (2) The change vector between the current round model and the last round global model is calculated by formula (3) The change vector between the global model of each round in the federated learning model training process and the final global model is calculated by formula (4) ​ Contribution of a computing participant: According to the participant The projection size of the local model update vector of the participant in the global model convergence direction and the included angle between the two vectors are used to measure the contribution of the participant The contribution generated in the first The contribution generated in the first The contribution generated in the first The contribution generated in the whole federated learning process: wherein, represents a participant In the first The angle between the local model update vector and the global model convergence direction in the kth round of federated learning, and its calculation method is shown in formula (4); represents a participant In the first The projection size of the local model update vector in the global model convergence direction in the kth round of federated learning, as shown in formula (5).

2. The method for evaluating the contribution of participants in federated learning according to claim 1, characterized in that, The model update adopts parameter update or gradient update.

3. The method for evaluating the contribution of participants in federated learning according to claim 1, characterized in that, The method for evaluating the contribution of participants in federal learning is based on the following system assumptions: 1) The participants are honest and trustworthy, and perform the model training process according to the negotiation in the system initialization, and submit the training results; 2) The central server is honest and trustworthy, and performs model aggregation and global model distribution according to the aggregation rule in the system initialization; and evaluates the contribution of each participant in an open and transparent manner.

4. A system for the method of assessing the contribution of a participant in federated learning according to any one of claims 1 to 3, characterized in that, It includes: A system initialization module for the server to negotiate with each participant the machine learning model structure adopted by the federal learning, the server aggregation rule and the related hyperparameters of model training, and to determine the initialized global model; A model training module for the federal learning training process described in step S2; The contribution evaluation module is configured to evaluate the specific contribution of each participant in the federated learning according to the projection of the local model update vector and the global model convergence direction and the included angle relationship.

5. A device for assessing the contribution of a participant in federated learning based on the method of any one of claims 1 to 3, characterized in that, The computer program is stored in the memory and comprises computer program code. The processor is configured to implement the method for evaluating the contribution of the participant in the federated learning according to any one of claims 1 to 3 when the computer program is executed. The computer program is stored in the memory and comprises computer program code.

6. A computer-readable storage medium storing a computer program, the computer-readable storage medium being characterized by, The processor is configured to implement the method for evaluating the contribution of the participant in the federated learning according to any one of claims 1 to 3 when the computer program is executed.

Citation Information

Patent Citations

  • Training system and training method based on medical federal party

    CN115547437A

  • Method for evaluating contribution degree of participant in horizontal federated learning

    CN116187474A