Manuscript Offprint

arXiv:2609.02241

Similarity-Aware Personalized Federated Learning in Heterogeneous Environments

Arun Kumar A, Sunil Gupta, Dang Ngyuen, Bao Duong, Dat Phan Trong

ABSTRACT

Federated Learning (FL) allows decentralized clients to train models collaboratively while preserving data privacy. However, distribution mismatch across clients often leads to poor global generalization and degraded local client-level performance. In such scenarios, some of the clients with their local models trained solely on local data may perform better than the globally learnt model, thus nullifying the benefits of collaborative federated learning. To address this, we propose SAPE-FL (Similarity-Aware Personalized Federated Learning), a novel personalization framework that anchors each client's model to both the global model and a similarity-weighted peer averaged model. By incorporating dynamic, client-specific regularization based on both model similarity and output similarity, SAPE-FL adaptively balances global knowledge transfer and peer collaboration while filtering out dissimilar clients. This dual anchoring mitigates negative transfer and enhances robustness in heterogeneous settings. We theoretically analyze our algorithm establishing its convergence guarantees and empirically show that SAPE-FL outperforms state-of-the-art methods under high statistical heterogeneity and low client data regimes.

Keywords Machine Learning · Federated Learning · Similarity-aware FL · Heterogenous Environments

1 Introduction

With the rapid proliferation and growing computational power of edge devices such as smartphones, wearable sensors, and IoT devices, there has been a shift towards training machine learning models directly on decentralized devices rather than centralizing data in one location. Federated Learning (FL) McMahan et al. [2017] enables multiple clients to collaboratively train a global model without sharing raw data, thereby preserving privacy. The decentralized and privacy-preserving nature of FL is appealing across various domains including healthcare Dayan et al. [2021], finance Long et al. [2020] and edge computing Abreha et al. [2022]. Compared to traditional distributed learning approaches (Alternating Direction Method of Multipliers (ADMM) in Boyd et al. [2011]), FL methods have shown superior scalability and communication efficiency.

While traditional FL methodologies have demonstrated significant promise, real-world deployments often face substantial challenges due to heterogeneity Li et al. [2020a], including statistical (diverse data distributions across clients), model (variations in model training methods), and communication heterogeneity (inconsistent network conditions and resource constraints). Among these, statistical heterogeneity (distribution mismatch, henceforth referred to as non-IID) across clients poses a significant challenge, often degrading global model performance. Standard FL methods such as FedAvg McMahan et al. [2017], originally designed for IID data, fail to generalize effectively across diverse client populations Zhao et al. [2018], motivating the development of personalization schemes that better align models with local client data.

To address data heterogeneity and personalization, several works have reformulated the optimization objectives of traditional FL methods. FedProx Li et al. [2020b] adds a proximal term to FedAvg to limit the divergence of local updates from the global model. However, as noted in Jiang et al. [2019], optimizing solely for global accuracy can

*Mail Correspondence: a.anjanapuravenkatesh@deakin.edu.au hinder effective personalization at the client level. To overcome this, personalized federated learning (PFL) Sim et al. [2019], Li et al. [2021a] has emerged as a paradigm that balances global collaboration with client-specific adaptation. Rather than relying on a single global model, PFL allows each client to tailor its model to local data and preferences Kulkarni et al. [2020], typically following a two-stage strategy: global training followed by local fine-tuning. However, existing PFL methods employ static regularization weights Fallah et al. [2020], Li et al. [2021a] or fixed similarity-based aggregation Chen et al. [2024], which fail to account for dynamic variations in client drift, data distribution, and model reliability over training rounds. This rigidity can lead to sub-optimal personalization or even negative transfer, particularly in settings with highly non-IID data.

Motivated by the limitations of static personalization and uniform aggregation strategies, we propose Similarity-Aware Personalized Federated Learning (SAPE-FL), a novel framework that jointly optimizes global collaboration and client-specific adaptation. SAPE-FL introduces a two-level anchoring mechanism, where each client aligns its model with both the global model and a similarity-weighted average of peer models. This dual anchoring is guided by client-specific adaptive regularization, computed using model output and weight-based similarity. Our measure combines both model output and model weight-based similarities, making it robust to structural and functional differences across clients. While weight-based similarity captures structural alignment, output similarity identifies functionally similar models despite parameter differences. To construct such reliable anchors, each client filters out dissimilar peer models using a similarity threshold, ensuring that only relevant peer information influences personalization. On the server side, SAPE-FL performs similarity-weighted aggregation of client model updates, where each client's contribution is scaled by its alignment with peer consensus. This suppresses noisy or misaligned updates and enhances quality of the global model.

We evaluate SAPE-FL against state-of-the-art methods across diverse tasks, including synthetic data classification, human activity recognition and image classification under non-IID or statistical heterogeneity. Our empirical results demonstrate that SAPE-FL framework consistently outperforms baselines, especially in settings with high statistical heterogeneity and limited client data availability. These findings highlight that our novel similarity-based personalization and aggregation strategy effectively personalizes federated learning to the unique characteristics of each client.

The key contributions of this paper are mentioned below.

  • We propose SAPE-FL, a novel similarity-aware personalized FL framework that anchors client models to both global and peer-averaged models, and uses an aggregation scheme that scale client updates based on their coherence with peers and prevent negative transfer.
  • We design an adaptive personalization scheme that computes client-specific regularization coefficients based on model output and weight similarity, enabling selective alignment with the global model and peer models.
  • We provide theoretical insights into the convergence behavior and performance guarantees of our method.
  • We empirically validate SAPE-FL's effectiveness on diverse datasets under high statistical heterogeneity.

Through these innovations, SAPE-FL advances the state-of-the-art in personalized federated learning by jointly enabling global knowledge sharing and client-specific adaptation via similarity-aware optimization and aggregation.

References (51)