Heterogeneous Federated Learning with Splited Language Model

Yifan Shi, Yuhui Zhang, Ziyue Huang, Xiaofeng Yang, Li Shen, Wei Chen, Xueqian Wang · DOI

Abstract

Federated Split Learning (FSL) is a promising distributed learning paradigm in practice, which gathers the strengths of both Federated Learning (FL) and Split Learning (SL) paradigms, to ensure model privacy while diminishing the resource overhead of each client, especially on large transformer models in a resource-constrained environment, e.g., Internet of Things (IoT). However, almost all works merely investigate the performance with simple neural network models in FSL. Despite the minor efforts focusing on incorporating Vision Transformers (ViT) as model architectures, they train ViT from scratch, thereby leading to enormous training overhead in each device with limited resources. Therefore, in this paper, we harness Pre-trained Image Transformers (PITs) as the initial model, coined FedV, to accelerate the training process and improve model robustness. Furthermore, we propose FedVZ to hinder the gradient inversion attack, especially having the capability compatible with black-box scenarios, where the gradient information is unavailable. Concretely, FedVZ approximates the server gradient by utilizing a zeroth-order (ZO) optimization, which replaces the backward propagation with just one forward process. Empirically, we are the first to provide a systematic evaluation of FSL methods with PITs in real-world datasets, different partial device participations, and heterogeneous data splits. Our experiments verify the effectiveness of our algorithms.

Introduction

Training large-scale models like Transformers on edge devices, such as smartphones or IoT sensors, presents significant challenges due to resource constraints and data heterogeneity. Standard Federated Learning (FL) requires devices to train full models, which is often infeasible for low-power hardware. Split Learning (SL) mitigates this by offloading model segments to a central server but often struggles with non-IID (heterogeneous) data distributions. Furthermore, training Transformers from scratch in a distributed setting is computationally expensive. Security is another concern; curious servers may perform gradient inversion attacks to reconstruct private local data from transmitted gradients. This paper introduces FedV and FedVZ to address these limitations by leveraging pre-trained models and privacy-preserving optimization techniques.

Methodology

We propose a "sandwich" architecture where a Pre-trained Image Transformer (PIT) is partitioned into three segments: a client-side Head, a server-side Encoder, and a client-side Tail. This structure allows the client to retain control over initial feature extraction and final prediction while offloading the heavy transformer blocks to the server.

FedV: Leveraging Pre-trained Models

FedV utilizes PITs as a starting point. By fine-tuning a pre-trained split model rather than training from scratch, FedV significantly reduces training time and improves robustness against heterogeneous data. This approach capitalizes on the inherent stability of pre-trained features.

FedVZ: Privacy via Zeroth-Order Optimization

To enhance privacy against gradient inversion attacks, we introduce FedVZ. In standard FSL, the server sends gradient information back to the client, which can be exploited. FedVZ employs Zeroth-Order (ZO) optimization to approximate gradients using two forward passes with slight perturbations. This eliminates the need for explicit gradient transmission, making the framework compatible with black-box scenarios where internal server parameters are inaccessible.

Algorithm 2: Client-side Process detailing the local operations for Head, Tail, and model updates.

Experimental Evaluation

We evaluated our frameworks on CIFAR-10, CIFAR-100, and Tiny-ImageNet datasets, partitioned to simulate real-world non-IID conditions using Dirichlet and Pathological splits. We compared FedV and FedVZ against baselines including FedAvg, Fed-RoD, and FESTA.

Key Results

  • Accuracy Boost: FedV achieved 96.87% accuracy on CIFAR-10 (Dirichlet 0.3), outperforming Fed-RoD by over 9%. On Tiny-ImageNet, FedV reached approximately 89% accuracy, a substantial improvement over FESTA's 36%.
  • Model Robustness: Vision Transformers demonstrated superior performance over traditional CNNs (e.g., ResNet) in handling data heterogeneity, likely due to their ability to model long-range dependencies.
  • Privacy-Performance Trade-off: FedVZ maintained performance levels very close to FedV while providing enhanced security through ZO optimization, proving that privacy does not necessitate a significant drop in accuracy.

Conclusion

FedV and FedVZ provide a robust framework for deploying large-scale Transformers in resource-constrained federated environments. By combining pre-trained models with split learning and zeroth-order optimization, we achieve state-of-the-art performance and enhanced privacy. Future work will focus on addressing communication overhead and scaling these architectures to even larger foundation models.

Summary updated

BibTeX
@misc{shi2024heterogeneous,
  author = {Yifan Shi and Yuhui Zhang and Ziyue Huang and Xiaofeng Yang and Li Shen and Wei Chen and Xueqian Wang},
  title = {{Heterogeneous Federated Learning with Splited Language Model}},
  year = {2024},
  eprint = {2403.16050},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.16050},
}
Figure