[Paper Review] Bidirectional Language Models Are Also Few-shot Learners
This paper introduces Sequential Autoregressive Prompting (SAP), a method enabling bidirectional language models like mT5 to perform few-shot and zero-shot prompt-based learning—previously limited to unidirectional models. Despite having ~50% fewer parameters, mT5 with SAP outperforms GPT-3 and XGLM in few-shot and zero-shot machine translation, question answering, and summarization, demonstrating that in-context learning is not exclusive to unidirectional models.
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.
Motivation & Objective
- To address the long-standing limitation that bidirectional language models cannot perform few-shot or zero-shot prompt-based learning due to incompatibility with autoregressive generation.
- To enable bidirectional models, which have stronger representations for transfer learning, to leverage in-context learning and instruction following without fine-tuning.
- To demonstrate that prompt-based learning is an emergent property of a broader class of models beyond unidirectional architectures.
- To evaluate SAP's effectiveness across diverse NLP tasks, including machine translation, question answering, and summarization.
- To show that stronger pre-trained representations in bidirectional models can lead to better few-shot performance even with fewer parameters.
Proposed method
- SAP enables autoregressive generation from bidirectional models by iteratively prompting the model with previously generated text, effectively building long completions from short span predictions.
- The method uses a sequential prompting strategy where each generation is appended to the prompt, allowing the model to generate longer, coherent outputs despite being pre-trained on masked span prediction.
- For few-shot learning, SAP uses labeled examples in the prompt, while for zero-shot, it employs synthetic examples retrieved in an unsupervised manner.
- The approach is applied to mT5, a multilingual T5-based model pre-trained with denoising objectives (e.g., masked language modeling), enabling it to function in a prompt-based paradigm.
- The method maintains the model’s original pre-training objective while adapting its inference-time behavior to support autoregressive generation.
- Evaluation uses standard metrics such as BLEU for translation, ROUGE for summarization, and F1 for question answering, comparing SAP-enhanced mT5 against unidirectional models like GPT-3 and XGLM.
Experimental results
Research questions
- RQ1Can bidirectional language models, traditionally incompatible with prompt-based learning, be adapted to perform few-shot in-context learning?
- RQ2Does the stronger representational capacity of bidirectional models translate into better few-shot and zero-shot performance when prompted?
- RQ3Can a technique like SAP enable mT5 to outperform unidirectional models like GPT-3 and XGLM in few-shot and zero-shot settings despite having fewer parameters?
- RQ4Is prompt-based learning an emergent property of a broader class of models, or is it restricted to unidirectional architectures?
- RQ5How effective is SAP across diverse NLP tasks beyond machine translation, such as question answering and abstractive summarization?
Key findings
- mT5 with SAP achieves superior few-shot and zero-shot translation performance compared to GPT-3 and XGLM, despite having approximately 50% fewer parameters.
- In the zero-shot translation setting, SAP enables mT5 to generate coherent and accurate translations using only synthetic, unsupervised examples retrieved from a multilingual corpus.
- For question answering on XQuAD, SAP-enhanced mT5 achieves competitive F1 scores, demonstrating effective instruction following without fine-tuning.
- In abstractive summarization on CNN/Daily Mail, SAP generates longer, more coherent summaries than mT5 alone, which often produces incoherent or incomplete outputs.
- The results show that bidirectional models can achieve strong few-shot and zero-shot performance in prompt-based learning, challenging the assumption that only unidirectional models support such capabilities.
- SAP enables mT5 to perform autoregressive generation effectively by iteratively appending model outputs to the prompt, overcoming the model’s original design for short span prediction.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.