Fanghao Li
Author directory2026
DSR-SQL: Dual-Schema Reasoning for Text-to-SQL and PI-MCE Optimized Schema Linking
Hu Lu | Fanghao Li | Dongqi Han | Yao Zhang
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Hu Lu | Fanghao Li | Dongqi Han | Yao Zhang
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
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.