Constrained Language Models Yield Few-Shot Semantic Parsers

Richard Shin, Christopher H. Lin, Sam Thomson, Charles Chen, Subhro Roy +5 more
4/18/2021
cs.CL

Official code: microsoft/semantic_parsing_with_constrained_lm (67 stars, Python, MIT, last commit 2024-05-31).

Abstract

We explore the use of large pretrained language models as few-shot semantic parsers. The goal in semantic parsing is to generate a structured meaning representation given a natural language input.

Show full abstract

However, language models are trained to generate natural language. To bridge the gap, we use language models to paraphrase inputs into a controlled sublanguage resembling English that can be automatically mapped to a target meaning representation. Our results demonstrate that with only a small amount of data and very little code to convert into English-like representations, our blueprint for rapidly bootstrapping semantic parsers leads to surprisingly effective performance on multiple community tasks, greatly exceeding baseline methods also trained on the same limited data.

View on arXivView PDF

Code Implementations(1)

MIT

Code to reproduce experiments in the paper "Constrained Language Models Yield Few-Shot Semantic Parsers" (EMNLP 2021).

676PythonSep 8, 20212 years agoMIT

Similar Papers

Cite this paper

@article{shin2021constrained,
  title  = {Constrained Language Models Yield Few-Shot Semantic Parsers},
  author = {Richard Shin and Christopher H. Lin and Sam Thomson and Charles Chen and Subhro Roy and Emmanouil Antonios Platanios and Adam Pauls and Dan Klein and Jason Eisner and Benjamin Van Durme},
  year   = {2021},
  eprint = {2104.08768},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2104.08768}
}

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/2104.08768.svg)](https://codeofpaper.com/paper/2104.08768)

Discussion