IGSQL: Database Schema Interaction Graph Based Neural Model for Context-Dependent Text-to-SQL Generation
29946Authors
nan
Abstract
AbstractContext-dependent text-to-SQL task has drawn much attention in recent years. Previous models on context-dependent text-to-SQL task only concentrate on utilizing historic user inputs. In this work, in addition to using encoders to capture historic information of user inputs, we propose a database schema interaction graph encoder to utilize historic information of database schema items. In decoding phase, we introduce a gate mechanism to weigh the importance of different vocabularies and then make the prediction of SQL tokens. We evaluate our model on the benchmark SParC and CoSQL datasets, which are two large complex context-dependent cross-domain text-to-SQL datasets. Our model outperforms previous state-of-the-art model by a large margin and achieves new state-of-the-art results on the two datasets. The comparison and ablation results demonstrate the efficacy of our model and the usefulness of the database schema interaction graph encoder.
Keywords
Full Content
Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, pages 6903–6912, November 16–20, 2020. c⃝2020 Association for Computational Linguistics 6903 IGSQL: Database Schema Interaction Graph Based Neural Model for Context-Dependent Text-to-SQL Generation Yitao Cai and Xiaojun Wan Wangxuan Institute of Computer Technology, Peking University Center for Data Science, Peking University The MOE Key Laboratory of Computational Linguistics, Peking University {caiyitao,wanxiaojun}@pku.edu.cn Abstract Context-dependent text-to-SQL task has drawn much attention in recent years. Previ- ous models on context-dependent text-to-SQL task only concentrate on utilizing historical user inputs. In this work, in addition to using encoders to capture historical informa- tion of user inputs, we propose a database schema interaction graph encoder to utilize historicalal information of database schema items. In decoding phase, we introduce a gate mechanism to weigh the importance of different vocabularies and then make the prediction of SQL tokens. We evaluate our model on the benchmark SParC and CoSQL datasets, which are two large complex context-dependent cross-domain text-to-SQL datasets. Our model outperforms previous state-of-the-art model by a large margin and achieves new state-of-the-art results on the two datasets. The comparison and ablation results demonstrate the efficacy of our model and the usefulness of the database schema interaction graph encoder. 1 Introduction The Text-to-SQL task aims to translate natural lan- guage texts into SQL queries. Users who do not understand SQL grammars can benefit from this task and acquire information from databases by just inputting natural language texts. Previous works (Li and Jagadish, 2014; Xu et al., 2017; Yu et al., 2018a; Bogin et al., 2019b; Huo et al., 2019) fo- cus on context-independent text-to-SQL genera- tion. However, in practice, users usually inter- act with systems for several turns to acquire in- formation, which extends the text-to-SQL task to the context-dependent text-to-SQL task in a con- versational scenario. Throughout the interaction, user inputs may omit some information that ap- peared before. This phenomenon brings difficulty for context-dependent text-to-SQL task. Recently, context-dependent text-to-SQL task has attracted more attention. Suhr et al. (2018) conduct experiments on ATIS dataset (Dahl et al., 1994). Besides, two cross-domain context- dependent datasets SParC (Yu et al., 2019b) and CoSQL (Yu et al., 2019a) are released. Cross- domain means databases in test set differ from that in training set, which is more challenging. EditSQL (Zhang et al., 2019) is the previ- ous state-of-the-art model on SParC and CoSQL datasets and it focuses on taking advantages of previous utterance texts and previously predicted query to predict the query for current turn. Table 1 shows the user inputs, ground truth queries and predicted queries of EditSQL for an interaction. In the second turn, EditSQL views “Kacey” as the name of a dog owner. However, since the context of the interaction is about dogs, “Kacey” should be the name of a dog. This example shows that a model using only historical information of user inputs may fail to keep context consistency and maintain thematic relations. According to (Yu et al., 2019b) and (Yu et al., 2019a), to …
Content truncated to 500 words
Labeled Text
AbstractContext-dependent text-to-SQL task has drawn much attention in recent years. Previous models on context-dependent text-to-SQL task only concentrate on utilizing historic user inputs. In this work, in addition to using encoders to capture historic information of user inputs, we propose a database schema interaction graph encoder to utilize historic information of database schema items. In decoding phase, we introduce a gate mechanism to weigh the importance of different vocabularies and then make the prediction of SQL tokens. We evaluate our model on the benchmark SParC and CoSQL datasets, which are two large complex context-dependent cross-domain text-to-SQL datasets. Our model outperforms previous state-of-the-art model by a large margin and achieves new state-of-the-art results on the two datasets. The comparison and ablation results demonstrate the efficacy of our model and the usefulness of the database schema interaction graph encoder.
Publication Details
- Paper ID:
- 29946
- Year:
- 2020
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan