Exploring Length Generalization in Large Language Models
arXiv:2207.04901
Abstract
The ability to extrapolate from short problem instances to longer ones is an important form of out-of-distribution generalization in reasoning tasks, and is crucial when learning from datasets where longer problem instances are rare. These include theorem proving, solving quantitative mathematics problems, and reading/summarizing novels. In this paper, we run careful empirical studies exploring the length generalization capabilities of transformer-based language models. We first establish that naively finetuning transformers on length generalization tasks shows significant generalization deficiencies independent of model scale. We then show that combining pretrained large language models' in-context learning abilities with scratchpad prompting (asking the model to output solution steps before producing an answer) results in a dramatic improvement in length generalization. We run careful failure analyses on each of the learning modalities and identify common sources of mistakes that highlight opportunities in equipping language models with the ability to generalize to longer problems.
Cited by in corpus (5)
- LINC: A Neurosymbolic Approach for Logical Reasoning by Combining Language Models with First-Order Logic Provers
- Can neural networks do arithmetic? A survey on the elementary numerical skills of state-of-the-art deep learning models
- DSS: Synthesizing long Digital Ink using Data augmentation, Style encoding and Split generation
- Tool-Augmented LLMs as a Universal Interface for IDEs
- It Ain't That Bad: Understanding the Mysterious Performance Drop in OOD Generalization for Generative Transformer Models