Abstract
NL2SQL (Natural Language to SQL) is a cutting-edge problem in the field of semantic parsing and TableQA. “CCKS2022: Financial NL2SQL Evaluation” raises a challenging scenario for building NL2SQL systems in the financial domain. To deal with the problem of small-scale data and the requirement of adapting to financial scenarios, we propose an NL2SQL approach to automatically converts natural language questions into SQL queries to achieve accurate table question answering. We use cross-validation and schema linking method that fuses table-column-value information to make full use of all the training data. Then we train a Transformer-based Seq2Seq semantic parsing model with T5 as pre-training model to understand common questions in the financial field and parse the database’s tables, attributes, foreign keys and other complex relationships, and finally generate SQL queries. Experiments are conducted to test the effectiveness of our strategy. Our best ensemble model achieves EM score of 0.287 on testing set and ranks 2nd in the competition.
X. Ning and Y. Zhao—The first two authors contributed equally to the work.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Hyeonji, K., et al.: Natural language to SQL: where are we today? In: Proceedings of the VLDB Endowment, vol. 13.10, pp. 1737–1750 (2020)
Zhong, V., Xiong, C., Socher, R.: Seq2sql: generating structured queries from natural language using reinforcement learning. In: CoRR, abs/1709.00103 (2017)
Yu, T., et al.: Spider: a large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. In: EMNLP, pp. 3911–3921 (2018)
He, P., Mao, Y., Chakrabarti, K., et al.: X-SQL: reinforce schema representation with context. arXiv:1908.08113 (2019)
Xuan, K., Wang, Y., Wang, Y., et al.: Sead: end-to-end text-to-sql generation with schema-aware denoising. arXiv:2105.07911 (2021)
Guo, J., et al.: Towards complex text-to-sql in cross-domain database with intermediate representation. In: ACL, pp. 4524–4535 (2019)
Wang, B., Shin, R., Liu, X., et al.: RAT-SQL: relation-aware schema encoding and linking for text-to-SQL parsers. In: ACL (2020)
Dou, L., Gao, Y., Pan, M., et al.: UniSAr: A Unified Structure-Aware Autoregressive Language Model for Text-to-SQL. arXiv:2203.07781 (2022)
Hui, B., Shi, X., Geng, R., et al.: Improving text-to-sql with schema dependency learning. arXiv:2103.04399 (2021)
Raffel, C., Shazeer, N., Roberts, A., et al.: Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res. 21(140), 1–67 (2020)
Vaswani, A., et al.: Attention is all you need. In: Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS'17), pp. 6000–6010. Curran Associates Inc., Red Hook, NY, USA (2017)
t5-base-Chinese. https://huggingface.co/lemon234071/t5-base-Chinese. Accessed 2021
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Ning, X., Zhao, Y., liu, J. (2022). Learning Seq2Seq Model with Dynamic Schema Linking for NL2SQL. In: Zhang, N., Wang, M., Wu, T., Hu, W., Deng, S. (eds) CCKS 2022 - Evaluation Track. CCKS 2022. Communications in Computer and Information Science, vol 1711. Springer, Singapore. https://doi.org/10.1007/978-981-19-8300-9_16
Download citation
DOI: https://doi.org/10.1007/978-981-19-8300-9_16
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-19-8299-6
Online ISBN: 978-981-19-8300-9
eBook Packages: Computer ScienceComputer Science (R0)