EMNLP Findings2025
Evaluating NL2SQL via SQL2NL
Mohammadtaher Safarzadeh, Afshin Oroojlooy, Dan Roth
Abstract
Robust evaluation in the presence of linguistic variation is key to understanding the generalization capabilities of Natural Language to SQL (NL2SQL) models, yet existing benchmarks rarely address this factor in a systematic or controlled manner. We propose a novel schemaaligned paraphrasing framework that leverages SQL-to-NL (SQL2NL) to automatically generate semantically equivalent, lexically diverse queries while maintaining alignment with the original schema and intent. This enables the first targeted evaluation of NL2SQL robustness to linguistic variation in isolationdistinct from prior work that primarily investigates ambiguity or schema perturbations. Our analysis reveals that state-of-the-art models are far more brittle than standard benchmarks suggest. For example, LLaMa3.3-70B exhibits a 10.23% drop in execution accuracy (from 77.11% to 66.9%) on paraphrased Spider queries, while LLaMa3.1-8B suffers an even larger drop of nearly 20% (from 62.9% to 42.5%). Smaller models (e.g., GPT-4o mini) are disproportionately affected. We also find that robustness degradation varies significantly with query complexity, dataset, and domainhighlighting the need for evaluation frameworks that explicitly measure linguistic generalization to ensure reliable performance in real-world settings.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
- Know What I don't Know: Handling Ambiguous and Unknown Questions for Text-to-SQL cites RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
- Know What I don't Know: Handling Ambiguous and Unknown Questions for Text-to-SQL cites Re-examining the Role of Schema Linking in Text-to-SQL
- Re-examining the Role of Schema Linking in Text-to-SQL cites RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
- Benchmarking and Improving Text-to-SQL Generation under Ambiguity cites RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
- CodeS: Towards Building Open-source Language Models for Text-to-SQL cites RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
- CodeS: Towards Building Open-source Language Models for Text-to-SQL cites Re-examining the Role of Schema Linking in Text-to-SQL
Builds on10
- CodeS: Towards Building Open-source Language Models for Text-to-SQLHaoyang Li, Jing Zhang, Hanbing Liu, Ju Fan et al.SIGMOD 2024 · 124 citations
- Re-examining the Role of Schema Linking in Text-to-SQLWenqiang Lei, Weixin Wang, Zhixin Ma, Tian Gan et al.EMNLP 2020 · 71 citations
- RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL ParsersBailin Wang, Richard Shin, Xiaodong Liu, Oleksandr Polozov et al.ACL 2020 · 39 citations
- Know What I don't Know: Handling Ambiguous and Unknown Questions for Text-to-SQLBing Wang, Yan Gao, Zhoujun Li, Jian-Guang LouACL Findings 2023 · 21 citations
- Benchmarking and Improving Text-to-SQL Generation under AmbiguityAdithya Bhaskar, Tushar Tomar, Ashutosh Sathe, Sunita SarawagiEMNLP 2023 · 13 citations
Related papers
- SPENCE: A Syntactic Probe for Detecting Contamination in NL2SQL BenchmarksMohammadtaher Safarzadeh, Hitesh Laxmichand Patel, Afshin Oroojlooy, Graham Horwood et al.ACL 2026
- Towards Robustness of Text-to-SQL Models against Synonym SubstitutionYujian Gan, Xinyun Chen, Qiuping Huang, Matthew Purver et al.ACL 2021
- Dr.Spider: A Diagnostic Evaluation Benchmark towards Text-to-SQL RobustnessShuaichen Chang, Jun Wang, Mingwen Dong, Lin Pan et al.ICLR 2023 · 9 citations
- EVOSCHEMA: TOWARDS TEXT-TO-SQL ROBUSTNESS AGAINST SCHEMA EVOLUTIONTianshu Zhang, Kun Qian, Siddhartha Sahai, Yuan Tian et al.VLDB 2025 · 3 citations
- NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL SolutionsShizheng Hou, Wenqi Pei, Nuo Chen, Quang-Trung Ta et al.VLDB 2026 · 1 citation
