DePT: Decomposed Prompt Tuning for Parameter-Efficient Fine-tuning

Zhengxiang Shi, Aldo Lipani

TL;DR

DePT (Decomposed Prompt Tuning) optimizes Large Language Models by splitting a traditional "soft prompt" into two components: a much shorter set of virtual tokens and a pair of low-rank matrices that update the model’s existing word embeddings. This approach matches or exceeds the performance of standard prompt tuning while significantly reducing the computational overhead (memory and time) caused by long input sequences.

What Problem Does This Paper Address?

Parameter-Efficient Fine-Tuning (PEFT) has become the gold standard for adapting massive models like T5 or Llama-2 to specific tasks without retraining billions of parameters. Prompt Tuning (PT) is a popular PEFT method that appends "soft prompt" vectors (trainable virtual tokens) to the input.

Comparison of Fine Tuning, Prompt Tuning, and Prompt Engineering

However, PT has a major "hidden cost": it increases the length of the input sequence. Because the Transformer architecture has a quadratic complexity relative to sequence length, adding 100 virtual tokens makes every training and inference step significantly slower and more memory-intensive. This is a dealbreaker for high-throughput applications. Furthermore, vanilla PT often suffers from slow convergence and is highly sensitive to how those virtual tokens are initialized.

Methods: Decomposed Prompt Tuning (DePT)

To address the inefficiencies of standard Prompt Tuning, the authors introduce Decomposed Prompt Tuning (DePT). Instead of using one long sequence of virtual tokens, DePT "decomposes" the prompt into two distinct parts:

DePT Methodology: Decomposing the soft prompt and updating embeddings
  1. A Shorter Soft Prompt: A reduced number of virtual tokens that are prepended to the input.
  2. Low-Rank Matrix Updates: A pair of low-rank matrices that are multiplied and added element-wise to the frozen word embeddings of the original model.

To keep the comparison fair, the authors ensure the total number of trainable parameters in DePT is identical to vanilla PT. The "secret sauce" for making this work is Two Rates of Learning: the shorter prompt is trained with a high learning rate, while the low-rank matrices use a much lower rate. This dual-track optimization allows the model to adapt its internal representations (via the embeddings) while simultaneously learning the task-specific "instructions" (via the prompt).

Datasets

The researchers conducted an exhaustive evaluation across 23 different tasks:

  • NLP Benchmarks: GLUE (8 tasks) and SuperGLUE (5 tasks).
  • Reading Comprehension: MRQA 2019 Shared Task (4 datasets: Natural Questions, HotpotQA, SearchQA, NewsQA).
  • General NLP: WinoGrande, Yelp-2, SciTail, and PAWS-Wiki.
  • Vision-Language (VL): VQA (Visual Question Answering) and MSCOCO (Image Captioning).

Key Insights and Ideas

  • The Efficiency-Performance Paradox: Usually, reducing sequence length hurts performance. DePT breaks this by shifting some of the "learning burden" from the sequence length to the embedding weights. It turns out that slightly nudging the existing word embeddings is more effective than just adding more virtual tokens.
  • Scaling Gracefully: One of the most important findings is that DePT becomes more efficient as the model size increases. On T5-Small, the speedup is modest (6.5%), but on T5-Large, it jumps to 18.1%. This makes it a prime candidate for the LLM era.
  • Orthogonality: DePT doesn't replace other PEFT methods like LoRA or Adapters; it is "orthogonal" to them. You could theoretically combine DePT with LoRA for even more specialized tuning.
  • Few-Shot Compatibility: PT is notoriously bad at few-shot learning. DePT, however, integrates seamlessly with "Parameter-Efficient Transfer Learning" (PETL), where prompts are pre-trained on source tasks before being tuned on the target.

Key Results

  • Superior Performance: DePT outperformed vanilla PT and its variants across almost all 23 tasks. On the GLUE benchmark, it achieved an average score of 85.9, even beating the full fine-tuning baseline (84.9) while tuning a fraction of the parameters.
  • Resource Savings: Using T5-Base, DePT saved over 20% in both training time and memory costs compared to vanilla PT.
  • Vision-Language Success: On MSCOCO image captioning, DePT achieved a CIDEr score of 113.7, outperforming state-of-the-art PEFT methods like LST and LoRA.
  • Inference Speed: In tests with Llama-2-7B, DePT increased inference speed (samples per second) by approximately 25% over standard prompt tuning.

Limitations and Future Work

The authors highlight a few areas for improvement:

  • Hyperparameter Sensitivity: DePT introduces extra hyperparameters, specifically the two different learning rates. Finding the optimal balance requires a grid search, which adds to the initial setup time.
  • Parameter Dependency: The number of trainable parameters in DePT is tied to the maximum sequence length. While this wasn't an issue for the hundreds of tokens used in this study, it might become a constraint for tasks involving extremely long documents (thousands of tokens).
  • Future Directions: The authors suggest exploring DePT's performance on even larger scales (100B+ parameter models) and investigating its behavior when the input sequence length is extremely large.

Summary updated

BibTeX
@inproceedings{shi2024dept,
  author = {Zhengxiang Shi and Aldo Lipani},
  title = {{DePT: Decomposed Prompt Tuning for Parameter-Efficient Fine-tuning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=KjegfPGRde},
}
Figure