DapperFL: Domain Adaptive Federated Learning with Model Fusion Pruning for Edge Devices

Yongzhe Jia, Xuyun Zhang, Hongsheng Hu, Kim-Kwang Raymond Choo, Lianyong Qi, Xiaolong Xu, Amin Beheshti, Wanchun Dou

Abstract

Federated learning (FL) has emerged as a prominent machine learning paradigm in edge computing environments, enabling edge devices to collaboratively optimize a global model without sharing their private data. However, existing FL frameworks suffer from efficacy deterioration due to the system heterogeneity inherent in edge computing, especially in the presence of domain shifts across local data. In this paper, we propose a heterogeneous FL framework DapperFL, to enhance model performance across multiple domains. In DapperFL, we introduce a dedicated Model Fusion Pruning (MFP) module to produce personalized compact local models for clients to address the system heterogeneity challenges. The MFP module prunes local models with fused knowledge obtained from both local and remaining domains, ensuring robustness to domain shifts. Additionally, we design a Domain Adaptive Regularization (DAR) module to further improve the overall performance of DapperFL. The DAR module employs regularization generated by the pruned model, aiming to learn robust representations across domains. Furthermore, we introduce a specific aggregation algorithm for aggregating heterogeneous local models with tailored architectures and weights. Experimental results on benchmark datasets with multiple domains demonstrate that DapperFL outperforms several state-of-the-art FL frameworks by up to 2.28%, while significantly achieving model volume reductions ranging from 20% to 80%.

Introduction

Deploying Federated Learning (FL) on real-world edge devices like smartphones or IoT sensors faces two major roadblocks: System Heterogeneity and Domain Shifts. System heterogeneity refers to the diverse hardware capabilities where low-power sensors might time out during training. Domain shifts occur because data is rarely "Independent and Identically Distributed" (non-IID); for instance, photos taken in different environments represent different domains. Most FL frameworks that compress models for weak devices often overfit to the local domain, making the global model fragile. DapperFL addresses these by creating compact, personalized models robust across multiple domains.

The DapperFL Framework

The DapperFL architecture consists of three core components designed to handle the "messy" reality of edge computing.

Overview of the DapperFL architecture including Model Fusion Pruning (MFP) and Domain Adaptive Regularization (DAR).

Model Fusion Pruning (MFP)

Standard pruning removes "unimportant" weights from a local model. MFP is more sophisticated: it fuses the global model's knowledge with the local model before pruning. It uses a dynamic fusion factor ($\alpha$) that starts high, relying on global knowledge for guidance, and gradually decreases as the local model specializes. This ensures the pruned model retains generalizable features.

Domain Adaptive Regularization (DAR)

To combat domain shifts, DapperFL splits the model into an encoder and a classifier. A squared $\ell_2$ norm penalty is applied to the encoder’s representations, encouraging the model to learn domain-invariant features. This prevents the encoder from becoming biased toward a single client's specific data style.

Heterogeneous Model Aggregation

Since clients may have differently pruned architectures, the server performs a "structure recovery" step. It uses the previous round's global weights to fill in the gaps of the pruned local models before performing weighted averaging to update the global model.

Experimental Results

The framework was evaluated on two classic domain generalization benchmarks: Digits (MNIST, USPS, SVHN, SYN) and Office Caltech (Caltech, Amazon, Webcam, DSLR). The researchers simulated 10 heterogeneous clients using ResNet10 and ResNet18 backbones.

Global accuracy comparison on the Digits dataset across various FL frameworks.

DapperFL outperformed eight state-of-the-art FL frameworks, achieving a global accuracy of 74.30% on Digits and 67.75% on Office Caltech. This represents improvements of up to 2.28% over competitors. Furthermore, it achieved model volume reductions (parameters and FLOPs) of 20% to 80% without significant performance loss.

Key Insights

  • Pruning as a Regularizer: At certain pruning rates, the pruned model performed better than the full-sized model, suggesting pruning acts as regularization by removing redundant parameters.
  • Hardware-Friendly Sparsity: DapperFL utilizes structural channel pruning, which is easier for standard hardware (CPUs/GPUs) to accelerate compared to unstructured pruning.

Conclusion

DapperFL effectively bridges the gap between model compression and domain robustness in federated learning. While the framework relies on several hyperparameters that currently require manual tuning, it sets a strong foundation for future work in automatic hyperparameter selection for diverse edge environments.

Summary updated

BibTeX
@inproceedings{jia2024dapperfl,
  author = {Yongzhe Jia and Xuyun Zhang and Hongsheng Hu and Kim-Kwang Raymond Choo and Lianyong Qi and Xiaolong Xu and Amin Beheshti and Wanchun Dou},
  title = {{DapperFL: Domain Adaptive Federated Learning with Model Fusion Pruning for Edge Devices}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=Pezt0xttae},
}
Figure