[Paper Review] Can language models learn from explanations in context?
This paper investigates whether language models (LMs) can improve few-shot in-context learning by incorporating answer explanations alongside input-output examples. Using 40 diverse, challenging tasks with human-annotated explanations and controls, the authors show that explanations—especially hand-tuned ones—significantly boost performance in large LMs, even without fine-tuning, suggesting that explanations help models infer task principles more effectively.
Language Models (LMs) can perform new tasks by adapting to a few in-context examples. For humans, explanations that connect examples to task principles can improve learning. We therefore investigate whether explanations of few-shot examples can help LMs. We annotate questions from 40 challenging tasks with answer explanations, and various matched control explanations. We evaluate how different types of explanations, instructions, and controls affect zero- and few-shot performance. We analyze these results using statistical multilevel modeling techniques that account for the nested dependencies among conditions, tasks, prompts, and models. We find that explanations can improve performance -- even without tuning. Furthermore, explanations hand-tuned for performance on a small validation set offer substantially larger benefits, and building a prompt by selecting examples and explanations together substantially improves performance over selecting examples alone. Finally, even untuned explanations outperform carefully matched controls, suggesting that the benefits are due to the link between an example and its explanation, rather than lower-level features. However, only large models benefit. In summary, explanations can support the in-context learning of large LMs on challenging tasks.
Motivation & Objective
- To investigate whether including answer explanations in few-shot prompts improves language model performance on challenging tasks.
- To determine whether the benefit of explanations stems from their semantic link to examples or from lower-level linguistic features.
- To evaluate the impact of different explanation types, instructions, and control conditions on zero- and few-shot learning.
- To assess whether performance gains from explanations are scalable across model sizes, particularly in large models.
- To develop and release a new benchmark of 40 diverse, challenging tasks with human-annotated explanations and control conditions.
Proposed method
- Annotated 40 diverse, challenging NLP tasks with answer explanations and matched control explanations to isolate the effect of explanation content.
- Designed few-shot prompts with variations: examples only, examples + explanations, examples + instructions, and examples + control conditions.
- Evaluated multiple large language models (from 1B to 280B parameters) on zero-shot and few-shot settings across all prompt variations.
- Used hierarchical statistical multi-level modeling to account for nested dependencies across tasks, prompts, conditions, and models.
- Selected high-performing explanations using a small validation set to tune prompts for maximum performance gain.
- Compared explanations to control conditions such as scrambled explanations, non-explanatory text, and non-instructional content to isolate causal effects.
Experimental results
Research questions
- RQ1Do answer explanations in few-shot prompts improve few-shot zero-shot performance in large language models?
- RQ2Is the performance gain due to the semantic link between example and explanation, or to lower-level linguistic features?
- RQ3Do hand-tuned explanations yield larger performance improvements than untuned or randomly selected ones?
- RQ4Does the benefit of explanations scale with model size, or is it limited to large models?
- RQ5Can selecting both examples and explanations together improve performance more than selecting examples alone?
Key findings
- Explanations significantly improve few-shot performance in large language models (e.g., 280B parameter model), even without any tuning.
- Untuned explanations outperform carefully matched control conditions, indicating that the benefit arises from the example-explanation link, not surface-level features.
- Hand-tuned explanations selected via a small validation set yield substantially larger performance gains than untuned explanations.
- Selecting both examples and explanations together leads to significantly better performance than selecting examples alone.
- Only large language models (≥7B parameters) benefit from explanations; smaller models show no significant improvement.
- The performance gains are robust across diverse, challenging tasks, including logical reasoning, commonsense reasoning, and language understanding.
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.