ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parser

21333

Authors

nan

Abstract

AbstractGiven 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

Keywords

nan

Full Content

Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5567–5577 June 6–11, 2021. ©2021 Association for Computational Linguistics 5567 ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parser Zhi Chen1, Lu Chen1∗, Yanbin Zhao1, Ruisheng Cao1, Zihan Xu1, Su Zhu2 and Kai Yu1∗ 1X-LANCE Lab, Department of Computer Science and Engineering MoE Key Lab of Artificial Intelligence, AI Institute, Shanghai Jiao Tong University Shanghai Jiao Tong University, Shanghai, China State Key Lab of Media Convergence Production Technology and Systems, Beijing, China 2AISpeech Co., Ltd., Suzhou, China {zhenchi713, chenlusz, kai.yu}@sjtu.edu.cn 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 generaliza- tion capability for rare and unseen schemas, we propose a new architecture, ShadowGNN, which processes schemas at abstract and se- mantic levels. By ignoring names of seman- tic items in databases, abstract schemas are exploited in a well-designed graph projection neural network to obtain delexicalized rep- resentation of question and schema. Based on the domain-independent representations, a relation-aware transformer is utilized to fur- ther extract logical linking between question and schema. Finally, a SQL decoder with context-free grammar is applied. On the chal- lenging Text-to-SQL benchmark Spider, em- pirical results show that ShadowGNN outper- forms state-of-the-art models. When the an- notated data is extremely limited (only 10% training set), ShadowGNN gets over absolute 5% performance gain, which shows its pow- erful generalization ability. Our implemen- tation will be open-sourced at https://github. com/WowCZ/shadowgnn. 1 Introduction Recently, Text-to-SQL has drawn a great deal of at- tention from the semantic parsing community (Be- rant et al., 2013; Cao et al., 2019, 2020). The ability to query a database with natural language (NL) en- gages 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. On public Text-to-SQL benchmarks (Zhong et al., ∗The corresponding authors are Lu Chen and Kai Yu. What are the names of teams that do not have match season record? SELECT name FROM team WHERE team id NOT IN (SELECT team FROM match season) team match reason team id name player team team position name years played player id player id NL Question: Semantic Schema: SQL Query: What are the col_1 of tab_1 that do not have tab_2 record? SELECT col_1 FROM tab_1 WHERE col_9 NOT IN (SELECT col_8 FROM tab_2) tab_1 tab_2 col_9 col_1 tab_3 col_2 col_8 col_6 col_7 col_3 col_4 col_5 Abstract Question: Abstract Schema: Abstract Query: (a) (b) Figure 1: An example to demonstrate the impact of do- main information. (b) is the human-labeled abstract representation of Text-to-SQL content from domain- aware example (a). The green nodes and orange nodes represent columns and tables respectively. 2017; Krishnamurthy et al., 2017), exact match ac- curacy even excesses more than 80%. …

Content truncated to 500 words

Labeled Text

AbstractGiven 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

Publication Details

Paper ID:
21333
Year:
2021
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan