Skip to main content
QUICK REVIEW

[论文解读] Bidirectional Language Models Are Also Few-shot Learners

Ajay Patel, Bryan Li|arXiv (Cornell University)|Sep 29, 2022
Topic ModelingComputer Science被引用 18
一句话总结

本文提出顺序自回归提示(SAP),一种使双向语言模型(如 mT5)能够执行少样本和零样本提示学习的方法——此前该能力仅限于单向模型。尽管参数量约减少50%,mT5 搭载 SAP 后在少样本和零样本机器翻译、问答和摘要任务中仍优于 GPT-3 和 XGLM,表明上下文学习并非单向模型独有。

ABSTRACT

Large language models such as GPT-3 (Brown et al., 2020) can perform arbitrary tasks without undergoing fine-tuning after being prompted with only a few labeled examples. An arbitrary task can be reformulated as a natural language prompt, and a language model can be asked to generate the completion, indirectly performing the task in a paradigm known as prompt-based learning. To date, emergent prompt-based learning capabilities have mainly been demonstrated for unidirectional language models. However, bidirectional language models pre-trained on denoising objectives such as masked language modeling produce stronger learned representations for transfer learning. This motivates the possibility of prompting bidirectional models, but their pre-training objectives have made them largely incompatible with the existing prompting paradigm. We present SAP (Sequential Autoregressive Prompting), a technique that enables the prompting of bidirectional models. Utilizing the machine translation task as a case study, we prompt the bidirectional mT5 model (Xue et al., 2021) with SAP and demonstrate its few-shot and zero-shot translations outperform the few-shot translations of unidirectional models like GPT-3 and XGLM (Lin et al., 2021), despite mT5's approximately 50% fewer parameters. We further show SAP is effective on question answering and summarization. For the first time, our results demonstrate prompt-based learning is an emergent property of a broader class of language models, rather than only unidirectional models.

研究动机与目标

  • 解决长期以来双向语言模型无法执行少样本或零样本提示学习的限制,原因在于其与自回归生成不兼容。
  • 使具备更强迁移学习表征能力的双向模型,能够在无需微调的情况下利用上下文学习和指令遵循能力。
  • 证明提示学习是更广泛模型类别中涌现的特性,而不仅限于单向架构。
  • 在包括机器翻译、问答和摘要在内的多样化 NLP 任务中评估 SAP 的有效性。
  • 表明双向模型中更强的预训练表征能力,即使参数更少,也能带来更好的少样本性能。

提出的方法

  • SAP 通过迭代地将先前生成的文本作为提示输入模型,实现从双向模型中进行自回归生成,从而从短跨度预测逐步构建长序列输出。
  • 该方法采用顺序提示策略,将每次生成的结果追加到提示中,使模型即使在仅预训练于掩码跨度预测任务的情况下,也能生成更长且连贯的输出。
  • 在少样本学习中,SAP 使用提示中的标注示例;在零样本学习中,则采用无监督方式检索的合成示例。
  • 该方法应用于 mT5,一种基于多语言 T5 的模型,其通过去噪目标(如掩码语言建模)进行预训练,使其能够以提示学习范式运行。
  • 该方法在保持模型原始预训练目标的同时,调整其推理阶段行为以支持自回归生成。
  • 评估采用标准指标,如翻译任务的 BLEU、摘要任务的 ROUGE 和问答任务的 F1,将 SAP 增强的 mT5 与 GPT-3 和 XGLM 等单向模型进行比较。

实验结果

研究问题

  • RQ1双向语言模型,传统上与提示学习不兼容,能否被适配以实现少样本上下文学习?
  • RQ2双向模型更强的表征能力是否能转化为在提示学习下更好的少样本和零样本性能?
  • RQ3像 SAP 这样的技术能否使 mT5 在少样本和零样本设置下,尽管参数更少,仍优于 GPT-3 和 XGLM 等单向模型?
  • RQ4提示学习是否是更广泛模型类别中涌现的特性,还是仅限于单向架构?
  • RQ5SAP 在机器翻译之外的多样化 NLP 任务(如问答和抽象摘要)中效果如何?

主要发现

  • 尽管参数量约减少50%,mT5 搭载 SAP 后在少样本和零样本翻译任务中的表现优于 GPT-3 和 XGLM。
  • 在零样本翻译设置中,SAP 使 mT5 仅通过从多语言语料库中无监督检索的合成示例,即可生成连贯且准确的翻译。
  • 在 XQuAD 问答数据集上,SAP 增强的 mT5 达到了具有竞争力的 F1 分数,证明其无需微调即可有效遵循指令。
  • 在 CNN/Daily Mail 摘要任务中,SAP 生成的摘要比 mT5 单独生成的更长、更连贯,而 mT5 单独生成的输出常出现不连贯或不完整的问题。
  • 结果表明,双向模型在提示学习中也能实现强大的少样本和零样本性能,挑战了仅单向模型支持此类能力的假设。
  • SAP 通过迭代地将模型输出追加到提示中,使 mT5 有效实现自回归生成,克服了其原始设计仅用于短跨度预测的限制。

阅读本论文

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

在 Nubint 中阅读本论文

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