Towards Robustness of Text-to-SQL Models against Synonym Substitution

06/02/2021
by   Yujian Gan, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/11/2021

Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalization

Recently, there has been significant progress in studying neural network...
research
08/08/2022

Semantic Enhanced Text-to-SQL Parsing via Iteratively Learning Schema Linking Graph

The generalizability to new databases is of vital importance to Text-to-...
research
01/21/2023

Dr.Spider: A Diagnostic Evaluation Benchmark towards Text-to-SQL Robustness

Neural text-to-SQL models have achieved remarkable performance in transl...
research
09/11/2021

Natural SQL: Making SQL Easier to Infer from Natural Language Specifications

Addressing the mismatch between natural language descriptions and the co...
research
12/20/2022

Towards Robustness of Text-to-SQL Models Against Natural and Realistic Adversarial Table Perturbation

The robustness of Text-to-SQL parsers against adversarial perturbations ...
research
12/21/2020

MT-Teql: Evaluating and Augmenting Consistency of Text-to-SQL Models with Metamorphic Testing

Text-to-SQL is a task to generate SQL queries from human utterances. How...
research
02/03/2021

An Investigation Between Schema Linking and Text-to-SQL Performance

Text-to-SQL is a crucial task toward developing methods for understandin...

Please sign up or login with your details

Forgot password? Click here to reset