Schema linking -- the process of aligning natural language questions with database schema elements -- is a critical yet underexplored component of Text-to-SQL systems. While recent methods have focused primarily on improving SQL generation, they often neglect the retrieval of relevant schema elements, which can lead to hallucinations and execution failures. In this work, we propose a context-aware bidirectional schema retrieval framework that treats schema linking as a standalone problem. Our approach combines two complementary strategies: table-first retrieval followed by column selection, and column-first retrieval followed by table selection. It is further augmented with techniques such as question decomposition, keyword extraction, and keyphrase extraction. Through comprehensive evaluations on challenging benchmarks such as BIRD and Spider, we demonstrate that our method significantly improves schema recall while reducing false positives. Moreover, SQL generation using our retrieved schema consistently outperforms full-schema baselines and closely approaches oracle performance, all without requiring query refinement. Notably, our method narrows the performance gap between full and perfect schema settings by 50\%. Our findings highlight schema linking as a powerful lever for enhancing Text-to-SQL accuracy and efficiency.


翻译:模式链接——即将自然语言问题与数据库模式元素对齐的过程——是Text-to-SQL系统中一个关键但尚未被充分探索的组成部分。尽管近期方法主要集中于改进SQL生成,但它们常常忽视了相关模式元素的检索,这可能导致幻觉生成和执行失败。在本工作中,我们提出了一种上下文感知的双向模式检索框架,将模式链接视为一个独立问题。我们的方法结合了两种互补的策略:先进行表检索再进行列选择,以及先进行列检索再进行表选择。该方法还进一步通过问题分解、关键词提取和关键短语提取等技术进行了增强。通过在BIRD和Spider等具有挑战性的基准测试上进行全面评估,我们证明了我们的方法显著提高了模式召回率,同时降低了误报率。此外,使用我们检索到的模式进行SQL生成,其性能始终优于全模式基线,并接近Oracle性能,且均无需进行查询优化。值得注意的是,我们的方法将完整模式与理想模式设置之间的性能差距缩小了50%。我们的研究结果突显了模式链接作为提升Text-to-SQL准确性和效率的强大杠杆作用。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
【博士论文】基于多模态基础模型的上下文学习
专知会员服务
22+阅读 · 2025年12月17日
【Google】多模态Transformer视频检索,Multi-modal Transformer
专知会员服务
103+阅读 · 2020年7月22日
干货|当深度学习遇见自动文本摘要,seq2seq+attention
机器学习算法与Python学习
10+阅读 · 2018年5月28日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
13+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
13+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员