Federated Learning Lab

Train models on distributed data without moving it: try FedAvg, FedProx and SCAFFOLD in a simulator that really computes in your browser, with privacy, medical applications, projects and quizzes.

14interactive experiments

Mathematical formulation: federated optimization

Federated Learning Fundamentals · Lesson advanced

The idea

The goal is to minimize the global loss, a weighted average of client losses, where client k has local loss F_k on its data D_k.

Explanation

The weight n_k/n is the client's share of samples. If distributions match, weighted and unweighted averages are close. Under non-IID data the local optimum of F_k differs from the solution of the global objective, which is the origin of client drift that SCAFFOLD, FedProx and FedNova address.

Mathematical form

\min_{w}\ F(w)=\sum_{k=1}^{K}\frac{n_k}{n}F_k(w),\qquad F_k(w)=\frac{1}{n_k}\sum_{i\in D_k}\ell(w;x_i,y_i)

Review questions

  • What changes if every client gets weight 1/K instead of n_k/n?

References

  1. McMahan, Moore, Ramage, Hampson, Agüera y Arcas (2017). Communication-Efficient Learning of Deep Networks from Decentralized Data. AISTATS 2017 (PMLR 54); arXiv:1602.05629. Link
  2. Li, Sahu, Zaheer, Sanjabi, Talwalkar, Smith (2020). Federated Optimization in Heterogeneous Networks. MLSys 2020; arXiv:1812.06127. Link
  3. Wang, Liu, Liang, Joshi, Poor (2020). Tackling the Objective Inconsistency Problem in Heterogeneous Federated Optimization. NeurIPS 2020. Link