Personalized Federated Learning via Learning Dynamic Graphs

Ziran Zhou, Guanyu Gao, Xiaohu Wu, Yan LyuarXiv 2025

Abstract

Personalized Federated Learning (PFL) aims to train models tailored to local data distributions, which often vary significantly across clients. Traditional Federated Learning (FL) struggles in these Non-IID scenarios. We propose pFedGAT (Personalized Federated Learning with Graph Attention Network), a method that captures latent graph structures between clients to dynamically determine aggregation weights. By optimizing a server-side GAT using scalar loss feedback from clients, pFedGAT enables fine-grained control over the aggregation process. Evaluations on Fashion MNIST, CIFAR-10, and CIFAR-100 demonstrate that pFedGAT consistently outperforms state-of-the-art methods across various data heterogeneity levels.

Introduction

Standard Federated Learning (FL) typically seeks a single global model that performs well on average. However, real-world data is rarely independent and identically distributed (IID). For individual clients, this "one-size-fits-all" approach often leads to suboptimal performance. While existing Personalized FL (PFL) techniques attempt to address this through local fine-tuning or clustering, they often treat the aggregation process as a static "black box," ignoring the underlying relationships between clients.

Methodology: pFedGAT

The core innovation of pFedGAT is treating the federation of clients as a dynamic graph where nodes represent clients and edges represent the strength of their collaborative relationship.

The pFedGAT workflow: Clients upload model parameters; the server uses a GAT to compute client importance and distribute personalized models; clients return test loss to optimize the GAT.
  1. Graph Construction: The server represents each client as a node, using flattened and normalized model parameters ($\theta$) as node features. Unlike traditional graphs with fixed edges, pFedGAT starts with a fully connected graph.
  2. Attention-Based Aggregation: A Graph Attention Network (GAT) calculates "attention coefficients" between clients. Higher weights are assigned to clients with similar parameter distributions, allowing for more effective knowledge transfer.
  3. Feedback-Driven Optimization: After receiving personalized models, clients evaluate them on local held-out test sets and return a single scalar—the test loss. The server aggregates these losses to update the GAT's internal parameters via backpropagation. This allows the server to "learn how to aggregate" based on actual performance feedback.

Experimental Setup and Data Heterogeneity

The effectiveness of pFedGAT was tested on Fashion MNIST, CIFAR-10, and CIFAR-100 against 12 state-of-the-art baselines. To simulate real-world challenges, the researchers used different data distribution strategies to create varying levels of heterogeneity.

Visualizing data heterogeneity: (a) Pathological distribution (2 classes per client), (b) IID (uniform), and (c, d) Dirichlet distributions showing varying levels of class imbalance across clients.
  • Pathological: Each client only possesses data from a small subset of classes (e.g., 2 out of 10).
  • Dirichlet Distribution: A more naturalistic, unbalanced distribution where class proportions vary across clients based on a concentration parameter $\beta$.

Key Results and Insights

pFedGAT consistently outperformed or matched all 12 baselines. On the challenging CIFAR-100 dataset with a Dirichlet distribution ($\beta=0.5$), pFedGAT achieved 36.87% accuracy, significantly beating standard FedAvg.

Key takeaways include:

  • Efficiency: By using a 4-byte scalar feedback (test loss), the method adds virtually zero communication overhead compared to standard FL.
  • Adaptability: The aggregation strategy evolves dynamically as models improve and the GAT learns the client graph. Weight matrices indicate that pFedGAT successfully learns to ignore "noisy" or dissimilar clients.
  • Robustness: The performance advantage of pFedGAT becomes more pronounced as data heterogeneity increases, proving its utility in highly diverse environments.
  • Generalization: The system quickly integrates new clients by identifying their position in the learned graph within just a few rounds.

Conclusion

pFedGAT introduces a sophisticated yet efficient way to handle client heterogeneity in Federated Learning. By leveraging Graph Attention Networks and simple loss feedback, it moves beyond static aggregation to a truly dynamic, personalized collaboration framework. Future work may address the $N \times N$ computational complexity for massive-scale deployments and explore further privacy-preserving measures for shared parameters.

Summary updated

BibTeX
@misc{zhou2025personalized,
  author = {Ziran Zhou and Guanyu Gao and Xiaohu Wu and Yan Lyu},
  title = {{Personalized Federated Learning via Learning Dynamic Graphs}},
  year = {2025},
  eprint = {2503.05474},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.05474},
}
Figure