RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQL
Jiexing Qi Affiliation: Shanghai Jiao Tong University, Shanghai, China Jingyao Tang Affiliation: Shanghai Jiao Tong University, Shanghai, China Ziwei He Affiliation: Shanghai Jiao Tong University, Shanghai, China Xiangpeng Wan Affiliation: NetMind.AI and ProtagoLabs, Virginia, USA Yu Cheng Affiliation: Microsoft Research, Redmond, Washington, USA Chenghu Zhou Affiliation: IGSNRR, Chinese Academy of Sciences, Beijing, China {qi_jiexing, monstar, ziwei.he, zqs1022, Xinbing Wang Affiliation: Shanghai Jiao Tong University, Shanghai, China Quanshi Zhang Affiliation: Shanghai Jiao Tong University, Shanghai, China Zhouhan Lin Thanks: Zhouhan Lin is the corresponding author. Affiliation: Shanghai Jiao Tong University, Shanghai, China
Abstract
Relational structures such as schema linking and schema encoding have been validated as a key component to qualitatively translating natural language into SQL queries. However, introducing these structural relations comes with prices: they often result in a specialized model structure, which largely prohibits using large pretrained models in text-to-SQL. To address this problem, we propose RASAT: a Transformer seq2seq architecture augmented with relation-aware self-attention that could leverage a variety of relational structures while inheriting the pretrained parameters from the T5 model effectively. Our model can incorporate almost all types of existing relations in the literature, and in addition, we propose introducing co-reference relations for the multi-turn scenario. Experimental results on three widely used text-to-SQL datasets, covering both single-turn and multi-turn scenarios, have shown that RASAT could achieve state-of-the-art results across all three benchmarks (75.5% EX on Spider, 52.6% IEX on SParC, and 37.4% IEX on CoSQL). 11 1 Our implementation is available at https://github.com/LUMIA-group/rasat.
原文 arXiv:2205.06983;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2205.06983v2