ChatPaper.aiChatPaper

Pre-Addestramento per Apprendere in Contesto

Pre-Training to Learn in Context

May 16, 2023
Autori: Yuxian Gu, Li Dong, Furu Wei, Minlie Huang
cs.AI

Abstract

L'apprendimento in contesto (in-context learning), in cui i modelli linguistici pre-addestrati imparano a eseguire compiti a partire da esempi di attività e istruzioni presenti nei loro contesti, ha attirato molta attenzione nella comunità NLP. Tuttavia, la capacità di apprendimento in contesto non è pienamente sfruttata poiché i modelli linguistici non sono esplicitamente addestrati per apprendere in contesto. A tal fine, proponiamo PICL (Pre-training for In-Context Learning), un framework per migliorare la capacità di apprendimento in contesto dei modelli linguistici pre-addestrandoli su un'ampia raccolta di "compiti intrinseci" presenti in un corpus di testo generico utilizzando l'obiettivo semplice del language modeling. PICL incoraggia il modello a dedurre ed eseguire compiti condizionandosi sui contesti, mantenendo al contempo la generalizzazione dei compiti dei modelli pre-addestrati. Valutiamo le prestazioni di apprendimento in contesto del modello addestrato con PICL su sette dataset ampiamente utilizzati per la classificazione del testo e sul benchmark Super-NaturalInstructions, che contiene oltre 100 compiti NLP formulati come generazione di testo. I nostri esperimenti dimostrano che PICL è più efficace e generalizzabile rispetto a una gamma di baseline, superando modelli linguistici più grandi con quasi 4 volte i parametri. Il codice è disponibile pubblicamente all'indirizzo https://github.com/thu-coai/PICL.
English
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.
PDF20May 8, 2026