Keywords: Text-to-SQL, Schema linking, LLMs
Abstract: Small open-source LLMs for Text-to-SQL face a critical dilemma: providing the full schema introduces overwhelming noise that distracts the model, while pruning the schema risks irreversible information loss due to the masking effect from erroneous linking. To resolve this trade-off systematically, we propose DSR-SQL, a dual-path reasoning framework. It concurrently generates candidate SQLs from both full and pruned schemas to capture structural precision and semantic completeness, followed by an intelligent module that merges or selects the optimal query based on execution feedback, effectively balancing recall and precision. Furthermore, DSR-SQL introduces a Permutation-Invariant Minimal Cross-Entropy (PI-MCE) loss to resolve training bias caused by the disorder of table selection outputs, significantly improving schema linking accuracy. Extensive experiments show that DSR-SQL significantly outperforms comparable baselines and some GPT-4-based methods, demonstrating that refined architectural design combined with targeted fine-tuning enables small LLMs to rival proprietary giants, facilitating low-cost, efficient, and privacy-preserving natural language interfaces.
Paper Type: Long
Research Area: Question Answering
Research Area Keywords: semantic parsing,table QA
Contribution Types: NLP engineering experiment, Publicly available software and/or pre-trained models
Languages Studied: English
Submission Number: 788
Loading