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

Huiyu Xie, Tanping Zhou, Tao Hu, Xinlei Liu, Hailong MaarXiv 2026

TL;DR

VeilTune is the first protocol to perform full backpropagation-based fine-tuning of LoRA adapters entirely within Secure Multi-Party Computation (MPC). It achieves "two-way privacy"—protecting both the user's data and the provider's proprietary model—while being significantly faster and more accurate than previous methods that only offered partial protection.

What Problem Does This Paper Address?

When a company wants to fine-tune a Large Language Model (LLM) on a client's private data, they usually use lightweight "adapters" like LoRA. This scenario involves two sensitive assets: the client's private data and the provider's proprietary adapter.

Existing "secure" protocols typically focus on protecting the data but leave the adapter vulnerable. They often reveal intermediate values—like hidden representations or "logits" (prediction scores)—to the data owner. The authors of VeilTune demonstrate a major security flaw: a data owner can use these intermediate values to perform a "model extraction attack," effectively stealing the provider's adapter. In fact, they show that seeing the hidden states from just a single batch of 32 samples is enough to clone an adapter with over 99% accuracy.

To truly protect both parties, the entire training process—including the forward pass, backpropagation, and weight updates—must happen inside a "black box" where neither party sees any intermediate values.

Methods

VeilTune implements the entire LoRA fine-tuning loop using Secure Multi-Party Computation (MPC). In MPC, data is "secret-shared" between parties; they can perform calculations on the data without ever seeing the actual values.

To make this computationally feasible and numerically stable, the authors introduced three key innovations:

  1. Token Packing: In standard training, a lot of time is wasted on "padding" (empty space used to make sentences the same length). VeilTune uses the fact that sentence lengths are public to "pack" only the real tokens into a dense sequence, nearly halving the communication cost (see Figure 4). Token packing illustration
  2. Training-Aware Nonlinear Operators: Standard MPC approximations for functions like GELU or Softmax are designed for inference (making predictions). Training is much harder because it involves a wider range of values and requires calculating derivatives. VeilTune uses custom-designed operators that remain accurate even for the extreme values produced during training (see Figure 5). GELU and its derivative approximation
  3. Oblivious Step Skipping: Fixed-point arithmetic in MPC can occasionally suffer from "truncation failures," which create massive, garbage gradients that would ruin the model. VeilTune detects these failures by checking gradient magnitudes and "obliviously" skips those training steps without letting either party know a skip occurred.
Token packing illustration
GELU and its derivative approximation

Datasets

The authors evaluated VeilTune on four diverse few-shot classification tasks using the RoBERTa-large model:

  • SST-2: Sentiment analysis.
  • Yelp Polarity: Restaurant review sentiment.
  • AG News: News topic classification.
  • RTE: Recognizing Textual Entailment (determining if one sentence follows from another).

Key Insights and Ideas

  • The "Intermediate Leak" is Fatal: The most surprising finding is how little information an attacker needs to steal a LoRA adapter. Previous protocols assumed that as long as the adapter weights themselves weren't revealed, the model was safe. VeilTune proves that intermediate activations are a "skeleton key" for model theft (see Figure 1). Attack performance showing high agreement with the original adapter
  • Training is Numerically "Wilder" than Inference: Generic MPC frameworks often fail during fine-tuning because they can't handle the "outlier" dimensions of pretrained models or the tiny values required by optimizers like Adam. Figure 3 illustrates how standard operators are only accurate in a narrow "shaded band," while training values often fall far outside it. Cost breakdown and input ranges for generic operators
  • Backpropagation is Worth the Cost: While some researchers try to avoid backpropagation in MPC because it's complex, VeilTune shows that "zeroth-order" (derivative-free) methods are actually more expensive in the long run because they require many more steps to converge.
Attack performance showing high agreement with the original adapter
Cost breakdown and input ranges for generic operators

Key Results

VeilTune sets a new state-of-the-art for secure fine-tuning:

  • Accuracy: It nearly matches the performance of standard "plaintext" training, staying within 0.3 to 1.7 percentage points. It outperforms the previous best secure protocol (SecP-Tuning) by an average of 5.3 points.
  • Efficiency: On the SST-2 task, VeilTune is 3.5x faster and uses 3.6x less communication than SecP-Tuning.
  • Scalability: Compared to full fine-tuning in MPC, VeilTune is up to 26x faster, proving that LoRA is the right path for private adaptation.

The overall workflow, shown in Figure 2, demonstrates how the model is split to maximize efficiency while maintaining strict privacy boundaries. Workflow of VeilTune

Workflow of VeilTune

Limitations and Future Work

  • Computational Overhead: While much faster than previous work, MPC is still orders of magnitude slower than plaintext training. Training a model that takes minutes on a GPU still takes hours in VeilTune.
  • Semi-Honest Assumption: The protocol assumes both parties follow the rules (semi-honest). Protecting against "malicious" parties who might intentionally send wrong data to corrupt the model remains a challenge for future research.
  • Model Size: The experiments focused on RoBERTa-large. Scaling this to massive 7B+ parameter models will require further optimizations in communication and memory management.

Summary updated

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.
BibTeX
@misc{xie2026veiltune,
  author = {Huiyu Xie and Tanping Zhou and Tao Hu and Xinlei Liu and Hailong Ma},
  title = {{VeilTune: Secure Fine-Tuning of Private LoRA Adapters on Public Pretrained Language Models}},
  year = {2026},
  eprint = {2611.11817},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.11817},
}
Figure