Skip to main content
QUICK REVIEW

[Paper Review] Compositional Semantic Parsing with Large Language Models

Andrew Drozdov, Nathanael Schärli|arXiv (Cornell University)|Sep 29, 2022
Natural Language Processing TechniquesComputer Science39 citations
TL;DR

The paper introduces dynamic least-to-most prompting with LM-based syntactic parsing and dynamic exemplar selection, achieving state-of-the-art compositional generalization on CFQ (95.0% avg) and strong COGS results (99.2%) using about 1% of training data.

ABSTRACT

Humans can reason compositionally when presented with new tasks. Previous research shows that appropriate prompting techniques enable large language models (LLMs) to solve artificial compositional generalization tasks such as SCAN. In this work, we identify additional challenges in more realistic semantic parsing tasks with larger vocabulary and refine these prompting techniques to address them. Our best method is based on least-to-most prompting: it decomposes the problem using prompting-based syntactic parsing, then uses this decomposition to select appropriate exemplars and to sequentially generate the semantic parse. This method allows us to set a new state of the art for CFQ while requiring only 1% of the training data used by traditional approaches. Due to the general nature of our approach, we expect similar efforts will lead to new results in other tasks and domains, especially for knowledge-intensive applications.

Motivation & Objective

  • Address compositional generalization in realistic semantic parsing benchmarks CFQ and COGS.
  • Adapt and extend least-to-most prompting to handle larger vocabularies and complex grammars.
  • Reduce training data requirements while maintaining high accuracy.
  • Develop a dynamic exemplar selection strategy guided by syntactic decomposition.

Proposed method

  • Dynamic least-to-most prompting that decomposes inputs via LM-predicted syntactic parsing into a tree structure.
  • Dynamic selection of a small exemplar pool to cover the decomposition tree based on top-down and bottom-up matching.
  • Sequential generation of subproblem solutions by linearizing the decomposition tree and prompting the model to solve subproblems before the final output.
  • Comparison against chain-of-thought prompting and fully supervised baselines to evaluate effectiveness and data efficiency.
  • Use of Codex (code-davinci-002) as the LM backbone and greedy decoding with self-consistency for multiple prompts.

Experimental results

Research questions

  • RQ1Can dynamic least-to-most prompting extend compositional generalization to realistic semantic parsing tasks like CFQ and COGS?
  • RQ2How can syntactic decomposition and dynamic exemplar selection be designed to handle large vocabularies and context-dependent translations?
  • RQ3How does the proposed approach compare to fully supervised finetuning and chain-of-thought prompting in terms of accuracy and data efficiency?

Key findings

  • On CFQ, dynamic least-to-most achieves 95.0% average accuracy across MCD splits using about 1% of the training data, setting a new state of the art.
  • The CFQ improvement corresponds to roughly a 45% reduction in error rate over previous best results.
  • On COGS, the approach scores 99.2% accuracy on the generalization test set using about 0.4% of the training data.
  • Exemplar pool size robustness is demonstrated; even with small pools (e.g., less than 0.1% of data), the method remains competitive.
  • Dynamic least-to-most outperforms vanilla few-shot and chain-of-thought prompting in their experiments, and is reported to be about twice as fast as chain-of-thought when using self-consistency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.