Bayesian Multi-Task Transfer Learning for Soft Prompt Tuning

Haeju Lee, Minchan Jeong, Se-Young Yun, Kee-Eung Kim · DOI

TL;DR

Soft prompt tuning is a highly parameter-efficient way to adapt large language models, but transferring knowledge from multiple source tasks often suffers from task interference. This paper introduces Bayesian Multi-Task Prompt Tuning (BMTPT), a method that uses Stein Variational Gradient Descent to learn a shared posterior distribution over source prompts. By using this posterior as an informative prior for target tasks, BMTPT achieves state-of-the-art performance—even outperforming full fine-tuning—while updating only 0.035% of the model's parameters.

What Problem Does This Paper Address?

Fine-tuning massive pre-trained language models (PLMs) for every new downstream task is computationally daunting. Soft prompt tuning (PT) offers a clever alternative: freeze the entire PLM and only optimize a small set of continuous virtual tokens (a "soft prompt") prepended to the input sequence.

While parameter-efficient, vanilla prompt tuning is highly sensitive to initialization and often underperforms compared to full fine-tuning. To fix this, researchers use multi-task transfer learning, training prompts on multiple "source" tasks to find a good initialization for the "target" task. However, existing approaches train source prompts individually and then aggregate them using attention mechanisms or simple averaging. This critically ignores task correlations: some source tasks positively reinforce each other, while others negatively interfere.

Methods

BMTPT reframes prompt transfer through a Bayesian lens. Instead of hunting for a single initialization point, it estimates the full posterior distribution of prompts across all source tasks and uses it as a prior to guide target task adaptation.

Two key steps for Bayesian Multi-Task Prompt Tuning (BMTPT) are illustrated.

The method consists of two main phases:

  1. Source Task Posterior Learning: Because calculating the exact global posterior across diverse tasks is mathematically intractable, the authors use Stein Variational Gradient Descent (SVGD). SVGD is a particle-based variational inference method. Here, multiple "particles" (each being an independent soft prompt instantiation) interactively map out the complex, multi-modal posterior distribution across source tasks. To prevent these particles from collapsing into a single point, SVGD applies a repulsive force between them.
  2. Target Task Adaptation: During target training, the objective function incorporates a regularization term derived from the source posterior. Through Jensen's inequality, the authors show this simplifies to initializing the target prompt with the average of the optimized SVGD particles and penalizing the target prompt if it drifts too far from this shared source knowledge base.

To keep computational overhead low, the authors introduce Source Task Sampling (randomly subsampling a subset of source tasks at each training iteration) and a full-rank/low-rank matrix decomposition scheme to facilitate multi-target task adaptation.

This illustrates the source task posterior learning in BMTPT.

Datasets

The authors evaluated BMTPT across a massive suite of standard NLP benchmarks using a T5-base backbone:

  • Source Tasks: 6 large-scale datasets chosen to build the base posterior: MNLI, QNLI, QQP, and SST-2 (from GLUE); SQuAD (from MRQA); and ReCoRD (from SuperGLUE).
  • Target Tasks: 21 distinct downstream datasets spanning GLUE (e.g., RTE, CoLA, MRPC), SuperGLUE (e.g., BoolQ, MultiRC, WiC, WSC), MRQA (e.g., Natural Questions, HotpotQA), and an "Others" benchmark (e.g., WinoGrande, Yelp-2, SciTail).

Key Insights and Ideas

  • Dataset-Agnostic Transfer: Unlike prior methods (like SPoT) that rely heavily on measuring explicit, pairwise transferability between specific tasks, BMTPT is dataset-agnostic. It naturally captures a holistic distribution of prompts that weights commonalities across all source tasks.
  • The Power of the Prior: The Bayesian prior acts as an excellent regularizer. In few-shot scenarios (where target data is extremely scarce), this regularizer prevents the prompt from overfitting, guiding it safely toward a generalized solution space.
  • Suboptimal Aggregation in Prior Work: Interestingly, the authors implemented a "vanilla multi-task transfer" baseline (simply training a single prompt on the combined loss of all source tasks) and found it beat many complex, state-of-the-art prompt transfer methods. This proved that previous prompt aggregation strategies were fundamentally bottlenecked, a bottleneck that BMTPT successfully bypasses.

Key Results

BMTPT achieved outstanding performance across the board, establishing new state-of-the-art results for parameter-efficient fine-tuning:

  • Outperforming Full Fine-Tuning: On the GLUE benchmark, BMTPT achieved an average score of 88.7, comfortably beating full fine-tuning (84.9). On SuperGLUE, it scored 74.6 compared to full fine-tuning's 73.9. It achieved this while tuning a mere 0.035% of the total parameters.
  • Few-Shot Dominance: In low-resource settings (4, 16, and 32 training instances), BMTPT consistently outperformed vanilla prompt tuning and advanced multi-task methods like MPT, proving the robustness of the learned prior.
Table 1: Experiment results for GLUE and SuperGLUE using T5-base, along with the number of trained parameters. BMTPT results are averaged across three runs, with subscripts indicating the standard deviation. The evaluation metrics are Pearson correlation for STS-B, F1 for MultiRC, and accuracy for the other tasks. Top rows use single- task adaptation with no parameter sharing during the target task adaptation, while bottom rows employ multi-task adaptation. The best performance among parameter-efficient fine-tuning methods is bolded. BMTPT consistently outperforms most baselines in GLUE and is comparable in SuperGLUE, affirming its robustness across language tasks.

Limitations and Future Work

Despite its strong performance, the authors note a few limitations:

  • Memory Footprint during Training: Because SVGD tracks multiple particles simultaneously, the effective batch size scales with the number of particles ($M \times K$), increasing memory demands during the source training phase.
  • Prompt Length Overhead: Like all soft prompt methods, prepending virtual tokens lengthens the input sequence, which increases the computational footprint during inference.
  • Variance Collapse: In high-dimensional spaces, SVGD particles can occasionally suffer from variance collapse (clustering too tightly around the peak of a distribution). While the authors used a "Damped SVGD" variant to mitigate this, exploring optimal particle dynamics remains an open avenue for future research.

Summary updated

BibTeX
@inproceedings{lee2023bayesian,
  author = {Haeju Lee and Minchan Jeong and Se-Young Yun and Kee-Eung Kim},
  title = {{Bayesian Multi-Task Transfer Learning for Soft Prompt Tuning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.329},
}
Figure