In-context Learning Generalizes, But Not Always Robustly: The Case of Syntax

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Mueller, Aaron, Webson, Albert, Petty, Jackson, Linzen, Tal
Format: Preprint
Veröffentlicht: 2023
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866929307896512512
author Mueller, Aaron
Webson, Albert
Petty, Jackson
Linzen, Tal
author_facet Mueller, Aaron
Webson, Albert
Petty, Jackson
Linzen, Tal
contents In-context learning (ICL) is now a common method for teaching large language models (LLMs) new tasks: given labeled examples in the input context, the LLM learns to perform the task without weight updates. Do models guided via ICL infer the underlying structure of the task defined by the context, or do they rely on superficial heuristics that only generalize to identically distributed examples? We address this question using transformations tasks and an NLI task that assess sensitivity to syntax - a requirement for robust language understanding. We further investigate whether out-of-distribution generalization can be improved via chain-of-thought prompting, where the model is provided with a sequence of intermediate computation steps that illustrate how the task ought to be performed. In experiments with models from the GPT, PaLM, and Llama 2 families, we find large variance across LMs. The variance is explained more by the composition of the pre-training corpus and supervision methods than by model size; in particular, models pre-trained on code generalize better, and benefit more from chain-of-thought prompting.
format Preprint
id arxiv_https___arxiv_org_abs_2311_07811
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle In-context Learning Generalizes, But Not Always Robustly: The Case of Syntax
Mueller, Aaron
Webson, Albert
Petty, Jackson
Linzen, Tal
Computation and Language
In-context learning (ICL) is now a common method for teaching large language models (LLMs) new tasks: given labeled examples in the input context, the LLM learns to perform the task without weight updates. Do models guided via ICL infer the underlying structure of the task defined by the context, or do they rely on superficial heuristics that only generalize to identically distributed examples? We address this question using transformations tasks and an NLI task that assess sensitivity to syntax - a requirement for robust language understanding. We further investigate whether out-of-distribution generalization can be improved via chain-of-thought prompting, where the model is provided with a sequence of intermediate computation steps that illustrate how the task ought to be performed. In experiments with models from the GPT, PaLM, and Llama 2 families, we find large variance across LMs. The variance is explained more by the composition of the pre-training corpus and supervision methods than by model size; in particular, models pre-trained on code generalize better, and benefit more from chain-of-thought prompting.
title In-context Learning Generalizes, But Not Always Robustly: The Case of Syntax
topic Computation and Language
url https://arxiv.org/abs/2311.07811