Improving Federated Learning Personalization via Model Agnostic Meta Learning

Yihan Jiang, Jakub Konecný, Keith Rush, Sreeram KannanarXiv 2019

Abstract

Federated Learning (FL) refers to learning a high quality global model based on decentralized data storage, without ever copying the raw data. A natural scenario arises with data created on mobile phones by the activity of their users. Given the typical data heterogeneity in such situations, it is natural to ask how can the global model be personalized for every such device, individually. In this work, we point out that the setting of Model Agnostic Meta Learning (MAML), where one optimizes for a fast, gradient-based, few-shot adaptation to a heterogeneous distribution of tasks, has a number of similarities with the objective of personalization for FL. We present FL as a natural source of practical applications for MAML algorithms, and make the following observations. 1) The popular FL algorithm, Federated Averaging, can be interpreted as a meta learning algorithm. 2) Careful fine-tuning can yield a global model with higher accuracy, which is at the same time easier to personalize. However, solely optimizing for the global model accuracy yields a weaker personalization result. 3) A model trained using a standard datacenter optimization method is much harder to personalize, compared to one trained using Federated Averaging, supporting the first claim. These results raise new questions for FL, MAML, and broader ML research.

Introduction: Federated Learning as Meta-Learning

In Federated Learning (FL), the goal is typically to train a single global model across a massive network of edge devices. However, because user data is inherently non-i.i.d. (not identically and independently distributed), a "one-size-fits-all" model often fails to capture individual nuances. This research explores the deep connection between FL and Model Agnostic Meta Learning (MAML), suggesting that the most common FL algorithm, Federated Averaging (FedAvg), is actually a meta-learning algorithm in disguise. By embracing this connection, we can train models specifically designed for rapid local personalization.

The Challenge of Personalization

The core difficulty in FL is data heterogeneity. A global model might achieve decent average performance but remain suboptimal for any specific user. Traditional approaches involve training a global model and then fine-tuning it locally. However, if the global training doesn't account for the subsequent personalization step, the resulting model may be "stiff"—difficult to adapt to local distributions.

Methods: Bridging the Gap

The authors demonstrate that FedAvg can be viewed as a linear combination of a simple baseline (FedSGD) and First-Order MAML (FOMAML). This theoretical link implies that the multiple local updates performed in FedAvg are effectively "learning how to learn."

To leverage this, a two-stage training pipeline is proposed:

  1. Stable Base Training: Standard FedAvg with momentum SGD is used to reach a stable global model.
  2. Meta-Finetuning: The process switches to a fine-tuning stage using Reptile (a MAML variant) to optimize specifically for the model's "adaptability."
  3. Local Personalization: Users perform local fine-tuning using the same optimizer configurations (e.g., Adam or SGD) used during the meta-training phase to ensure consistency.

Key Insights and Results

The researchers evaluated their approach on the EMNIST-62 (handwritten characters) and Shakespeare (language modeling) datasets.

The Personalization Boost

The most significant finding is the consistent gap between the initial global model accuracy and the personalized accuracy. As shown in Figure 1, personalized models achieve substantially higher test accuracy across communication rounds compared to their initial global states.

Convergence speed and personalization accuracy for EMNIST-62 and Shakespeare.

Datacenter Models vs. Federated Models

A critical observation is that models trained in a centralized datacenter environment are significantly harder to personalize than those trained via FedAvg or Reptile. Figure 4 illustrates how models trained with standard centralized methods often see their accuracy plummet or stagnate when subjected to local fine-tuning, whereas meta-trained models adapt quickly and effectively.

Comparison of personalization performance between meta-learning (Reptile) and centralized training.

Optimizer Consistency and Trade-offs

The study highlights that solely optimizing for global accuracy can be counterproductive for personalization. A "stiffer" global model might reach a higher initial accuracy but provide a poorer starting point for local adaptation. Furthermore, maintaining consistency between the server-side meta-optimizer and the local personalization optimizer is vital for stability.

Conclusion

By reframing Federated Learning as a meta-learning problem, this work provides a robust framework for building personalized AI. The results suggest that the "meta-knowledge" inherent in the FL training process is what enables effective local adaptation. Future work will focus on developing metrics to predict a model's adaptability and exploring these techniques in broader transfer learning contexts.

Summary updated

BibTeX
@misc{jiang2019improving,
  author = {Yihan Jiang and Jakub Konecný and Keith Rush and Sreeram Kannan},
  title = {{Improving Federated Learning Personalization via Model Agnostic Meta Learning}},
  year = {2019},
  eprint = {1909.12488},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.12488},
}
Figure