RGISQL: Integrating Refined Grammatical Information into Relational Graph Neural Network for Text-to-SQL Task
Source abstract
Abstract
The text-to-SQL task aims to convert natural language questions into corresponding SQL queries based on a given database schema. Previous models that rely on graph neural networks often struggle to accurately capture the complex grammatical relationships present in these questions, leading to poor performance when generating queries for longer requests. To address these challenges, we propose RGISQL, which integrates refined grammatical information extracted from the question and employs segmentation processing to effectively manage long queries. Additionally, RGISQL minimizes the complexity of edge embeddings by reducing the coupling within graph neural networks. By utilizing grammatical dependency trees, RGISQL is better equipped to capture the inherent structure and grammatical rules of questions. This refined grammatical information offers additional contextual and semantic cues for the model, thereby enhancing both its generalizability and interpretability. Furthermore, we dynamically assess the importance of different edges based on the graph structure, which helps reduce the coupling of edge embeddings and further improves the model’s performance. Multiple sets of experiments conducted on the Spider and Spider-Syn datasets demonstrate that RGISQL outperforms other baselines, achieving the best results in both datasets.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Advanced Graph Neural Networks · Graph Theory and Algorithms · Semantic Web and Ontologies
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
School of Mathematics, Hohai University, Nanjing 211100, China
College of Computer Science and Software Engineering, Hohai University, Nanjing 211100, China
Key Laboratory of Water Big Data Technology of Ministry of Water Resources, Hohai University, Nanjing 211100, China
Funding
the Key Research and Development Program of China · the Key Technology Project of China Huaneng Group
References (34)
Show source-provided references
1. Deng, X., Awadallah, A.H., Meek, C., Polozov, O., Sun, H., and Richardson, M. (2021, January 6–11). Structure-Grounded Pretraining for Text-to-SQL. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Online.10.18653/v1/2021.naacl-main.105 ↗
2. Kamath, A., and Das, R. (2018). A Survey on Semantic Parsing. arXiv.
3. Yu, T., Zhang, R., Yang, K., Yasunaga, M., Wang, D.X., Li, Z.F., Ma, J., Li, I., Yao, Q.N., and Roman, S. (November, January 31). Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium.10.18653/v1/D18-1425 ↗
4. Gan, Y.J., Chen, X.Y., Huang, Q.P., Purver, M., John, W., Xie, J.X., and Huang, P.S. (2021, January 1–6). Towards Robustness of Text-to-SQL Models against Synonym Substitution. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), Online.10.18653/v1/2021.acl-long.195 ↗
5. The Graph Neural Network Model10.1109/TNN.2008.2005605 ↗
6. Schlichtkrull, M., Kipf, T.N., Bloem, P., Berg, R.V.D., Titov, I., and Welling, M. (2018, January 3–7). Modeling Relational Data with Graph Convolutional Networks. Proceedings of the 15th International Semantic Web Conference, Heraklion, Greece.10.1007/978-3-319-93417-4_38 ↗
7. Wang, B.L., Shin, R., Liu, X.D., Polozov, O., and Richardson, M. (2021, January 5–10). RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online.10.18653/v1/2020.acl-main.677 ↗
8. Cao, R.S., Chen, L., Chen, Z., Zhao, Y.B., Zhu, S., and Yu, K. (2021, January 1–6). LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and NonLocal Relations. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, Online.10.18653/v1/2021.acl-long.198 ↗
9. Qi, J.X., Tang, J.Y., He, Z.W., Wan, X.P., Cheng, Y., Zhou, C.H., Wang, X.B., Zhang, Q.S., and Lin, Z.H. (2022, January 7–11). RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQL. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Abu Dhabi, United Arab Emirates.10.18653/v1/2022.emnlp-main.211 ↗
10. Zelle, J.M., and Mooney, R.J. (1996, January 4–9). Learning to parse database queries using inductive logic programming. Proceedings of the National Conference on Artificial Intelligence, Philadelphia, PA, USA.
11. Zettlemoyer, L.S., and Collins, M. (2005, January 22–26). Learning to map sentences to logical form: Structured classification with probabilistic categorial grammars. Proceedings of the Twenty-First Conference on Uncertainty in Artificial Intelligence, Arlington, VA, USA.
12. Xu, X.J., Liu, C., and Song, D. (2017). SQLNet: Generating Structured Queries from Natural Language Without Reinforcement Learning. arXiv.
13. Yu, T., Yasunaga, M., Yang, K., Zhang, R., Wang, D.X., Li, Z.F., and Radev, D. (November, January 31). SyntaxSQLNet: Syntax Tree Networks for Complex and Cross-Domain Text-to-SQL Task. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium.10.18653/v1/D18-1193 ↗
14. Choi, D.H., Shin, M.C., Kim, E.G., and Shin, D.R. (2021). RYANSQL: Recursively Applying Sketch-Based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databases, Computational Linguistics.10.1162/coli_a_00403 ↗
15. Hui, B.Y., Shi, X., Geng, R.Y., Li, B.H., Li, Y.B., Sun, J., and Zhu, X.D. (2021). Improving Text-to-SQL with Schema Dependency Learning. arXiv.
16. Kelkar, A., Relan, R., Bhardwaj, V., Vaichal, S., and Relan, P.A. (2020). Bertrand-DR: Improving Text-to-SQL using a Discriminative Reranker. arXiv.
17. Rubin, O., and Berant, J. (2021, January 6–11). SmBoP: Semi-autoregressive Bottomup Semantic Parsing. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Online.10.18653/v1/2021.naacl-main.29 ↗
18. Bogin, B., Berant, J., and Gardner, M. (August, January 28). Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsing. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy.
19. Scholak, T., Li, R., Bahdanau, D., Vries, H.D., and Pal, C. (2021, January 6–11). DuoRAT: Towards Simpler Text-to-SQL Models. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Online.10.18653/v1/2021.naacl-main.103 ↗
20. Chen, Z., Chen, L., Zhao, Y.B., Cao, R.S., Xu, Z.H., Zhu, S., and Yu, K. (2021, January 6–11). ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parser. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Online.10.18653/v1/2021.naacl-main.441 ↗
21. Veličković, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., and Bengio, Y.S. (2017). Graph attention networks. arXiv.
22. Shaw, P., Uszkoreit, J., and Vaswani, A. (2018, January 1–6). Self-Attention with Relative Position Representations. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, New Orleans, LO, USA.10.18653/v1/N18-2074 ↗
23. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017, January 4–9). Attention is all you need. Proceedings of the 31st International Conference on Neural Information Processing Systems, Red Hook, NY, USA.
24. Guo, J.Q., Zhan, Z.C., Gao, Y., Xiao, Y., Lou, J.G., Liu, T., and Zhang, D.M. (August, January 28). Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy.
25. Lei, W.Q., Wang, W.X., Ma, Z.X., Gan, T., Lu, W., Kan, M.Y., and Chua, T.S. (2020, January 16–20). Re-examining the Role of Schema Linking in Text-to-SQL. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, Online.10.18653/v1/2020.emnlp-main.564 ↗
26. Ishiwatari, T.C., Yasuda, Y., Miyazaki, T., and Goto, J. (2020, January 16–20). Relation-aware Graph Attention Networks with Relational Position Encodings for Emotion Recognition in Conversations. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, Online.10.18653/v1/2020.emnlp-main.597 ↗
27. Wang, Y., Sun, Y.B., Liu, Z.W., Sarma, S.E., Bronstein, M., and Solomon, J.M. (2019). Dynamic Graph CNN for Learning on Point Clouds, Association for Computing Machinery.10.1145/3326362 ↗
28. Cao, R., Zhang, H., and Xu, H. (2023). ASTormer: An AST Structure-aware Transformer Decoder for Text-to-SQL. arXiv.
29. Peng, Q., Zhang, Y.H., Zhang, Y.H., Bolton, J., and Manning, C.D. (2020, January 5–10). Stanza: A Python Natural Language Processing Toolkit for Many Human Languages. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, Online.
30. Clark, K., Luong, M.T., Le, Q.V., and Manning, C.D. (May, January 26). Electra: Pre-training text encoders as discriminators rather than generators. Proceedings of the International Conference on Learning Representations. International Conference on Learning Representations, Online.
31. Hui, B.Y., Geng, R.Y., Wang, L.H., Qin, B.W., Li, Y.Y., Li, B.W., Sun, J., and Li, Y.B. (2022, January 22–27). S2SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parsers. Proceedings of the Association for Computational Linguistics: ACL 2022, Dublin, Ireland.10.18653/v1/2022.findings-acl.99 ↗
32. Lin, X.V., Socher, R., and Xiong, C.M. (2020, January 5–10). Bridging textual and tabular data for crossdomain text-to-SQL semantic parsing. Proceedings of the Association for Computational Linguistics, Online.10.18653/v1/2020.findings-emnlp.438 ↗
33. Huang, J., Wang, Y., Wang, Y., Dong, Y., and Xiao, Y. (2021). Relation Aware Semi-autoregressive Semantic Parsing for NL2SQL. arXiv.
34. Gan, Y.J., Chen, X.Y., Xie, J.X., Purver, M., Woodward, J.R., Drake, J., and Zhang, Q.F. (2021, January 6–11). Natural SQL: Making SQL easier to infer from natural language specifications. Proceedings of the Association for Computational Linguistics, Punta Cana, Dominican Republic.10.18653/v1/2021.findings-emnlp.174 ↗