ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parser
arXiv:2104.04689
Abstract
Given a database schema, Text-to-SQL aims to translate a natural language question into the corresponding SQL query. Under the setup of cross-domain, traditional semantic parsing models struggle to adapt to unseen database schemas. To improve the model generalization capability for rare and unseen schemas, we propose a new architecture, ShadowGNN, which processes schemas at abstract and semantic levels. By ignoring names of semantic items in databases, abstract schemas are exploited in a well-designed graph projection neural network to obtain delexicalized representation of question and schema. Based on the domain-independent representations, a relation-aware transformer is utilized to further extract logical linking between question and schema. Finally, a SQL decoder with context-free grammar is applied. On the challenging Text-to-SQL benchmark Spider, empirical results show that ShadowGNN outperforms state-of-the-art models. When the annotated data is extremely limited (only 10\% training set), ShadowGNN gets over absolute 5\% performance gain, which shows its powerful generalization ability. Our implementation will be open-sourced at \url{https://github.com/WowCZ/shadowgnn}.
Accepted at NAACL2021, 11 pages, 4 figures
References in corpus (14)
- PyTorch: An Imperative Style, High-Performance Deep Learning Library
- HuggingFace's Transformers: State-of-the-art Natural Language Processing
- Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning
- Gated Graph Sequence Neural Networks
- Compositional generalization in a deep seq2seq model by separating syntax and semantics
- GraPPa: Grammar-Augmented Pre-Training for Table Semantic Parsing
- Editing-Based SQL Query Generation for Cross-Domain Context-Dependent Questions
- Grammar-based Neural Text-to-SQL Generation
- Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsing
- TaBERT: Pretraining for Joint Understanding of Textual and Tabular Data
- Efficient Context and Schema Fusion Networks for Multi-Domain Dialogue State Tracking
- Bertrand-DR: Improving Text-to-SQL using a Discriminative Re-ranker
- Dynamic Hybrid Relation Network for Cross-Domain Context-Dependent Semantic Parsing
- Structured Hierarchical Dialogue Policy with Graph Neural Networks