Skip to content

POST: Efficient Privacy-Preserving Soft Prompt Transfer for LLMsEfficient and Privacy-Preserving Soft Prompt Transfer for LLMs

arXiv· arXiv:2506.16196· ICML 2025· Xun Wang, Jing Xu, Franziska Boenisch, Michael Backes, Christopher A. Choquette-Choo, Adam DziedzicCISPA Helmholtz Center for Information Security; Google DeepMindIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose POST: privately tune the soft prompt on a small model and then transfer it to a large LLM. The authors report that on Llama2-7b, the sst2 transfer accuracy reaches 90.02% (Table 1a).

Threat modelTwo-party setting: the LLM provider deploys a general-purpose LLM and offers paid queries; the user holds private data and wants to adapt the LLM while keeping the data confidential from the provider. The protected object is the private training data used to tune the soft prompt (excluding inference-stage queries). Optionally, DP (ε=8) is used to formally bound leakage.

Questions
Soft prompts are strongly coupled to the LLM they are tuned on and are difficult to transfer to other models: retuning on each LLM is costly, and when the model is hosted externally, tuning prompts requires handing private data to the provider (e.g., NVIDIA NeMo API), which raises privacy issues.
Methods
POST has three steps: the provider uses knowledge distillation to compress the large LLM into a small model and sends it to the user; the user locally tunes the soft prompt with private data (optionally with DP); the provider, using only a small public dataset, transfers the prompt back to the large LLM with two KL divergence losses.
Experiments and results
On Llama2-7b, Roberta-base, and GPT2-XL, POST transfer accuracy exceeds the large-model zero-shot, small-model prompt tuning, and direct transfer baselines, and outperforms DP-OPT and Zero-Shot Transfer (Table 5); the LiRA attack shows that DP prompt tuning reduces membership inference leakage (Table 3); on sst2, runtime drops from 2660 minutes to 409 minutes (Table 4).
Limitations and future work
The authors point out: inference-stage leakage is not addressed; pretraining data leakage is not prevented; distillation may be expensive for the provider; public dataset selection affects transfer performance and there is no optimal selection strategy (Appendix A). The experiments are limited to three open-source LLMs and classification/extraction tasks.
Experimental setupRoberta-base、GPT2-XL et al. · sst2、imdb et al. · test accuracy、AUC et al.
Evaluated models
Roberta-baseGPT2-XLLlama2-7b
Benchmarks
sst2imdbtweetarisetvmpqaMITAIEagnewsboolqdisastertrecBookCorpusWikiMIA
Metrics
test accuracyAUCTPR@1%FPRruntime (min)
AI summaryThe POST framework lets soft prompts be tuned locally on small models first, then transferred to larger LLMs, to reduce tuning compute and avoid sharing private data with external model providers. It uses knowledge distillation to derive small models from large LLMs to improve prompt transferability, supports optional differential privacy guarantees, and completes transfer with the help of small public datasets. Experiments show the method reduces computational cost and protects privacy while maintaining the high utility of soft prompts.

The POST framework lets soft prompts be tuned locally on small models first, then transferred to larger LLMs, to reduce tuning compute and avoid sharing private data with external model providers. It uses knowledge distillation to derive small models from large LLMs to improve prompt transferability, supports optional differential privacy guarantees, and completes transfer with the help of small public datasets. Experiments show the method reduces computational cost and protects privacy while maintaining the high utility of soft prompts.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Addresses the transfer difficulty caused by the strong coupling between soft prompts and the LLM they are tuned on: retuning on each LLM is costly, and in hosted settings, tuning prompts requires handing private data to the provider.

    Core problem: soft prompts are strongly coupled to the LLM they are tuned on and are difficult to transfer to other LLMs, which puts private task adaptation in a dilemma between efficiency and privacy.

    • Setting and importance: Soft prompts are already popular in APIs (e.g., NVIDIA NeMo API) and can encode more training samples than discrete prompts while occupying fewer tokens. However, tuning soft prompts requires backpropagation through the entire LLM, so the model and data must be on the same device.
    • Shortcomings of existing approaches: According to the paper, users must either hand private data to the LLM provider (the approach of existing APIs, which raises privacy issues), or the provider must hand over the model (which involves intellectual property and breaks the pay-per-query business model). Existing soft-prompt transfer methods either still require access to private data during transfer (Su et al., 2022), or after transfer perform worse on large models than small models with prompts (Wu et al., 2023).
    • Core observation: The authors argue that a small model obtained by knowledge distillation maintains feature-space alignment with the large model, so prompts tuned on the small model can be transferred back to the large model with the help of a small public dataset, without touching private data.
    • Proposed in the paper: The POST (Privacy Of Soft-prompt Transfer) framework—distill a small model, tune prompts locally (optionally with DP), and transfer back to the large LLM using only public data; evaluated on 5 classification datasets and 2 generation tasks across 3 LLMs.
    • Threat model:
      • Protected object: the private downstream data (training data) used to tune the soft prompt; protection of inference-stage queries is explicitly out of scope (footnote 1).
      • Two parties: the LLM provider deploys a general-purpose LLM and offers paid queries; the user holds private data and requires the data to be kept confidential from the provider.
      • Privacy guarantee: optionally, differential privacy (ε=8 in the main-text experiments) is used to formally bound leakage during the prompt-tuning stage; the provider can only access public data during the transfer stage.
      • Not explicitly stated in the paper: whether the provider is modeled as an active attacker (honest-but-curious, etc.); it is only described as data not being leakable to the provider.
  2. What related research exists?

    Related work falls into four groups: prompt tuning, knowledge distillation, soft/discrete prompt transfer, and differentially private prompt methods; the baselines are DP-OPT and Zero-Shot Transfer.

    Prompt Tuning

    • Discrete prompts (Schick & Schütze, 2020; Shin et al., 2020, etc.) — text tokens are prepended to the input; the paper states that this requires extensive engineering trial and error.
    • Soft prompts (Lester et al., 2021; Li & Liang, 2021, etc.) — trainable embedding vectors are prepended to the input and automatically tuned by gradient methods; the paper states that this has higher performance and lower cost.

    Knowledge Distillation

    • Hinton et al. (2015) proposed KD; Sanh et al. (2019), Gu et al. (2024), etc. use KD to compress LLMs; the distillation pipeline in this paper directly follows Sanh et al. (2019).
    • Zhong et al. (2024) use KD to mitigate task forgetting between transferred prompts; the paper points out that their setting is cross-task transfer, whereas this paper is cross-model transfer.

    Prompt Transfer

    • Cross-task transfer (Vu et al., 2022; Su et al., 2022, etc.) — reuse prompt parameters on the same LLM to shorten training.
    • Su et al. (2022) — cross-model transfer of soft prompts, but the transfer requires guidance with private data; the paper points out that this exposes the data to the provider of the second model.
    • Wu et al. (2023) — Zero-Shot continuous prompt transfer, encoding the source prompt into a relative space and then finding the target prompt; the paper points out that after transfer the target model performs worse than the source model, and the transfer requires private data.
    • Xiao et al. (2023) — Offsite-Tuning performs cross-model transfer learning; the paper states that it targets fine-tuning and does not apply to soft prompts, but this paper works under the same setting and assumptions as it.

    Differential Privacy and Private Prompts

    • Duan et al. (2023a) propose PromptDPSGD, which provides DP guarantees for soft prompt tuning (this paper directly adopts it); Hanke et al. (2024) extend it to generation tasks.
    • Duan et al. (2023b), Tang et al. (2024), Wu et al. (2024), etc. DP prompt frameworks — the paper points out that they provide DP guarantees only for model outputs, and private data is still leaked to the model provider.
    • DP-OPT (Hong et al., 2023) — tune a discrete prompt on a local surrogate model and then use it on a large model; the paper points out that its discrete prompt directly leaks words and sentences from the training data to the provider (Figure 3 of their paper), and that it requires a strong (large) local model, imposing high compute requirements on the user side.

    Baselines and Benchmarks: The comparison baselines are DP-OPT (Hong et al., 2023) and Zero-Shot Transfer (Wu et al., 2023), compared on sst2, imdb, tweet, arisetv, mpqa, disaster, trec (Table 5, Table 15). The authors position this paper as: under the same cross-model setting, completing soft prompt transfer using only public data while protecting the confidentiality of private data from the provider.

  3. How does the paper address this problem?

    POST has three steps: the provider distills a small model and sends it to the user; the user tunes the soft prompt locally (optionally with DP); the provider transfers the prompt back to the large model using only public data with two KL losses.

    Overall approach: POST (Privacy Of Soft-prompt Transfer) splits "tuning prompts on a large model" into "privately tuning prompts on a small model + transferring back to the large model using public data", so that private data never leaves the user side.

    Problem setup

    • Two parties: the LLM provider owns the large model Φt and offers paid queries; the user holds a private dataset Dpri and wants to adapt Φt without leaking data to the provider.
    • The small model Φs must satisfy three points (stated in the paper): small enough for the user to tune prompts locally; semantically close to Φt for transfer; limited performance so that the user still has an incentive to pay for Φt.

    Step one: knowledge distillation (KD)

    • The provider distills according to the objective of Sanh et al. (2019): Ldistil = αceLce + αlmLlm + αcosLcos, i.e., a weighted sum of the logits KL divergence, the language modeling loss and the embedding cosine loss (weights 5.0/2.0/1.0, Table 8).
    • Unlike conventional KD, the authors state that the goal is a large compression ratio rather than preserving Φs performance. The main experiments compress 12-layer Roberta-base and 32-layer Llama2-7b to 2 layers, and 48-layer GPT2-XL to 4 layers; distillation uses BookCorpus, taking the 500,000-step checkpoint (Appendix B.1).
    • KD is a one-time operation, and the same small model can be distributed to all users.

    Step two: private prompt tuning

    • The user tunes a soft prompt ps on Φs with Dpri: argminps∑x∈ Dpri L(Φs, ps + x), i.e., only the prompt is optimized and the model is frozen.
    • Optional DP: use PromptDPSGD (Duan et al., 2023a), clipping per-sample gradients by clipping norm c and adding Gaussian noise, giving (ε, δ)-DP; the main experiments use ε=8, with δ set according to dataset size (Table 10).
    • The soft prompt has a default length of 100 tokens (Appendix B.3).

    Step three: prompt transfer based on public data

    • The provider obtains the target prompt pt with the same initialization as ps, and iteratively updates pt only on a small public dataset Dpub, with loss L = (1−α)L1 + α L2: L1 makes the large model with the prompt imitate the output distribution of the small model with the prompt on public data (KL divergence), and L2 aligns the direction of the output change introduced by the prompt on the two models.
    • The authors state that both terms are needed: when the small model performs poorly, merely imitating its behavior is ineffective. The choice of α depends on the large model's zero-shot performance and the small model's performance; the paper gives a heuristic (Appendix D.5).
    • Default transfer steps: 5000 for Roberta-base, 8000 for GPT2-XL, 6000 for Llama2-7b; since the provider has no private data, training stops at a fixed number of steps.

    Success criterion and evaluation method

    • Main metric: the accuracy of the large model loaded with the transferred prompt on the private data test set (Private Transfer).
    • Controls: large model zero-shot (Full ZS, lower bound), directly tuning the prompt on the large model with private data (Full PT, theoretical performance upper bound, infeasible in practice), prompt tuning on the small model (Compressed PT, which transfer must exceed for there to be an incentive to transfer), and direct transfer (Direct Transfer).
    • Classification tasks are modeled as text-infilling following Li et al. (2022), compared by the average probability of multiple ground-truth text labels (Table 9).
  4. What experiments did the paper conduct?

    Evaluated on 3 LLMs, 5 classification datasets, and 2 generation tasks: POST transfer accuracy exceeds all baselines, DP reduces LiRA leakage, and sst2 runtime drops from 2660 to 409 minutes.

    Experimental Setup

    • Models evaluated: Roberta-base (distilled to 2 layers), GPT2-XL (distilled to 4 layers), Llama2-7b (distilled to 2 layers); BookCorpus is used for distillation. The pretraining leakage experiment additionally uses Pythia 2.8B (Appendix D.7).
    • Private datasets: five classification tasks: sst2, imdb, tweet, arisetv, mpqa; the generation task uses MIT (extracting director/genre). Public datasets: agnews, boolq (classification), AIE (generation); disaster, trec are used for baseline comparison and ablation.
    • Baselines: Full ZS, Full PT, Compressed PT, Direct Transfer; external baselines are DP-OPT (Hong et al., 2023) and Zero-Shot Transfer (Wu et al., 2023).
    • Metrics: accuracy on the private test set; privacy uses the AUC and TPR@1%FPR of the LiRA membership inference attack; efficiency uses runtime (minutes) on a single A100.
    • DP setting: ε=8, δ according to dataset size (Table 10, e.g., 1.5×10⁻⁵ for sst2); prompt length 100 tokens.
    • Sample size and number of repetitions: the paper does not report the number of repetitions for the numbers in each table (Table 18 and Table 20 give mean±standard deviation; the remaining tables give single values).

    Main Results

    Table 1 (Llama2-7b, private test set accuracy %):

    Swipe horizontally to read the table

    Private dataFull ZSFull PTCompressed PTDirect TransferPOST without DP (public data)POST DP ε=8 (public data)
    sst278.6794.84 / 90.6078.78 / 70.9955.28 / 53.5590.02 (imdb)89.91 (imdb)
    tweet44.5072.03 / 62.4054.12 / 48.1641.70 / 41.6561.15 (sst2)59.55 (sst2)
    arisetv76.5793.47 / 83.7377.92 / 64.4354.23 / 64.7386.71 (agnews)82.60 (agnews)
    mpqa53.1192.36 / 85.9583.82 / 68.8732.96 / 33.2887.37 (sst2)80.17 (boolq)

    (The two values "without DP / DP" in each cell come from Table 1a and Table 1b respectively; the POST column gives the higher of the two public datasets for each private dataset, and the other value is in the original table. Comparable results for Roberta-base and GPT2-XL are in Table 13 and Table 14.)

    • The authors state: after transfer, POST exceeds the large model's zero-shot and the small model's prompt tuning (Compressed PT), giving the user an incentive to transfer back to the paid large model; and it greatly exceeds direct transfer.
    • The authors report: under DP, the improvement of transfer over Compressed PT is larger, e.g., for sst2 with imdb as public data, DP improves by 18.92% and non-DP by 11.24%; the authors speculate that DP noise acts as a regularizer.
    • The authors state that the results are close to the non-private upper bound Full PT, but still generally lower than Full PT (visible in the table).

    Generation Tasks

    • What was tested: MIT-D (director) and MIT-G (genre) extraction, public data AIE, Llama2-7b without DP (Table 2).
    • Results: on MIT-D, POST 75.66, versus Full ZS 70.84, Compressed PT 21.69, Direct Transfer 43.61; on MIT-G, POST 61.41, versus 51.28, 51.92, 50.51.
    • The authors state that POST applies to open-ended generation tasks.

    Privacy: LiRA Membership Inference Attack

    • What was tested: LiRA attack on soft prompts for four datasets on Roberta-base, using 8 shadow models (Table 3).
    • Results: without DP, sst2 has AUC 0.5610 and TPR@1%FPR 0.0232; after DP (ε=8), AUC drops to 0.5258 and TPR@1%FPR drops to 0.0137. On imdb, tweet, arisetv, AUC also drops after DP (e.g., tweet from 0.5269 to 0.5006).
    • The authors state: soft prompts without DP have non-trivial membership information leakage, and DP prompt tuning reduces leakage on all datasets.

    Efficiency: Runtime

    • What was tested: GPT2-XL, private data arisetv and sst2, 5000 transfer steps, single A100 (Table 4).
    • Results: on sst2, PT on Φt is 2660 minutes, and POST's small-model prompt tuning 310 minutes + transfer 99 minutes = 409 minutes; on arisetv, 368 versus 145 minutes. One-time KD is 1203 minutes; including it, sst2 totals 1612 minutes.
    • The authors state a 6× speedup on sst2 (2660→409 minutes), and that the KD cost can be amortized across multiple users.

    Baseline Comparison

    • What was tested: with distilled 2-layer Llama2-7b or GPT2 as the source model and Llama2-7b as the target model, comparing DP-OPT and Zero-Shot Transfer (Table 5); the comparable comparison on GPT2-XL is in Table 15.
    • Results (Table 5, sst2): POST 90.14, DP-POST 89.91; OPT (2-Lay) 81.31, OPT (GPT2) 81.65, DP-OPT (GPT2) 72.59, ZST 62.38, ZST with DP 53.55. POST is higher than these baselines on all 7 datasets; the exception is that on trec, DP-POST is 37.80, lower than OPT (2-Lay) 58.00, OPT (GPT2) 46.80, and DP-OPT 48.90.
    • The authors state that POST also outperforms all baselines under the DP setting.

    Other Ablations and Analyses

    • Amount of public data (Figure 2, arisetv private, agnews public): the authors state that fewer than 100 public samples suffice to achieve high transfer accuracy (the figure shows accuracy curves on a logarithmic x-axis; the specific endpoint values are not given in the caption).
    • Number of transfer steps (Figure 3): the authors state convergence at about 1000 steps for Roberta-base and about 2000 steps for GPT2-XL.
    • Choice of public dataset (Table 16): using the same dataset as public data works best; the same task family transfers well even with a different number of classes (e.g., arisetv with agnews 87.56), while cross-domain transfer degrades (tweet with disaster 48.15).
    • Feature space alignment (Table 6): a 2-layer Llama with the same architecture and same initialization, fine-tuned directly on BookCorpus rather than distilled, has prompt-tuning accuracy close to the distilled model, but consistently lower transfer accuracy (e.g., tweet 45.65 versus 61.15); the authors state that the feature alignment brought by distillation is key to transfer.
    • Compression rate (Table 19, Roberta-base): larger distilled models transfer better (arisetv: 1 layer 53.62, 2 layers 82.73, 3 layers 86.45), but distillation takes longer (6h04min→7h35min); the authors report that at 3 layers the transfer gains on imdb and tweet become smaller or even negative.
    • Prompt length (Table 21, Roberta-base): 50–100 tokens is better; too short or too long both degrade.
    • Distillation loss and settings (Table 17, 18): the combination of three losses transfers best; fixing the language modeling head is slightly better.
    • Pretraining data leakage (Table 22, Pythia 2.8B, WikiMIA, Mink% method): the original model has AUC 0.7103, and the 3-layer and 4-layer distilled models have 0.5737 and 0.5750 respectively; the authors state that distillation reduces pretraining data leakage.
  5. What are some points that can be further explored?

    The authors list four limitations in Appendix A: it does not cover leakage at the inference stage, does not prevent pretraining data leakage, the distillation cost is high, and there is no optimal strategy for selecting the public dataset.

    Limitations and Future Directions Pointed Out by the Authors

    • Inference-stage leakage is not addressed (Appendix A): the method protects only the prompt tuning stage and does not address the privacy leakage risk at the inference stage.
    • Does not prevent pretraining data leakage (Appendix A): although experiments show that the leakage brought by distillation is small, the authors state that a more thorough investigation is needed.
    • Distillation cost (Appendix A): compressing an LLM via knowledge distillation may be computationally expensive for the LLM provider.
    • Public dataset selection (Appendix A): the choice of public dataset affects transfer performance; although structurally similar public data usually works better, there is no ideal strategy for selecting the optimal public dataset.

    Scope of Experimental Coverage

    • The models evaluated are 3 open-source LLMs in total: Roberta-base, GPT2-XL, Llama2-7b (main experiments); Pythia 2.8B is additionally used only for the pretraining leakage experiment (Appendix D.7).
    • Tasks cover 5 classification datasets (sst2, imdb, tweet, arisetv, mpqa) and 1 generation dataset MIT (two extraction tasks: director and genre); public data are agnews, boolq, AIE, etc.
    • The privacy evaluation is the LiRA membership inference attack, conducted only on Roberta-base, 4 datasets, and 8 shadow models (Table 3); the DP experiments fix ε=8.
    • The efficiency evaluation is reported only on GPT2-XL, a single A100 GPU, and the two datasets arisetv and sst2 (Table 4).
    • The paper does not report the number of repetitions or variance for the numbers in the main results tables (Table 1, 13, 14); standard deviations appear only in Table 18 and Table 20.
  6. Summarize the main content of the paper

    POST lets users privately tune soft prompts on a small model and lets the provider transfer them back to the large LLM using only public data, balancing privacy, efficiency and post-transfer utility.

    A defense paper on private soft prompt transfer, whose goal is to complete soft prompt tuning without handing private data to the LLM provider.

    • Problem: soft prompts are strongly coupled to the LLM they are tuned on; tuning directly on a large model requires sharing private data (as in the NVIDIA NeMo API approach), and existing transfer methods either still require private data or perform worse after transfer than the small model.
    • Method: POST has three steps — the provider uses knowledge distillation to compress the large LLM into a small model and sends it to the user; the user locally tunes the soft prompt with private data (optionally PromptDPSGD, ε=8); the provider, using only a small public dataset, transfers the prompt back to the large model with two KL divergence losses.
    • Main results: on Llama2-7b, with sst2 as private data and imdb as public data, POST transfer accuracy is 90.02% without DP and 89.91% with DP, higher than zero-shot 78.67%, small-model prompt tuning 78.78%, and direct transfer 55.28% (Table 1).
    • Privacy: under the LiRA attack, the AUC of the sst2 soft prompt on Roberta-base drops from 0.5610 without DP to 0.5258 with DP (Table 3).
    • Efficiency: on GPT2-XL, the prompt tuning + transfer runtime for sst2 is 409 minutes, versus 2660 minutes for directly tuning the prompt on the large model (Table 4).
    • Comparison: on 7 datasets, POST is higher than the DP-OPT and Zero-Shot Transfer baselines (Table 5); the exception is that DP-POST on trec is lower than the OPT-type baselines.
    • Authors' conclusion: the authors state that POST improves the computational efficiency of prompt tuning while protecting user privacy and the provider's intellectual property, and point out that inference-stage leakage, pretraining data leakage, distillation cost, and public dataset selection remain unsolved problems (Appendix A).
Read originalICML 2025