FedPIT: Towards Privacy-preserving and Few-shot Federated Instruction Tuning

Zhuo Zhang, Jingyuan Zhang, Jintao Huang, Lizhen Qu, Hongzhi Zhang, Zenglin XuarXiv 2024 · DOI

Abstract

Instruction tuning is vital for aligning Large Language Models (LLMs) with human intent, yet it faces significant challenges in data-scarce and privacy-sensitive domains. This paper introduces FewFedPIT, a federated learning framework designed to fine-tune LLMs on "few-shot" datasets while mitigating privacy risks. By integrating autonomous synthetic data generation with a novel parameter isolation strategy, FewFedPIT improves model performance by up to 13% and reduces the success rate of training data extraction attacks by approximately 20%.

Introduction

Instruction tuning typically requires substantial amounts of high-quality data. However, in sectors like healthcare and legal services, data is often distributed across multiple entities and protected by strict privacy regulations (e.g., GDPR, HIPAA). Federated Instruction Tuning (FedIT) offers a solution by allowing collaborative training without sharing raw data. Nonetheless, FedIT struggles with two primary issues:

  1. Data Scarcity: Individual clients often possess only a handful of relevant examples.
  2. Privacy Vulnerabilities: Model updates can inadvertently leak sensitive information through training data extraction attacks.

FewFedPIT addresses these hurdles by enabling clients to safely augment their local data and shielding private information during the parameter sharing process.

Methodology

The FewFedPIT framework introduces a three-stage process on the client side to enhance both utility and privacy.

Overview of the FedPIT framework illustrating the three-step client-side process: synthetic data generation, parameter isolation training, and local aggregation sharing.

1. Synthetic Data Generation

To overcome data scarcity, clients leverage the global LLM’s in-context learning (ICL) capabilities. Using a few local "seed" examples, the model generates a larger synthetic dataset. An Instruction Following Score (IFS) is employed to filter out low-quality generations, ensuring the synthetic data remains high-fidelity.

2. Parameter Isolation Training

FewFedPIT maintains two distinct sets of Low-Rank Adaptation (LoRA) parameters. One set is trained on the "public" synthetic data, while the other is dedicated to the "private" local data. This isolation prevents the potential noise from synthetic data from degrading the accuracy of the private model.

3. Local Aggregation Sharing

Before uploading to the central server, the client mixes the public and private parameters using a mixing hyperparameter ($\beta$). This step serves as a defense mechanism; the public parameters act as a mask for the private ones, making it significantly harder for an adversary to reconstruct original training examples from the shared weights.

Experimental Evaluation

The framework was evaluated using three instruction-tuning datasets: ALPACA (general domain), MedInstruct (medical instructions), and MedAlpaca (medical conversations). To simulate a realistic few-shot environment, datasets were clustered, and only 5 to 10 examples per cluster were provided to each client.

Results and Discussion

FewFedPIT demonstrated superior performance and robust privacy protection across all benchmarks.

Performance Gains

The proposed method outperformed standard federated baselines (such as FedAvg) by 7% to 13%. Notably, its performance reached within 3% of the "Centralized Training" upper bound, where all data is pooled.

Privacy Preservation

In simulated training data extraction attacks, FewFedPIT reduced the attacker's success rate (measured by Rouge-L similarity) by approximately 20% compared to standard FedIT. The $\beta$ mixing ratio allows for a flexible trade-off between privacy and utility, adaptable to specific regulatory requirements.

Robustness

The system remained resilient in non-IID (non-independent and identically distributed) scenarios, where data distributions vary significantly across clients—a common challenge in real-world federated learning.

Conclusion and Future Work

FewFedPIT effectively bridges the gap between data scarcity and privacy in federated instruction tuning. While the framework introduces some computational overhead due to client-side synthetic data generation, it provides a scalable and secure path for fine-tuning LLMs on sensitive data. Future research will focus on optimizing inference efficiency (e.g., using vLLM) and investigating advanced cryptographic defenses to further harden the parameter sharing phase.

Summary updated

BibTeX
@misc{zhang2024fedpit,
  author = {Zhuo Zhang and Jingyuan Zhang and Jintao Huang and Lizhen Qu and Hongzhi Zhang and Zenglin Xu},
  title = {{FedPIT: Towards Privacy-preserving and Few-shot Federated Instruction Tuning}},
  year = {2024},
  eprint = {2403.06131},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.06131},
}
Figure