A contribution-aware based clustering federated learning method

By employing a contribution-aware clustering federated learning method, client contributions are evaluated and low contributors are penalized, thus optimizing the computational efficiency and model accuracy of federated learning and addressing the issues of system fairness and stability under high data security requirements.

CN116796204BActive Publication Date: 2026-03-20HANGZHOU DIANZI UNIVERSITY SHANGYU INSTITUTE OF SCIENCE & ENGINEERING CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In federated learning, how to efficiently evaluate participant contributions under high data security requirements, design incentive mechanisms to ensure system fairness and stability, and especially improve model performance under non-independent and identically distributed and low-quality data conditions are key questions.

Method used

We design a contribution-aware clustering federated learning method that evaluates contributions based on parameters uploaded by clients, optimizes computational complexity using approximate Shapley values ​​and client-level clustering algorithms, penalizes low-contribution clients, and incentivizes high-quality clients to participate.

Benefits of technology

This approach enables efficient evaluation of client contributions without compromising data security, optimizes model accuracy, incentivizes high-quality client participation, and improves the fairness and stability of the federated learning system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116796204B_ABST
    Figure CN116796204B_ABST
Patent Text Reader

Abstract

The application discloses a clustering federated learning method based on contribution awareness, which comprises the following steps: step 1, parameter server initialization; step 2, client updates the parameters of the local model; step 3, the client trains n rounds on the local data set according to the updated parameters, and the local gradient is uploaded to the parameter server; step 4, judge whether contribution evaluation is needed, if the contribution evaluation is needed, step 5 is entered, otherwise step 6 is entered; step 5, the server calculates the approximate shapley value of the parameters uploaded by the client, and takes the shapley value as the quantitative index of the contribution of each client; step 6, the server judges whether the federated system is completed training, if the training is completed, step 7 outputs the final prediction model; step 7, the federated training is completed, and the final prediction model is output. The method can perform contribution evaluation and collaborative training without violating the federated learning data security paradigm, improve the accuracy of the federated system and encourage high-quality clients.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of federated learning, and specifically to a contribution-aware clustering federated learning method, particularly a contribution evaluation method that highly protects data privacy. Background Technology

[0002] With the rapid development of artificial intelligence and its application in many fields, prioritizing data security and privacy has become a global trend, as exemplified by the EU's General Data Protection Regulation (GDPR). Different organizations, driven by self-interest and privacy concerns, are unwilling to contribute data, resulting in numerous data silos of varying sizes.

[0003] Federated learning offers an effective solution that breaks down traditional data silos. It collaboratively trains a final global model while adhering to privacy-preserving standards. As a special distributed machine learning framework, federated learning is not fundamentally different from centralized learning in terms of model training and inference methods, but it differs in its assumptions and requirements regarding dataset ownership and privacy. Its characteristic is that training data can be collaboratively trained without leaving the local machine. However, federated learning also faces significant challenges. When the participants' training data is non-independent and identically distributed (Non-IID) or low-quality data, the performance of the global model is greatly reduced.

[0004] Currently, federated learning primarily addresses these challenges through personalized federation. However, personalized federation optimizes the client or system and cannot fundamentally solve the problems caused by data heterogeneity. The performance of federated learning depends on the availability of high-quality data sources. How to incentivize participants with high-quality data to join the training process has become a crucial issue. However, due to the privacy requirements of local data in federated learning, it is impossible to directly access any of the participants' source data, which is a significant obstacle to implementing subsequent incentive mechanisms. Shapley's value is a widely used solution in cooperative game theory to measure the contribution of each participant to the overall cooperation. However, Shapley's value itself has exponential computational costs, which become unbearable as the number of participants increases. Therefore, an evaluation method that can efficiently assess the quality of participant data while ensuring data security is of significant research importance. Summary of the Invention

[0005] The purpose of this invention is to address how to efficiently evaluate the contributions of multiple participants in a federated system under high data security requirements, design incentive mechanisms to ensure the fairness and stability of the federated system, and proposes a contribution-aware clustering federated learning method.

[0006] The application takes enterprises and organizations (clients) as participants of federated learning on the basis of Shapley value, evaluates the contribution of the clients according to the parameters uploaded by the clients under the condition of ensuring the safety of the data of the clients, and designs an incentive mechanism to ensure the fairness of the federated system.

[0007] The application provides a clustering federated learning method based on contribution awareness, which comprises the following steps:

[0008] Step 1. The parameter server initializes the weight of the global model.

[0009] Step 2. The server distributes the parameters to each client, and the client updates the parameters of the local model. If the contribution evaluation is performed in the current communication round, the clients with different contribution levels are distinguished through the contribution evaluation.

[0010] Step 3. The client trains n rounds on the local data set according to the updated parameters, and uploads the local gradient to the parameter server.

[0011] Step 4. After the parameter server receives the parameters uploaded by the client after completing the training, it determines whether the contribution evaluation is needed according to the loss function change rate. If the contribution evaluation is needed, step 5 is entered, otherwise step 6 is entered.

[0012] Step 5. The server calculates the approximate Shapley value of the parameters uploaded by the client, and takes the Shapley value as the quantitative index of the contribution of each client.

[0013] Step 6. The server determines whether the federated system is completed according to the communication round. If the training is completed, step 7 is entered to output the final prediction model. If the training is not completed, the server aggregates the parameters of the clients using the FedAvg algorithm to obtain an updated global model.

[0014] Step 7. The federated training is completed, and the final prediction model is output.

[0015] Further, the method aims to minimize the global loss function So that the model performance of each client reaches the extreme value.

[0016] Further, the method optimizes the calculation process of the Shapley value, does not change the ideal properties of the specification, optimizes the original exponential calculation complexity to linear, and provides a quantifiable calculation method for the contribution of participants.

[0017] Further, the method designs an incentive mechanism to effectively eliminate the clients that have a negative effect on the federated system, and gives more compensation to high-quality clients in a hierarchical manner.

[0018] The application has the following advantages:

[0019] Effect 1: A clustering federated learning method based on contribution awareness (CA-CFL) is proposed.

[0020] Effect 2: The calculation efficiency of the Shapley value is optimized without violating the security paradigm of federated learning, and the contribution of the client to the overall federated system is quantitatively evaluated.

[0021] Effect 3: CA-CFL punishes low-contribution clients to exit, reduces their negative impact, and improves the accuracy of the model.

[0022] Effect 4: The clustering method is used at the client level of federated learning, ensuring the training benefits of high-quality clients and encouraging clients to provide better data. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 The system architecture diagram of the clustering federated learning method based on contribution awareness proposed by the present application.

[0024] Figure 2 is a schematic diagram of federated client cosine similarity clustering.

[0025] Figure 3 is a training flowchart of the CA-CFL method. DETAILED DESCRIPTION

[0026] The following examples are combined with Figure 1 , Figure 1 The system architecture of the clustering federated learning method based on contribution awareness proposed by the present application. We can evaluate it on public image datasets (EMNIST, FashionMNIST, Cifar-10) and select a suitable model as the initialized model. Taking the Cifar-10 dataset as an example, the VGG network is used as the global model, and the network is divided into two parts: one part is mainly composed of convolutional layers and pooling layers, and the second part is composed of fully connected layers. The specific model is composed of five VGG blocks and three fully connected layers, and the model structure of the client and the server is the same.

[0027] The contribution evaluation of CA-CFL is as follows:

[0028]

[0029] The present application is further described below, supplemented by examples. The examples of the present application minimize the loss function through the above-mentioned scheme, and its expression is: In this example, there are different data quality clients, specifically three categories: 1, Non-IID: the sample label distribution is different from that of other clients, and the random method used by the method is generated in the form of Dirichlet distribution; 2, label pollution: the client contains a certain proportion of error data labels; 3, uniform distribution: the distribution of each label of the client is relatively uniform. The three types of clients with different data quality simulate low-quality clients, clients poisoned by malicious attacks, and high-quality clients.

[0030] The specific implementation steps are as follows:

[0031] Step 1. In the initialization phase, the method is applied, the parameter server initializes the weight of the global model, and distributes the model to the client. In addition, the server enables a validation dataset to provide a standard for contribution evaluation.

[0032] It should be noted that the global model and local model mentioned in this embodiment are the models initialized by the parameter server for federated learning.

[0033] Step 2. After each client receives the latest parameters from the server, the client local model is updated, and the model is trained on the local data set in parallel. If the contribution evaluation is performed in the current communication round, the relative change rate of the loss function can be used to determine whether to perform client-level clustering adjustment. If the change rate is less than the threshold, then the clients with different contribution levels are distinguished; otherwise, no client arrangement is performed. The relative change rate of the loss function is as follows:

[0034]

[0035] wherein, represents the loss function calculated by the model in the current communication round on the validation set, and ξ represents the relative change rate of the loss function. When ξ is less than a certain threshold, the client clustering algorithm is performed. The contribution evaluation corresponds to the specific pseudocode implementation steps as follows:

[0036]

[0037]

[0038] The formula for calculating the cosine distance is as follows:

[0039]

[0040] Step 3. The client trains one or more rounds on the local data set according to the received update parameters, and uploads the local gradient update as parameters to the parameter server.

[0041] The training process is as follows:

[0042]

[0043]

[0044] where θ t-1 parameters updated in the last communication round, is the client C i gradient update in the t-th round.

[0045] Step 4. After receiving the uploaded parameters, the server determines whether contribution evaluation is needed according to the relative change rate of the loss function. If the relative change rate of the loss function is greater than a set threshold, step 5 is entered to perform contribution evaluation, otherwise step 6 is entered.

[0046] Step 5. The server calculates the approximate Shapley value of the parameters uploaded by the client, and the calculation formula of the approximate Shapley value is as follows:

[0047]

[0048] The server uses the Shapley value to measure the contribution of each client {φ1,…,φ i ,…,φ n}, and performs client-level orchestration on this basis. The present application designs a punishment exit mechanism to ensure the performance of the global model. In each communication round t = {1, 2,…, τ}, we set a counter φ i,low to count the number of times the contribution value φ i of the client C i is lower than the contribution threshold ε1. When the contribution value φ i,low of the client i is greater than the punishment threshold ε2, the server punishes the client to exit. For clients with different contribution levels, the client cosine clustering algorithm in step 2 is executed.

[0049] Step 6. The server determines whether the federated system has completed training. If the training is completed, the prediction model is output; if the training is not completed, the server aggregates the client parameters using the FedAvg algorithm to obtain an updated global model.

[0050]

[0051] Step 7. Steps 2-6 are an iteration cycle, and the number of iteration cycles is the communication round set by the federated learning, which includes the client contribution evaluation period of steps 2-5.

[0052] The effectiveness of the evaluation method of the present example is mainly measured from the classification accuracy of the model and the contribution evaluation time, and the calculation formula is as follows.

[0053]

[0054] Wherein, TP = true positive, TN = true negative, FP = false positive, FN = false negative.

[0055]

[0056] The above is the implementation process of the present application. Any changes made in accordance with the present application technology, as long as the resulting functional effects do not exceed the scope of the present application technical solution, are within the scope of protection of the present application.

Claims

1. A contribution-aware clustering federated learning method, characterized in that, The method includes the following steps: Step 1. The parameter server initializes the weights of the global model; Step 2. The server distributes parameters to each client, and the client updates the parameters of its local model. If contribution evaluation has been performed in the current communication round, the client with different contribution levels is distinguished through the contribution evaluation. Step 3. The client trains on the local dataset for n rounds based on the updated parameters and uploads the local gradients to the parameter server; Step 4. After receiving the parameters uploaded by the client after training, the parameter server determines whether contribution evaluation is required. If contribution evaluation is required, proceed to Step 5 to perform client contribution evaluation; otherwise, proceed to Step 6. Step 5. The server calculates an approximate Shapley value for the parameters uploaded by the client and uses the Shapley value as a quantitative indicator of each client's contribution; Step 6. The server determines whether training is complete based on whether the number of communication rounds has reached the iteration count. If training is complete, proceed to Step 7 to output the final prediction model; if training is not complete, the server uses the FedAvg algorithm to aggregate client parameters and obtain an updated global model. Step 7. Federated training ends, output the final prediction model; The contribution evaluation methods in steps 2 and 4 are as follows: Clustering adjustments are performed based on the client contribution level according to the relative rate of change of the loss function, as shown below: ; in, This represents the loss function calculated by the model on the validation set for the current communication round. Represents the relative rate of change of the loss function, when If the value is below a certain threshold, then the client-side cosine clustering algorithm is used.

2. The contribution-aware clustering federated learning method according to claim 1, characterized in that, The server distributes the parameters of the global model within its cluster to the client, while the client uploads the gradients to the server.

3. The contribution-aware clustering federated learning method according to claim 2, characterized in that, The client-side cosine clustering algorithm expression is as follows: ; in, For the client Gradient update in round t.

4. The contribution-aware clustering federated learning method according to claim 1, characterized in that, In step 3, the training method is as follows: ; ; in, The parameters updated in the previous communication round It is a client In the Gradient update of the round, This is the learning rate.

5. The contribution-aware clustering federated learning method according to claim 1, characterized in that, Steps 2-6 constitute the federated training iteration cycle, with the number of iteration cycles being the number of communication rounds set by the federated learning, including the client contribution evaluation cycle in steps 2-5.

Citation Information

Patent Citations

  • Efficient contribution evaluation method in federated learning scene

    CN112506753A

  • Federal learning method and system based on client weight evaluation

    CN114564746A