litian96 / fair_flearn

Fair Resource Allocation in Federated Learning (ICLR '20)
MIT License
242 stars 59 forks source link

Why the argument 'replacement' is set False as default when sampling? #9

Closed WwZzz closed 3 years ago

WwZzz commented 3 years ago

Dear author, thanks for sharing your wonderful codes. I'm curious about the reason why the argument 'replacement' is set 'False' as default when sampling clients with proportion pk. And I've noticed that this item is usually set 'True' in other papers, like “FEDERATED LEARNING’S BLESSING: FEDAVG HAS LINEAR SPEEDUP" and "On the convergence of Fedavg on non-i.i.d. data”. image image I want to know whether it matters in experiments.

litian96 commented 3 years ago

In practice, if you don't want to select the same devices again, it is reasonable to set 'replacement=False'. It usually doesn't matter in terms of the experiments where the number of devices is large. In terms of the analysis, in order to get unbiased gradients, we can assume sampling with replacement.

WwZzz commented 3 years ago

Thank you for reply. I got it.