Federal learning excitation method and system for balancing local and global contributions

By sending a global model to the nodes in federated learning for local training, and calculating the comprehensive incentive value based on the model accuracy, the problem of node exiting learning is solved, the benefits of excellent nodes are improved and the federated learning environment is optimized.

CN119990362APending Publication Date: 2025-05-13PEKING UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411989397.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In federated learning, nodes may withdraw from learning due to poor data quality and lack of incentive mechanisms, resulting in the damage to the interests of excellent nodes and the phenomenon of bad money driving out good money.

Method used

By sending global models to all nodes for local training, the verification data set is used to calculate the accuracy of the global and local models, the comprehensive stimulus value of each node is calculated based on these accuracy rates, and rewards are issued based on the stimulus value.

Benefits of technology

It improves the benefits of excellent nodes, reduces the squeezing of excellent nodes by bad nodes, and optimizes the federated learning environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990362A_ABST
    Figure CN119990362A_ABST
Patent Text Reader

Abstract

The invention discloses a federated learning excitation method and system for balancing local and global contributions, and belongs to the technical field of federated learning. The method comprises the steps that a global model Gt-1 is sent to all nodes, so that all the nodes conduct training of the global model Gt-1 on local training data, a local model # imgabs0 # is obtained, t is the training round of federal learning, and i is a node serial number; aggregating the local model # imgabs1 # to generate a global model Gt; and verifying the global model Gt and the local model # imgabs2 # by using a verification data set to obtain the accuracy gt of the global model Gt and the accuracy # imgabs4 # of the local model # imgabs3 #, calculating a comprehensive excitation value # imgabs6 # obtained by each node in the tth round of federated learning based on the accuracy gt and the accuracy # imgabs5 #, and issuing awards to the node according to the comprehensive excitation value # imgabs7 #. According to the method, the benefits of excellent nodes can be improved, extrusion of bad nodes on the excellent nodes is reduced, and optimization of a federal learning environment is well facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of federated learning technology, and in particular to a federated learning incentive method and system that balances local and global contributions. Background Art

[0002] In federated learning, nodes need to perform local training to generate local models. If there is no corresponding incentive mechanism, nodes will exit federated learning because their income cannot cover their expenses. However, the quality of data held by different nodes is different. Incentive mechanisms that do not consider the benefits of local training will also cause the interests of excellent nodes to be damaged, leading to the phenomenon of bad money driving out good money. Summary of the invention

[0003] In view of the above-mentioned deficiencies of the existing technology, a federated learning incentive method and system that balances local and global contributions is provided, which can increase the benefits of excellent nodes and reduce the squeeze of bad nodes on excellent nodes, and is of great help to optimize the federated learning environment.

[0004] To achieve the above objectives, the technical solution of the present invention includes the following contents.

[0005] A federated learning incentive method for balancing local and global contributions is applied to a server, the method comprising:

[0006] Send the global model G to all nodes t-1 , so that each node performs the global model G on the local training data t-1 Training to get the local model Where t is the training round of federated learning, and i is the node number;

[0007] Aggregate the local model Generate a global model G t ;

[0008] Use the validation dataset to test the global model G t and local models Verify and get the global model G t The accuracy of g t and local models The accuracy

[0009] Based on the accuracy g t And the accuracy Calculate the comprehensive incentive value obtained by each node in the tth round of federated learning And according to the comprehensive incentive value A reward is issued to the node.

[0010] Further, based on the accuracy g tAnd the accuracy Calculate the comprehensive incentive value obtained by each node in the tth round of federated learning include:

[0011] Based on the accuracy g t And the accuracy Calculate the global excitation value y t and the local incentive value of each node

[0012] Get the historical best accuracy of the global model And the historical best accuracy The corresponding global incentive value

[0013] Based on the accuracy g t , global incentive value y t , local incentive value Historical best accuracy And the global incentive value Calculate the global excitation coefficient of each node separately and the local incentive coefficient

[0014] Based on local incentive value Local incentive factor Global incentive value And the global excitation coefficient Get the comprehensive incentive value obtained by the node in the tth round of federated learning

[0015] Furthermore, the local excitation coefficient Where h(·) is a piecewise function.

[0016] Furthermore, the global excitation coefficient Where h(·) is a piecewise function.

[0017] A federated learning incentive system that balances local and global contributions, the system comprising:

[0018] Federated learning module, used to send the global model G to all nodes t-1 , so that each node performs the global model G on the local training data t-1 Training to get the local model Where t is the training round of federated learning, i is the node number; aggregate the local model Generate a global model G t ;

[0019] The incentive calculation module is used to use the validation data set to evaluate the global model Gt and local models Verify and get the global model G t The accuracy of g t and local models The accuracy Based on the accuracy g t And the accuracy Calculate the comprehensive incentive value obtained by each node in the tth round of federated learning And according to the comprehensive incentive value A reward is issued to the node.

[0020] An electronic device, characterized in that the electronic device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements any of the above-mentioned federated learning incentive methods for balancing local and global contributions.

[0021] A computer-readable storage medium, characterized in that computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are executed by a processor, the federated learning incentive method for balancing local and global contributions described in any of the above items is implemented.

[0022] Compared with the existing technology, the present invention takes into account both the local benefits and the global benefits of the local model, and calculates the incentive value for each node based on the historical performance of the global model. It can increase the benefits of excellent nodes and reduce the squeeze of bad nodes on excellent nodes, which is of great help in optimizing the federated learning environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 Flowchart of the federated learning incentive approach that balances local and global contributions. DETAILED DESCRIPTION

[0024] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0025] In federated learning, nodes need to perform local training to generate local models. If there is no corresponding incentive mechanism, the nodes will exit federated learning because the income is not enough to cover the expenses. However, the quality of data held by different nodes is not the same. The incentive mechanism that does not consider the benefits of local training will also cause the interests of excellent nodes to be damaged, resulting in the phenomenon of bad money driving out good money. The present invention takes into account both the local benefits and the global benefits of the local model, and calculates the incentive value for each node based on the historical performance of the global model. It can increase the benefits of excellent nodes and reduce the squeeze of bad nodes on excellent nodes, which is very helpful for optimizing the federated learning environment.

[0026] like Figure 1 The federated learning incentive method for balancing local and global contributions of the present invention includes the following steps 1 to 9.

[0027] Step 1: Identify the two roles of federated learning, the server and the node. The server must have a validation dataset and a global model, while the node provides training data and corresponding computing power.

[0028] Step 2: The server sends the global model to all nodes. The nodes use their own training data to perform local training based on the global model to obtain local models.

[0029] Step 3: The server collects local models and calculates a new global model by averaging.

[0030] Step 4: The server uses the verification data set to verify all received local models and the newly generated global model to obtain the accuracy g of the global model in the current round. t And the accuracy of all local models

[0031] Step 5: Input the obtained accuracy value into the mapping formula between accuracy and incentive:

[0032]

[0033] Among them, γ is a custom coefficient, x is the input accuracy, and y is the incentive value corresponding to the accuracy x. At this time, the global incentive can be obtained as y t =-γ·ln -1 g t , the local incentives are: This mapping formula meets the resource requirements of model training: when the model effect is at a higher level, more training resources are needed to improve the same effect, and the model effect cannot reach 100%. In this mapping formula, the larger the x value, the closer the y value is to infinity, reflecting that when the model effect is at a higher level, it deserves higher incentives.

[0034] Step 6: Calculate the local excitation coefficient for each node. For node i, its local excitation coefficient is:

[0035]

[0036] in, represents the optimal historical effect of the global model, express The corresponding excitation value, h(·), is a piecewise function, specifically:

[0037]

[0038] That is, the best performance in history Current global model effect g t And local model effect Together they determine the coefficient of local incentives.

[0039] The greater the local model effect value, the higher the local incentive coefficient, and the greater the proportion of local incentives in the comprehensive incentives; however, if the local model effect is not higher than the historical optimal effect of the global model, the local coefficient is 0, and the node will not be able to obtain incentives based on the local model effect. This property can effectively stimulate nodes to conduct high-quality local training and promote better results in federated learning.

[0040] Step 7: Calculate the global excitation coefficient for each node. The global excitation is determined by the effect of the global model. According to the aggregation process of the global model, the weights of the local models are the same, so the global excitation values ​​of each node are consistent. Therefore, the global excitation coefficient of each node is:

[0041]

[0042] When the global model effect is higher than the optimal historical value, the global incentive coefficient is greater than 0; otherwise, the global incentive coefficient is 0. This global incentive coefficient can ensure that the node's benefits are higher when the new global model effect is higher than the historical optimal effect of the global model and the local model effect is not higher than the historical optimal effect of the global model, which has a stimulating effect on the node's enthusiasm.

[0043] Step 8: Calculate the comprehensive incentive value for each node based on the local incentive coefficient, local incentive value, global incentive coefficient, and the highest global incentive value in history. The main process is as follows:

[0044]

[0045] Among them, the calculation formula of the comprehensive incentive will make Four situations occur:

[0046] 1) When and hour, The incentives received by the node consist of global incentives and local incentives, which are higher than the incentive value corresponding to the best historical performance of the global model;

[0047] 2) When and hour, The node only receives global incentives, which are equal to the incentive value corresponding to the best historical performance of the global model;

[0048] 3) When and hour, The node only receives local incentives, but they are also higher than the incentive value corresponding to the best historical performance of the global model;

[0049] 4) When and hour, Nodes cannot earn any benefits.

[0050] These four situations achieve a balance between incentive distribution and federated learning effects

[0051] Step 9: If the number of trainings or the global model effect has reached the training requirements, end the federated learning; otherwise, jump to step 2.

[0052] In summary, the incentive mechanism of the present invention introduces more comprehensive incentive value parameters including four parameters (local incentive coefficient, local incentive value, global incentive coefficient, and historical highest global incentive value) to comprehensively describe the overall incentive value of the node. In this way, by traversing the four possibilities of global incentives and local incentives, and calculating the incentive value for each node based on the historical performance of the global model, it is possible to increase the benefits of excellent nodes and reduce the squeeze of excellent nodes by bad nodes, which is very helpful for optimizing the federated learning environment.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.

Claims

1. A federated learning incentive method that balances local and global contributions, characterized in that: Applied to a server, the method comprises: Send the global model G to all nodes t-1 , so that each node performs the global model G on the local training data t-1 Training to get the local model Where t is the training round of federated learning, and i is the node number; Aggregate the local model Generate a global model G t ; Use the validation dataset to test the global model G t and local models Verify and get the global model G t The accuracy of g t and local models The accuracy Based on the accuracy g t And the accuracy Calculate the comprehensive incentive value obtained by each node in the tth round of federated learning And according to the comprehensive incentive value A reward is issued to the node.

2. The method according to claim 1, characterized in that Based on the accuracy g t And the accuracy Calculate the comprehensive incentive value obtained by each node in the tth round of federated learning include: Based on the accuracy g t And the accuracy Calculate the global excitation value y t and the local incentive value of each node Get the historical best accuracy of the global model And the historical best accuracy The corresponding global incentive value Based on the accuracy g t , global incentive value y t , local incentive value Historical best accuracy And the global incentive value Calculate the global excitation coefficient of each node separately and the local incentive coefficient Based on local incentive value Local incentive factor Global incentive value And the global excitation coefficient Get the comprehensive incentive value obtained by the node in the tth round of federated learning 3. The method according to claim 2, characterized in that The local excitation coefficient Where h(·) is a piecewise function.

4. The method according to claim 2, characterized in that: The global excitation coefficient Where h(·) is a piecewise function.

5. A federated learning incentive system that balances local and global contributions, characterized in that: The system comprises: Federated learning module, used to send the global model G to all nodes t-1 , so that each node performs the global model G on the local training data t-1 Training to get the local model Where t is the training round of federated learning, i is the node number; aggregate the local model Generate a global model G t ; The incentive calculation module is used to use the validation data set to evaluate the global model G t and local models Verify and get the global model G t The accuracy of g t and local models The accuracy Based on the accuracy g t And the accuracy Calculate the comprehensive incentive value obtained by each node in the tth round of federated learning And according to the comprehensive incentive value A reward is issued to the node.

6. An electronic device, characterized in that: The electronic device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the federated learning incentive method for balancing local and global contributions as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the federated learning incentive method for balancing local and global contributions as described in any one of claims 1 to 4.