DSR-SQL: Dual-Schema Reasoning for Text-to-SQL and PI-MCE Optimized Schema Linking

Hu Lu, Fanghao Li, Dongqi Han, Yao Zhang


Abstract
Small open-source LLMs for Text-to-SQL face a trade-off between schema completeness and input noise. Pruned schemas provide compact contexts for SQL generation but are vulnerable to schema-linking errors, while full schemas preserve complete database information but may introduce substantial irrelevant context. We propose DSR-SQL, a dual-schema reasoning framework that generates SQL candidates from both pruned and full schemas. The pruned-schema path supports focused reasoning, whereas the full-schema path helps recover schema elements that may be missed during pruning. The generated candidates are refined with execution feedback and integrated through an execution-aware merger or a deterministic fallback selector. To improve the reliability of the pruned-schema path, we further introduce a Permutation-Invariant Minimum Cross-Entropy (PI-MCE) loss for table selection, which reduces the sequence-order bias caused by autoregressive training on unordered table sets. Experiments on the BIRD benchmark show that DSR-SQL achieves 67.41% execution accuracy on the test set using a 7B-parameter model. These results demonstrate the effectiveness of dual-schema reasoning, with PI-MCE providing complementary improvements in table selection for smaller open-source LLMs.
Anthology ID:
2026.emnlp-main.1688
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
38396–38410
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1688/
DOI:
Bibkey:
Cite (ACL):
Hu Lu, Fanghao Li, Dongqi Han, and Yao Zhang. 2026. DSR-SQL: Dual-Schema Reasoning for Text-to-SQL and PI-MCE Optimized Schema Linking. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 38396–38410, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
DSR-SQL: Dual-Schema Reasoning for Text-to-SQL and PI-MCE Optimized Schema Linking (Lu et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1688.pdf