Research Article

Enhancing Fairness in Federated Learning: A Contribution-Based Differentiated Model Approach

Algorithm 2

DQN-based contribution scores update for FL.
Input: current state
Output: contribution scores set
(1) Initialize the global model parameters for each cluster, experience replay memory
(2) Initialize action-value function with random weights
(3) Initialize target action-value function with weights
(4)for to do
(5)  With probability select random actions
(6)  Otherwise select actions
(7)  Execute actions , update contribution score for each client.
(8)  Obtain clustering results by using Algorithm 1 based on contribution score
(9)  Run the FL algorithms independently on each cluster
(10)  Observe reward and next state
(11)  Store transition in
(12)  Sample random mini-batch of transitions from
(13)  Update weights by minimizing the loss
(14)  At every certain step, update the target network weights:
(15)end for