S2SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parsers
32812Authors
nan
Abstract
AbstractThe task of converting a natural language question into an executable SQL query, known as text-to-SQL, is an important branch of semantic parsing. The state-of-the-art graph-based encoder has been successfully used in this task but does not model the question syntax well. In this paper, we propose S2SQL, injecting Syntax to question-Schema graph encoder for Text-to-SQL parsers, which effectively leverages the syntactic dependency information of questions in text-to-SQL to improve the performance. We also employ the decoupling constraint to induce diverse relational edge embedding, which further improves the network’s performance. Experiments on the Spider and robustness setting Spider-Syn demonstrate that the proposed approach outperforms all existing methods when pre-training models are used, resulting in a performance ranks first on the Spider leaderboard.
Keywords
Full Content
Findings of the Association for Computational Linguistics: ACL 2022, pages 1254 - 1262 May 22-27, 2022 c⃝2022 Association for Computational Linguistics S2SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parsers Binyuan Hui 1, Ruiying Geng 1, Lihan Wang 1,2,3 ∗, Bowen Qin 1,2,3 ∗, Yanyang Li 4, Bowen Li 1, Jian Sun 1 and Yongbin Li 1 † 1 Alibaba Group, 2 University of Chinese Academy of Sciences 3 Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences 4 The Chinese University of Hong Kong {binyuan.hby,ruiying.gry,yanjin.lbw,jian.sun,shuide.lyb}@alibaba-inc.com Abstract The task of converting a natural language ques- tion into an executable SQL query, known as text-to-SQL, is an important branch of seman- tic parsing. The state-of-the-art graph-based encoder has been successfully used in this task but does not model the question syntax well. In this paper, we propose S2SQL, injecting Syntax to question-Schema graph encoder for Text-to-SQL parsers, which effectively lever- ages the syntactic dependency information of questions in text-to-SQL to improve the perfor- mance. We also employ the decoupling con- straint to induce diverse relational edge em- bedding, which further improves the network’s performance. Experiments on the Spider and robustness setting Spider-Syn demonstrate that the proposed approach outperforms all existing methods when pre-training models are used, resulting in a performance ranks first on the Spider leaderboard. 1 Introduction Relational databases are ubiquitous and store a great amount of structured information. The in- teraction with databases often requires expertise on writing structured code like SQL, which is not friendly for users who are not proficient in query languages. Text-to-SQL aims to automatically translate natural language questions into executable SQL statements (Zelle and Mooney, 1996; Zettle- moyer and Collins, 2005; Wong and Mooney, 2007; Zettlemoyer and Collins, 2007; Berant et al., 2013; Li and Jagadish, 2014; Yaghmazadeh et al., 2017; Iyer et al., 2017). Recently, a large-scale, multi-table, realistic text- to-SQL benchmark, Spider (Yu et al., 2018), has been released. The most effective and popular en- coder architecture on Spider is the question-schema interaction graph (Wang et al., 2020). Built on that, ∗ Work done during an internship at Alibaba DAMO. † Corresponding author. Show the date of the transcript which shows at least number of results, also list the id. Schema Pred SQL Question Gold SQL SELECT transcript_date, FROM Transcript_Contents AS T1 JOIN … SELECT transcript_date, transcript_id FROM Transcript_Contents AS T1 JOIN … transcript_date transcript_contents transcript_id Column Table Column dep obj Figure 1: A typical bad case of the current graph-based methods. If the structure of question (dependencies) are not considered, the wrong SQL will be generated even if the linking is correct. many state-of-the-art models have been further de- veloped (Chen et al., 2021; Cao et al., 2021). It jointly models natural language question and struc- tured database schema information, and uses some pre-defined relationships to carve out the interac- tion between them. However, we observed that the current graph-based model yet has two major limitations. Syntactic Modelling. Jointly modeling syntax and semantics is a core problem in NLP. …
Content truncated to 500 words
Labeled Text
AbstractThe task of converting a natural language question into an executable SQL query, known as text-to-SQL, is an important branch of semantic parsing. The state-of-the-art graph-based encoder has been successfully used in this task but does not model the question syntax well. In this paper, we propose S2SQL, injecting Syntax to question-Schema graph encoder for Text-to-SQL parsers, which effectively leverages the syntactic dependency information of questions in text-to-SQL to improve the performance. We also employ the decoupling constraint to induce diverse relational edge embedding, which further improves the network’s performance. Experiments on the Spider and robustness setting Spider-Syn demonstrate that the proposed approach outperforms all existing methods when pre-training models are used, resulting in a performance ranks first on the Spider leaderboard.
Publication Details
- Paper ID:
- 32812
- Year:
- 2022
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan