@inproceedings{sheng-shuai-2025-csc,
title = "{CSC}-{SQL}: Corrective Self-Consistency in Text-to-{SQL} via Reinforcement Learning",
author = "Sheng, Lei and
Shuai, Xu Shuai",
editor = "Inui, Kentaro and
Sakti, Sakriani and
Wang, Haofen and
Wong, Derek F. and
Bhattacharyya, Pushpak and
Banerjee, Biplab and
Ekbal, Asif and
Chakraborty, Tanmoy and
Singh, Dhirendra Pratap",
booktitle = "Proceedings of the 14th International Joint Conference on Natural Language Processing and the 4th Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics",
month = dec,
year = "2025",
address = "Mumbai, India",
publisher = "The Asian Federation of Natural Language Processing and The Association for Computational Linguistics",
url = "https://preview.aclanthology.org/ingest-ijcnlp-aacl/2025.findings-ijcnlp.91/",
pages = "1473--1496",
ISBN = "979-8-89176-303-6",
abstract = "Large language models (LLMs) have demonstrated strong capabilities in translating natural language questions about relational databases into SQL queries. In particular, test-time scaling techniques such as Self-Consistency and Self-Correction can enhance SQL generation accuracy by increasing computational effort during inference. However, these methods have notable limitations: Self-Consistency may select suboptimal outputs despite majority votes, while Self-Correction typically addresses only syntactic errors. To leverage the strengths of both approaches, we propose CSC-SQL, a novel method that integrates Self-Consistency and Self-Correction. CSC-SQL selects the two most frequently occurring outputs from parallel sampling and feeds them into a merge revision model for correction. Additionally, we employ the Group Relative Policy Optimization (GRPO) algorithm to fine-tune both the SQL generation and revision models via reinforcement learning, significantly enhancing output quality. Experimental results confirm the effectiveness and generalizability of CSC-SQL. On the BIRD private test set, our 7B model achieves 71.72{\%} execution accuracy, while the 32B model achieves 73.67{\%}, outperforming other known methods using open source models. The code has been open sourced at https://github.com/CycloneBoy/csc{\_}sql."
}Markdown (Informal)
[CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learning](https://preview.aclanthology.org/ingest-ijcnlp-aacl/2025.findings-ijcnlp.91/) (Sheng & Shuai, Findings 2025)
ACL
- Lei Sheng and Xu Shuai Shuai. 2025. CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learning. In Proceedings of the 14th International Joint Conference on Natural Language Processing and the 4th Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics, pages 1473–1496, Mumbai, India. The Asian Federation of Natural Language Processing and The Association for Computational Linguistics.