Secure fine-tuning of private language model adapters prevents data leaks

VeilTune: Secure Fine-Tuning of Private LoRA Adapters on Public Pretrained Language Models

Cryptography and SecurityArtificial Intelligence

Summary

Fine-tuning public language models often involves using lightweight adapters trained on private data. Existing secure methods keep the data safe but leak intermediate outputs, which can be exploited to copy the adapter. This paper shows that revealing such intermediate results is risky and introduces VeilTune, a new protocol that fine-tunes adapters fully securely without leaking any values related to the adapter. VeilTune performs nearly as well as normal training while being more accurate and faster than prior secure methods.

What this means in practice

  • For cloud service providers: Train private LoRA adapters on client data without revealing intermediate outputs or adapters, enhancing privacy in AI services.
  • For security teams in ai companies: Use fully secure MPC-based fine-tuning to prevent data leakage when collaborating with external data owners on language model adaptation.

Authors

Huiyu Xie, Tanping Zhou, Tao Hu, Xinlei Liu, Hailong Ma

Abstract

Fine-tuning public pretrained language models with lightweight adapters such as LoRA has become the mainstream way to adapt them to downstream tasks. A service provider often trains its adapter on a data owner's samples, so two assets need protection: the data owner's samples and the provider's adapter. Existing secure fine-tuning protocols protect the samples but reveal to the data owner intermediate results of every training step, such as the hidden representations or logits of its inputs. We show that a single step suffices to copy the adapter: from the hidden representations of one mini-batch of 32 samples, the data owner fits an adapter that agrees with the provider's on 99.2% of test inputs, and logits alone yield about 94%. Protecting both assets therefore requires that no value that depends on the adapter be revealed throughout training. We present VeilTune, to the best of our knowledge the first protocol that fine-tunes a pretrained language model with backpropagation entirely in secure multi-party computation (MPC). VeilTune computes only what the loss depends on, replaces generic MPC operators with training-aware nonlinear operators that stay accurate on the values that training produces, and obliviously skips the steps corrupted by truncation failures. On four few-shot tasks with RoBERTa-large, VeilTune nearly matches plaintext training and is 5.3 points more accurate on average than SecP-Tuning, the state-of-the-art secure fine-tuning protocol. On SST-2, it achieves a 3.5x end-to-end speedup and a 3.6x reduction in communication over SecP-Tuning, and 26x and 17x over full fine-tuning in MPC.