[论文解读] P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Tasks
P-Tuning v2 表明,通过跨所有层使用深层提示进行精心优化的提示调优,可以在模型规模(300M–10B 参数)和 NLU 任务上达到微调的水平,同时仅使用极少量的任务特定参数。
Prompt tuning, which only tunes continuous prompts with a frozen language model, substantially reduces per-task storage and memory usage at training. However, in the context of NLU, prior work reveals that prompt tuning does not perform well for normal-sized pretrained models. We also find that existing methods of prompt tuning cannot handle hard sequence labeling tasks, indicating a lack of universality. We present a novel empirical finding that properly optimized prompt tuning can be universally effective across a wide range of model scales and NLU tasks. It matches the performance of finetuning while having only 0.1%-3% tuned parameters. Our method P-Tuning v2 is an implementation of Deep Prompt Tuning \cite{li2021prefix,qin2021learning} optimized and adapted for NLU. Given the universality and simplicity of P-Tuning v2, we believe it can serve as an alternative to finetuning and a strong baseline for future research.Our code and data are released at https://github.com/THUDM/P-tuning-v2.
研究动机与目标
- 证明经过适当优化的提示调优可以在广泛的模型规模和 NLU 任务中达到与微调相匹配的效果。
- 开发并验证一种深层提示调优方法,该方法在多个层中使用提示,而不仅仅是输入层。
- 确定能够在有限的任务特定参数下实现竞争性性能的实际优化与实现细节。
提出的方法
- 通过在多个 Transformer 层插入可训练的提示来采用深层提示调优,而不仅仅是在输入处。
- 使用连续提示,并为每个任务设定灵活的提示长度,简单任务通常较短,较难的序列标注任务长度约为 100。
- 尝试重参数化选项(嵌入与 MLP),并分析它们对不同任务的影响。
- 在监督设置中使用随机初始化的线性分类头,而不是在输出层使用 verbalizer。
- 通过跨任务联合训练共享提示并使用任务特定的分类器来评估多任务学习。
实验结果
研究问题
- RQ1在多个层中使用提示的提示调优是否能够在不同的模型规模(300M–10B 参数)上达到与微调相当的性能?
- RQ2P-Tuning v2 是否对简单分类和困难的序列标注 NLU 任务都具有普遍有效性?
- RQ3哪些优化与实现细节对于缩小提示调优与微调之间的差距是必要的,以及深度和提示长度如何影响性能?
- RQ4跨任务使用共享提示的多任务学习是否为 P-Tuning v2 在各任务上带来额外的收益?
主要发现
- P-Tuning v2 在从 300M 到 10B 参数的模型规模上与微调相匹配。
- P-Tuning v2 以每个任务仅 0.1%–3% 的任务特定参数实现具竞争力的性能。
- 引入到多层的深层提示提升了性能,特别是对较小的模型和困难任务。
- 多任务学习通常提高 P-Tuning v2 在大多数任务上的性能,某些设置下的 QA 除外。
- 消融研究显示在监督设置中,verbalizers 与线性头之间没有显著差异,而更深的提示深度往往比浅层提示插入更有帮助。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。