Abstract
Context-dependent Text-to-SQL aims to translate multi-turn natural language questions into SQL queries. Despite various methods have exploited context-dependence information implicitly for contextual SQL parsing, there are few attempts to explicitly address the dependencies between current question and question context. This paper presents QURG, a novel QUestion Rewriting Guided approach to help the models achieve adequate contextual understanding. Specifically, we first train a question rewriting model to complete the current question based on question context, and convert them into a rewriting edit matrix. We further design a two-stream matrix encoder to jointly model the rewriting relations between question and context, and the schema linking relations between natural language and structured schema. Experimental results show that QURG significantly improves the performances on two large-scale context-dependent datasets SParC and CoSQL, especially for hard and long-turn questions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Cai, Y., Wan, X.: IGSQL: database schema interaction graph based neural model for context-dependent text-to-SQL generation. In: Proceedings of EMNLP (2020)
Cao, R., Chen, L., Chen, Z., Zhao, Y., Zhu, S., Yu, K.: LGESQL: line graph enhanced text-to-SQL model with mixed local and non-local relations. In: Proceedings of ACL (2021)
Chen, Z., et al.: Decoupled dialogue modeling and semantic parsing for multi-turn text-to-SQL. In: Proceedings of ACL Findings (2021)
Clark, K., Luong, M.T., Le, Q.V., Manning, C.D.: Electra: pre-training text encoders as discriminators rather than generators. In: Proceedings of ICLR (2020)
Dong, C., et al.: A survey of natural language generation. ACM Comput. Surv. (2023)
Elgohary, A., Peskov, D., Boyd-Graber, J.: Can you unpack that? Learning to rewrite questions-in-context. In: Proceedings of EMNLP (2019)
Hui, B., et al.: Dynamic hybrid relation exploration network for cross-domain context-dependent semantic parsing. In: Proceedings of AAAI (2021)
Kim, G., Kim, H., Park, J., Kang, J.: Learn to resolve conversational dependency: a consistency training framework for conversational question answering. In: ACL (2021)
Li, T., Fang, L., Lou, J.G., Li, Z.: TWT: table with written text for controlled data-to-text generation. In: Proceedings of EMNLP Findings (2021)
Li, T., Fang, L., Lou, J.G., Li, Z., Zhang, D.: Anasearch: extract, retrieve and visualize structured results from unstructured text for analytical queries. In: Proceedings of WSDM (2021)
Li, Y., et al.: On the (in)effectiveness of large language models for Chinese text correction. CoRR (2023)
Li, Y., Zhang, H., Li, Y., Wang, S., Wu, W., Zhang, Y.: Pay more attention to history: a context modeling strategy for conversational text-to-SQL. arXiv:2112.08735 (2021)
Lin, S.C., Yang, J.H., Nogueira, R., Tsai, M.F., Wang, C.J., Lin, J.: Conversational question reformulation via sequence-to-sequence architectures and pretrained language models. arXiv preprint arXiv:2004.01909 (2020)
Lin, X.V., Socher, R., Xiong, C.: Bridging textual and tabular data for cross-domain text-to-SQL semantic parsing. In: Proceedings of EMNLP Findings (2020)
Liu, Q., Chen, B., Guo, J., Lou, J.G., Zhou, B., Zhang, D.: How far are we from effective context modeling? An exploratory study on semantic parsing in context. In: Proceedings of IJCAI (2020)
Liu, Q., Chen, B., Lou, J.G., Zhou, B., Zhang, D.: Incomplete utterance rewriting as semantic segmentation. In: Proceedings of EMNLP (2020)
Raffel, C., et al.: Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res. 21(1), 5485–5551 (2020)
Scholak, T., Li, R., Bahdanau, D., de Vries, H., Pal, C.: Duorat: towards simpler text-to-SQL models. In: Proceedings of AACL (2021)
Scholak, T., Schucher, N., Bahdanau, D.: PICARD: parsing incrementally for constrained auto-regressive decoding from language models. In: Proceedings of EMNLP (2021)
Shaw, P., Uszkoreit, J., Vaswani, A.: Self-attention with relative position representations. In: Proceedings of AACL (2018)
Vaswani, A., et al.: Attention is all you need. In: Proceedings of NeurIPS (2017)
Wang, B., Shin, R., Liu, X., Polozov, O., Richardson, M.: RAT-SQL: relation-aware schema encoding and linking for text-to-SQL parsers. In: Proceedings of ACL (2020)
Wang, R.Z., Ling, Z.H., Zhou, J., Hu, Y.: Tracking interaction states for multi-turn text-to-SQL semantic parsing. In: Proceedings of AAAI (2021)
Yang, J., et al.: Multilingual machine translation systems from microsoft for WMT21 shared task. In: Proceedings of the Sixth Conference on Machine Translation, WMT@EMNLP 2021, Online Event, 10–11 November 2021 (2021)
Yang, J., Ma, S., Zhang, D., Wu, S., Li, Z., Zhou, M.: Alternating language modeling for cross-lingual pre-training. In: Proceedings of AAAI (2020)
Yang, J., et al.: Learning to select relevant knowledge for neural machine translation. In: Proceedings of NLPCC (2021)
Yang, J., et al.: Multilingual agreement for multilingual neural machine translation. In: Proceedings of ACL (2021)
Yin, P., Neubig, G.: TRANX: a transition-based neural abstract syntax parser for semantic parsing and code generation. In: Proceedings of EMNLP (2018)
Yu, T., et al.: GraPPa: grammar-augmented pre-training for table semantic parsing. In: Proceedings of ICLR (2021)
Yu, T., et al.: CoSQL: a conversational text-to-SQL challenge towards cross-domain natural language interfaces to databases. In: Proceedings of EMNLP (2019)
Yu, T., Zhang, R., Polozov, A., Meek, C., Awadallah, A.H.: Score: pre-training for context representation in conversational semantic parsing. In: Proceedings of ICLR (2021)
Yu, T., et al.: Spider: a large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task. In: Proceedings of EMNLP (2018)
Yu, T., et al.: SParC: cross-domain semantic parsing in context. In: Proceedings of ACL (2019)
Zhang, R., et al.: Editing-based SQL query generation for cross-domain context-dependent questions. In: Proceedings of EMNLP (2019)
Zheng, Y., Wang, H., Dong, B., Wang, X., Li, C.: HIE-SQL: history information enhanced network for context-dependent text-to-SQL semantic parsing. In: Proceedings of ACL Findings (2022)
Zhong, V., Lewis, M., Wang, S.I., Zettlemoyer, L.: Grounded adaptation for zero-shot executable semantic parsing. In: Proceedings of EMNLP (2020)
Acknowledgement
This work was supported in part by the National Natural Science Foundation of China (Grant Nos. 62276017, U1636211, 61672081), the 2022 Tencent Big Travel Rhino-Bird Special Research Program, the 2022 CCF-NSFOCUS Kun-Peng Scientific Research Fund and the Fund of the State Key Laboratory of Software Development Environment (Grant No. SKLSDE-2021ZX-18).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Chai, L. et al. (2024). QURG: Question Rewriting Guided Context-Dependent Text-to-SQL Semantic Parsing. In: Liu, F., Sadanandan, A.A., Pham, D.N., Mursanto, P., Lukose, D. (eds) PRICAI 2023: Trends in Artificial Intelligence. PRICAI 2023. Lecture Notes in Computer Science(), vol 14326. Springer, Singapore. https://doi.org/10.1007/978-981-99-7022-3_24
Download citation
DOI: https://doi.org/10.1007/978-981-99-7022-3_24
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-99-7021-6
Online ISBN: 978-981-99-7022-3
eBook Packages: Computer ScienceComputer Science (R0)