Hot-pluggable Federated Learning: Bridging General and Personalized FL via Dynamic Selection

Lei Shen, Zhenheng Tang, Lijun Wu, Yonggang Zhang, Xiaowen Chu, Tao Qin, Bo HanICLR 2025

TL;DR

Hot-Pluggable Federated Learning (HPFL) bridges the gap between general and personalized federated learning by allowing clients to dynamically select and "plug in" specialized model components from a server-side store. This approach enables models to adapt on-the-fly to new data distributions while maintaining strong privacy guarantees and high efficiency.

The Problem: The Gap Between General and Personalized FL

Federated Learning (FL) typically falls into two camps: Generic FL (GFL), which aims to train a single global model that works for everyone, and Personalized FL (PFL), which creates custom models tailored to each user's local data.

The challenge is that GFL often struggles with data heterogeneity—when users have vastly different data distributions, a single global model delivers mediocre performance for everyone. Conversely, PFL models tend to "over-fit" to a user's specific local environment. If a user's data distribution suddenly changes (e.g., traveling to a new city and using a locally personalized recommendation engine), the personalized model often fails.

The authors identify this significant "performance gap" where PFL models collapse when faced with global test data. To resolve this, they propose a new paradigm called Selective FL (SFL): instead of relying on one static model, clients should be able to dynamically pick the best-fitting personalized model for their current task.

Methods: The HPFL Framework

To make Selective FL practical and efficient, the authors introduce HPFL. This framework decomposes a neural network into two distinct parts: a shared, frozen backbone (acting as a universal feature extractor) and small, trainable plug-in modules (typically the final classification layers).

The HPFL framework: Clients train personalized plug-ins and upload them to a modular store. During inference, clients dynamically select the best plug-in for their current data.

The HPFL workflow operates in several key steps:

  1. Global Training: A standard GFL algorithm (like FedAvg) is used to train a robust, shared backbone.
  2. Personalization: Clients freeze the shared backbone and train their own small plug-in modules using their local data.
  3. Modular Store: Clients upload these trained plug-ins to a central server. Crucially, they attach a plug-in marker—a representative, noised feature vector of their local data.
  4. Dynamic Selection: During inference, a client generates a "task marker" from its current batch of incoming data. It uses a selection algorithm (such as Maximum Mean Discrepancy) to query the server's modular store and retrieve the plug-in that best matches its current data distribution.
  5. Privacy Protection: To prevent "feature inversion attacks" (where malicious actors might try to reconstruct raw data from the markers), the framework applies Gaussian noise to the markers, providing formal Differential Privacy (DP) guarantees.

Key Insights

  • The "Win-Win" of Noise: Surprisingly, adding noise to ensure privacy doesn't significantly degrade the accuracy of the selection process. The system remains robust enough that even heavily noised markers successfully guide clients to the most suitable plug-ins.
  • Plug-ins are Sufficient: Clients do not need to download or swap out entire models to gain the benefits of personalization. Swapping just the final layers is highly communication-efficient while delivering exceptional performance.
  • Beyond Static Learning: Because of its modular nature, HPFL naturally supports Continual Federated Learning. As new tasks or data distributions arrive, clients simply train and upload new plug-ins without needing to retrain the entire global system or risking "catastrophic forgetting" of old tasks.

Key Results

The framework was rigorously evaluated on four standard image classification benchmarks (CIFAR-10, CIFAR-100, Fashion-MNIST, and Tiny-ImageNet-200) using Dirichlet sampling to simulate realistic, heterogeneous data distributions.

Main experiment results comparing HPFL against baseline GFL and PFL methods across multiple datasets and client scales.

HPFL consistently outperformed state-of-the-art GFL and PFL baselines across all tested datasets:

  • Superior Accuracy: On CIFAR-10 (with 10 clients), HPFL achieved 95.7% accuracy in the personalized model setting, significantly outpacing standard FedAvg (81.5%) and advanced PFL methods like FedRoD (85.3% GFL / 94.3% PFL).
  • Scalability: Unlike many PFL methods that degrade as the network grows, HPFL maintained high performance even when scaled up to 100 clients.
  • Architecture Agnostic: The performance benefits of HPFL held true across different neural network architectures, proving effective on both Simple-CNNs and MobileNet.

Limitations and Future Work

While HPFL offers a powerful new paradigm, the authors note a few areas for future refinement:

  • Selection Overhead: As the number of clients—and consequently, the number of plug-ins—grows into the thousands, searching the modular store becomes computationally expensive. Future work could explore clustering similar plug-ins to reduce the search space.
  • Plug-in Complexity: The current selection mechanism works best for small, shallow plug-ins (e.g., a single layer). Accurately matching deeper, more complex plug-ins to data distributions remains a challenge.
  • Out-of-Distribution (OOD) Scenarios: HPFL excels at finding the best existing plug-in. However, more research is needed to handle true OOD scenarios where none of the existing plug-ins in the store are a good fit for the incoming data.

Summary updated

BibTeX
@inproceedings{shen2025hot,
  author = {Lei Shen and Zhenheng Tang and Lijun Wu and Yonggang Zhang and Xiaowen Chu and Tao Qin and Bo Han},
  title = {{Hot-pluggable Federated Learning: Bridging General and Personalized FL via Dynamic Selection}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=B8akWa62Da},
}
Figure