Efficient Personalized Federated Learning via Sparse Model-Adaptation

Daoyuan Chen, Liuyi Yao, Dawei Gao, Bolin Ding, Yaliang Li

Abstract

Federated Learning (FL) faces significant challenges due to data heterogeneity across clients and varying hardware capabilities (system heterogeneity). Traditional Personalized Federated Learning (PFL) methods often address data distribution shifts but fail to account for the computational constraints of edge devices. This paper introduces pFedGate, a novel framework that utilizes lightweight gating layers to generate sparse, personalized models. By adaptively masking a shared global model based on local data and hardware constraints, pFedGate achieves superior accuracy while significantly reducing computation and communication overhead. Our results demonstrate that pFedGate outperforms state-of-the-art methods across multiple benchmarks, offering up to a 4.53% improvement in accuracy while reducing peak memory usage by 66%.

1. Introduction

Federated Learning (FL) enables collaborative model training across decentralized parties without the need for raw data exchange. Despite its promise, FL deployment is hindered by two primary forms of heterogeneity:

  1. Data Heterogeneity: Non-identical data distributions (non-IID) across clients make a single global model sub-optimal for individual local tasks.
  2. System Heterogeneity: Clients often possess vastly different hardware resources, ranging from high-performance servers to low-power IoT devices.

Existing PFL approaches typically focus on data heterogeneity but often increase the local computational burden, making them unsuitable for resource-constrained environments. We propose pFedGate, which treats model sparsity not merely as a compression tool, but as a mechanism for personalization. By selecting client-specific sub-networks, pFedGate simultaneously addresses both data and system constraints.

2. The pFedGate Framework

The core of pFedGate is a shared global model augmented by client-specific, lightweight gating layers. This architecture enables dynamic model adaptation through several key mechanisms:

2.1 Conditional Gating and Sparse Adaptation

Unlike static pruning methods, pFedGate employs a conditional gating layer that predicts importance weights for different blocks of the global model based on the input data batch. The personalized local model is then derived via a block-wise Hadamard product between the global parameters and the generated sparse mask. This allows the model to activate different sub-networks dynamically, effectively tailoring the hypothesis space to the specific characteristics of the local data.

2.2 Hardware-Aware Optimization (The Knapsack Constraint)

To respect varying system limits, pFedGate formulates the sparsity requirement as a "knapsack problem." The objective is to maximize the importance of selected model blocks while ensuring the total parameter count remains under a client-specific budget ($s_i$). This ensures that even low-end devices can participate in training by focusing on the most critical parameters for their specific data distribution.

2.3 Differentiable Training

Because discrete block selection is non-differentiable, pFedGate utilizes the Straight-Through Estimator (STE). This allows the gating layer to be trained alongside the model parameters using standard backpropagation, ensuring a seamless end-to-end optimization process.

3. Theoretical Insights

A key contribution of this work is the theoretical demonstration that sparsity can enhance generalization. By applying Ockham’s Razor to the federated context, we show that lower sparsity (fewer active parameters) can lead to tighter generalization error bounds. By restricting the model to a focused sub-network, pFedGate avoids overfitting to global noise and concentrates on relevant local patterns.

4. Experimental Evaluation

We evaluated pFedGate against several state-of-the-art (SOTA) baselines, including FedEM, pFedMe, and Ditto, using four standard benchmarks: EMNIST, FEMNIST, CIFAR-10, and CIFAR-100. Data was partitioned using Dirichlet allocation to simulate realistic non-IID scenarios.

4.1 Accuracy and Efficiency

pFedGate consistently outperformed all baselines, achieving an average accuracy improvement of up to 4.53%. Notably, on the EMNIST dataset, pFedGate with a sparsity of 0.3 (utilizing only 30% of the model) still surpassed the performance of dense SOTA models.

In terms of system efficiency, practical tests on CIFAR-10 revealed that pFedGate reduced peak memory usage by 66% and training time by 72% compared to standard FedAvg. This efficiency makes it highly viable for real-world edge deployment.

4.2 Robustness to Novel Clients

pFedGate demonstrates exceptional performance for "novel clients"—those joining the network after initial training. These clients only need to train the lightweight gating layer to adapt the pre-trained global model to their local data, significantly lowering the barrier to entry for new participants.

5. Conclusion and Future Work

pFedGate represents a significant step toward efficient and personalized federated learning. By leveraging sparse model adaptation, it bridges the gap between high-performance personalization and the practical constraints of edge hardware. Future research will explore the privacy implications of sparse masks and extend the framework to task-level adaptation for complex multi-task learning environments.

Summary updated

BibTeX
@inproceedings{chen2023efficient,
  author = {Daoyuan Chen and Liuyi Yao and Dawei Gao and Bolin Ding and Yaliang Li},
  title = {{Efficient Personalized Federated Learning via Sparse Model-Adaptation}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=ieSN7Xyo8g},
}
Figure