Skip to main content
QUICK REVIEW

[Paper Review] Personalized Federated Learning through Local Memorization

Othmane Marfoq, Giovanni Neglia|arXiv (Cornell University)|Nov 17, 2021
Privacy-Preserving Technologies in DataComputer Science38 references21 citations
TL;DR

This paper proposes kNN-Per, a personalized federated learning method that combines a globally trained deep neural network with local k-nearest neighbors (kNN) models using shared embeddings. By interpolating the global model with client-specific kNN predictions, the approach achieves significantly higher accuracy and fairness than state-of-the-art methods, especially under data distribution shifts and system heterogeneity.

ABSTRACT

Federated learning allows clients to collaboratively learn statistical models while keeping their data local. Federated learning was originally used to train a unique global model to be served to all clients, but this approach might be sub-optimal when clients' local data distributions are heterogeneous. In order to tackle this limitation, recent personalized federated learning methods train a separate model for each client while still leveraging the knowledge available at other clients. In this work, we exploit the ability of deep neural networks to extract high quality vectorial representations (embeddings) from non-tabular data, e.g., images and text, to propose a personalization mechanism based on local memorization. Personalization is obtained by interpolating a collectively trained global model with a local $k$-nearest neighbors (kNN) model based on the shared representation provided by the global model. We provide generalization bounds for the proposed approach in the case of binary classification, and we show on a suite of federated datasets that this approach achieves significantly higher accuracy and fairness than state-of-the-art methods.

Motivation & Objective

  • Address statistical heterogeneity in federated learning, where clients have non-i.i.d. data distributions, leading to poor performance of a single global model.
  • Overcome fairness and accuracy limitations of conventional federated learning by enabling personalized models per client without retraining the global model.
  • Develop a simple, communication-efficient personalization mechanism that adapts to dynamic data shifts and varying client hardware capabilities.
  • Provide theoretical justification for the method through generalization bounds in binary classification.
  • Minimize privacy leakage by performing personalization locally after communication ends, enabling integration with differential privacy.

Proposed method

  • Train a global deep neural network using FedAvg or similar FL algorithms to learn shared representations from all clients.
  • Use the global model's final layer features as fixed embeddings for input data at each client, enabling consistent representation across clients.
  • At each client, build a local kNN model using the shared embeddings of their local datastore, where predictions are based on the k most similar training examples.
  • Interpolate the global model’s prediction with the local kNN prediction using a learnable or fixed hyperparameter λ: y_pred = λ * y_global + (1 - λ) * y_knn.
  • Allow clients to independently tune k and update their local datastore (e.g., via FIFO or concatenate strategies) without retraining the global model.
  • Support differential privacy by applying it only to the global model training, while local kNN inference remains private and communication-free post-training.

Experimental results

Research questions

  • RQ1Can local memorization via kNN improve model accuracy and fairness in federated learning under statistical heterogeneity?
  • RQ2How does the quality of the global model’s representation affect the performance of the local kNN model in personalized FL?
  • RQ3Can kNN-Per maintain high performance when data distributions shift over time without retraining the global model?
  • RQ4Does the proposed method achieve better generalization than state-of-the-art personalized FL approaches like FedRep and pFedGP?
  • RQ5What is the theoretical generalization bound for the kNN-Per method in binary classification settings?

Key findings

  • kNN-Per achieves significantly higher test accuracy than state-of-the-art methods, including FedRep and pFedGP, across multiple federated benchmark datasets.
  • The method demonstrates strong robustness to data distribution shifts: when client data distributions change after training, kNN-Per maintains higher accuracy than baselines, especially when using dynamic datastore update strategies like FIFO or concatenate.
  • The test accuracy of kNN-Per with λ=1 (pure kNN) shows a nearly linear relationship with the global model’s test accuracy, indicating that better global representations lead to better local memorization.
  • kNN-Per outperforms FedAvg+ and other fine-tuning baselines, particularly in high-heterogeneity settings, due to its ability to capture local distribution shifts via kNN.
  • The method enables efficient adaptation to new data: clients can update their local datastore without retraining the global model, supporting dynamic and evolving data environments.
  • Theoretical analysis provides a generalization bound for kNN-Per in binary classification, showing that the local kNN error is upper bounded by a term linearly dependent on the global model’s error, justifying the empirical gains.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.