Few-Shot Semantic Parsing with Language Models Trained On Code
Richard Shin, Benjamin Van Durme

TL;DR
This paper investigates the effectiveness of code-trained language models like Codex for few-shot semantic parsing, showing they outperform GPT-3 on datasets where meaning representations resemble code.
Contribution
It demonstrates that code-pretrained models excel at semantic parsing tasks involving code-like representations, offering a new approach for structured language understanding.
Findings
Codex outperforms GPT-3 on semantic parsing tasks.
Models trained on code perform better when meaning representations are code-like.
Performance gap is reduced when parsing into code-like structures.
Abstract
Large language models can perform semantic parsing with little training data, when prompted with in-context examples. It has been shown that this can be improved by formulating the problem as paraphrasing into canonical utterances, which casts the underlying meaning representation into a controlled natural language-like representation. Intuitively, such models can more easily output canonical utterances as they are closer to the natural language used for pre-training. Recently, models also pre-trained on code, like OpenAI Codex, have risen in prominence. For semantic parsing tasks where we map natural language into code, such models may prove more adept at it. In this paper, we test this hypothesis and find that Codex performs better on such tasks than equivalent GPT-3 models. We evaluate on Overnight and SMCalFlow and find that unlike GPT-3, Codex performs similarly when targeting…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Text Readability and Simplification
MethodsMulti-Head Attention · Attention Is All You Need · Linear Layer · Cosine Annealing · Dense Connections · 15 Ways to Contact How can i speak to someone at Delta Airlines · {Dispute@FaQ-s}How to file a dispute with Expedia? · Attention Dropout · Linear Warmup With Cosine Annealing · Residual Connection
