Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers

About

When translating natural language questions into SQL queries to answer questions from a database, contemporary semantic parsing models struggle to generalize to unseen database schemas. The generalization challenge lies in (a) encoding the database relations in an accessible way for the semantic parser, and (b) modeling alignment between database columns and their mentions in a given query. We present a unified framework, based on the relation-aware self-attention mechanism, to address schema encoding, schema linking, and feature representation within a text-to-SQL encoder. On the challenging Spider dataset this framework boosts the exact match accuracy to 57.2%, surpassing its best counterparts by 8.7% absolute improvement. Further augmented with BERT, it achieves the new state-of-the-art performance of 65.6% on the Spider leaderboard. In addition, we observe qualitative improvements in the model's understanding of schema linking and alignment. Our implementation will be open-sourced at https://github.com/Microsoft/rat-sql.

Bailin Wang, Richard Shin, Xiaodong Liu, Oleksandr Polozov, Matthew Richardson• 2019

Related benchmarks

TaskDatasetResultRank
Text-to-SQLSpider (test)
Execution Accuracy65.6
140
Text-to-SQLSpider (dev)--
100
Text-to-SQLSpider 1.0 (dev)
Exact Match Accuracy73.4
92
Text-to-SQLSpider 1.0 (test)
EM Acc (Overall)69.7
91
Text-to-SQLSpider-Syn (dev)
Exact Match Accuracy48.2
11
Text-to-SQLSpider-DK 1.0 (val)
EM40.9
10
Text-to-SQLSpider-SYN 1.0 (val)
EM Accuracy48.2
10
Text-to-SQLSpider-Realistic 1.0 (test)
Exact Match (EM)58.1
9
Text-to-SQLWikiSQL (dev)
Logic Form Acc73.6
8
Text-to-SQLWikiSQL (test)
Logic Form Accuracy73.3
8
Showing 10 of 15 rows

Other info

Code

Follow for update