On Transferability of Prompt Tuning for Natural Language Processing

Yusheng Su, Xiaozhi Wang, Yujia Qin, Chi-Min Chan, Yankai Lin, Huadong Wang, Kaiyue Wen, Zhiyuan Liu, Peng Li, Juanzi Li, Lei Hou, Maosong Sun, Jie Zhou

Abstract

Prompt tuning (PT) is a parameter-efficient method for adapting large pre-trained language models (PLMs), yet it suffers from slow convergence. This paper investigates the transferability of "soft prompts" across different tasks and model architectures. We introduce Transferable Prompt Tuning (TPT), demonstrating that prompts can serve as modular knowledge units. By initializing PT with transferred prompts, we achieve up to a 50x speedup in training and improved task performance. Our analysis reveals that transferability is driven by the stimulation of similar internal neuron activation patterns within the PLM.

Introduction

As Pre-trained Language Models (PLMs) like GPT-3 and T5 scale to hundreds of billions of parameters, full-parameter fine-tuning becomes computationally and financially prohibitive. Prompt Tuning (PT) has emerged as a lightweight alternative, keeping the PLM frozen while learning a small set of "soft prompt" vectors prepended to the input. However, PT typically requires significantly more training steps to converge compared to standard fine-tuning. This research explores whether these soft prompts can be treated as transferable knowledge units to overcome the convergence bottleneck.

Methodology: Transferable Prompt Tuning (TPT)

The authors propose Transferable Prompt Tuning (TPT), which leverages existing prompts to initialize the tuning process for new tasks or models. Two primary transfer scenarios are explored:

  1. Cross-Task Transfer: Reusing a prompt trained on a source task for a target task within the same model.
  2. Cross-Model Transfer: Mapping a prompt from a source model (e.g., RoBERTa) to a target model (e.g., T5-XXL) using a Prompt Projector—a shallow neural network designed to align different embedding spaces.
Overview of Cross-Task and Cross-Model Transfer mechanisms.

Analysis: Why Do Prompts Transfer?

A key contribution of this work is the investigation into the mechanics of prompt transfer. The researchers introduce the concept of Model Stimulation Similarity, measured by the overlapping rate of activated neurons (ON) in the model's feed-forward layers.

The findings suggest that soft prompts act as "keys" that trigger specific pre-existing functional circuits within the frozen PLM. If two prompts activate a similar set of neurons, they are highly likely to be transferable. Interestingly, this neuron-based metric is a far more reliable predictor of transferability than traditional vector similarity measures like Cosine distance.

Experimental Results

The study evaluated TPT across 17 NLP tasks, including sentiment analysis, natural language inference, and summarization, using RoBERTa and T5 model families.

Transferability Patterns

The experiments revealed that transferability is highly dependent on task similarity. Prompts transfer effectively between tasks of the same type (e.g., different sentiment analysis datasets) but struggle when applied to fundamentally different task categories.

Heatmaps showing prompt transferability across various source and target tasks for RoBERTa and T5 models.

Efficiency and Performance Gains

TPT demonstrates remarkable efficiency gains:

  • Convergence Speedup: On T5-XXL, TPT achieved up to a 49.9x speedup in convergence compared to vanilla PT. In specific scenarios, the time required to reach baseline performance was reduced by over 200x.
  • Accuracy Improvements: Beyond speed, TPT often improves final model performance. For instance, on the laptop sentiment task, TPT increased RoBERTa-Large accuracy from 76.6% to 79.1%.
  • Zero-Shot Capabilities: Prompts trained on large-scale source datasets can sometimes be deployed on similar target tasks with zero additional training, occasionally outperforming trained but randomly initialized baselines.

Conclusion and Future Directions

This research establishes soft prompts as modular, transferable components that can significantly accelerate the adaptation of giant language models. The strong correlation between neuron activation and transferability provides a theoretical foundation for selecting optimal source prompts. Future work includes the development of "universal" projectors and the creation of a "Prompt Warehouse" to facilitate large-scale knowledge sharing in the NLP community.

Summary updated

BibTeX
@inproceedings{su2022transferability,
  author = {Yusheng Su and Xiaozhi Wang and Yujia Qin and Chi-Min Chan and Yankai Lin and Huadong Wang and Kaiyue Wen and Zhiyuan Liu and Peng Li and Juanzi Li and Lei Hou and Maosong Sun and Jie Zhou},
  title = {{On Transferability of Prompt Tuning for Natural Language Processing}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.290},
}
Figure