Skip to main content
QUICK REVIEW

[论文解读] NSP-BERT: A Prompt-based Few-Shot Learner Through an Original Pre-training Task--Next Sentence Prediction

Yi Sun, Yu Zheng|arXiv (Cornell University)|Sep 8, 2021
Topic ModelingComputer Science参考文献 39被引用 30
一句话总结

NSP-BERT 引入一种基于句子级提示的方法,使用下一句预测(NSP)实现 BERT 的零样本学习与少样本学习,并通过在 RoBERTa 风格语料上继续预训练来提升性能。

ABSTRACT

Using prompts to utilize language models to perform various downstream tasks, also known as prompt-based learning or prompt-learning, has lately gained significant success in comparison to the pre-train and fine-tune paradigm. Nonetheless, virtually all prompt-based methods are token-level, meaning they all utilize GPT's left-to-right language model or BERT's masked language model to perform cloze-style tasks. In this paper, we attempt to accomplish several NLP tasks in the zero-shot scenario using a BERT original pre-training task abandoned by RoBERTa and other models--Next Sentence Prediction (NSP). Unlike token-level techniques, our sentence-level prompt-based method NSP-BERT does not need to fix the length of the prompt or the position to be predicted, allowing it to handle tasks such as entity linking with ease. Based on the characteristics of NSP-BERT, we offer several quick building templates for various downstream tasks. We suggest a two-stage prompt method for word sense disambiguation tasks in particular. Our strategies for mapping the labels significantly enhance the model's performance on sentence pair tasks. On the FewCLUE benchmark, our NSP-BERT outperforms other zero-shot methods on most of these tasks and comes close to the few-shot methods.

研究动机与目标

  • 倡导使用句子级预训练任务(NSP)而非基于标记的 MLM 的提示学习。
  • 在多样化的 NLP 任务中实现强大的零样本表现和具有竞争力的少样本结果。
  • 证明在 RoBERTa 风格语料上继续预训练可以提升 NSP-BERT 的表现。
  • 提出 NSP-tuning,利用带二分类交叉熵的 NSP 头部进行单句分类。
  • 为多样化任务设置引入两种读法/标签映射策略(候选项对比和样本对比)。

提出的方法

  • 重新审视常规的 BERT NSP 目标,并将其改造为适用于下游任务的提示学习。
  • 构造与 NSP 对齐的句子级提示,支持多标签和可变长度输出,而无需固定长度的标记映射。
  • 使用 verbalizer 将标签映射到提示上,允许标签为较长的短语或词汇。
  • 提出将正例和负例耦合并使用二元交叉熵损失的 NSP-tuning,以在少样本设置中保留零样本的优势。
  • 引入两种答案映射策略:候选项对比用于多候选任务,样本对比用于句子对任务,以推导最终预测。
  • 证明在 RoBERTa 风格语料上继续预训练(BERT_C_B+Mix5)可带来显著的零样本和少样本增益。

实验结果

研究问题

  • RQ1句子级预训练任务 NSP 能否在零样本与少样本场景中作为有效的提示学习器?
  • RQ2在少样本设置中,带耦合示例与二进制损失的 NSP-tuning 与基于 MLM 的提示相比如何?
  • RQ3使用 NSP-BERT 时,预训练语料选择对少样本性能的影响是什么?
  • RQ4NSP-BERT 是否能够处理具有可变长度标签描述的任务,如实体链接或类型预测?
  • RQ5在不同任务类型中,将标签映射到提示上的实际策略(候选项对比、样本对比)有哪些?

主要发现

  • NSP-BERT 实现了具有竞争力的零样本表现,特别是在多主题的中文数据集和英语任务上。
  • 在少样本设置中,NSP-BERT 在许多数据集上的表现与 PET 持平,并且在没有 NLI 预训练的情况下超过 EFL。
  • 带耦合的正/负实例和二元交叉熵损失的 NSP-tuning 在各任务中带来稳健的提升。
  • 在 RoBERTa 风格语料上继续预训练显著提升零样本和少样本表现,有时甚至超过仅改动提示方法本身的效果。
  • 两阶段提示和两种映射策略使得处理实体链接等具有可变长度标签描述的任务成为可能。
  • NSP-BERT 在少样本学习中比基线收敛更快,并且在不同模型规模下仍然有效。

阅读本论文

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

在 Nubint 中阅读本论文

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