Personalized Federated Learning through Local Memorization
Othmane MarfoqGiovanni NegliaRichard VidalLaetitia Kameni
Proposes kNN-Per, a personalized federated learning method that couples a shared global model with client-specific k-nearest neighbors classifiers over local datastores to effectively handle statistical heterogeneity with theoretical generalization bounds and minimal computational overhead.
Federated learning enables multiple client devices to collaboratively train a shared machine learning model while keeping sensitive data stored locally. However, standard federated approaches produce a single global model that frequently performs poorly when client data distributions vary widely or when client hardware capabilities differ. This lack of customization creates accuracy bottlenecks and unfair performance disparities across participating devices. The article evaluates and demonstrates a personalized federated learning method, called kNN-Per, which couples a shared global neural network with a local nearest-neighbor memorization mechanism to tailor predictions to individual client data.
To address this challenge, the authors propose training a standard global neural network across clients and using its internal feature representations to build a private, local datastore on each device. During inference, the final prediction linearly blends the global model output with a local nearest-neighbor search over the stored representations, requiring no extra distributed retraining. The approach was evaluated through mathematical generalization bounds and extensive empirical testing across four standard federated benchmark datasets covering image classification, handwritten character recognition, and language modeling, across hundreds to thousands of simulated client devices.
The findings establish that this local memorization strategy outperforms existing personalization methods. Across all evaluated benchmarks, kNN-Per consistently achieved higher average test accuracy and delivered superior results for the bottom ten percent of clients, improving overall system fairness. Second, the method generalized seamlessly to newly arriving clients who did not participate in training, outperforming competing adaptation techniques. Third, performance gains scaled with data heterogeneity: clients benefited most when their local distributions diverged sharply from the global average. Fourth, the system showed strong operational adaptability, successfully navigating local data distribution shifts through simple first-in-first-out updates to the local datastore without triggering costly global retraining.
These results demonstrate that organizations can achieve highly effective personalization and improved fairness without increasing communication overhead, retraining costs, or data privacy risks. By decoupling global feature learning from local memorization, devices retain privacy since local datastores are never transmitted to the central server. Organizations deploying federated systems should consider implementing local representation caching rather than running complex, jointly trained personalization architectures. When client devices face memory constraints, teams can deploy approximate nearest-neighbor compression techniques or sliding-window update strategies to maintain real-time personalization.
The primary limitations include increased local storage demands for maintaining feature datastores and potential computational latency during nearest-neighbor retrieval on highly resource-constrained devices. In addition, the theoretical generalization guarantees are strictly proven for binary classification under specific bounded-loss assumptions, though multi-class empirical results remain strong. Overall, confidence in the findings is high given the consistent empirical performance across diverse tasks and alignment with formal theoretical bounds.
- Paper: Federated Learning with Personalization Layers, Manoj Ghuhan Arivazhagan et al. (2019). It introduces the foundational FedPer baseline of splitting shared base neural representations from local personalization layers, which kNN-Per directly builds upon and outperforms.
- Paper: Ditto: Fair and Robust Federated Learning Through Personalization, Tian Li et al. (2020). It establishes key personalization objectives and benchmarks balancing local customization with global fairness across heterogeneous client distributions.
- Paper: Personalized Federated Learning with Theoretical Guarantees: A Model-Agnostic Meta-Learning Approach, Alireza Fallah et al. (2020). It establishes the theoretical foundations and benchmark formulations for personalized federated learning under non-convex client heterogeneity.
- Paper: Personalized Federated Learning with Moreau Envelopes, Canh T. Dinh et al. (2020). It formalizes personalized federated optimization and localized adaptation against which local memorization methods are comparatively benchmarked.
- Paper: Communication-Efficient Learning of Deep Networks from Decentralized Data, H. B. McMahan et al. (2016). It introduces the standard FederatedAveraging algorithm that serves as the global feature-learning foundation for kNN-Per.
- Paper: Towards Personalized Federated Learning, Alysa Ziying Tan et al. (2021). It provides a comprehensive taxonomy of personalized federated learning techniques and the trade-offs of decoupling global and local representations.
- Paper: Federated Learning with Non-IID Data, Yue Zhao et al. (2018). It demonstrates the fundamental accuracy degradation caused by non-IID client distributions that local personalization techniques are designed to resolve.
- Paper: FedALA: Adaptive Local Aggregation for Personalized Federated Learning, Jianqing Zhang et al. (2023). It advances beyond static feature memorization by adaptively aggregating element-wise local and global model parameters on edge devices.
- Paper: CD2-pFed: Cyclic Distillation-guided Channel Decoupling for Model Personalization in Federated Learning, Yiqing Shen et al. (2022). It extends representation-level personalization by using cyclic distillation and channel decoupling across network layers to handle multi-faceted heterogeneity.
- Paper: FedTGP: Trainable Global Prototypes with Adaptive-Margin-Enhanced Contrastive Learning for Data and Model Heterogeneity in Federated Learning, Jianqing Zhang et al. (2024). It builds on localized representation sharing by learning global class prototypes via margin-enhanced contrastive learning for heterogeneous clients.
- Paper: DisPFL: Towards Communication-Efficient Personalized Federated Learning via Decentralized Sparse Training, Rong Dai et al. (2022). It extends personalized federated learning to fully decentralized peer-to-peer topologies using customized sparse training.
- Paper: Federated Domain Generalization with Generalization Adjustment, Ruipeng Zhang et al. (2023). It investigates federated domain generalization to unseen target distributions, complementing client-side personalization strategies.
- Paper: An Aggregation-Free Federated Learning for Tackling Data Heterogeneity, Yuan Wang et al. (2024). It develops an aggregation-free paradigm to mitigate client drift under severe data heterogeneity without standard centralized model aggregation.
