Abstract
Semantic parsing—the conversion of natural language into machine-executable code—traditionally relies on labor-intensive human-labeled data. This paper introduces a framework that eliminates this requirement by combining compact, idiomatic grammars with large-scale language models (LMs) for paraphrasing and data selection. By bridging the "logical gap" and "language gap" inherent in synthetic data, the proposed system achieves state-of-the-art zero-shot performance on standard benchmarks, outperforming previous semi-supervised methods.
Introduction
Semantic parsers are critical components of virtual assistants and database interfaces. However, building them requires "parallel data": pairs of natural language utterances and their corresponding formal programs (e.g., SQL). Collecting such data is expensive and requires expert knowledge.
Existing zero-shot methods attempt to synthesize training data using grammars, but they face two primary hurdles:
- The Logical Gap: Synthetic grammars often miss the complex logic patterns found in real-world user queries.
- The Language Gap: Sentences generated by grammars (canonical utterances) are often "clunky" and robotic (e.g., "Paper that has the largest publication year"), failing to match the diversity of natural human speech.
Methodology
The proposed framework addresses these gaps through three core components: idiomatic grammars, iterative paraphrasing, and naturalness-driven selection.
Idiomatic Grammars
Rather than exhaustive, massive grammars, the authors utilize a compact set of 46 general rules supplemented by "idiomatic" rules. These capture how humans naturally compress logic—for example, shortening "Author that writes paper whose topic is NLP" to "Author that works on NLP."
Iterative Paraphrasing and Filtering
A BART model, fine-tuned on a large paraphrase dataset, rewrites robotic canonical sentences into natural variations. To maintain quality, an "expert iteration" process is employed: a parser is trained on the synthetic data and then used to filter out paraphrases it cannot accurately map back to the original program.
Naturalness-driven Data Selection
To manage the exponential growth of possible programs, GPT-2 XL scores the "naturalness" of generated sentences. Only the top-K most likely examples are retained, focusing training on programs that reflect plausible human intent.
Experimental Results
The model was evaluated on two benchmarks: SCHOLAR (academic database queries) and GEO (U.S. geography queries).
The system achieved significant improvements without any human-labeled training data:
- SCHOLAR: Reached 75.5% denotation accuracy, outperforming previous semi-supervised methods like GRANNO (68.3%) and OVERNIGHT (41.0%).
- GEO: Reached 74.1% accuracy, surpassing GRANNO (69.4%).
- Efficiency: Naturalness-driven selection allowed the model to reach these results using only 0.2% to 1% of the total possible synthetic examples.
Discussion and Limitations
The study highlights that capturing "sub-lexical compositionality" (how humans shorten phrases) is more vital than exhaustive grammar coverage. Furthermore, using LM priors (like GPT-2) effectively filters out logically valid but practically useless programs (e.g., "Mountain whose elevation is the length of the Colorado River").
However, limitations remain. The filtering model can be overly conservative, rejecting valid but unfamiliar sentence structures. Additionally, while the grammar is compact, designing idiomatic rules still requires domain expertise. Future work may focus on automating "grammar discovery" and further improving the modeling of utterance naturalness to handle remaining "unnatural" synthetic concepts.
Summary updated