Learning SQL Like a Human: Structure-Aware Curriculum Learning for Text-to-SQL Generation

Xiaohu Zhu, Qian Li, Lizhen Cui, Yuntao Du


Abstract
The Text-to-SQL capabilities of large language allow users to interact with databases using natural language. While current models struggle with handling complex queries, especially involving multi-table joins and reasoning. To address this gap, we propose to construct a model, namely SAC-SQL, with synthetic training samples followed by a structure-aware curriculum learning framework for enhancing SQL generation. Our approach begins with a supervised fine-tuning (SFT) stage, where we train open-source models on a synthetically constructed, cross-domain SQL dataset with diverse structural patterns. Moreover, we introduce a unified structure difficulty scoring function to partition the training samples into non-overlapping curriculum phases, guiding the model progressively learning from simpler to more complex SQL structures. Extensive experiments are conducted and the results show that SAC-SQL achieves better results than the baselines, and significantly narrows the performance gap between open-source and close-source models on Spider and Bird benchmarks.
Anthology ID:
2025.findings-emnlp.190
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2025
Month:
November
Year:
2025
Address:
Suzhou, China
Editors:
Christos Christodoulopoulos, Tanmoy Chakraborty, Carolyn Rose, Violet Peng
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
3545–3559
Language:
URL:
https://aclanthology.org/2025.findings-emnlp.190/
DOI:
Bibkey:
Cite (ACL):
Xiaohu Zhu, Qian Li, Lizhen Cui, and Yuntao Du. 2025. Learning SQL Like a Human: Structure-Aware Curriculum Learning for Text-to-SQL Generation. In Findings of the Association for Computational Linguistics: EMNLP 2025, pages 3545–3559, Suzhou, China. Association for Computational Linguistics.
Cite (Informal):
Learning SQL Like a Human: Structure-Aware Curriculum Learning for Text-to-SQL Generation (Zhu et al., Findings 2025)
Copy Citation:
PDF:
https://aclanthology.org/2025.findings-emnlp.190.pdf
Checklist:
 2025.findings-emnlp.190.checklist.pdf