Skip to main content
QUICK REVIEW

[Paper Review] UNITE: A Unified Benchmark for Text-to-SQL Evaluation

Wuwei Lan, Zhiguo Wang|arXiv (Cornell University)|May 25, 2023
Natural Language Processing TechniquesComputer Science9 citations
TL;DR

UNITE combines 18 public text-to-SQL datasets into a unified benchmark of 97k training and 27k test examples across 29k databases, challenging models with cross-database generalization and robustness; evaluations show limited generalization of SOTA models and strong out-of-domain performance of Codex via in-context learning.

ABSTRACT

A practical text-to-SQL system should generalize well on a wide variety of natural language questions, unseen database schemas, and novel SQL query structures. To comprehensively evaluate text-to-SQL systems, we introduce a UNIfied benchmark for Text-to-SQL Evaluation (UNITE). It is composed of publicly available text-to-SQL datasets, containing natural language questions from more than 12 domains, SQL queries from more than 3.9K patterns, and 29K databases. Compared to the widely used Spider benchmark, we introduce $\sim$120K additional examples and a threefold increase in SQL patterns, such as comparative and boolean questions. We conduct a systematic study of six state-of-the-art (SOTA) text-to-SQL parsers on our new benchmark and show that: 1) Codex performs surprisingly well on out-of-domain datasets; 2) specially designed decoding methods (e.g. constrained beam search) can improve performance for both in-domain and out-of-domain settings; 3) explicitly modeling the relationship between questions and schemas further improves the Seq2Seq models. More importantly, our benchmark presents key challenges towards compositional generalization and robustness issues -- which these SOTA models cannot address well. Our code and data processing script are available at https://github.com/awslabs/unified-text2sql-benchmark

Motivation & Objective

  • Provide a comprehensive benchmark for text-to-SQL that covers diverse domains, schemas, NLQ patterns, and SQL structures.
  • Enable apples-to-apples evaluation across previously fragmented datasets.
  • Analyze SOTA model performance on in-domain and out-of-domain tasks and identify key bottlenecks such as compositional generalization and schema linking.

Proposed method

  • Aggregate 18 public text-to-SQL datasets into a unified JSONL/SQLite-based format.
  • Convert NLQ/SQL pairs to a common schema representation including original and cleaned table/column names and keys.
  • Provide three fields per example: database identifier, question, and SQL query; preserve schema details in JSON.
  • Evaluate six SOTA models (including Codex, UL-20B, T5-3B, RASAT, SmBoP, PICARD) on zero-shot and few-shot settings where applicable.
  • Apply execution accuracy as the primary metric by running predicted and ground-truth SQL against the databases.

Experimental results

Research questions

  • RQ1How do state-of-the-art text-to-SQL models generalize across a large, diverse, cross-database benchmark?
  • RQ2What is the impact of training on Spider versus UNITE on in-domain and out-of-domain evaluation?
  • RQ3Can decoding strategies (e.g., constrained beam search) and relation-aware schema modeling improve cross-domain performance?
  • RQ4How does large-language-model-based inference (e.g., Codex) compare to fine-tuned models on out-of-domain data?
  • RQ5What challenges in compositional generalization and robustness remain for existing SOTA models?

Key findings

  • UNITE is the largest existing benchmark for text-to-SQL to date, with 97k training and 27k test examples across 29k databases.
  • Six SOTA parsers perform below 50% accuracy on UNITE on average, highlighting limited real-world generalization.
  • Codex in-context learning achieves the best out-of-domain performance among evaluated models.
  • Customized decoding (e.g., constrained beam search) improves Seq2Seq models in both in-domain and out-domain settings.
  • Relational-schema-aware modeling (e.g., relation-aware self-attention) provides benefits over baseline Seq2Seq approaches.
  • UNITE reveals robustness and compositional generalization gaps that are not fully addressed by current SOTA methods.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.