English

HyperPrompt: Prompt-based Task-Conditioning of Transformers

Computation and Language 2022-06-16 v2 Machine Learning

Abstract

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%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.

Keywords

Cite

@article{arxiv.2203.00759,
  title  = {HyperPrompt: Prompt-based Task-Conditioning of Transformers},
  author = {Yun He and Huaixiu Steven Zheng and Yi Tay and Jai Gupta and Yu Du and Vamsi Aribandi and Zhe Zhao and YaGuang Li and Zhao Chen and Donald Metzler and Heng-Tze Cheng and Ed H. Chi},
  journal= {arXiv preprint arXiv:2203.00759},
  year   = {2022}
}

Comments

Accepted to ICML 2022

R2 v1 2026-06-24T09:58:34.107Z