A Split-and-Privatize Framework for Large Language Model Fine-Tuning

Xicong Shen, Yang Liu, Huiqi Liu, Jue Hong, Bing Duan, Zirui Huang, Yunlong Mao, Ye Wu, Di WuarXiv 2023

Abstract: Fine-tuning is a prominent technique to adapt a pre-trained language model to downstream scenarios. In parameter-efficient fine-tuning, only a small subset of modules are trained over the downstream datasets, while leaving the rest of the pre-trained model frozen to save computation resources. In recent years, a popular productization form arises as Model-as-a-Service (MaaS), in which vendors provide abundant pre-trained language models, server resources and core functions, and customers can fine-tune, deploy and invoke their customized model by accessing the one-stop MaaS with their own private dataset. In this paper, we identify the model and data privacy leakage risks in MaaS fine-tuning, and propose a Split-and-Privatize (SAP) framework, which manage to mitigate the privacy issues by adapting the existing split learning architecture. The proposed SAP framework is sufficiently investigated by experiments, and the results indicate that it can enhance the empirical privacy by 62% at the cost of 1% model performance degradation on the Stanford Sentiment Treebank dataset.

Introduction

As Large Language Models (LLMs) become central to modern business operations, the "Model-as-a-Service" (MaaS) paradigm has emerged as a dominant delivery model. In this setup, vendors provide the models and compute infrastructure, while customers provide the private data required for fine-tuning. However, this creates a double-sided privacy deadlock. Vendors treat their pre-trained model weights as proprietary trade secrets, while customers possess sensitive data (legal, financial, or medical) that cannot be uploaded to a vendor's cloud in plaintext without risking serious leaks.

Existing solutions, such as local text privatization (adding noise to text before transmission), often destroy the "utility" of the data, leading to significantly lower model accuracy. This research introduces the Split-and-Privatize (SAP) framework to protect both parties without sacrificing the model's intelligence.

The SAP Framework

The SAP framework addresses the privacy deadlock through three primary pillars: Split Learning, Text Privatization, and a novel Contributing-Token-Identification (CTI) method.

The architecture of the Split-and-Privatize (SAP) framework, illustrating the data flow between Customer and Vendor.

Split Learning (SL)

Instead of the customer sending raw data, the vendor sends the "bottom" part of the model (e.g., the embedding layer or initial encoder blocks) to the customer. The customer processes their data locally and only sends the resulting intermediate mathematical representations (tensors) back to the vendor for the remaining layers.

Text Privatization and CTI

To prevent the vendor from "inverting" these tensors to reconstruct the original words, the customer adds $d\chi$-privacy noise to the representations. The core innovation is Contributing-Token-Identification (CTI). While standard privatization adds noise to every word equally, CTI uses a statistical metric to identify which tokens are most critical for the specific task (e.g., "excellent" in sentiment analysis). The framework applies less noise to these "contributing tokens" and more noise to irrelevant ones, preserving accuracy while maintaining high overall privacy.

Experimental Setup

The framework was evaluated using RoBERTa-Large (355M parameters) across four diverse NLP benchmarks:

  • Financial Phrasebank (FP): Sentiment analysis of financial news.
  • Blog Dataset: Topic classification and gender-based attribute inference.
  • Stanford Sentiment Treebank (SST): Standard sentiment analysis.
  • Microsoft Research Paraphrase Corpus (MRPC): Semantic equivalence judgment.

Key Results and Discussion

The SAP-CTI framework demonstrates a superior balance between privacy and utility. On the SST dataset, the framework enhanced empirical privacy by 62% while suffering only a 1% degradation in accuracy compared to standard centralized fine-tuning.

Accuracy results of the SAP framework across four major NLP datasets.

Privacy-Utility Trade-offs

  • Split-Position: Moving the "split point" deeper into the model (giving the customer more layers) increases privacy. Running 8 encoder blocks locally can reach 80% empirical privacy even without noise, as higher-level representations are more abstract.
  • Frozen vs. Tunable Modules: Interestingly, making the customer's local layers "trainable" actually decreases privacy over time. As weights change each epoch, an attacker can observe different representations of the same input to "triangulate" the original data.
  • Attack Resistance: The framework proved robust against Embedding Inversion Attacks (EIA) and Attribute Inference Attacks (AIA).

Limitations and Future Work

While effective for classification, the CTI method struggled on the MRPC task because semantic equivalence relies on the relationship between all words rather than specific "contributing" tokens. Future research will explore more sophisticated token identification methods, such as attention-based importance scores, and investigate ways to reduce latency during the inference phase.

Summary updated

BibTeX
@misc{shen2023split,
  author = {Xicong Shen and Yang Liu and Huiqi Liu and Jue Hong and Bing Duan and Zirui Huang and Yunlong Mao and Ye Wu and Di Wu},
  title = {{A Split-and-Privatize Framework for Large Language Model Fine-Tuning}},
  year = {2023},
  eprint = {2312.15603},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.15603},
}
Figure