CharlieDinh / pFedMe

Personalized Federated Learning with Moreau Envelopes (pFedMe) using Pytorch (NeurIPS 2020)
289 stars 88 forks source link

Some questions about your peper and your code #5

Closed ty4b112 closed 3 years ago

ty4b112 commented 3 years ago

Hi , I am very interested in your work. I have few questions.

  1. Does the model expressive power have great influence to pFedMe. You propose a personalized FL method so that clients with differen data statistics can train personalized models. pFedMe send the same parameter to each selected clients at the beginning of each glob_iteration, and each client begins to train their local model from this w. If the model has strong expressive power to fit most training data across many clients, will these clients still train their personalized models? Will pFedMe still outperform FedAvg?
  2. The code You create variables local_model, persionalized_model, persionalized_model_bar for personalized FL, but it seems that you have never used persionalized_model and persionalized_model_bar is just a copy of local_model. Is there anything I missed?
CharlieDinh commented 3 years ago

Hi @ty4b112,

Thanks for your interest,

  1. By natural, in the federated network, the data across clients has a different distribution (non-iid data), therefore we can not make sure that the global model (of FedAvg) can fit the local data of each client. Our idea is basically to create a global model which allow generating well on client data after train K-steps. So after train global model small number of step, we have the personalized model which will fit client data then improve the performance of traditional federated learning (we've provided the theory for that). In the case of FedAvg, there are no theory guarantees that the global model of FedAvg is well-generalized to clients’ data after train a small number of steps at the client's side. In the case of IID data, the global model will fit to client's data, so i believe that the personalized model will not so much different compare to a global model.

  2. The local model is used to aggregate the global model, persionalized_model_bar is used for evaluation and to create the local model.

ty4b112 commented 3 years ago

Thanks, your explanation is very helpful.