Data-Anonymous Encoding for Text-to-SQL Generation
8972Authors
nan
Abstract
AbstractOn text-to-SQL generation, the input utterance usually contains lots of tokens that are related to column names or cells in the table, called table-related tokens. These table-related tokens are troublesome for the downstream neural semantic parser because it brings complex semantics and hinders the sharing across the training examples. However, existing approaches either ignore handling these tokens before the semantic parser or simply use deterministic approaches based on string-match or word embedding similarity. In this work, we propose a more efficient approach to handle table-related tokens before the semantic parser. First, we formulate it as a sequential tagging problem and propose a two-stage anonymization model to learn the semantic relationship between tables and input utterances. Then, we leverage the implicit supervision from SQL queries by policy gradient to guide the training. Experiments demonstrate that our approach consistently improves performances of different neural semantic parsers and significantly outperforms deterministic approaches.
Keywords
Full Content
Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, pages 5405–5414, Hong Kong, China, November 3–7, 2019. c⃝2019 Association for Computational Linguistics 5405 Data-Anonymous Encoding for Text-to-SQL Generation Zhen Dong1∗, Shizhao Sun2, Hongzhi Liu1, Jian-Guang Lou2 and Dongmei Zhang2 1Peking University 2Microsoft Research {zhendong,liuhz}@pku.edu.cn {shizsu,jlou,dongmeiz}@microsoft.com Abstract On text-to-SQL generation, the input utterance usually contains lots of tokens that are related to column names or cells in the table, called table-related tokens. These table-related to- kens are troublesome for the downstream neu- ral semantic parser because it brings com- plex semantics and hinders the sharing across the training examples. However, existing ap- proaches either ignore handling these tokens before the semantic parser or simply use de- terministic approaches based on string-match or word embedding similarity. In this work, we propose a more efficient approach to han- dle table-related tokens before the semantic parser. First, we formulate it as a sequen- tial tagging problem and propose a two-stage anonymization model to learn the semantic re- lationship between tables and input utterances. Then, we leverage the implicit supervision from SQL queries by policy gradient to guide the training. Experiments demonstrate that our approach consistently improves performances of different neural semantic parsers and signif- icantly outperforms deterministic approaches. 1 Introduction Interacting with relational databases or tables through natural language is an important and chal- lenging problem (Androutsopoulos et al., 1995; Li and Jagadish, 2014; Pasupat and Liang, 2015; Zhong et al., 2017; Yu et al., 2018c). To tackle this problem, the neural semantic parser has been widely studied (Dong and Lapata, 2016; Jia and Liang, 2016; Herzig and Berant, 2017; Dong and Lapata, 2018), which automatically maps the input natural language into the logical form (e.g., SQL query) following the typical encoder- decoder structure (Hochreiter and Schmidhuber, 1997; Bahdanau et al., 2015; Vinyals et al., 2015). ∗ This work was done when the author was visiting Mi- crosoft Research Asia. Semantic parsing usually tackles two kinds of problems (Goldman et al., 2018; Herzig and Be- rant, 2018), i.e., the lexical problem and the struc- tural problem. On text-to-SQL generation, the lex- ical problem refers to mapping tokens in input ut- terances to constants in SQL queries, e.g., the col- umn names or cells in SQL queries. The structural problem refers to mapping intentions conveyed by input utterances to operators in SQL queries, e.g., the aggregators or the existence of WHERE clause in SQL queries. Intuitively, the lexical problem can be formulated as a sequential tagging problem, called anonymization, where each token in the in- put utterance will be tagged as being related to a column name, a cell or nothing. For ease of refer- ence, we call the tokens in input utterances related to column names or cells table-related tokens, and the tagged utterance anonymous utterance. If the lexical problem can be reduced before the neural semantic parsing, the training difficulties will be greatly alleviated. The reason is two-fold. First, by …
Content truncated to 500 words
Labeled Text
AbstractOn text-to-SQL generation, the input utterance usually contains lots of tokens that are related to column names or cells in the table, called table-related tokens. These table-related tokens are troublesome for the downstream neural semantic parser because it brings complex semantics and hinders the sharing across the training examples. However, existing approaches either ignore handling these tokens before the semantic parser or simply use deterministic approaches based on string-match or word embedding similarity. In this work, we propose a more efficient approach to handle table-related tokens before the semantic parser. First, we formulate it as a sequential tagging problem and propose a two-stage anonymization model to learn the semantic relationship between tables and input utterances. Then, we leverage the implicit supervision from SQL queries by policy gradient to guide the training. Experiments demonstrate that our approach consistently improves performances of different neural semantic parsers and significantly outperforms deterministic approaches.
Publication Details
- Paper ID:
- 8972
- Year:
- 2019
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan