Skip to main content
QUICK REVIEW

[Paper Review] Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsing

Xi Lin, Richard Socher|arXiv (Cornell University)|Dec 23, 2020
Topic ModelingComputer Science51 references15 citations
TL;DR

BRIDGE proposes a BERT-based sequential model that encodes natural language questions and relational database schemas as a tagged hybrid sequence, enhancing cross-modal alignment through anchor texts (cell values mentioned in questions). It achieves state-of-the-art performance on Spider (67.5% test, 71.1% dev with ensemble) and WikiSQL (91.9% test, 92.6% dev) by leveraging contextualized attention and schema-consistent decoding.

ABSTRACT

We present BRIDGE, a powerful sequential architecture for modeling dependencies between natural language questions and relational databases in cross-DB semantic parsing. BRIDGE represents the question and DB schema in a tagged sequence where a subset of the fields are augmented with cell values mentioned in the question. The hybrid sequence is encoded by BERT with minimal subsequent layers and the text-DB contextualization is realized via the fine-tuned deep attention in BERT. Combined with a pointer-generator decoder with schema-consistency driven search space pruning, BRIDGE attained state-of-the-art performance on popular cross-DB text-to-SQL benchmarks, Spider (71.1\% dev, 67.5\% test with ensemble model) and WikiSQL (92.6\% dev, 91.9\% test). Our analysis shows that BRIDGE effectively captures the desired cross-modal dependencies and has the potential to generalize to more text-DB related tasks. Our implementation is available at \url{https://github.com/salesforce/TabularSemanticParsing}.

Motivation & Objective

  • Address the challenge of cross-domain text-to-SQL parsing, where models must generalize across diverse, unseen database schemas.
  • Improve alignment between natural language questions and relational database schemas to enhance semantic parsing accuracy.
  • Overcome limitations of prior models that rely on task-specific architectures or fail to leverage database content effectively.
  • Enable robust generalization over natural language variation and structural patterns in complex, out-of-domain databases.
  • Investigate model limitations in compositional generalization and explainability for future improvements in production-ready systems.

Proposed method

  • Represent the question and database schema as a single tagged sequence, with schema components (tables and fields) marked using special tokens.
  • Augment schema fields with anchor texts—cell values from the database that are mentioned in the question—directly appended to their corresponding fields.
  • Encode the hybrid sequence using BERT-large with minimal fine-tuning on subsequent layers (two single-layer bi-directional LSTMs), leveraging pre-trained contextual attention for cross-modal alignment.
  • Use a pointer-generator decoder with schema-consistency-driven search space pruning to generate valid, executable SQL queries.
  • Apply end-to-end training with cross-entropy loss and beam search decoding, ensuring structural validity and SQL correctness.
  • Implement an ensemble model by combining predictions from multiple independently trained BRIDGE instances to improve robustness and performance on Spider.

Experimental results

Research questions

  • RQ1Can a unified, sequential encoding of questions and database schemas using BERT improve cross-domain text-to-SQL generalization compared to task-specific architectures?
  • RQ2To what extent does injecting database cell values (anchor texts) into the schema representation enhance alignment between natural language and schema components?
  • RQ3How does BRIDGE perform on out-of-domain databases, particularly in handling natural language variation and structural complexity?
  • RQ4What are the primary failure modes of sequence-to-sequence models in text-to-SQL, and how do they relate to compositional generalization and explainability?
  • RQ5Can ensemble learning significantly improve performance on challenging benchmarks like Spider, especially in the presence of sparse training data?

Key findings

  • BRIDGE achieves state-of-the-art performance on the Spider benchmark, attaining 71.1% exact match on the dev set and 67.5% on the test set when using an ensemble model.
  • On the WikiSQL benchmark, BRIDGE reaches 92.6% dev and 91.9% test exact match, demonstrating strong performance on simpler, in-domain tasks.
  • The model effectively captures cross-modal dependencies between questions and database schemas, particularly through BERT’s attention mechanism and anchor text injection.
  • Error analysis reveals that BRIDGE struggles with compositional generalization, such as correctly interpreting complex logical structures involving multiple conditions or aggregations.
  • The model occasionally makes unexplainable errors, such as ignoring key question components (e.g., selecting 'Horsepower' instead of 'Model' in a car query), indicating spurious correlations in training data.
  • Despite limitations, BRIDGE outperforms most recently proposed models with task-specific architectures, highlighting the effectiveness of a unified, BERT-based sequential framework with minimal head design.

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.