# Decoupling the Skeleton Parsing and Schema Linking for Text-to-SQL

**Authors:** Haoyang Li, Jing Zhang, Cuiping Li, Hong Chen  
**arXiv:** [2302.05965](https://arxiv.org/abs/2302.05965)  
**Date:** 2023-02-12  
**Summary page:** https://www.summarizepaper.com/en/paper/2302.05965v1/

## Key points

- The paper presents a novel approach to improve the performance of Text-to-SQL models.
- Existing Text-to-SQL models face challenges in parsing complex SQL queries involving multiple schema items and logic operators.
- The authors propose a ranking-enhanced encoding and skeleton-aware decoding framework to address this issue.
- Their approach modifies the seq2seq encoder-decoder model by injecting only the most relevant schema items into the encoder.
- This modification reduces the effort required for schema linking during SQL parsing.
- The decoder first generates the skeleton of the SQL query before generating the actual SQL query itself, leading to improved accuracy.
- The proposed framework is evaluated on Spider, a benchmark dataset for Text-to-SQL tasks, along with its three robustness variants: Spider-DK, Spider-Syn, and Spider-Realistic.
- Experimental results demonstrate promising performance and robustness in generating accurate SQL queries using their framework.
- The authors provide their code implementation on GitHub for further reference.

## Summary

The paper titled "Decoupling the Skeleton Parsing and Schema Linking for Text-to-SQL" presents a novel approach to improve the performance of Text-to-SQL models. The existing best attempts at Text-to-SQL utilize pre-trained language models, but they face challenges in parsing complex SQL queries that involve multiple schema items and logic operators. This is because the seq2seq model used in these approaches is responsible for parsing both the schema items (tables and columns) and the skeleton (SQL keywords), which increases the difficulty of generating accurate SQL queries. To address this issue, the authors propose a ranking-enhanced encoding and skeleton-aware decoding framework that decouples the schema linking and skeleton parsing processes. In their approach, they modify the seq2seq encoder-decoder model by injecting only the most relevant schema items into the encoder instead of using all unordered ones. This modification reduces the effort required for schema linking during SQL parsing. Furthermore, their decoder first generates the skeleton of the SQL query before generating the actual SQL query itself. This sequential generation process implicitly constrains the SQL parsing, leading to improved accuracy. The proposed framework is evaluated on Spider, a benchmark dataset for Text-to-SQL tasks, along with its three robustness variants: Spider-DK, Spider-Syn, and Spider-Realistic. The experimental results demonstrate that their framework achieves promising performance and robustness in generating accurate SQL queries. The authors also provide their code implementation on GitHub for further reference.
