PDSS: A Privacy-Preserving Framework for Step-by-Step Distillation of Large Language Models

Tao Fan, Yan Kang, Weijing Chen, Hanlin Gu, Yuanfeng Song, Lixin Fan, Kai Chen, Qiang Yang · OpenReview

Abstract

In the context of real-world applications, leveraging large language models (LLMs) for domain-specific tasks often faces two major challenges: domain-specific knowledge privacy and constrained resources. To address these issues, we propose PDSS, a privacy-preserving framework for step-by-step distillation of LLMs. PDSS works on a server-client architecture, wherein client transmits perturbed prompts to the server's LLM for rationale generation. The generated rationales are then decoded by the client and used to enrich the training of task-specific small language model(SLM) within a multi-task learning paradigm. PDSS introduces two privacy protection strategies: the Exponential Mechanism Strategy and the Encoder-Decoder Strategy, balancing prompt privacy and rationale usability. Experiments demonstrate the effectiveness of PDSS in various text generation tasks, enabling the training of task-specific SLM with enhanced performance while prioritizing data privacy protection.

Introduction

Large Language Models (LLMs) like GPT-4 and LLaMA-3 possess remarkable reasoning capabilities but are often too resource-intensive for edge devices or private local servers. While Small Language Models (SLMs) offer efficiency, they typically lack the reasoning depth of their larger counterparts. Knowledge distillation is a common solution, but it traditionally requires sending raw, potentially sensitive user data to a central server.

The PDSS (Privacy-Preserving Step-by-Step) framework, often referred to as FedCoT in implementation, addresses this by allowing SLMs to "inherit" reasoning capabilities without compromising privacy. By utilizing Differential Privacy to obfuscate prompts before they leave the client’s device, PDSS enables secure Chain-of-Thought (CoT) distillation.

Methodology

The PDSS framework operates through a four-stage pipeline designed to balance privacy and utility:

  1. Privacy-Preserving Prompt Encoding: The client uses an Exponential Mechanism to perturb the prompt, replacing sensitive tokens with semantically similar but different ones to satisfy $\epsilon$-Differential Privacy requirements. An adaptive version (FedCoT-A) employs a local Encoder-Decoder SLM to optimize this "garbling" process.
  2. Server-Side Rationale Generation: The server-side LLM receives the noisy prompt and generates a "perturbed rationale"—a step-by-step explanation for the modified problem.
  3. Perturbed Rationales Decoding: The client receives the noisy rationale and uses its local decoder to map it back to the context of the original private prompt.
  4. Multi-Task Distillation: The client trains its task-specific SLM to predict the correct label and generate the reconstructed rationale simultaneously.
Overview of the PDSS framework architecture and the four-stage pipeline for privacy-preserving rationale generation.

Experimental Setup

The framework was evaluated on four benchmarks requiring complex reasoning: CommonsenseQA (CQA), OpenBookQA (OBQA), BoolQ, and ArcE. The experiments utilized LLaMA3-70B and Qwen1.5-14B as server-side teachers, with Pythia-1.4B and Qwen1.5-0.5B as client-side students.

A key insight from the study is that reasoning structures are robust; even with perturbed prompts, powerful LLMs can generate logic that remains useful for distillation. The adaptive strategy (FedCoT-A) proved particularly effective by learning to prioritize the privacy of sensitive keywords while preserving semantic "gist."

Key Results

PDSS demonstrates significant performance gains and data efficiency:

  • Performance Gains: In Setting 1 (LLaMA3-70B teacher), FedCoT-A outperformed standalone SLM training by 5.7% on CQA and 6.7% on BoolQ.
  • Data Efficiency: SLMs trained with FedCoT using only 50% of available data often matched or exceeded standalone models trained on 100% of the data.
  • Privacy-Utility Tradeoff: While performance improves as the privacy budget ($\epsilon$) increases, the framework remains viable even under strict privacy constraints ($\epsilon=1$).
Performance comparison of FedCoT variants against baselines across four reasoning benchmarks.

Conclusion

PDSS provides a robust framework for transferring reasoning capabilities from massive LLMs to efficient SLMs while maintaining strict data privacy. While the quality of the student remains dependent on the teacher's reasoning accuracy and local training adds some computational overhead, the framework's ability to provide interpretable, high-performance models on edge devices marks a significant step forward for privacy-sensitive AI applications.

Summary updated

BibTeX
@misc{fan2024pdss,
  author = {Tao Fan and Yan Kang and Weijing Chen and Hanlin Gu and Yuanfeng Song and Lixin Fan and Kai Chen and Qiang Yang},
  title = {{PDSS: A Privacy-Preserving Framework for Step-by-Step Distillation of Large Language Models}},
  year = {2024},
  eprint = {2406.12403},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.12403},
}
Figure