S hadow GNN : Graph Projection Neural Network for Text-to- SQL Parser (2021)

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 https://github.com/WowCZ/shadowgnn

## introduction recently, text-to-sql has drawn a great deal of attention from the semantic parsing community @xcite @xcite . the ability to query a database with natural language (nl) engages the majority of users, who are not familiar with sql language, in visiting large databases. a number of neural approaches have been proposed to translate questions into executable sql queries. ## background in this section, we first introduce relational graph convolution network (r-gcn) @xcite , which is the basis of our proposed gpnn. then, we introduce the relation-aware transformer, which is a transformer variant considering relation information during calculating attention weights. ## experiments in this section, we evaluate the effectiveness of our proposed shadowgnn than other strong baselines. we further conduct the experiments with limited annotated training data to validate the generalization capability of the proposed shadowgnn. finally, we ablate other designed choices to understand their contributions. ## conclusion in this paper, we propose a graph project neural network (gpnn) to abstract the representation of question and schema with simple attention way. we further unify the abstract representation of question and schema outputted from gpnn with relativeaware transformer (rat). the experiments demonstrate that our proposed shadowgnn can get excellent performance on the challenging text-to-sql task. especially when the annotated training data is limited, our proposed shadowgnn gets more performance gain on exact match accuracy and convergence speed. the ablation studies further indicate the effectiveness of our proposed gpnn. recently, we notice that some text2sql-specific pretrained models have been proposed, e.g., tabert @xcite and grappa @xcite . in future work, we will evaluate our proposed shadowgnn with these adaptive pretrained models.