SADGA: Structure-Aware Dual Graph Aggregation Network for Text-to-SQL

Ruichu Cai, Jinjie Yuan, Boyan Xu, Zhifeng Hao
11/1/2021
cs.CL

Official code: DMIRLAB-Group/SADGA (36 stars, Python, last commit 2022-03-01).

Abstract

The Text-to-SQL task, aiming to translate the natural language of the questions into SQL queries, has drawn much attention recently. One of the most challenging problems of Text-to-SQL is how to generalize the trained model to the unseen database schemas, also known as the cross-domain Text-to-SQL task.

Show full abstract

The key lies in the generalizability of (i) the encoding method to model the question and the database schema and (ii) the question-schema linking method to learn the mapping between words in the question and tables/columns in the database schema. Focusing on the above two key issues, we propose a Structure-Aware Dual Graph Aggregation Network (SADGA) for cross-domain Text-to-SQL. In SADGA, we adopt the graph structure to provide a unified encoding model for both the natural language question and database schema. Based on the proposed unified modeling, we further devise a structure-aware aggregation method to learn the mapping between the question-graph and schema-graph. The structure-aware aggregation method is featured with Global Graph Linking, Local Graph Linking, and Dual-Graph Aggregation Mechanism. We not only study the performance of our proposal empirically but also achieved 3rd place on the challenging Text-to-SQL benchmark Spider at the time of writing.

View on arXivView PDF

Code Implementations(1)

The PyTorch implementation of paper SADGA: Structure-Aware Dual Graph Aggregation Network for Text-to-SQL. (NeurIPS 2021)

3610Python, JsonnetOct 19, 20214 years ago

Similar Papers

Cite this paper

@article{cai2021sadga,
  title  = {SADGA: Structure-Aware Dual Graph Aggregation Network for Text-to-SQL},
  author = {Ruichu Cai and Jinjie Yuan and Boyan Xu and Zhifeng Hao},
  year   = {2021},
  eprint = {2111.00653},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.00653}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2111.00653.svg)](https://codeofpaper.com/paper/2111.00653)

Discussion