Patent ID: 11935137
Assignee: BEIJING JIAOTONG UNIVERSITY
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A method for distributing an equity reward for federated learning based on an equity theory, wherein Adams' equity theory is applied to the federated learning that is a decentralized machine learning scheme to facilitate collaborative training across participants by a coordinator thereby improving model performance of the participants, the participants are intelligent clients ranging from resource-rich devices including a large-scale server to resource-constrained device, and the coordinator served by a blockchain, and inputs and benefits of Adams' equity theory are transformed into an expected reward and an actual reward in the federated learning, comprising the following steps:
giving, by a participant, the expected reward for this task after comprehensively analyzing all factors invested in the federated task, and calculating, by a task publisher, the reputation of the participant using a historical task of the participant, wherein the participant is an intelligent client, the task publisher is a blockchain smart contract;
participating, by the participant, in each round of a training task using local data, evaluating, by the task publisher, three factors of data contribution, model contribution, and waiting-time allowance of the participant, and evaluating, by the task publisher, the contribution of the participant by combining contribution results of the three factors;
entering, by the task publisher, a reward distribution phase after a global model converges, dynamically adjusting weights of the three factors according to an objective function of the equity reward, with a goal that the actual reward of the participant is as close as possible to the expected reward, and obtaining and distributing, by the task publisher, the actual reward of the participant, the steps of giving, by the participant, the expected reward for this task after comprehensively analyzing, by the participant, all the factors invested in the federated task, and calculating, by the task publisher, the reputation of the participant using the historical task of the participant comprise:
in the preparation phase, giving, by participant i, the expected reward ER for this task after comprehensively analyzing all the factors invested in the federated task (Ei);
the task publisher combines a historical federated learning task of each participant and evaluates a degree of match between ER and AR for historical tasks, the task publisher utilizes a forgetting factor as a coefficient, the closer the task to a current moment, the higher the weight of the task, and the task publisher obtains the reputation Vi of the participant i based on a historical reputation record of the participant with the following calculation formula:, V
      i
     
     =
     
      
       ∑
       
        t
        =
        
         t
         0
        
       
       
        t
        
         n
         ⁢
         o
         ⁢
         w
        
       
      
      
       
        (
        
         1
         -
         
          
           2
           π
          
          ·
          
           
            tan
            
             -
             1
            
           
           (
           
            
             
              A
              i
              t
             
             -
             
              E
              i
              t
             
            
            
             A
             i
             t
            
           
           )
          
         
        
        )
       
       ·
       
        e
        
         -
         
          (
          
           t
           -
           
            t
            
             n
             ⁢
             o
             ⁢
             w
            
           
          
          )
         
        
       
      
     
    
   
   
    
     (
     7
     )
    
   
  
 

wherein Ait and Eit are the actual rewards ARs and the expected rewards ERs of the participant i in a t-th task, and e−(t−tnow) is a forgetting factor of the t-th task, the steps of participating, by the participant, in each round of the training task using the local data, evaluating, by the task publisher, the three factors of the data contribution, the model contribution, and the waiting-time allowance of the participant, and evaluating the contribution of the participant by combining the contribution results of the three factors comprises:
in a training process, participating, by the participant, in each round of the training task according to training rules of federated learning, and in an r-th round, downloading an aggregated global model of the r−1-th round from a blockchain, training the aggregated global model using the local data, uploading an updated local model to the blockchain, and repeating this training process, after the global model of the r-th round is aggregated, until the model converges;
in a contribution evaluation process, taking the data contribution, the model contribution, and the waiting-time allowance as the three factors, and calculating, by the participant i, the data contribution u1i according to a formula, u
    
     1
     ⁢
     i
    
   
   =
   
    
     
      D
      i
     
     D
    
    +
    
     (
     
      1
      -
      
       d
       i
      
     
     )
    
   
  
  ,
 

 Di being data volume for the participant i, D being data volume for all the participants, and di being EMD of a similarity measure between the participant i and overall data distribution;
in each round of training, determining, by the participant, an accuracy rate of the local model submitted by another participant with the local data to give an evaluation score, and an average score of the model is a model score of the round, and a score of model evaluation, calculated by the task publisher, of the participant i in the r-th round being, u
    
     2
     ⁢
     i
    
    r
   
   =
   
    
     1
     
      N
      -
      1
     
    
    ⁢
    
     
      ∑
       
     
     
      
       j
       ∈
       N
      
      ,
      
       j
       ≠
       i
      
     
    
    ⁢
    
     S
     
      j
      ⁢
      i
     
     r
    
   
  
  ,
 

 wherein Sjir being a participant j-to-participant i score in the r-th round;
obtaining, by the task publisher, the waiting time of the participant using the upload time of the local model recorded by the blockchain, then the waiting-time allowance of the participant i in the r-th round being, u
    
     3
     ⁢
     i
    
    r
   
   =
   
    
     
      T
      *
     
     -
     
      T
      i
      r
     
    
    
     T
     *
    
   
  
  ,
 

 being a waiting-time threshold, and obtaining the reward at waiting time within the threshold;
evaluating, by the task publisher, the contribution of participant i by combining the contribution results of the participant i of the three factors; and
improving decision-making and task execution efficiency of intelligent devices by integrating the method for distributing the equity reward for federated learning.