赞
踩
P-tuning等方法的提出,避免了人工构建离散的template,而让模型可以自动学习continuous embedding,然而P-tuning在一些复杂的自然语言理解(Natural Langauge Understanding, NLU)任务上效果很差。因此本文基于P-tuning和Prefix-tuning,拓展提出p-tuning的V2版本模型——P-tuning V2,并引入Deep Prompt Encoding和Multi-task Learning。
简要信息:
序号 | 属性 | 值 |
---|---|---|
1 | 模型名称 | P-Tuning V2 |
2 | 所属领域 | 自然语言处理;自然语言理解; |
3 | 研究内容 | 预训练语言模型;Prompt框架 |
4 | 核心内容 | Prompt-based Fine-tuning |
5 | GitHub源码 | https://github.com/THUDM/P-tuning-v2 |
6 | 论文PDF | https://arxiv.org/pdf/2110.07602.pdf |
核心要点:
Deep prompt tuning increases the capacity of continuous prompts and closes the gap to finetuning across various settings, especially for small models and hard tasks.
如下图(RTE、BoolQA、CB验证集的平均准确率):
当预训练语言模型的参数很少时,P-tuning效果显然很差,而只有当参数规模达到100亿时,才勉强达到Fine-tuning效果。
如上图,输入一个句子,设计一个template,其包含pseudo token,对这部分token使用LSTM进行表征,并替换原始的pre-trained model word embedding后,得到:
[ e ( x ) , h 0 , ⋯ , h i , e ( [ M A S K ] ) ] [\mathbf{e}(\mathbf{x}), h_0, \cdots, h_i, \mathbf{e}([MASK])] [e(x),h0,⋯,hi,e([MASK])]
将其喂入MLM,MLM输出[MASK]位置的概率分布,根据verbalizer给出label word以及对应的class预测概率。
然而P-tuning其存在两个问题:
But for those smaller models (from 100M to 1B), there is a significant discrepancy between performances of prompt tuning and fine-tuning.
先前的P-tuning用了一层BiLSTM来表征pseudo token,显然是推理能力不足的原因之一,因此该部分提出Deep Prompt Tuning,替换原来的BiLSTM而使用Prefix-tuning中的深层模型,如下图:
P-tuning V2相比P-tuning,区别在于:
挑选部分NLU task,包括:
Baseline选择:
挑选几个比较复杂的任务:
(1)实体识别(CoNLL03、OntoNotes 5.0、CoNLL04):
(2)ExtractiveQA(SQuAD1.1、SQuAD2.0):
(3)Semantic Role Labelling(CoNLL05、CoNLL12):
(4)结论:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。