Federated Learning of a Mixture of Global and Local Models

Filip Hanzely, Peter Richtárik

TL;DR

This paper introduces a novel optimization framework for Federated Learning (FL) that explicitly balances a global model with personalized local models. This new formulation allows for improved communication efficiency, especially in heterogeneous data settings, and provides a theoretical justification for the effectiveness of local steps in FL.

What Problem Does This Paper Address?

Federated Learning (FL) aims to train machine learning models on decentralized data residing on edge devices (like phones or IoT devices) without centralizing the data. This is crucial for privacy and efficiency. The standard FL approach focuses on learning a single global model that performs well across all devices. However, this can lead to a model that is not optimal for individual users, especially when data distributions vary significantly across devices (heterogeneity). Furthermore, existing FL methods like FedAvg, while empirically successful, often lack strong theoretical guarantees for communication efficiency, particularly in heterogeneous settings. This paper addresses these limitations by proposing a new FL formulation that allows for a trade-off between a global model and personalized local models, aiming to improve both individual user utility and communication efficiency.

Methods

The core contribution is a new optimization formulation for FL:

$$ \min_{x_1, \dots, x_n \in \mathbb{R}^d} \left\{ F(x) := f(x) + \lambda \psi(x) \right\} $$

where $x_i$ are local models for each device $i$, $x = (x_1, \dots, x_n)$ is the collection of local models, $\bar{x} = \frac{1}{n} \sum_{i=1}^n x_i$ is the average of local models, $f(x) = \sum_{i=1}^n f_i(x_i)$ is the sum of local losses, and $\psi(x) = \frac{1}{2n} \sum_{i=1}^n \|x_i - \bar{x}\|^2$ is a penalty term that encourages local models to be similar to the average. The parameter $\lambda \ge 0$ controls the trade-off between the global and local models.

To solve this new formulation, the authors propose Loopless Local Gradient Descent (L2GD), a randomized algorithm that is a variant of SGD. L2GD samples either the gradient of the loss term $f(x)$ or the gradient of the penalty term $\psi(x)$ at each step. This leads to a mix of local gradient steps (when $f(x)$ is sampled) and aggregation steps (when $\psi(x)$ is sampled). The key novelty is that L2GD is applied to the new formulation, not the traditional one, which allows for theoretical improvements in communication complexity. They also introduce L2SGD+, a variance-reduced version of L2GD that achieves linear convergence.

Datasets

The experiments were conducted using datasets from LibSVM. Specific datasets mentioned include:

  • ala
  • mushrooms
  • phishing
  • madelon
  • duke
  • gisette_scale
  • a8a

The paper notes that these datasets were normalized, and the local objectives were made strongly convex.

Key Insights and Ideas

  • A New Perspective on Local Steps: The paper argues that local steps in FL (like in LGD or FedAvg) are not primarily for reducing communication complexity in the traditional FL problem. Instead, they are better understood as a mechanism to steer the optimization towards a mixture of global and local models, as formalized by their new objective function.
  • Personalization Reduces Communication: The proposed formulation and L2GD algorithm demonstrate that personalization (allowing for local models) can lead to reduced communication complexity, especially when data is heterogeneous. This is a counter-intuitive but significant finding.
  • Bridging Global and Local: The new objective function elegantly bridges the gap between purely local models (when $\lambda=0$) and a single global model (as $\lambda \to \infty$). This allows for a flexible trade-off.
  • Theoretical Justification for Local Methods: The paper provides theoretical guarantees for L2GD and L2SGD+ in terms of communication complexity, showing they can outperform traditional methods like GD in certain FL scenarios.

Key Results

  • Communication Efficiency: The proposed L2GD algorithm achieves communication complexity that interpolates between that of standard Gradient Descent (GD) for finding the global model and zero communication for finding purely local models. Specifically, as $\lambda \to \infty$, the communication complexity recovers that of GD. As $\lambda \to 0$, communication rounds tend to zero.
  • Linear Convergence with Variance Reduction: L2SGD+, a variance-reduced variant, achieves linear convergence to the global optimum, outperforming methods that only converge to a neighborhood.
  • Heterogeneity Insensitivity: The proposed methods are shown to be robust to data heterogeneity, meaning that data splits (homogeneous vs. heterogeneous) do not significantly affect their convergence speed. This is a key advantage over standard local SGD.
  • Empirical Validation: Extensive experiments on LibSVM datasets confirm the theoretical predictions regarding the effect of parameters $\lambda$ and $p$ (aggregation probability) on convergence and communication.

Limitations and Future Work

  • Smooth Convexity Assumption: The theoretical analysis primarily assumes smooth convex loss functions $f_i$. The authors mention that the analysis of L2GD can be extended to non-convex loss functions, but this is not explored in the current work.
  • Privacy: The paper explicitly states that the algorithm statements do not take data privacy into consideration, although they note that privacy-preserving implementations are possible using existing techniques.
  • Decentralized Settings: The authors suggest extending their methods to decentralized regimes where communication is only allowed along the edges of a connected network.
  • Acceleration: Further work could explore accelerating their methods in the sense of Nesterov for even faster convergence.

Summary updated

BibTeX
@misc{hanzely2020federated,
  author = {Filip Hanzely and Peter Richtárik},
  title = {{Federated Learning of a Mixture of Global and Local Models}},
  year = {2020},
  eprint = {2002.05516},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.05516},
}
Figure