Skip to main content
QUICK REVIEW

[论文解读] HyperPrompt: Prompt-based Task-Conditioning of Transformers

Yun He, Huaixiu Zheng|arXiv (Cornell University)|Mar 1, 2022
Topic ModelingComputer Science被引用 29
一句话总结

HyperPrompt 通过一个 HyperNetwork 生成的超提示集合注入自注意力,以在任务条件化 Transformer,实现强多任务性能,额外参数极少且效率良好。对 GLUE/SuperGLUE 在全量微调时,在不同模型尺寸上均优于若干基线。

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

研究动机与目标

  • 提出 HyperPrompt,一种基于提示、面向任务条件化 Transformer 的多任务学习架构。
  • 证明注入自注意力的超提示提供任务特定的记忆,并实现高效的参数使用。
  • 证明由 HyperNet 生成的提示实现灵活的任务共享并在各任务之间达到 Pareto 优化的性能。
  • 在 GLUE 与 SuperGLUE 上,针对 T5 模型尺寸,比较多任务基线和参数高效的适配器。
  • 突出在高难度任务中微调全部参数与仅微调任务特定参数之间的权衡。

提出的方法

  • 在每个 Transformer 块的多头自注意力中注入 l 个可训练的超提示,用于键和值。
  • 使用 HyperNetworks 从全局任务提示(HyperPrompt-Global)生成层特定和任务特定的超提示,或从任务特定局部提示(HyperPrompt-Share/Sep)生成。
  • 对于 HyperPrompt-Global,通过受层感知的任务嵌入条件化的全局 HyperNetworks 生成投影矩阵,以获得 P^m_{τ,k} 和 P^m_{τ,v}。
  • 在局部 HyperNetworks 中采用瓶颈结构以限制参数增长(D、U 下/上投影)。
  • 评估全量微调与仅任务条件参数微调,以评估 Pareto 效率和模型性能。
  • 在 GLUE 和 SuperGLUE 上使用 T5 变体,比较 MTL 基线、Vanilla Adapter、HyperFormer++ 与 Prompt-Tuning。

实验结果

研究问题

  • RQ1由 HyperNetworks 生成的超提示注入自注意力,能否在 GLUE/SuperGLUE 上超越标准多任务学习与参数高效的适配器?
  • RQ2在性能、参数效率与跨任务信息共享方面,HyperPrompt-Global 相较 HyperPrompt-Share/Sep 表现如何?
  • RQ3对像 SuperGLUE 这样的难任务,是否对整个模型进行微调比仅微调任务条件参数能获得更好的 Pareto 效率?
  • RQ4超提示长度以及在编码器/解码器中的何处插入提示对性能与效率的影响?
  • RQ5所提出的方法如何随模型大小和任务数量的增加而扩展?

主要发现

  • HyperPrompt-Global 在 T5 模型达到 XXL 级别的 SuperGLUE 上实现了最先进的性能。
  • HyperPrompt-Global 以仅 0.14% 的额外参数优于 HyperFormer++ 和 MTL 基线。
  • 使用 HyperPrompt-Global 的全量微调在 SuperGLUE 上带来比仅微调任务特定参数更大的增益。
  • HyperPrompt-Global 在计算量(FLOPs)较低和与适配器及 Prompt-Tuning 相当的精准度之间提供了有利的平衡。
  • HyperPrompt-Global 在 GLUE/SuperGLUE 基准测试中,对 T5 Base 与 Large 一直优于基线。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。