Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsing

Ben Bogin, Jonathan Berant, Matt Gardner


Abstract
Research on parsing language to SQL has largely ignored the structure of the database (DB) schema, either because the DB was very simple, or because it was observed at both training and test time. In spider, a recently-released text-to-SQL dataset, new and complex DBs are given at test time, and so the structure of the DB schema can inform the predicted SQL query. In this paper, we present an encoder-decoder semantic parser, where the structure of the DB schema is encoded with a graph neural network, and this representation is later used at both encoding and decoding time. Evaluation shows that encoding the schema structure improves our parser accuracy from 33.8% to 39.4%, dramatically above the current state of the art, which is at 19.7%.
Anthology ID:
P19-1448
Volume:
Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics
Month:
July
Year:
2019
Address:
Florence, Italy
Editors:
Anna Korhonen, David Traum, Lluís Màrquez
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
4560–4565
Language:
URL:
https://aclanthology.org/P19-1448
DOI:
10.18653/v1/P19-1448
Bibkey:
Cite (ACL):
Ben Bogin, Jonathan Berant, and Matt Gardner. 2019. Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsing. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4560–4565, Florence, Italy. Association for Computational Linguistics.
Cite (Informal):
Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsing (Bogin et al., ACL 2019)
Copy Citation:
PDF:
https://preview.aclanthology.org/emnlp22-frontmatter/P19-1448.pdf
Supplementary:
 P19-1448.Supplementary.pdf
Code
 benbogin/spider-schema-gnn