Abstract: We investigate the ability of language models to perform compositional reasoning tasks where the overall solution depends on correctly composing the answers to sub-problems. We measure how often models can correctly answer all sub-problems but not generate the overall solution, a ratio we call the compositionality gap. We evaluate this ratio by asking multi-hop questions with answers that require composing multiple facts unlikely to have been observed together during pretraining. In the GPT-3 family of models, as model size increases we show that the single-hop question answering performance improves faster than the multi-hop performance does, therefore the compositionality gap does not decrease. This surprising result suggests that while more powerful models memorize and recall more factual knowledge, they show no corresponding improvement in their ability to perform this kind of compositional reasoning. We then demonstrate how elicitive prompting (such as chain of thought) narrows the compositionality gap by reasoning explicitly. We present a new method, self-ask, that further improves on chain of thought. In our method, the model explicitly asks itself (and answers) follow-up questions before answering the initial question. We finally show that self-ask's structured prompting lets us easily plug in a search engine to answer the follow-up questions, which additionally improves accuracy.
Introduction: The Compositionality Gap
Large Language Models (LLMs) like GPT-3 possess immense world knowledge, yet they often stumble on multi-step reasoning tasks. A model might know that Justin Bieber was born in 1994 and that José María Olazábal won the Masters in 1994, but fail to answer: "Who won the Masters the year Justin Bieber was born?" This research introduces the compositionality gap—the ratio of multi-hop questions a model fails to answer despite knowing all the constituent facts—and explores how to close it.
The Scaling Wall
The authors define the compositionality gap as the fraction of multi-hop questions a model gets wrong, even when it can answer all underlying sub-questions correctly. A key finding is that scaling models (increasing parameters from 350M to 175B) does not naturally solve this. While larger models memorize more facts, the compositionality gap remains stubbornly constant at approximately 40% across both GPT-3 and InstructGPT-3 variants.
Methods: Bridging the Gap with Self-Ask
To address this gap, the paper evaluates several prompting strategies:
- Direct Prompting: Standard question-answer format, which often fails on multi-hop logic.
- Chain of Thought (CoT): Encouraging the model to "think step-by-step" in prose. While better than direct prompting, it can still drift into incorrect logic.
- Self-ask: A novel structured method where the model explicitly asks and answers its own follow-up questions before providing a final answer. This "disentangles" the reasoning steps.
- Self-ask + Search Engine (SA+SE): Intercepting the model's self-generated follow-up questions to query a search engine, providing more accurate intermediate facts.
Key Results and Datasets
The study utilizes four benchmarks: Compositional Celebrities (CC), Bamboogle (Google-proof questions), 2WikiMultiHopQA, and Musique.
Self-ask significantly outperforms CoT across these benchmarks. On the Bamboogle dataset, Direct Prompting scored only 17.6%, CoT reached 46.4%, and Self-ask achieved 57.6%. Integrating a search engine (SA+SE) pushed performance further to 60%. Beyond accuracy, Self-ask is roughly 30% faster than other decomposition methods because it operates in a single inference pass rather than multiple sequential calls.
Limitations and Future Work
While Self-ask narrows the gap, challenges remain. The study is primarily limited to 2-hop English questions, and the compositionality gap persists even in models as large as GPT-4 (estimated at ~23%). Future work will explore higher-order reasoning and the impact of potential dataset leakage as these benchmarks become part of future training corpora.
Summary updated