Skip to main content

AOED: Generating SQL with the Aggregation Operator Enhanced Decoding

  • Conference paper
  • First Online:
Web Information Systems and Applications (WISA 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13579))

Included in the following conference series:

  • 951 Accesses

Abstract

NL2SQL is a translation task that converts natural language queries to SQL. We revisit the popular NL2SQL models and find that the accuracy of aggregation operator prediction remains a bottleneck of current NL2SQL models. We present a novel statistics-based approach called AOED, which stands for Aggregation Operator Enhanced Decoding, to help predict aggregation operator. AOED is a carefully designed mechanism that takes full advantage of the statistical information of the aggregation keywords in the natural language query to help improve the prediction accuracy of the aggregation operator. Experiments on the WikiSQL dataset show that our model outperforms the state-of-the-art model SQLova and NL2SQL-RULE by 3.4% and 0.7% on overall SQL results in the logical form accuracy and by 0.2% and 0.7% on aggregation operator result.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Bernstein, A., Kaufmann, E., Kaiser, C., Kiefer, C.: Ginseng: A Guided Input Natural Language Search Engine for Querying Ontologies. In: Jena User Conference (2006). (issue: May)

    Google Scholar 

  2. Blunschi, L., Jossen, C., Kossmann, D., Mori, M., Stockinger, K.: SODA: generating SQL for business users. Proc. VLDB Endowment 5(10) (2012). https://doi.org/10.14778/2336664.2336667

  3. Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: BERT: pre-training of deep bidirectional transformers for language understanding. In: NAACL HLT 2019–2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies - Proceedings of the Conference. vol. 1 (2019). https://doi.org/10.18653/v1/N19-1423

  4. Guo, T., Gao, H.: Content enhanced bert-based text-to-sql generation. arXiv preprint arXiv:1910.07179 (2019)

  5. Hwang, W., Yim, J., Park, S., Seo, M.: A comprehensive exploration on wikisql with table-aware word contextualization. arXiv preprint arXiv:1902.01069 (2019)

  6. Jin, Y., Chen, R., Xu, L.: Text keyword extraction based on multi-dimensional features. In: Wang, G., Lin, X., Hendler, J., Song, W., Xu, Z., Liu, G. (eds.) WISA 2020. LNCS, vol. 12432, pp. 248–259. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-60029-7_23

  7. Lyu, Q., Chakrabarti, K., Hathi, S., Kundu, S., Zhang, J., Chen, Z.: Hybrid Ranking Network for Text-to-SQL. Tech. Rep. MSR-TR-2020-7, Microsoft Dynamics 365 AI (2020). https://www.microsoft.com/en-us/research/publication/hybrid-ranking-network-for-text-to-sql/

  8. Ma, J., Yan, Z., Pang, S., Zhang, Y., Shen, J.: Mention extraction and linking for SQL query generation. In: EMNLP 2020–2020 Conference on Empirical Methods in Natural Language Processing, Proceedings of the Conference (2020). https://doi.org/10.18653/v1/2020.emnlp-main.563

  9. Min, Q., Shi, Y., Zhang, Y.: A pilot study for Chinese SQL semantic parsing. In: EMNLP-IJCNLP 2019–2019 Conference on Empirical Methods in Natural Language Processing and 9th International Joint Conference on Natural Language Processing, Proceedings of the Conference (2019). https://doi.org/10.18653/v1/d19-1377

  10. Sun, N., Yang, X., Liu, Y.: Tableqa: a large-scale chinese text-to-sql dataset for table-aware sql generation. arXiv preprint arXiv:2006.06434 (2020)

  11. Vaswani, A., et al.: Attention is all you need. In: Advances in Neural Information Processing Systems, vol. 2017-December (2017). (iSSN: 10495258)

    Google Scholar 

  12. Wang, C., et al.: Robust text-to-sql generation with execution-guided decoding. arXiv preprint arXiv:1807.03100 (2018)

  13. Xu, X., Liu, C., Song, D.: Sqlnet: generating structured queries from natural language without reinforcement learning. arXiv preprint arXiv:1711.04436 (2017)

  14. Xuan, K., Wang, Y., Wang, Y., Wen, Z., Dong, Y.: SeaD: end-to-end Text-to-SQL Generation with Schema-aware Denoising. arXiv preprint arXiv:2105.07911 (2021)

  15. Zhong, V., Xiong, C., Socher, R.: Seq2sql: generating structured queries from natural language using reinforcement learning. arXiv preprint arXiv:1709.00103 (2017)

Download references

Acknowledgement

This research is supported by Chinese Scientific and Technical Innovation Project 2030 (No. 2018AAA0102100), National Natural Science Foundation of China (No. 62077031). We thank the reviewers for their constructive comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yanlong Wen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Li, Y., Pan, X., Zhao, D., Wang, M., Wen, Y. (2022). AOED: Generating SQL with the Aggregation Operator Enhanced Decoding. In: Zhao, X., Yang, S., Wang, X., Li, J. (eds) Web Information Systems and Applications. WISA 2022. Lecture Notes in Computer Science, vol 13579. Springer, Cham. https://doi.org/10.1007/978-3-031-20309-1_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-20309-1_18

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-20308-4

  • Online ISBN: 978-3-031-20309-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics