A Real-time Contribution Measurement Method for Participants in Federated Learning

Federated learning is a framework for protecting distributed data privacy and has participated in commercial activities . However , there is a lack of a sufficiently reasonable contribution measurement mechanism to distribute the reward for each agent . In the commercial union , if there is no mechanism like this , every agent will get the same reward . This is unfair to agents that provide better data , so such a mechanism is needed . To address this issue , this work proposes a real-time contribution measurement method . Firstly , the method defines the impact of each agent . Furthermore , we comprehensively consider the current round and the previous round to obtain the contribution rate of each agent . To verify effectiveness of the proposed method , the work conducts pseudo-distributed training and an experiment on the Penn Treebank dataset . Comparing the Shapley Value in game theory , the comparative experiment result shows that the proposed method is more sensitive to both data quantity and data quality under the premise of maintaining real-time . 1 INTRODUCTION . There are lots of data generate , collect , and access every day by smart terminals . But cause of the privacy of these data , it is usually difficult to use them . Such as the language model to predict the next word or even entire reply ( Ion et al. , 2016 ) . The emergence of federated learning breaks this data barrier . It can use agent computing power to conduct model training while maintaining data localization and privacy protection , and obtain an excellent global model . But in a commercial federation , each agent should get corresponding rewards based on its contribution to the model , not the same rewards . There are many methods for contribution measurement . Such Wang et al . ( 2019 ) measured the contribution of each group features in vertical federated learning , and Zhan et al . ( 2020 ) proposed an incentive mechanism to make each agent willing to contribute better data . But most of them need to consume large computing resources and many methods are calculated offline . In order to address this problem , this paper proposes a method for obtaining the contribution of each agent in real time with a small amount of calculation in horizontal federated learning . Our contributions in this paper are as follows : • We propose a method to measure agents ’ contributions and compare this method with Shapley Value . • The method we propose is sensitive to data volume and data quality , and can be used for mutual comparison between agents . • In the training process , the contribution to each agent can be obtained in real time , with low computational complexity . 2 RELATED WORK . In this section , we will introduce the current research situation and application of federated learning , as well as the existing problems of reward distribution in the commercialization of federated learning framework , and introduce the necessity and importance of our work . 2.1 FEDERATED LEARNING . Distribute the training data on each mobile device to maintain the localization of the data , instead of transmitting the data to the central server , updating the model locally , and uploading the update results to the server . While maintaining data localization and privacy , it can aggregate the data of each agent . The central server collects agent data and uses FedSGD , FedAVG ( Brendan McMahan et al. , 2016 ) and other algorithms to maintain the central model in combination with the different optimizer ( Felbab et al. , 2019 ) , and sends the updated model to each agent . During the transmission process , methods such as homomorphic encryption are used to protect the security of data transmission and maintain the continuous iterative update of the model . This method is federated learning . At present , for different datasets , federated learning framework can be classified into horizontal federated learning , vertical federated learning , and federated transfer learning ( Yang et al. , 2019 ) . Horizontal federated learning is suitable for situations where the data provided by the agents has more of the same characteristics . In ( McMahan et al. , 2017 ) , Google proposed a solution to update the horizontal federated learning model in Android phones . vertical federated learning is suitable for situations where there is less feature overlap but more user id overlap . Hardy et al . ( 2017 ) proposed a vertical federated learning method for training a logistic model . Chen et al . ( 2020 ) proposed the FedHealth method , which uses federated learning to aggregate data and uses transfer learning to obtain a personalized model . Under the framework of federated learning , there are many different directions of research . Aono et al . ( 2017 ) use the data transmitted by the homomorphic encryption agents and the central server for model training , which further strengthens the privacy of the agents ’ data . In ( Lu et al. , 2019 ; Kim et al. , 2019 ) , data verification is carried out in conjunction with the blockchain to prevent the gradient information from being maliciously tampered with . Konečnỳ et al . ( 2016 ) research on reducing the consumption of communication resources in federated learning . 2.2 APPLICATION AND COMMERCIALIZATION OF FEDERATED LEARNING . Since federated learning was proposed , federated learning has been successfully applied to more and more scenarios . When considering data privacy issues , many companies will choose to use federated learning to protect data privacy to achieve cooperation . Such WeBank has successfully used federated learning in bank federations for credit evaluation and other financial aspect . In ( Ren et al. , 2019 ) , federated learning is applied to dynamic IoT system.Lu et al . ( 2019 ) ; Kim et al . ( 2019 ) use blockchain for data verification as an alternative to the commercialization of federated learning . Bao et al . ( 2019 ) achieved model commercialization by providing a healthy marketplace for collaborative-training models . In the commercialization process of federated learning , the method of using this decentralized training model provides privacy , security , supervision and economic benefits , but also brings many fairness and systemic challenges . 2.3 CONTRIBUTION MEASUREMENT AND INCENTIVE MECHANISM IN FEDERATED LEARNING . Wang et al . ( 2019 ) proposed grouped instance influence to measure contribution of agents in horizontal federated learning and grouped feature importance in vertical federated learning which equitably and accurately realized the measurement of contributions of all agents . But this method can not take into account the amount of data . Geyer et al . ( 2017 ) proposed a federated learning optimization algorithm based on differential privacy protection of the agents that can hide the contribution of the agents . In order to balance the contribution of the soft training model and ensure the collaborative convergence , Xu et al . ( 2019 ) proposed the corresponding parameter aggregation scheme . Kang et al . ( 2019 ) used the weighted subjective logic model to design a reputation-based worker selection plan to achieve reliable federated learning . In ( Zhan et al. , 2020 ) , designed an incentive mechanism based on deep reinforcement learning to determine the optimal pricing strategy for parameter servers and the optimal training strategy for agents . Our work focus on real-time contribution measurement mechanism for each agent in vertical federated learning . Current research has problems such as poor real-time performance and high resource consumption by contribution measurement methods . The method proposed in this paper can obtain real-time contribution measurement to each agent in the process of federated learning . At the same time , it verifies that the method proposed in this paper has high sensitivity on data quantity and data quality . 3 METHODOLOGY . In order to solve the above issues , we propose a corresponding method which does not need to obtain agents data and data scale , but can measure agents contribution . This method of measuring agents contributions is suitable for evaluating agents in real time . 3.1 FEDERATED LEARNING . In this section , we will introduce the basic framework of federated learning and how parameters are updated . Federated learning is a distributed learning method in which the server maintains an central model and distributes it to individual agents . To solve privacy problems , the server does not need to obtain the data of the agents , so the computing power of the agents is used to learn at the agents local environment . The server will set up a fraction C , to select the agents proportionally for the server ’ s central model update . Then the selected agents ’ updated model parameters are uploaded to the server for parameter updating of the server model . It is then distributed to the each agent to improve the model of the agents . In this way , it continue to improve the central model of the server and the local model of the agents . Under the premise of ensuring the correctness and privacy of the agents , using this method can make full use of the computing power of the agents and a large amount of private data for learning , and at the same time maintain an excellent global model . 3.2 ATTENTION AGGREGATION . In this section , we will introduce a FedAtt algorithm proposed by Shaoxiong Ji , Shirui Pan , Guodong Long et al.Ji et al . ( 2019 ) , which is outperformed to the common FedAvg and FedSGD algorithm . The proposed attention mechanism in Federated Learning is used after the agents transmitted the parameters to the server , the server uses Formula equation 1 to calculate the value of attention α of each layer parameter that should be allocated to the agent , and multiplies each layer parameter by the corresponding attention to update the central model . The server integrates the update parameters passed by the agents according to theirs own parameter information , and finally completes an update of the central model through the communication between the server and the agents . αlk = softmax ( s l k ) = es l k∑ i e sli ( 1 ) The slk is the norm difference from the central model . We use w l to represent layer l parameters of the server and wlk for lth layer parameters of the agent model k. So the definition of s l k is as follows slk = ||wl − wlk||p ( 2 ) So for m agents that are selected to update the central model , the method of updating becomes wt+1 ← wt − m∑ k=1 5 ( wkt ) = wt − m∑ k=1 αk ( wt − wkt ) ( 3 ) To protect the agents ’ data privacy , you can add the randomized mechanism before the agent passes parameters to the server . Randomly generate a random vector that obeys the standard distribution N ( 0 , σ2 ) , multiply the corresponding weight β , the results of the final update parameters as shown in Formula equation 4 wt+1 ← wt − m∑ k=1 αk ( wt − wkt + βN ( 0 , σ2 ) ) ( 4 ) The implementation process of the whole algorithm is shown as Algorithm 1 Algorithm 1 Attentive Federated Optimization 1 : l is the ordinal of neural network layers ; is the stepsize of server optimization 2 : Input : server parameters wt at t , agents parameters w1t+1 , w2t+1 , · · · , wmt+1 at t+ 1 3 : Output : server parameters wt+1 at t+ 1 4 : Initialize attention α = { α1 , α2 , · · · , αm } 5 : for each layer l in model do 6 : for each agents k ∈ St from 1 to m do 7 : slk = ||wl − wlk||p 8 : end for 9 : αlk = softmax ( s l k ) = es l k∑ i e sl i 10 : end for 11 : αk = { α1k , α2k , · · · , αlk } 12 : wt+1 ← wt − ∑m k=1 αk ( wt − wkt + βN ( 0 , σ2 ) )

Summary: The paper is to measure each client’s contribution to training the federated learning model. In particular, the contribution is measured by the distance between the local model and the global model in each iteration. The targeting problem is interesting, and the use of attention-based model divergence is also an interesting idea to measure the contribution. However, the paper lacks strict theoretical discussion to prove the proposed solution is a reasonable one rather than a heuristic method. Moreover, the experiment is too weak to support the claims. The paper’s technique contribution and originality are also limited.