Towards robustness of text-to-SQL models against synonym substitution

58Citations
Citations of this article
127Readers
Mendeley users who have this article in their library.

Abstract

Recently, there has been significant progress in studying neural networks to translate text descriptions into SQL queries. Despite achieving good performance on some public benchmarks, existing text-to-SQL models typically rely on the lexical matching between words in natural language (NL) questions and tokens in table schemas, which may render the models vulnerable to attacks that break the schema linking mechanism. In this work, we investigate the robustness of text-to-SQL models to synonym substitution. In particular, we introduce Spider-Syn, a human-curated dataset based on the Spider benchmark for text-to-SQL translation. NL questions in Spider-Syn are modified from Spider, by replacing their schema-related words with manually selected synonyms that reflect real-world question paraphrases. We observe that the accuracy dramatically drops by eliminating such explicit correspondence between NL questions and table schemas, even if the synonyms are not adversarially selected to conduct worst-case adversarial attacks. Finally, we present two categories of approaches to improve the model robustness. The first category of approaches utilizes additional synonym annotations for table schemas by modifying the model input, while the second category is based on adversarial training. We demonstrate that both categories of approaches significantly outperform their counterparts without the defense, and the first category of approaches are more effective.

References Powered by Scopus

GloVe: Global vectors for word representation

27020Citations
11185Readers

Hotflip: White-box adversarial examples for text classification

576Citations
537Readers

Towards a theory of natural language interfaces to databases

408Citations
74Readers
Get full text

Cited by Powered by Scopus

This article is free to access.

RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL

66Citations
63Readers

StructGPT: A General Framework for Large Language Model to Reason over Structured Data

64Citations
142Readers

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Cite

CITATION STYLE

APA

Gan, Y., Chen, X., Huang, Q., Purver, M., Woodward, J. R., Xie, J., & Huang, P. (2021). Towards robustness of text-to-SQL models against synonym substitution. In ACL-IJCNLP 2021 - 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, Proceedings of the Conference (pp. 2505–2515). Association for Computational Linguistics (ACL). https://doi.org/10.18653/v1/2021.acl-long.195

Readers over time

‘21‘22‘23‘24‘25015304560

Readers' Seniority

Tooltip

PhD / Post grad / Masters / Doc 38

75%

Researcher 8

16%

Lecturer / Post doc 3

6%

Professor / Associate Prof. 2

4%

Readers' Discipline

Tooltip

Computer Science 48

83%

Linguistics 5

9%

Business, Management and Accounting 3

5%

Engineering 2

3%

Save time finding and organizing research with Mendeley

Sign up for free
0