Personalized Federated Learning: An Attentive Collaboration Approach

Yutao Huang, Lingyang Chu, Zirui Zhou, Lanjun Wang, Jiangchuan Liu, Jian Pei, Yong Zhang

Abstract

Non-IID data present a tough challenge for federated learning. In this paper, we explore a novel idea of facilitating pairwise collaborations between clients with similar data. We propose FedAMP, a new method employing federated attentive message passing to facilitate similar clients to collaborate more. We establish the convergence of FedAMP for both convex and non-convex models, and propose a heuristic method to further improve the performance of FedAMP when clients adopt deep neural networks as personalized models. Our extensive experiments on benchmark data sets demonstrate the superior performance of the proposed methods.

Introduction

Standard Federated Learning (FL), exemplified by algorithms like FedAvg, typically aims to train a single global model across all participating clients. While effective for identically and independently distributed (IID) data, this "one-size-fits-all" approach falters in "cross-silo" scenarios where data is non-IID. For instance, a predictive model for food preferences in Italy will differ significantly from one in Japan. Forcing these diverse clients to converge on a single average model often results in a "jack of all trades, master of none" that performs poorly for everyone. The fundamental bottleneck is the assumption that a single global model can adequately represent all clients.

The FedAMP Framework

To address the limitations of global models, we introduce FedAMP (Federated Attentive Message Passing). This framework shifts the paradigm from a single global model to a system of personalized cloud models managed by a central server.

The FedAMP framework maintains personalized cloud models ($u_i^k$) for each client ($C_i$) and facilitates collaboration through attentive message passing weights ($\xi_{i,j}$).

In FedAMP, the server maintains a unique personalized cloud model for every client. During each training round, a client’s model is updated not by a simple average of all participants, but by a weighted combination of other models. These weights are determined by an "attention-inducing function," typically based on the negative exponential of the Euclidean distance between model parameters. This mechanism ensures that if Client A’s model is similar to Client B’s, they "attend" to each other more, facilitating deeper collaboration between clients with similar data distributions.

Addressing Deep Learning with HeurFedAMP

While Euclidean distance is effective for lower-dimensional models, it can become an unreliable measure of similarity in high-dimensional spaces, such as those found in Deep Neural Networks (DNNs)—a phenomenon known as the "curse of dimensionality." To combat this, we propose HeurFedAMP, a heuristic version that utilizes cosine similarity to determine collaboration weights. This adaptation proves significantly more robust for deep learning applications, allowing the attentive mechanism to function effectively even with complex DNN architectures.

Experimental Evaluation and Key Results

We evaluated FedAMP and HeurFedAMP across four standard computer vision benchmarks: MNIST, FMNIST, EMNIST, and CIFAR100. Our tests included various data distributions, ranging from IID to highly practical non-IID settings where clients are grouped by similarity but still possess varying local distributions.

In the most realistic non-IID scenarios, our methods consistently outperformed state-of-the-art baselines. For example, on the CIFAR100 dataset, HeurFedAMP achieved an accuracy of 53.27%, a substantial improvement over FedAvg’s 35.21% and FedProx’s 37.31%. Similarly, on FMNIST, HeurFedAMP reached 91.37% accuracy, surpassing specialized personalized methods like APFL (84.08%).

Heatmaps of collaboration weights for FedAMP and HeurFedAMP, demonstrating how the algorithm successfully identifies and groups clients with similar data distributions.

A key insight from our work is the emergence of a positive feedback loop: as similar clients collaborate, their models become more aligned, further increasing their collaboration weight in subsequent rounds. This naturally "clusters" clients into collaborative subgroups without requiring explicit cluster labels or metadata. As shown in the heatmaps above, the algorithm successfully identifies and groups clients based on the underlying similarity of their data (e.g., separating clients with digit data from those with letter data).

Conclusion

FedAMP offers a powerful alternative to traditional federated learning by leveraging model similarity as a proxy for data distribution similarity. By facilitating attentive collaboration, it significantly boosts performance in non-IID environments while maintaining the core privacy promises of FL. While the current approach requires the server to maintain $O(m)$ models—making it ideal for cross-silo FL—future work will explore scaling these attentive mechanisms for massive cross-device deployments and integrating them with advanced differential privacy techniques.

Summary updated

BibTeX
@inproceedings{huang2021personalized,
  author = {Yutao Huang and Lingyang Chu and Zirui Zhou and Lanjun Wang and Jiangchuan Liu and Jian Pei and Yong Zhang},
  title = {{Personalized Federated Learning: An Attentive Collaboration Approach}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i9.16960},
}
Figure