[Paper Review] HyperPrompt: Prompt-based Task-Conditioning of Transformers
HyperPrompt uses a HyperNetwork-generated set of hyper-prompts injected into self-attention to condition Transformers on tasks, achieving strong multi-task performance with minimal extra parameters and good efficiency. It outperforms several baselines on GLUE/SuperGLUE across model sizes when fully fine-tuned.
Prompt-Tuning is a new paradigm for finetuning pre-trained language models in a parameter-efficient way. Here, we explore the use of HyperNetworks to generate hyper-prompts: we propose HyperPrompt, a novel architecture for prompt-based task-conditioning of self-attention in Transformers. The hyper-prompts are end-to-end learnable via generation by a HyperNetwork. HyperPrompt allows the network to learn task-specific feature maps where the hyper-prompts serve as task global memories for the queries to attend to, at the same time enabling flexible information sharing among tasks. We show that HyperPrompt is competitive against strong multi-task learning baselines with as few as $0.14\%$ of additional task-conditioning parameters, achieving great parameter and computational efficiency. Through extensive empirical experiments, we demonstrate that HyperPrompt can achieve superior performances over strong T5 multi-task learning baselines and parameter-efficient adapter variants including Prompt-Tuning and HyperFormer++ on Natural Language Understanding benchmarks of GLUE and SuperGLUE across many model sizes.
Motivation & Objective
- Introduce HyperPrompt, a prompt-based, task-conditioned Transformer architecture for multi-task learning.
- Show that hyper-prompts injected into self-attention provide task-specific memory with efficient parameter usage.
- Demonstrate that HyperNet-generated prompts enable flexible task sharing and Pareto-efficient performance across tasks.
- Compare against multi-task baselines and parameter-efficient adapters on GLUE and SuperGLUE across T5 model sizes.
- Highlight the trade-offs between tuning all parameters vs task-specific parameters in high-difficulty tasks.
Proposed method
- Inject l trainable hyper-prompts for keys and values into multihead self-attention at every Transformer block.
- Use HyperNetworks to generate layer-specific and task-specific hyper-prompts from a global task prompt (HyperPrompt-Global) or task-specific local prompts (HyperPrompt-Share/Sep).
- For HyperPrompt-Global, generate projection matrices via global HyperNetworks conditioned on layer-aware task embeddings to obtain P^m_{τ,k} and P^m_{τ,v}.
- Adopt a bottleneck structure in local HyperNetworks to limit parameter growth (D, U down/up projections).
- Evaluate full fine-tuning vs only task-conditioned parameter tuning to assess Pareto efficiency and model performance.
- Compare against MTL baselines, Vanilla Adapter, HyperFormer++, and Prompt-Tuning on GLUE and SuperGLUE using T5 variants.
Experimental results
Research questions
- RQ1Can HyperNetworks-generated hyper-prompts injected into self-attention outperform standard multi-task learning and parameter-efficient adapters on GLUE/SuperGLUE?
- RQ2How does HyperPrompt-Global compare to HyperPrompt-Share/Sep in terms of performance, parameter efficiency, and information sharing across tasks?
- RQ3Does fine-tuning the entire model yield better Pareto efficiency for hard tasks like SuperGLUE compared to tuning only task-conditioned parameters?
- RQ4What is the impact of hyper-prompt length and where in the encoder/decoder to insert prompts on performance and efficiency?
- RQ5How does the proposed approach scale with model size and number of tasks?
Key findings
- HyperPrompt-Global achieves state-of-the-art performance on SuperGLUE for T5 models up to XXL.
- HyperPrompt-Global outperforms HyperFormer++ and MTL baselines with as little as 0.14% additional parameters.
- Full fine-tuning with HyperPrompt-Global yields larger gains on SuperGLUE than tuning only task-specific parameters.
- HyperPrompt-Global provides a favorable balance of lower compute (FLOPs) and competitive accuracy compared to adapters and Prompt-Tuning.
- HyperPrompt-Global consistently outperforms baselines across T5 Base and Large in GLUE/SuperGLUE benchmarks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.