arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

AttnLink:将注意力转化为文本到SQL的模式链接

AttnLink: Turning Attention into Schema Links for Text-to-SQL

Jinwang Song, Tao Liu, Haowen Zheng, Xiangheng Li, Yifan Li, Hongying Zan

arXiv 2608.00693首次发表:更新:

AI 中文总结

研究针对文本到SQL的模式链接方法在性能与效率间的权衡问题,提出AttnLink框架,其变体AttnLink-S在多数据集上实现高mAP与低延迟,且提升下游SQL生成准确率。

AI 中文摘要

模式链接是文本到SQL系统的关键组成部分,但现有方法常需在上下文建模能力、基于分数的可控性与推理效率之间进行权衡。我们提出AttnLink,一种基于注意力的框架,将大型语言模型(LLMs)的内部注意力转化为模式项的连续相关性分数。AttnLink提取从生成起始位置到候选模式跨度的注意力,使所有候选在单次预填充(prefill)过程中即可排序,无需自回归解码。我们开发了两个变体:AttnLink-U,直接探测预训练注意力而不进行参数更新;AttnLink-S,通过直接监督使注意力分布与黄金模式项对齐。为提升对多个相关模式项的覆盖,AttnLink-S结合集质量目标与自适应概率阈值正则化器。所得分数支持通过温度缩放和累积质量选择进行事后精确率-召回率控制。在Spider、BIRD和Spider2-SQLite上的实验显示,AttnLink-S的平均精度均值(mAP)分别达99.22%、95.95%和83.29%,模式链接延迟为毫秒级,且在9种生成器-数据集设置中的7种里,其下游SQL生成的执行准确率达到最优或并列最优。

英文摘要

Schema linking is a critical component of Text-to-SQL systems, but existing approaches often trade off contextual modeling capacity, score-based controllability, and inference efficiency. We introduce AttnLink, an attention-based framework that converts LLMs' internal attention into continuous relevance scores for schema items. AttnLink extracts the attention from the generation-start position to candidate schema spans, enabling all candidates to be ranked in a single prefill pass without autoregressive decoding. We develop two variants: AttnLink-U, which directly probes pretrained attention without parameter updates, and AttnLink-S, which aligns the attention distribution with gold schema items through direct supervision. To improve coverage of multiple relevant schema items, AttnLink-S combines a set-mass objective with an adaptive probability-floor regularizer. The resulting scores support post-hoc precision-recall control through temperature scaling and cumulative-mass selection. Experiments on Spider, BIRD, and Spider2-SQLite show that AttnLink-S achieves mAP scores of 99.22%, 95.95%, and 83.29%, respectively, with millisecond-scale schema-linking latency. It also yields the best or tied-best execution accuracy for downstream SQL generation in seven of nine generator-dataset settings.

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑