arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.06599cs.CLcs.LG
收藏

学习如何提问:使用软提示混合体查询语言模型(LMs)

Learning How to Ask: Querying LMs with Mixtures of Soft Prompts

Johns Hopkins University(约翰斯·霍普金斯大学)

Guanghui Qin, Jason Eisner

AI总结:

该研究针对预训练语言模型的提示来源问题,提出通过梯度下降学习由软词构成的提示混合体并集成最优提示的方法,实验证明该方法大幅优于现有方法,且随机初始化效果接近有依据初始化,揭示语言模型隐式事实知识此前被低估。

摘要:

自然语言提示近来被用于诱导预训练语言模型执行其他AI任务,采用的是填空范式(Petroni等人,2019)或小样本外推范式(Brown等人,2020)。例如,语言模型保留了其训练语料库中的事实性知识,可通过让模型在句子提示中“填空”来提取这些知识。然而,这类提示从何而来?我们探索了通过梯度下降学习提示的思路——要么对先前研究中采用的提示进行微调,要么从随机初始化开始。我们的提示由“软词”构成,即连续向量,它们不一定是语言模型中的词类型嵌入。此外,针对每个任务,我们优化一个提示混合体,学习哪些提示最有效以及如何集成它们。在多个英文语言模型(LMs)和任务中,我们的方法大幅优于先前方法,表明语言模型中的隐式事实性知识此前被低估了。此外,提取这类知识的成本很低:随机初始化的效果几乎与有依据的初始化相当。

英文摘要:

Natural-language prompts have recently been used to coax pretrained language models into performing other AI tasks, using a fill-in-the-blank paradigm (Petroni et al., 2019) or a few-shot extrapolation paradigm (Brown et al., 2020). For example, language models retain factual knowledge from their training corpora that can be extracted by asking them to "fill in the blank" in a sentential prompt. However, where does this prompt come from? We explore the idea of learning prompts by gradient descent -- either fine-tuning prompts taken from previous work, or starting from random initialization. Our prompts consist of "soft words," i.e., continuous vectors that are not necessarily word type embeddings from the language model. Furthermore, for each task, we optimize a mixture of prompts, learning which prompts are most effective and how to ensemble them. Across multiple English LMs and tasks, our approach hugely outperforms previous methods, showing that the implicit factual knowledge in language models was previously underestimated. Moreover, this knowledge is cheap to elicit: random initialization is nearly as good as informed initialization.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑