Large pre-trained language models for textual data have an unconstrained output space; at each decoding step, they can produce any of 10,000s of sub-word tokens. When fine-tuned to target constrained formal languages like SQL, these models often generate invalid code, rendering it unusable. We propose PICARD (code and trained models available at https://github.com/ElementAI/picard), a method for constraining auto-regressive decoders of language models through incremental parsing. PICARD helps to find valid output sequences by rejecting inadmissible tokens at each decoding step. On the challenging Spider and CoSQL text-to-SQL translation tasks, we show that PICARD transforms fine-tuned T5 models with passable performance into state-of-the-art solutions.
PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models
PICARD, a method that constrains auto-regressive decoders through incremental parsing, improves the performance of fine-tuned models on text-to-SQL tasks by generating valid output sequences.
- Year
- 2021
- Venue
- EMNLP 2021 11
- Authors
- 3
- Hosting
- Abstract onlyARXIV-DEFAULT
Cite
Notes
Only stored in your browser.
Attribution
- Abstract & full text
- arxiv.org/abs/2109.05093ARXIV-DEFAULT
- TL;DR
- Semantic Scholar