论文标题

从验证的语言模型中获取知识,以供典型提示语言器

Eliciting Knowledge from Pretrained Language Models for Prototypical Prompt Verbalizer

论文作者

Wei, Yinyi, Mo, Tong, Jiang, Yongtao, Li, Weiping, Zhao, Wen

论文摘要

迅速调查的最新进展几乎没有射击分类任务作为蒙版的语言建模问题。通过将输入包装到模板中,并使用构造标签空间和标签单词空间映射的言语器,及时调整可以在零拍摄和少量射击场景中获得出色的结果。但是,典型的及时调整需要手动设计的语言器,需要领域的专业知识和人类努力。标签空间不足可能对结果引入相当大的偏见。在本文中,我们专注于从审慎的语言模型中引起知识,并提出典型的及时官方器来及时调整。标签由特征空间中的原型嵌入代表,而不是由离散的单词表示。输入的掩盖位置和原型嵌入的嵌入之间的距离用作分类标准。对于零拍设置,通过手动设计的模板从验证的语言模型中获取知识,以形成初始原型嵌入。对于几个射击设置,可以调整模型以学习有意义且可解释的原型嵌入。我们的方法通过对比度学习优化了模型。与其他Verbalizer构造方法相比,对具有低资源设置的几个多级文本分类数据集的广泛实验结果证明了我们方法的有效性。我们的实施可从https://github.com/ydongd/prototypical-prompt-verbalizer获得。

Recent advances on prompt-tuning cast few-shot classification tasks as a masked language modeling problem. By wrapping input into a template and using a verbalizer which constructs a mapping between label space and label word space, prompt-tuning can achieve excellent results in zero-shot and few-shot scenarios. However, typical prompt-tuning needs a manually designed verbalizer which requires domain expertise and human efforts. And the insufficient label space may introduce considerable bias into the results. In this paper, we focus on eliciting knowledge from pretrained language models and propose a prototypical prompt verbalizer for prompt-tuning. Labels are represented by prototypical embeddings in the feature space rather than by discrete words. The distances between the embedding at the masked position of input and prototypical embeddings are used as classification criterion. For zero-shot settings, knowledge is elicited from pretrained language models by a manually designed template to form initial prototypical embeddings. For few-shot settings, models are tuned to learn meaningful and interpretable prototypical embeddings. Our method optimizes models by contrastive learning. Extensive experimental results on several many-class text classification datasets with low-resource settings demonstrate the effectiveness of our approach compared with other verbalizer construction methods. Our implementation is available at https://github.com/Ydongd/prototypical-prompt-verbalizer.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源