Pre-Training to Learn in Context
Preprint
Abstract
In-context learning, where pre-trained language models learn to perform tasks from task examples and instructions in their contexts, has attracted much attention in the NLP community. However, the ability of in-context learning is not fully exploited because language models are not explicitly trained to learn in context. To this end, we propose PICL (Pre-training for In-Context Learning), a framework to enhance the language models' in-context learning ability by pre-training the model on a large collection of "intrinsic tasks" in the general plain-text corpus using the simple language modeling objective. PICL encourages the model to infer and perform tasks by conditioning on the contexts while maintaining task generalization of pre-trained models. We evaluate the in-context learning performance of the model trained with PICL on seven widely-used text classification datasets and the Super-NaturalInstrctions benchmark, which contains 100+ NLP tasks formulated to text generation. Our experiments show that PICL is more effective and task-generalizable than a range of baselines, outperforming larger language models with nearly 4x parameters. The code is publicly available at https://github.com/thu-coai/PICL.Keywords
All Related Versions
This publication has 12 references indexed in Scilit:
- Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language ProcessingACM Computing Surveys, 2023
- Impact of Pretraining Term Frequencies on Few-Shot Numerical Reasoning2022
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity2022
- Pre-trained models: Past, present and futureAI Open, 2021
- Pre-trained models for natural language processing: A surveyScience China Technological Sciences, 2020
- DREAM: A Challenge Data Set and Models for Dialogue-Based Reading ComprehensionTransactions of the Association for Computational Linguistics, 2019
- Billion-Scale Similarity Search with GPUsIEEE Transactions on Big Data, 2019
- Constructing Datasets for Multi-hop Reading Comprehension Across DocumentsTransactions of the Association for Computational Linguistics, 2018
- Aligning Books and Movies: Towards Story-Like Visual Explanations by Watching Movies and Reading Books2015
- The PASCAL Recognising Textual Entailment Challenge2006