Elamur Research⌕
☰
home / papers / 2026 / Bidirectional Semantic Enhancement for Schema Routing Across Large-Scale Databases

Bidirectional Semantic Enhancement for Schema Routing Across Large-Scale Databases

Paper · 2026 · Yuyang Wu, Xiaoliang Wang and Cam-Tu Nguyen

Summary

The paper tackles schema routing: picking the few relevant tables from repositories that may hold thousands of them before an LLM writes SQL. The main obstacle is semantic. Users ask in everyday words, while real schemas often use cryptic identifiers. Earlier methods enrich only one side, either expanding the query or walking schema graphs that rely on foreign keys. The authors propose Bi-SR, which works on both sides. Offline, an LLM writes a functional explanation and domain keywords for every table, and these descriptions are indexed as vectors. Online, the system guesses likely table descriptions and names for the incoming question, retrieves candidates, and then prunes them more finely. A dense retriever is trained with a dual-augmented contrastive objective, matching LLM-expanded queries against the enriched table descriptions. On routing benchmarks built from BIRD and Spider, Bi-SR reports state-of-the-art recall and execution accuracy. It also stays robust when the search pool grows with unseen tables, which matters for real data warehouses and for running cheaper, smaller models.

Key points

  • Each table is represented as a triplet of DatabaseID, TableID, and an LLM-generated Explanation. Training queries are the question joined to an LLM-produced "Target Potential Schema" with a [SEP] token. Hard negatives are mined with BM25.
  • In the ablation, removing the fine-grained pruning step lowers downstream execution accuracy (EX) to 66.2%. The drop is comparable to removing the core retrieval augmentations.
  • For the out-of-distribution test, models are trained only on BIRD. The retrieval pool is then expanded with unseen Spider and WikiSQL databases, growing from 0.5K to 20K tables.
  • In that test, DBCopilot and ICRL fall to roughly 50% retrieval. Bi-SR keeps Recall@5 above 78% at 20K tables and widens its lead over Gen-SQL as the pool grows.
  • Stated limitations:
    • Descriptions may be hallucinated in niche domains the LLM knows poorly.
    • Cell values are not indexed, so value-only disambiguation is weak.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

Cite

Cite as Yuyang Wu, Xiaoliang Wang and Cam-Tu Nguyen. 2026. Bidirectional Semantic Enhancement for Schema Routing Across Large-Scale Databases. Findings of the Association for Computational Linguistics: ACL 2026.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2026.findings-acl.369

@inproceedings{wu2026bidirectional,
  title = {{Bidirectional Semantic Enhancement for Schema Routing Across Large-Scale Databases}},
  author = {Yuyang Wu, Xiaoliang Wang and Cam-Tu Nguyen},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2026},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.369},
  url = {https://doi.org/10.18653/v1/2026.findings-acl.369}
}

References

36 references, 19 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Ben Bogin, Jonathan Berant, and Matt Gardner. 2019. Representing schema structure with graph neural networks for text-to-SQL parsing. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4560–4565.
  2. Edgar F. Codd. 1970. A relational model of data for large shared data banks. Communications of the ACM, 13:377–387. find
  3. Grace Fan, Jin Wang, Yuliang Li, and Renée J. Miller. 2023. Table discovery in data lakes: State-of-the-art and future directions. In Companion of the 2023 International Conference on Management of Data, page 69–75. find
  4. Avrilia Floratou, Fotis Psallidas, Fuheng Zhao, Shaleen Deep, Gunther Hagleither, Wangda Tan, Joyce Cahoon, Rana Alotaibi, Jordan Henkel, Abhik Singla, and 1 others. 2024. Nl2sql is a solved problem... not! In Proceedings of the 14th Conference on Innovative Data Systems Research. find
  5. Yujian Gan, Xinyun Chen, Qiuping Huang, Matthew Purver, John R. Woodward, Jinxia Xie, and Peng-sheng Huang. 2021. Towards robustness of text-to-SQL models against synonym substitution. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th Internation…
  6. Jiaqi Guo, Zecheng Zhan, Yan Gao, Yan Xiao, Jian-Guang Lou, Ting Liu, and Dongmei Zhang. 2019. Towards complex text-to-sql in cross-domain database with intermediate representation. arXiv preprint arXiv:1905.08205. find
  7. Mingqian He, Yongliang Shen, Wenqi Zhang, Qiuying Peng, Jun Wang, and Weiming Lu. 2025. STaR-SQL: Self-taught reasoner for text-to-SQL. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 24365–24375.
  8. Jonathan Herzig, Thomas Müller, Syrine Krichene, and Julian Eisenschlos. 2021. Open domain question answering over tables via dense retrieval. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 512–…
  9. Mayank Kothyari, Dhruva Dhingra, Sunita Sarawagi, and Soumen Chakrabarti. 2023. CRUSH4SQL: Collective retrieval using schema hallucination for Text2SQL. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 14054–14066. find
  10. Dongjun Lee, Choongwon Park, Jaehyuk Kim, and Heesoo Park. 2025. Mcs-sql: Leveraging multiple prompts and multiple-choice selection for text-to-sql generation. In Proceedings of the 31st International Conference on Computational Linguistics, pages 337– 353.
  11. Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, and 1 others. 2020. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in neural information processing systems, 33:9459–…
  12. Haoyang Li, Jing Zhang, Hanbing Liu, Ju Fan, Xiaokang Zhang, Jun Zhu, Renjie Wei, Hongyan Pan, Cuiping Li, and Hong Chen. 2024a. Codes: Towards building open-source language models for text-to-sql. Proceedings of the ACM on Management of Data, 2:1–28.
  13. Jinyang Li, Binyuan Hui, Ge Qu, Jiaxi Yang, Binhua Li, Bowen Li, Bailin Wang, Bowen Qin, Ruiying Geng, Nan Huo, and 1 others. 2024b. Can llm already serve as a database interface? a big bench for large-scale database grounded text-to-sqls. Advances in Neural Information Processing Systems, 36.
  14. Zhishuai Li, Xiang Wang, Jingjing Zhao, Sun Yang, Guoqing Du, Xiaoru Hu, Bin Zhang, Yuxiao Ye, Ziyue Li, Rui Zhao, and 1 others. 2024c. Pet-sql: A prompt-enhanced two-round refinement of text-to-sql with cross-consistency. arXiv preprint arXiv:2403.09732. — [arXiv:2403.09732](https://arxiv.org/abs/2403.09732) find
  15. Geling Liu, Yunzhi Tan, Ruichao Zhong, Yuanzhen Xie, Lingchen Zhao, Qian Wang, Bo Hu, and Zang Li. 2025. Solid-SQL: Enhanced schema-linking based in-context learning for robust text-to-SQL. In Proceedings of the 31st International Conference on Computational Linguistics, pages 9793–9803. find
  16. Fatemeh Nargesian, Erkang Zhu, Renée J. Miller, Ken Q. Pu, and Patricia C. Arocena. 2019. Data lake management: challenges and opportunities. Proceedings of the VLDB Endowment, 12:1986–1989. find
  17. Rodrigo Nogueira, Wei Yang, Jimmy Lin, and Kyunghyun Cho. 2019. Document expansion by query prediction. arXiv preprint arXiv:1904.08375.
  18. Aaron van den Oord, Yazhe Li, and Oriol Vinyals. 2018. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748.
  19. Dazhi Peng. 2025. X-sql: Expert schema linking and understanding of text-to-sql with multi-llms. arXiv preprint arXiv:2509.05899. — [arXiv:2509.05899](https://arxiv.org/abs/2509.05899) find
  20. Mohammadreza Pourreza and Davood Rafiei. 2023. Din-sql: Decomposed in-context learning of text-to-sql with self-correction. arXiv preprint arXiv:2304.11015.
  21. Nils Reimers and Iryna Gurevych. 2019. Sentence-BERT: Sentence embeddings using Siamese BERT-networks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3982–3992.
  22. Stephen Robertson, Hugo Zaragoza, and 1 others. 2009. The probabilistic relevance framework: Bm25 and beyond. Foundations and Trends® in Information Retrieval, 3:333–389. find
  23. Jie Shi, Bo Xu, Jiaqing Liang, Yanghua Xiao, Jia Chen, Chenhao Xie, Peng Wang, and Wei Wang. 2025. Gen-SQL: Efficient text-to-SQL by bridging natural language question and database schema with pseudo-schema. In Proceedings of the 31st International Conference on Computational Linguistics, pages 3794… find
  24. Shayan Talaei, Mohammadreza Pourreza, Yu-Chen Chang, Azalia Mirhoseini, and Amin Saberi. 2024. Chess: Contextual harnessing for efficient sql synthesis. arXiv preprint arXiv:2405.16755. — [arXiv:2405.16755](https://arxiv.org/abs/2405.16755) find
  25. Rishit Toteja, Arindam Sarkar, and Prakash Mandayam Comar. 2025. In-context reinforcement learning with retrieval-augmented generation for text-to-SQL. In Proceedings of the 31st International Conference on Computational Linguistics, pages 10390–10397. find
  26. Bing Wang, Changyu Ren, Jian Yang, Xinnian Liang, Jiaqi Bai, Linzheng Chai, Zhao Yan, Qian-Wen Zhang, Di Yin, Xing Sun, and 1 others. 2025a. Mac-sql: A multi-agent collaborative framework for text-to-sql. In Proceedings of the 31st International Conference on Computational Linguistics, pages 540–557…
  27. Tianshu Wang, Xiaoyang Chen, Hongyu Lin, Xianpei Han, Le Sun, Hao Wang, and Zhenyu Zeng. 2025b. Dbcopilot: Natural language querying over massive databases via schema routing. In Proceedings 28th International Conference on Extending Database Technology, pages 707–721. find
  28. Yihan Wang, Peiyu Liu, and Xin Yang. 2025c. LinkAlign: Scalable schema linking for real-world large-scale multi-database text-to-SQL. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 977–991. find
  29. Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, and 1 others. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824– 24837.
  30. Xiangjin Xie, Guangwei Xu, Lingyan Zhao, and Ruijie Guo. 2025. Opensearch-sql: Enhancing text-to-sql with dynamic few-shot and consistency alignment. arXiv preprint arXiv:2502.14913. — [arXiv:2502.14913](https://arxiv.org/abs/2502.14913) find
  31. An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, and 41 others. 2025. Qwen3 technical report. arXiv preprint arXiv:2505.09388.
  32. Tao Yu, Rui Zhang, Heyang Er, Suyi Li, Eric Xue, Bo Pang, Xi Victoria Lin, Yi Chern Tan, Tianze Shi, Zihan Li, and 1 others. 2019. Cosql: A conversational text-to-sql challenge towards cross-domain natural language interfaces to databases. In Proceedings of the 2019 conference on empirical methods i…
  33. Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, Zilin Zhang, and Dragomir Radev. 2018. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. In Proceedings of the 2018…
  34. Yanzhao Zhang, Mingxin Li, Dingkun Long, Xin Zhang, Huan Lin, Baosong Yang, Pengjun Xie, An Yang, Dayiheng Liu, Junyang Lin, and 1 others. 2025. Qwen3 embedding: Advancing text embedding and reranking through foundation models. arXiv preprint arXiv:2506.05176.
  35. Yi Zhang and Zachary G. Ives. 2020. Finding related tables in data lakes for interactive data science. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, page 1951–1966. find
  36. Victor Zhong, Caiming Xiong, and Richard Socher. 2017. Seq2sql: Generating structured queries from natural language using reinforcement learning. arXiv preprint arXiv:1709.00103.

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/wu-2026-bidirectional-semantic-enhancement-schema-routing/