Skip to main content
Erschienen in: International Journal of Machine Learning and Cybernetics 12/2023

05.07.2023 | Original Article

UniSAr: a unified structure-aware autoregressive language model for text-to-SQL semantic parsing

verfasst von: Longxu Dou, Yan Gao, Mingyang Pan, Dingzirui Wang, Wanxiang Che, Jian-Guang Lou, Dechen Zhan

Erschienen in: International Journal of Machine Learning and Cybernetics | Ausgabe 12/2023

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Existing text-to-SQL semantic parsers are typically designed for particular settings such as handling queries that span multiple tables, domains, or turns which makes them ineffective when applied to different settings. We present UniSAr (Unified Structure-Aware Autoregressive Language Model), which benefits from directly using an off-the-shelf language model architecture and demonstrates consistently high performance under different settings. Specifically, UniSAr extends existing autoregressive language models to incorporate two non-invasive extensions to make them structure-aware: (1) adding structure mark to encode database schema, conversation context, and their relationships; (2) constrained decoding to decode well-structured SQL for a given database schema. On seven well-known text-to-SQL datasets covering multi-domain, multi-table, and multi-turn, UniSAr demonstrates highly comparable or better performance to the most advanced specifically-designed text-to-SQL models.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Weitere Produktempfehlungen anzeigen
Literatur
1.
Zurück zum Zitat Zhong V, Xiong C, Socher R (2017) Seq2sql: generating structured queries from natural language using reinforcement learning. arXiv:1709.00103 Zhong V, Xiong C, Socher R (2017) Seq2sql: generating structured queries from natural language using reinforcement learning. arXiv:​1709.​00103
2.
Zurück zum Zitat Yu T, Zhang R, Yang K, Yasunaga M, Wang D, Li Z, Ma J, Li I, Yao Q, Roman S, Zhang Z, Radev D (2018) Spider: a large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task. EMNLP2018. https://aclanthology.org/D18-1425 Yu T, Zhang R, Yang K, Yasunaga M, Wang D, Li Z, Ma J, Li I, Yao Q, Roman S, Zhang Z, Radev D (2018) Spider: a large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task. EMNLP2018. https://​aclanthology.​org/​D18-1425
3.
Zurück zum Zitat Guo J, Zhan Z, Gao Y, Xiao Y, Lou J-G, Liu T, Zhang D (2019) Towards complex text-to-SQL in cross-domain database with intermediate representation. Association for Computational Linguistics, Florence, Italy. https://aclanthology.org/P19-1444. Accessed 2 Aug 2019 Guo J, Zhan Z, Gao Y, Xiao Y, Lou J-G, Liu T, Zhang D (2019) Towards complex text-to-SQL in cross-domain database with intermediate representation. Association for Computational Linguistics, Florence, Italy. https://​aclanthology.​org/​P19-1444. Accessed 2 Aug 2019
4.
Zurück zum Zitat Yu T, Zhang R, Yasunaga M, Tan YC, Lin XV, Li S, Er H, Li I, Pang B, Chen T, Ji E, Dixit S, Proctor D, Shim S, Kraft J, Zhang V, Xiong C, Socher R, Radev D (2019) SParC: cross-domain semantic parsing in context. Association for Computational Linguistics, Florence, Italy. https://aclanthology.org/P19-1443. Accessed 2 Aug 2019 Yu T, Zhang R, Yasunaga M, Tan YC, Lin XV, Li S, Er H, Li I, Pang B, Chen T, Ji E, Dixit S, Proctor D, Shim S, Kraft J, Zhang V, Xiong C, Socher R, Radev D (2019) SParC: cross-domain semantic parsing in context. Association for Computational Linguistics, Florence, Italy. https://​aclanthology.​org/​P19-1443. Accessed 2 Aug 2019
5.
7.
Zurück zum Zitat Yu T, Zhang R, Er H, Li S, Xue E, Pang B, Lin XV, Tan YC, Shi T, Li Z, Jiang Y, Yasunaga M, Shim S, Chen T, Fabbri A, Li Z, Chen L, Zhang Y, Dixit S, Zhang V, Xiong C, Socher R, Lasecki W, Radev D (2019) CoSQL: a conversational text-to-SQL challenge towards cross-domain natural language interfaces to databases. Association for Computational Linguistics, Hong Kong, China. https://aclanthology.org/D19-1204. Accessed 7 Nov 2019 Yu T, Zhang R, Er H, Li S, Xue E, Pang B, Lin XV, Tan YC, Shi T, Li Z, Jiang Y, Yasunaga M, Shim S, Chen T, Fabbri A, Li Z, Chen L, Zhang Y, Dixit S, Zhang V, Xiong C, Socher R, Lasecki W, Radev D (2019) CoSQL: a conversational text-to-SQL challenge towards cross-domain natural language interfaces to databases. Association for Computational Linguistics, Hong Kong, China. https://​aclanthology.​org/​D19-1204. Accessed 7 Nov 2019
9.
Zurück zum Zitat Yin P, Neubig G (2018) TRANX: a transition-based neural abstract syntax parser for semantic parsing and code generation. Association for Computational Linguistics, Brussels, Belgium. https://aclanthology.org/D18-2002. Accessed 4 Nov 2018 Yin P, Neubig G (2018) TRANX: a transition-based neural abstract syntax parser for semantic parsing and code generation. Association for Computational Linguistics, Brussels, Belgium. https://​aclanthology.​org/​D18-2002. Accessed 4 Nov 2018
11.
13.
Zurück zum Zitat Zhang R, Yu T, Er H, Shim S, Xue E, Lin XV, Shi T, Xiong C, Socher R, Radev D (2019) Editing-based SQL query generation for cross-domain context-dependent questions. Association for Computational Linguistics, Hong Kong, China. https://aclanthology.org/D19-1537. Accessed 7 Nov 2019 Zhang R, Yu T, Er H, Shim S, Xue E, Lin XV, Shi T, Xiong C, Socher R, Radev D (2019) Editing-based SQL query generation for cross-domain context-dependent questions. Association for Computational Linguistics, Hong Kong, China. https://​aclanthology.​org/​D19-1537. Accessed 7 Nov 2019
14.
Zurück zum Zitat Hwang W, Yim J, Park S, Seo M (2019) A comprehensive exploration on wikisql with table-aware word contextualization. arXiv:1902.01069 Hwang W, Yim J, Park S, Seo M (2019) A comprehensive exploration on wikisql with table-aware word contextualization. arXiv:​1902.​01069
15.
Zurück zum Zitat Xu X, Liu C, Song D (2017) Sqlnet: Generating structured queries from natural language without reinforcement learning. arXiv preprint. arXiv:1711.04436 Xu X, Liu C, Song D (2017) Sqlnet: Generating structured queries from natural language without reinforcement learning. arXiv preprint. arXiv:​1711.​04436
17.
Zurück zum Zitat Shin R, Lin CH, Thomson S, Chen C, Roy S, Platanios EA, Pauls A, Klein D, Eisner J, Durme BV (2021) Constrained language models yield few-shot semantic parsers. CoRR. arXiv:2104.08768 Shin R, Lin CH, Thomson S, Chen C, Roy S, Platanios EA, Pauls A, Klein D, Eisner J, Durme BV (2021) Constrained language models yield few-shot semantic parsers. CoRR. arXiv:​2104.​08768
19.
Zurück zum Zitat Xie T, Wu CH, Shi P, Zhong R, Scholak T, Yasunaga M, Wu C-S, Zhong M, Yin P, Wang SI, Zhong V, Wang B, Li C, Boyle C, Ni A, Yao Z, Radev D, Xiong C, Kong L, Zhang R, Smith NA, Zettlemoyer L, Yu T (2022) UnifiedSKG: unifying and multi-tasking structured knowledge grounding with text-to-text language models. arXiv preprint. arXiv:2201.05966 Xie T, Wu CH, Shi P, Zhong R, Scholak T, Yasunaga M, Wu C-S, Zhong M, Yin P, Wang SI, Zhong V, Wang B, Li C, Boyle C, Ni A, Yao Z, Radev D, Xiong C, Kong L, Zhang R, Smith NA, Zettlemoyer L, Yu T (2022) UnifiedSKG: unifying and multi-tasking structured knowledge grounding with text-to-text language models. arXiv preprint. arXiv:​2201.​05966
20.
Zurück zum Zitat Xuan K, Wang Y, Wang Y, Wen Z, Dong Y (2021) Sead: End-to-end text-to-sql generation with schema-aware denoising. CoRR. arXiv:2105.07911 Xuan K, Wang Y, Wang Y, Wen Z, Dong Y (2021) Sead: End-to-end text-to-sql generation with schema-aware denoising. CoRR. arXiv:​2105.​07911
21.
Zurück zum Zitat Lewis M, Liu Y, Goyal N, Ghazvininejad M, Mohamed A, Levy O, Stoyanov V, Zettlemoyer L (2020) BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. Association for Computational Linguistics, Online. https://aclanthology.org/2020.acl-main.703. Accessed 10 Jul 2020 Lewis M, Liu Y, Goyal N, Ghazvininejad M, Mohamed A, Levy O, Stoyanov V, Zettlemoyer L (2020) BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. Association for Computational Linguistics, Online. https://​aclanthology.​org/​2020.​acl-main.​703. Accessed 10 Jul 2020
22.
Zurück zum Zitat Liu Y, Wan Y, He L, Peng H, Yu PS (2020) KG-BART: knowledge graph-augmented BART for generative commonsense reasoning. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol 35, no 7, pp 6418–6425 Liu Y, Wan Y, He L, Peng H, Yu PS (2020) KG-BART: knowledge graph-augmented BART for generative commonsense reasoning. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol 35, no 7, pp 6418–6425
23.
Zurück zum Zitat Raffel C, Shazeer N, Roberts A, Lee K, Narang S, Matena M, Zhou Y, Li W, Liu PJ (2020) Exploring the limits of transfer learning with a unified text-to-text transformer. J Mach Learn Res 21(140):1–67MathSciNet Raffel C, Shazeer N, Roberts A, Lee K, Narang S, Matena M, Zhou Y, Li W, Liu PJ (2020) Exploring the limits of transfer learning with a unified text-to-text transformer. J Mach Learn Res 21(140):1–67MathSciNet
24.
Zurück zum Zitat Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser L, Polosukhin I (2017) Attention is all you need. In: Part of Advances in Neural Information Processing Systems 30 (NIPS 2017) Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser L, Polosukhin I (2017) Attention is all you need. In: Part of Advances in Neural Information Processing Systems 30 (NIPS 2017)
26.
Zurück zum Zitat Aghajanyan A, Okhonko D, Lewis M, Joshi M, Xu H, Ghosh G, Zettlemoyer L (2022) Htlm: hyper-text pre-training and prompting of language models. ICLR Aghajanyan A, Okhonko D, Lewis M, Joshi M, Xu H, Ghosh G, Zettlemoyer L (2022) Htlm: hyper-text pre-training and prompting of language models. ICLR
27.
Zurück zum Zitat Chen X, Zhang N, Xie X, Deng S, Yao Y, Tan C, Huang F, Si L, Chen H (2021) Knowprompt: knowledge-aware prompt-tuning with synergistic optimization for relation extraction. arXiv:2104.07650 Chen X, Zhang N, Xie X, Deng S, Yao Y, Tan C, Huang F, Si L, Chen H (2021) Knowprompt: knowledge-aware prompt-tuning with synergistic optimization for relation extraction. arXiv:​2104.​07650
28.
Zurück zum Zitat Liu Q, Yang D, Zhang J, Guo J, Zhou B, Lou J-G (2021) Awakening latent grounding from pretrained language models for semantic parsing. In: Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021. Association for Computational Linguistics, pp 1174–1189, Online. https://aclanthology.org/2021.findings-acl.100 Liu Q, Yang D, Zhang J, Guo J, Zhou B, Lou J-G (2021) Awakening latent grounding from pretrained language models for semantic parsing. In: Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021. Association for Computational Linguistics, pp 1174–1189, Online. https://​aclanthology.​org/​2021.​findings-acl.​100
29.
Zurück zum Zitat Sun Y, Tang D, Duan N, Ji J, Cao G, Feng X, Qin B, Liu T, Zhou M (2018) Semantic parsing with syntax- and table-aware SQL generation. Association for Computational Linguistics, Melbourne, Australia. https://aclanthology.org/P18-1034. Accessed 20 Jul 2018 Sun Y, Tang D, Duan N, Ji J, Cao G, Feng X, Qin B, Liu T, Zhou M (2018) Semantic parsing with syntax- and table-aware SQL generation. Association for Computational Linguistics, Melbourne, Australia. https://​aclanthology.​org/​P18-1034. Accessed 20 Jul 2018
30.
Zurück zum Zitat Zheng Y, Wang H, Dong B, Wang X, Li C (2022) HIE-SQL: history information enhanced network for context-dependent text-to-SQL semantic parsing. ACL2022. arXiv:2203.07376 Zheng Y, Wang H, Dong B, Wang X, Li C (2022) HIE-SQL: history information enhanced network for context-dependent text-to-SQL semantic parsing. ACL2022. arXiv:​2203.​07376
32.
Zurück zum Zitat Cormen TH, Leiserson CE, Rivest RL, Stein C (2001) Introduction to algorithms. The MIT Press, Cambridge Cormen TH, Leiserson CE, Rivest RL, Stein C (2001) Introduction to algorithms. The MIT Press, Cambridge
35.
37.
Zurück zum Zitat Choi D, Shin M, Kim E, Shin DR (2020) RYANSQL: recursively applying sketch-based slot fillings for complex text-to-SQL in cross-domain databases. CoRR. arXiv:2004.03125 Choi D, Shin M, Kim E, Shin DR (2020) RYANSQL: recursively applying sketch-based slot fillings for complex text-to-SQL in cross-domain databases. CoRR. arXiv:​2004.​03125
38.
Zurück zum Zitat Ott M, Edunov S, Baevski A, Fan A, Gross S, Ng N, Grangier D, Auli M (2019) fairseq: A fast, extensible toolkit for sequence modeling. Association for Computational Linguistics, Minneapolis, Minnesota. https://aclanthology.org/N19-4009. Accessed 7 Jun 2019 Ott M, Edunov S, Baevski A, Fan A, Gross S, Ng N, Grangier D, Auli M (2019) fairseq: A fast, extensible toolkit for sequence modeling. Association for Computational Linguistics, Minneapolis, Minnesota. https://​aclanthology.​org/​N19-4009. Accessed 7 Jun 2019
39.
Zurück zum Zitat Srivastava N, Hinton GE, Krizhevsky A, Sutskever I, Salakhutdinov R (2014) Dropout: a simple way to prevent neural networks from overfitting. J Mach Learn Res 15:1929–1958MathSciNetMATH Srivastava N, Hinton GE, Krizhevsky A, Sutskever I, Salakhutdinov R (2014) Dropout: a simple way to prevent neural networks from overfitting. J Mach Learn Res 15:1929–1958MathSciNetMATH
42.
Zurück zum Zitat Wolf T, Debut L, Sanh V, Chaumond J, Delangue C, Moi A, Cistac P, Rault T, Louf R, Funtowicz M, Davison J, Shleifer S, von Platen P, Ma C, Jernite Y, Plu J, Xu C, Le Scao T, Gugger S, Drame M, Lhoest Q, Rush A (2020) Transformers: state-of-the-art natural language processing. In: Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations. Association for Computational Linguistics, pp 38–45, Online. https://aclanthology.org/2020.emnlp-demos.6 Wolf T, Debut L, Sanh V, Chaumond J, Delangue C, Moi A, Cistac P, Rault T, Louf R, Funtowicz M, Davison J, Shleifer S, von Platen P, Ma C, Jernite Y, Plu J, Xu C, Le Scao T, Gugger S, Drame M, Lhoest Q, Rush A (2020) Transformers: state-of-the-art natural language processing. In: Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations. Association for Computational Linguistics, pp 38–45, Online. https://​aclanthology.​org/​2020.​emnlp-demos.​6
45.
Zurück zum Zitat Cao R, Chen L, Chen Z, Zhao Y, Zhu S, Yu K (2021) LGESQL: line graph enhanced text-to-SQL model with mixed local and non-local relations. ACL 2021 Cao R, Chen L, Chen Z, Zhao Y, Zhu S, Yu K (2021) LGESQL: line graph enhanced text-to-SQL model with mixed local and non-local relations. ACL 2021
Metadaten
Titel
UniSAr: a unified structure-aware autoregressive language model for text-to-SQL semantic parsing
verfasst von
Longxu Dou
Yan Gao
Mingyang Pan
Dingzirui Wang
Wanxiang Che
Jian-Guang Lou
Dechen Zhan
Publikationsdatum
05.07.2023
Verlag
Springer Berlin Heidelberg
Erschienen in
International Journal of Machine Learning and Cybernetics / Ausgabe 12/2023
Print ISSN: 1868-8071
Elektronische ISSN: 1868-808X
DOI
https://doi.org/10.1007/s13042-023-01898-3

Weitere Artikel der Ausgabe 12/2023

International Journal of Machine Learning and Cybernetics 12/2023 Zur Ausgabe

Neuer Inhalt