An interaction-modeling mechanism for context-dependent Text-to-SQL translation based on heterogeneous graph aggregation

Neural Netw. 2021 Oct:142:573-582. doi: 10.1016/j.neunet.2021.07.014. Epub 2021 Jul 18.

Abstract

For the context-dependent Text-to-SQL task, the generation of SQL query is placed in a multi-turn interaction scenario. Each turn of Text-to-SQL must take historical interactive information and database schema into account. Accordingly, how to encode and integrate these different types of texts (the question sentence, the corresponding SQL query, and database schema) is a tough problem. In previous work, these series of texts are usually concatenated into sequences and encoded by various variants of recurrent neural networks (RNN). However, the RNNs cannot model the intrinsic relationship of the text directly. To this end, we propose an interaction-modeling mechanism to represent and aggregate these texts. Firstly, different types of texts are represented as individual graphs. Then, heterogeneous graph aggregation is used to capture the interactions and aggregate graphs into a holistic representation. Finally, the corresponding SQL query is generated based on the current question and the aggregated information. We evaluate our model on the SparC and CoSQL dataset to demonstrate the benefits of interaction-modeling. Experimentally, our model has a competitive performance and space-time cost.

Keywords: Context-dependent Text-to-SQL; Heterogeneous graph aggregation; Interaction modeling.

MeSH terms

  • Databases, Factual
  • Language*
  • Neural Networks, Computer*