Measuring and Narrowing the Compositionality Gap in Language Models

Ofir Press, Muru Zhang, Sewon Min, Ludwig Schmidt, Noah A. Smith +1 more
10/7/2022
1,634 citations
cs.CL

Official code: ofirpress/self-ask (325 stars, Jupyter Notebook, MIT, last commit 2023-12-28).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

ofirpress/self-askOfficial100%
MIT

Code and data for "Measuring and Narrowing the Compositionality Gap in Language Models"

32534Jupyter NotebookOct 4, 20222 years agoMIT

Similar Papers

Cite this paper

@article{press2022measuring,
  title  = {Measuring and Narrowing the Compositionality Gap in Language Models},
  author = {Ofir Press and Muru Zhang and Sewon Min and Ludwig Schmidt and Noah A. Smith and Mike Lewis},
  year   = {2022},
  eprint = {2210.03350},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.03350}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.03350.svg)](https://codeofpaper.com/paper/2210.03350)

Discussion