Command Palette
Search for a command to run...
PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models
Torsten Scholak Nathan Schucher Dzmitry Bahdanau

Abstract
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.
Code Repositories
Benchmarks
| Benchmark | Methodology | Metrics |
|---|---|---|
| dialogue-state-tracking-on-cosql | T5-3B + PICARD | interaction match accuracy: 23.7 question match accuracy: 54.6 |
| semantic-parsing-on-spider | T5-3B + PICARD | Accuracy: 71.9 |
| text-to-sql-on-spider | T5-3B + PICARD | Exact Match Accuracy (Dev): 75.5 Exact Match Accuracy (Test): 71.9 Execution Accuracy (Test): 75.1 |
| text-to-sql-on-spider-1 | T5-3B+PICARD | Exact Match Accuracy (in Dev): 75.5 Execution Accuracy (in Dev): 79.3 |
| text-to-sql-on-spider-1 | T5-3B | Exact Match Accuracy (in Dev): 71.5 Execution Accuracy (in Dev): 74.4 |
Build AI with AI
From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.