QURG: Question Rewriting Guided Context-Dependent Text-to-SQL Semantic Parsing

  • Conference paper
  • First Online:
PRICAI 2023: Trends in Artificial Intelligence (PRICAI 2023)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 14326))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (Germany)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 93.08
Price includes VAT (Germany)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 117.69
Price includes VAT (Germany)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Cai, Y., Wan, X.: IGSQL: database schema interaction graph based neural model for context-dependent text-to-SQL generation. In: Proceedings of EMNLP (2020)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. Chen, Z., et al.: Decoupled dialogue modeling and semantic parsing for multi-turn text-to-SQL. In: Proceedings of ACL Findings (2021)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. Dong, C., et al.: A survey of natural language generation. ACM Comput. Surv. (2023)

    Google Scholar 

  6. Elgohary, A., Peskov, D., Boyd-Graber, J.: Can you unpack that? Learning to rewrite questions-in-context. In: Proceedings of EMNLP (2019)

    Google Scholar 

  7. Hui, B., et al.: Dynamic hybrid relation exploration network for cross-domain context-dependent semantic parsing. In: Proceedings of AAAI (2021)

    Google Scholar 

  8. Kim, G., Kim, H., Park, J., Kang, J.: Learn to resolve conversational dependency: a consistency training framework for conversational question answering. In: ACL (2021)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. Li, Y., et al.: On the (in)effectiveness of large language models for Chinese text correction. CoRR (2023)

    Google Scholar 

  12. 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. ar**v:2112.08735 (2021)

  13. 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. ar**v preprint ar**v:2004.01909 (2020)

  14. Lin, X.V., Socher, R., **ong, C.: Bridging textual and tabular data for cross-domain text-to-SQL semantic parsing. In: Proceedings of EMNLP Findings (2020)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. Liu, Q., Chen, B., Lou, J.G., Zhou, B., Zhang, D.: Incomplete utterance rewriting as semantic segmentation. In: Proceedings of EMNLP (2020)

    Google Scholar 

  17. 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)

    MathSciNet  Google Scholar 

  18. Scholak, T., Li, R., Bahdanau, D., de Vries, H., Pal, C.: Duorat: towards simpler text-to-SQL models. In: Proceedings of AACL (2021)

    Google Scholar 

  19. Scholak, T., Schucher, N., Bahdanau, D.: PICARD: parsing incrementally for constrained auto-regressive decoding from language models. In: Proceedings of EMNLP (2021)

    Google Scholar 

  20. Shaw, P., Uszkoreit, J., Vaswani, A.: Self-attention with relative position representations. In: Proceedings of AACL (2018)

    Google Scholar 

  21. Vaswani, A., et al.: Attention is all you need. In: Proceedings of NeurIPS (2017)

    Google Scholar 

  22. 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)

    Google Scholar 

  23. 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)

    Google Scholar 

  24. 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)

    Google Scholar 

  25. 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)

    Google Scholar 

  26. Yang, J., et al.: Learning to select relevant knowledge for neural machine translation. In: Proceedings of NLPCC (2021)

    Google Scholar 

  27. Yang, J., et al.: Multilingual agreement for multilingual neural machine translation. In: Proceedings of ACL (2021)

    Google Scholar 

  28. Yin, P., Neubig, G.: TRANX: a transition-based neural abstract syntax parser for semantic parsing and code generation. In: Proceedings of EMNLP (2018)

    Google Scholar 

  29. Yu, T., et al.: GraPPa: grammar-augmented pre-training for table semantic parsing. In: Proceedings of ICLR (2021)

    Google Scholar 

  30. Yu, T., et al.: CoSQL: a conversational text-to-SQL challenge towards cross-domain natural language interfaces to databases. In: Proceedings of EMNLP (2019)

    Google Scholar 

  31. 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)

    Google Scholar 

  32. 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)

    Google Scholar 

  33. Yu, T., et al.: SParC: cross-domain semantic parsing in context. In: Proceedings of ACL (2019)

    Google Scholar 

  34. Zhang, R., et al.: Editing-based SQL query generation for cross-domain context-dependent questions. In: Proceedings of EMNLP (2019)

    Google Scholar 

  35. 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)

    Google Scholar 

  36. Zhong, V., Lewis, M., Wang, S.I., Zettlemoyer, L.: Grounded adaptation for zero-shot executable semantic parsing. In: Proceedings of EMNLP (2020)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Jian Yang .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics

Navigation