|
Algorithm 3 Federated Learning Algorithm with Dynamic UE Selection using D4PG |
|
Input: Global model parameters , UE dataset for each UE k, hyperparameter for all UEs, maximum number of global iterations G, local training iterations L. |
|
Output: Final global model parameters , trained D4PG agent, performance metrics. |
-
1:
Initialization: Initialize global model parameters . Initialize the hyperparameter for all UEs.
-
2:
D4PG Agent Initialization: Initialize the D4PG agent with appropriate observation and action spaces, neural networks for policy and value functions, and experience replay buffer.
-
3:
Dynamic Sampling: At each global iteration g:
-
4:
D4PG agent dynamically selects a subset of UEs based on learned policies
-
5:
Global Model Broadcast: Broadcast the global model parameters to all UEs in .
-
6:
Local Training: Each UE performs local training:
-
7:
Initialize local model with .
-
8:
for do
-
9:
Randomly select a data point from local dataset .
-
10:
Update local model: As shown in Equation (45)
-
11:
end for
-
12:
Send Local Models: Each UE sends its updated local model to the base station.
-
13:
Global Model Aggregation: The base station aggregates the local models to update the global model: As shown in Equation (46)
-
14:
D4PG Agent Update: Update the D4PG agent using the reward based on the performance and fairness of the aggregated model, storing experiences in the replay buffer, and training the neural networks.
-
15:
Repeat: Repeat the process for G global iterations.
|