REVIEW 3 major objections 4 minor 40 references
A single prefill attention pass can rank every schema candidate, and direct supervision of that attention reaches 99.22/95.95/83.29 mAP on the three main text-to-SQL benchmarks while keeping latency in milliseconds.
Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →
Attention from an LLM's generation-start position, pooled over schema candidates, yields millisecond-scale, controllable schema-linking scores that beat prior linkers on three benchmarks.
T0 review reviewed 2026-08-05 challenge →
load-bearing objection AttnLink is a genuinely novel and well-tested attention-based schema linker; the main open question is whether the gold labels it trains and evaluates on are clean enough to fully trust the headline numbers. the 3 major comments →
AttnLink: Turning Attention into Schema Links for Text-to-SQL
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
Core claim
The central claim is that the attention distribution from the generation anchor—the final prompt token at which the model would begin copying an identifier from a candidate list—is a usable continuous relevance score for schema items. AttnLink-U extracts that attention from a selected layer and head, mean-pools it over each candidate's token span, and normalizes it with temperature scaling. AttnLink-S keeps the same pipeline but directly supervises the resulting candidate distribution with a set-mass objective that shifts probability onto the gold schema set, plus an adaptive probability floor per positive item that prevents a few easy positives from soaking up all the mass. Inference is a s
What carries the argument
Generation-anchor attention: at the last token of the input prompt, the effective query vector of the final layer attends over all visible prompt tokens; the paper treats this as a retrieval operation from candidate schema spans. Token-level attention weights over each candidate identifier are mean-pooled into a candidate score, mapped through a temperature-scaled softmax over candidates, and selected by top-p cumulative mass. For the supervised variant, the training objective is a set-mass loss over the gold positives plus a floor regularizer that penalizes any positive falling below rho over the number of positives, ensuring coverage without forcing uniformity.
Load-bearing premise
The gold schema for every example is defined by automatically parsing the reference SQL query and collecting the physical tables and columns it mentions, so if that parse misses a schema item a correct query could use, or includes items only because of the reference query's style, the supervision signal and all reported metrics inherit that bias.
What would settle it
Construct an independent gold set for a random sample of BIRD and Spider examples by having human annotators mark, without seeing the reference SQL, every table and column needed to answer the question, then compare against the parsed gold. If agreement is low, or if AttnLink-S's mAP drops sharply when retrained or re-evaluated on the human gold set, the reported accuracy partly reflects the parser, not schema relevance. A lighter check is to verify that the gold sets cover all columns appearing in any execution-equivalent query, since different valid SQL formulations can reference different c
If this is right
- Schema linking can run in a single prefill pass with millisecond-scale latency, making it compatible with existing serving infrastructure and applicable to very large schemas.
- The resulting continuous scores allow post-hoc precision-recall control by temperature and top-p selection, letting users calibrate schema budget per generator without retraining the linker.
- Direct attention supervision improves multi-positive coverage over the training-free probe, transferring from BIRD training to the no-training-split Spider2-SQLite benchmark.
- Table-level linking is nearly saturated by the same mechanism, with supervised variants reaching at least 99.91% mAP on Spider, indicating attention already carries strong table-grounding signal.
- Best execution accuracy is generator-dependent: stronger generators benefit from higher schema recall, while weaker generators prefer sharper filtering, so the operating point should be chosen per generator.
Where Pith is reading between the lines
- The same generation-anchor attention probe could generalize to other list-copying and structured-span retrieval tasks, such as tool selection, entity linking, or fact extraction, where an LLM is asked to copy one identifier from a candidate list.
- Because the probe only needs query and key tensors at one position, it may extend to long-context pruning or retrieval within the same prefill, treating arbitrary spans as candidates rather than just schema items.
- The observed pattern that optimal temperature varies with generator strength suggests a practical closed-loop controller: pick the temperature on a small validation set of the target generator, making the schema budget adaptive rather than fixed.
- The copy-oriented instruction is load-bearing for inducing the useful attention distribution; replacing it with semantic reasoning destroys the signal, so this prompting design is likely essential beyond schema linking and worth testing in other copying tasks.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes AttnLink, a schema-linking framework that converts the attention of a decoder-only LLM at the generation-start position ('generation anchor') into continuous relevance scores for candidate schema items. AttnLink-U probes pretrained attention with no parameter updates; AttnLink-S additionally applies LoRA supervision using a set-mass objective and an adaptive probability floor. Both variants rank all candidates in a single prefill pass, with temperature and top-p selection controlling precision/recall. Experiments on Spider, BIRD, and Spider2-SQLite report state-of-the-art mAP for ranked linkers (99.22/95.95/83.29 for AttnLink-S with Qwen3.5-9B), millisecond-scale latency, and best or tied-best downstream execution accuracy in seven of nine generator-dataset settings. The appendix includes ablations on the floor ratio, pooling strategy, layer-head selection, candidate-order stability, and the necessity of the copy-oriented instruction.
Significance. The central observation—that generation-anchor attention can act as a schema-linking signal—is interesting and reasonably well supported. The method is simple, efficient, and compatible with standard LLM serving infrastructure, and the ablations are unusually thorough: the copy-instruction versus semantic-rationale comparison, the candidate-order perturbation analysis, and the pooling and floor-ratio studies all speak to the mechanism rather than only to benchmark numbers. If the gold-label construction is audited and the headline comparisons are shown to be statistically stable, the result would be a useful contribution to text-to-SQL schema linking. The paper is not circular in the sense of fitting constants from test labels; AttnLink-S uses gold labels as ordinary supervision, and the copy-instruction ablation indicates the signal is not a trivial artifact.
major comments (3)
- [Appendix, 'Datasets and Gold-Schema Construction'; Eqs. (6)-(10), (15)-(19)] The gold set G is defined by parsing the reference SQL with SQLGlot and resolving aliases. The appendix discloses that 477 BIRD training reference SQLs fail to execute and removes them from training only; no equivalent audit is reported for the dev splits on which all headline numbers are computed. Because the same gold sets supervise AttnLink-S (Eqs. 6-10) and define every mAP/SRR/recall number in Table 1, any malformed or non-parseable dev reference SQL biases both training and evaluation in unknown directions. Please report the number of dev reference SQLs that fail to execute/parse, manually inspect a sample, and show that Table 1 is stable when problematic examples are excluded.
- [Table 4; Table 1] The 'best or tied-best in seven of nine' claim and several mAP differences are reported without error bars or significance tests. On Spider2-SQLite (135 examples), Qwen3-4B AttnLink-S achieves EX 9.6% versus RSL-SQL 10.3%; on Spider Dev, Qwen3.5-9B AttnLink-S ties ExSL at 84.1%. Since SQL generation uses stochastic decoding, these differences may be within run-to-run noise. Please report standard deviations over repeated runs or a significance test for the main comparisons, or qualify the claim accordingly.
- [Table 2; Implementation Details] The floor ratio is set to rho=0.25 in the main experiments, and Table 2 reports the rho ablation on BIRD Dev and Spider2-SQLite. If rho was selected by inspecting these dev results, then the BIRD Dev and Spider2-SQLite numbers in Table 1 are selected optima rather than held-out evaluations, and the cross-dataset transfer claim for Spider2-SQLite is weakened. Please clarify whether rho was chosen before seeing dev labels; if not, re-run with a prespecified value or a calibration split separate from the reported dev sets.
minor comments (4)
- [Throughout] There are numerous formatting and spacing errors in the extracted text (e.g., 'fine-tuneLLMstooutput' in the Introduction) and in Table 1 (e.g., '89.3091.15N/A'). These make the paper harder to read and should be fixed.
- [Eq. (10)] The floor regularizer writes log(f/(pi+eps)) with a max; please clarify the epsilon handling for pi = 0 and state whether the gradient is clipped or stabilized.
- [Implementation Details] The fixed inference setting tau=2.0, p=0.99 is justified empirically, but the paper should state explicitly whether these values were chosen on a development split or prespecified.
- [Appendix, 'Temperature Sensitivity...'] The appendix reports post-hoc best-temperature EX values that exceed the main fixed-temperature results. This is a useful sensitivity analysis, but the wording 'establish a new maximum' should be accompanied by a clear caveat that these are selected optima, not a prespecified evaluation.
Circularity Check
AttnLink-S's headline mAPs on BIRD Dev and Spider2-SQLite are the exact values used to select the floor ratio rho; otherwise the attention-to-schema-link mechanism is not circular.
specific steps
-
fitted input called prediction
[Implementation Details / Table 2 / Table 1]
"We use top-p= 0.99 and τ= 2.0 for both variants during inference, and set ρ= 0.25 for AttnLink-S during training. Table 2: Dataset ρ 0 0.1 0.25 0.5 0.75 1.0 BIRD Dev 88.41 95.54 95.95 95.72 95.48 94.96 Spider2-SQLite 71.44 82.06 83.29 80.75 81.22 78.75. Table 1: AttnLink-S Qwen3.5-9B ... BIRD Dev ... 95.95 ... Spider2-SQLite ... 83.29"
Table 2 is an ablation on the same evaluation sets used for the headline results. The value ρ=0.25 is the one that maximizes mAP on BIRD Dev and Spider2-SQLite (95.95 and 83.29), and Table 1 reports those same maxima as AttnLink-S's performance. Thus the reported mAPs are the selection criterion for ρ, not an independent evaluation of a fixed configuration. This is a fitted hyperparameter presented as a prediction, statistically forcing the two headline numbers. The core attention mechanism is not itself circular, but these specific headline metrics are contaminated by selection on the evaluation sets.
full rationale
The central derivation is not circular: AttnLink extracts generation-anchor attention over candidate spans, pools it, normalizes it, and for AttnLink-S supervises the resulting distribution with gold schema items obtained by parsing reference SQL. This is standard supervised learning and evaluation; the gold labels do not come from AttnLink's own outputs. The copy-instruction vs. semantic-rationale ablation further shows the signal is not a trivial artifact of pretraining. No load-bearing self-citation chain, imported uniqueness theorem, or ansatz-by-citation is present. The SQLGlot-based gold-schema construction is a data-quality risk (e.g., 477 BIRD training SQLs that fail to execute are removed only from training, with no dev-set audit), but that is a correctness concern, not circularity. The one genuine circular step is the selection of ρ on BIRD Dev and Spider2-SQLite in Table 2 followed by reporting the selected maxima in Table 1; this affects only the headline AttnLink-S mAP values and does not invalidate the overall mechanism, the training-free variant, or the downstream EX comparisons.
Axiom & Free-Parameter Ledger
free parameters (7)
- Temperature tau =
2.0
- top-p cumulative mass p =
0.99
- Floor ratio rho =
0.25
- Layer-head selection (AttnLink-U) =
e.g., Qwen3.5-9B L23/H9
- Supervised head (AttnLink-S) =
final layer head 0
- LoRA rank/alpha/dropout =
r=64, alpha=512, dropout=0.08
- Epsilon epsilon =
small constant
axioms (5)
- domain assumption The generation anchor's attention distribution over candidate spans is a valid operational relevance signal for schema linking.
- domain assumption Gold schema items obtained by parsing reference SQL with SQLGlot and resolving aliases are complete and correct targets for schema linking.
- ad hoc to paper A single layer-head pair captures a transferable schema-grounding signal; no multi-head or cross-layer aggregation is needed.
- ad hoc to paper Mean pooling over candidate token spans is the best aggregation; first-token or sum pooling are worse.
- domain assumption The copying prompt with random uniform selection induces attention that covers multiple relevant candidates even though the model is asked to copy only one.
Cite this review
Pith. "Pith review of AttnLink: Turning Attention into Schema Links for Text-to-SQL." pith.science (2026). https://pith.science/paper/3GAYGXYN
@misc{pith2026260800693,
author = {Pith},
title = {Pith review of: AttnLink: Turning Attention into Schema Links for Text-to-SQL},
year = {2026},
howpublished = {\url{https://pith.science/paper/3GAYGXYN}},
note = {Machine review of arXiv:2608.00693}
}
read the original abstract
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.
Figures
Reference graph
Works this paper leans on
-
[1]
Yu, Tao and Zhang, Rui and Yang, Kai and Yasunaga, Michihiro and Wang, Dongxu and Li, Zifan and Ma, James and Li, Irene and Yao, Qingning and Roman, Shanelle and Zhang, Zilin and Radev, Dragomir. S pider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to- SQL Task. Proceedings of the 2018 Conference on Empirical...
-
[2]
Advances in Neural Information Processing Systems , volume=
Can llm already serve as a database interface? a big bench for large-scale database grounded text-to-sqls , author=. Advances in Neural Information Processing Systems , volume=
-
[3]
Proceedings of the AAAI Conference on Artificial Intelligence , year =
Haoyang Li and Jing Zhang and Cuiping Li and Hong Chen , title =. Proceedings of the AAAI Conference on Artificial Intelligence , year =
-
[4]
arXiv preprint arXiv:2411.00073 , year =
Zhenbiao Cao and Yuanlei Zheng and Zhihao Fan and Xiaojin Zhang and Wei Chen and Xiang Bai , title =. arXiv preprint arXiv:2411.00073 , year =. 2411.00073 , archivePrefix =
-
[5]
Advances in Neural Information Processing Systems (NeurIPS) , year =
Mohammadreza Pourreza and Davood Rafiei , title =. Advances in Neural Information Processing Systems (NeurIPS) , year =. 2304.11015 , archivePrefix =
-
[6]
Proceedings of the VLDB Endowment , volume=
Text-to-sql empowered by large language models: A benchmark evaluation , author=. Proceedings of the VLDB Endowment , volume=. 2024 , publisher=
work page 2024
-
[7]
arXiv preprint arXiv:2405.16755 , year=
Chess: Contextual harnessing for efficient sql synthesis , author=. arXiv preprint arXiv:2405.16755 , year=
-
[8]
arXiv preprint arXiv:2501.17174 , year=
Extractive schema linking for text-to-sql , author=. arXiv preprint arXiv:2501.17174 , year=
-
[9]
Hu and Yelong Shen and Phillip Wallis and Zeyuan Allen-Zhu and Yuanzhi Li and Shean Wang and Lu Wang and Weizhu Chen , title =
Edward J. Hu and Yelong Shen and Phillip Wallis and Zeyuan Allen-Zhu and Yuanzhi Li and Shean Wang and Lu Wang and Weizhu Chen , title =. International Conference on Learning Representations (ICLR) , year =
-
[10]
JOLT - SQL : Joint Loss Tuning of Text-to- SQL with Confusion-aware Noisy Schema Sampling
Song, Jinwang and Zan, Hongying and Zhang, Kunli and Mu, Lingling and Han, Yingjie and Hua, Haobo and Peng, Min. JOLT - SQL : Joint Loss Tuning of Text-to- SQL with Confusion-aware Noisy Schema Sampling. Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing. 2025. doi:10.18653/v1/2025.emnlp-main.308
-
[11]
Gonzalez and Hao Zhang and Ion Stoica , title =
Woosuk Kwon and Zhuohan Li and Siyuan Zhuang and Ying Sheng and Lianmin Zheng and Cody Hao Yu and Joseph E. Gonzalez and Hao Zhang and Ion Stoica , title =. Proceedings of the 29th. 2023 , pages =. doi:10.1145/3600006.3613165 , note =
arXiv 2023
-
[12]
Bailin Wang and Richard Shin and Xiaodong Liu and Oleksandr Polozov and Matthew Richardson , title =. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL) , year =
-
[13]
Towards Complex Text-to- SQL in Cross-Domain Database with Intermediate Representation
Guo, Jiaqi and Zhan, Zecheng and Gao, Yan and Xiao, Yan and Lou, Jian-Guang and Liu, Ting and Zhang, Dongmei. Towards Complex Text-to- SQL in Cross-Domain Database with Intermediate Representation. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. 2019. doi:10.18653/v1/P19-1444
-
[14]
Re-examining the Role of Schema Linking in Text-to- SQL
Lei, Wenqiang and Wang, Weixin and Ma, Zhixin and Gan, Tian and Lu, Wei and Kan, Min-Yen and Chua, Tat-Seng. Re-examining the Role of Schema Linking in Text-to- SQL. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP). 2020. doi:10.18653/v1/2020.emnlp-main.564
-
[15]
arXiv preprint arXiv:2408.07702 , year =
Karime Maamari and Fadhil Abubaker and Daniel Jaroslawicz and Amine Mhedhbi , title =. arXiv preprint arXiv:2408.07702 , year =. 2408.07702 , archivePrefix =
-
[16]
MAC - SQL : A Multi-Agent Collaborative Framework for Text-to- SQL
Wang, Bing and Ren, Changyu and Yang, Jian and Liang, Xinnian and Bai, Jiaqi and Chai, LinZheng and Yan, Zhao and Zhang, Qian-Wen and Yin, Di and Sun, Xing and Li, Zhoujun. MAC - SQL : A Multi-Agent Collaborative Framework for Text-to- SQL. Proceedings of the 31st International Conference on Computational Linguistics. 2025
2025
-
[17]
2024 , eprint=
CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL , author=. 2024 , eprint=
2024
-
[18]
Nils Reimers and Iryna Gurevych , title =. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) , year =
work page 2019
-
[19]
Chen, Jianlyu and Xiao, Shitao and Zhang, Peitian and Luo, Kun and Lian, Defu and Liu, Zheng. M 3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation. Findings of the Association for Computational Linguistics: ACL 2024. 2024. doi:10.18653/v1/2024.findings-acl.137
-
[20]
Kevin Clark and Urvashi Khandelwal and Omer Levy and Christopher D. Manning , title =. Proceedings of the 2019. 2019 , pages =
work page 2019
-
[21]
Attention is not not Explanation
Wiegreffe, Sarah and Pinter, Yuval. Attention is not not Explanation. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). 2019. doi:10.18653/v1/D19-1002
-
[22]
A Primer in BERT ology: What We Know About How BERT Works
Rogers, Anna and Kovaleva, Olga and Rumshisky, Anna. A Primer in BERT ology: What We Know About How BERT Works. Transactions of the Association for Computational Linguistics. 2020. doi:10.1162/tacl_a_00349
-
[23]
International Conference on Learning Representations , volume=
Spider 2.0: Evaluating language models on real-world enterprise text-to-sql workflows , author=. International Conference on Learning Representations , volume=
-
[24]
arXiv preprint arXiv:2506.05176 , year=
Qwen3 embedding: Advancing text embedding and reranking through foundation models , author=. arXiv preprint arXiv:2506.05176 , year=
-
[25]
Findings of the Association for Computational Linguistics: EMNLP 2024 , pages=
Dts-sql: Decomposed text-to-sql with small large language models , author=. Findings of the Association for Computational Linguistics: EMNLP 2024 , pages=
work page 2024
-
[26]
Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing , pages=
Linkalign: Scalable schema linking for real-world large-scale multi-database text-to-sql , author=. Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing , pages=
work page 2025
-
[27]
Proceedings of the AAAI Conference on Artificial Intelligence , volume=
Autolink: Autonomous schema exploration and expansion for scalable schema linking in text-to-sql at scale , author=. Proceedings of the AAAI Conference on Artificial Intelligence , volume=
-
[28]
Attention in Large Language Models Yields Efficient Zero-Shot Re-Rankers , booktitle =
Shijie Chen and Bernal Jim. Attention in Large Language Models Yields Efficient Zero-Shot Re-Rankers , booktitle =. 2025 , eprint =
work page 2025
-
[29]
Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing , year =
Wuwei Zhang and Fangcong Yin and Howard Yen and Danqi Chen and Xi Ye , title =. Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing , year =. doi:10.18653/v1/2025.emnlp-main.1214 , eprint =
-
[30]
doi:10.48550/arXiv.2603.06588 , url =
Ko, Ching-Yun and Chen, Pin-Yu , year =. doi:10.48550/arXiv.2603.06588 , url =. 2603.06588 , archivePrefix =
-
[31]
5-coder technical report , author=
Qwen2. 5-coder technical report , author=. arXiv preprint arXiv:2409.12186 , year=
-
[32]
arXiv preprint arXiv:2505.09388 , year=
Qwen3 technical report , author=. arXiv preprint arXiv:2505.09388 , year=
-
[33]
2026 , eprint=
Qwen3.5-Omni Technical Report , author=. 2026 , eprint=
2026
-
[34]
arXiv preprint arXiv:2407.21783 , year=
The llama 3 herd of models , author=. arXiv preprint arXiv:2407.21783 , year=
-
[35]
Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , pages=
Rethinking the role of scale for in-context learning: An interpretability-based case study at 66 billion scale , author=. Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) , pages=
-
[36]
Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing , pages=
How do large language models learn in-context? query and key matrices of in-context heads are two towers for metric learning , author=. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing , pages=
work page 2024
-
[37]
ACM Computing Surveys , volume=
A survey on employing large language models for text-to-sql tasks , author=. ACM Computing Surveys , volume=. 2025 , publisher=
work page 2025
-
[38]
IEEE Transactions on Knowledge and Data Engineering , year=
A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going? , author=. IEEE Transactions on Knowledge and Data Engineering , year=
-
[39]
Hong, Zijin and Yuan, Zheng and Zhang, Qinggang and Chen, Hao and Dong, Junnan and Huang, Feiran and Huang, Xiao , journal=. 2025 , volume=. doi:10.1109/TKDE.2025.3609486 , url =
-
[40]
Proceedings of the VLDB Endowment , volume=
OmniSQL: Synthesizing High-Quality Text-to-SQL Data at Scale , author=. Proceedings of the VLDB Endowment , volume=. 2025 , publisher=
work page 2025
This paper was first reviewed by deepseek-v4-flash on August 5, 2026.
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.