CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learning
On the map: LLM reasoning → Knowledge- and tool-augmented reasoning
Abstract (arXiv)
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%. The code has been open sourced at https://github.com/CycloneBoy/cscsql.
Key facts. Cited by 15 papers in the map (data through 14 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 36 of its 42 references that are in the map. First posted on arXiv 19 May 2025.
Builds on
36 of 42 references.
Closest ancestors · 5
Same direction, newest first
- 2025Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewards7 May
- 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQL21 Apr
- 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQL29 Mar
- 2025STaR-SQL: Self-Taught Reasoner for Text-to-SQL19 Feb
- 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL2 Oct
Other references · 31
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2024OpenAI o1 System Cardcited by 1,244
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
- 2025A Survey on Test-Time Scaling in Large Language Models: What, How, Where, and How Well?cited by 223
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 187
- 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 169
19 more
- 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
- 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 105
- 2025OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scalecited by 91
- 2024The Dawn of Natural Language to SQL: Are We Fully Ready?cited by 79
- 2025SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learningcited by 68
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 56
- 2025A Survey on Post-training of Large Language Modelscited by 54
- 2025OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignmentcited by 53
- 2024RSL-SQL: Robust Schema Linking in Text-to-SQL Generationcited by 52
- 2024A Preview of XiYan-SQL: A Multi-Generator Ensemble Framework for Text-to-SQLcited by 46
- 2025Reasoning Language Models: A Blueprintcited by 42
- 2025Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Searchcited by 34
- 2024Soft Self-Consistency Improves Language Model Agentscited by 25
- 2024MSc-SQL: Multi-Sample Critiquing Small Language Models For Text-To-SQL Translationcited by 19
- 2025SQL-o1: A Self-Reward Heuristic Dynamic Search Method for Text-to-SQLcited by 19
- 2025BASE-SQL: A powerful open source Text-To-SQL baseline approachcited by 9
- 2024DFIN-SQL: Integrating Focused Schema with DIN-SQL for Superior Accuracy in Large-Scale Databasescited by 4
- 2025MCTS-SQL: Light-Weight LLMs can Master the Text-to-SQL through Monte Carlo Tree Searchcited by 4
Built on by
Citing papers per year: 2025: 3; 2026: 12.
15 papers.
Sort:
By area:
- 2025Agentar-Scale-SQL: Advancing Text-to-SQL through Orchestrated Test-Time Scalingcited by 24
- 2026Pervasive Annotation Errors Break Text-to-SQL Benchmarks and Leaderboardscited by 13
- 2025SpotIt: Evaluating Text-to-SQL Evaluation with Formal Verificationcited by 4
- 2026RoboPhD: Self-Improving Text-to-SQL Through Autonomous Agent Evolutioncited by 3
- 2026An Efficient and Effective Evaluator for Text2SQL Models on Unseen and Unlabeled Datacited by 2
- 2026SpotIt+: Verification-based Text-to-SQL Evaluation with Database Constraintscited by 1
- 2026NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutionscited by 1
- 2026The Horizon Gap: Planning, Memory, Execution, Training, and Evaluation for Long-Horizon LLM Agentscited by 1
- 2026SQLMorph: Query Mutation and Fine-Grained Metrics for Text-to-SQL Evaluationcited by 1
- 2025GradeSQL: Test-Time Inference with Outcome Reward Models for Text-to-SQL Generation from Large Language Modelscited by 0
- 2026LEAF-SQL: Level-wise Exploration with Adaptive Fine-graining for Text-to-SQL Skeleton Predictioncited by 0
- 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuningcited by 0
- 2026SQLMorph: Query Mutation and Fine-Grained Metrics for Text-to-SQL Evaluation8 Sep 2026
- 2026SQL-Zero: Self-Evolving Text-to-SQL4 Sep 2026
- 2026ACTS-SQL: Agentic and Critic-Oriented Tree-Structured SQL Correctness with Large Language Models15 Aug 2026
- 2026The Horizon Gap: Planning, Memory, Execution, Training, and Evaluation for Long-Horizon LLM Agents7 Aug 2026
- 2026STRATOS: Bridging the Symbolic-to-Numeric Gap in Spatio-Temporal Text-to-SQL for Meteorological Data3 Jul 2026
- 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning14 Jun 2026
- 2026LEAF-SQL: Level-wise Exploration with Adaptive Fine-graining for Text-to-SQL Skeleton Prediction10 May 2026
- 2026NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions13 Apr 2026
- 2026An Efficient and Effective Evaluator for Text2SQL Models on Unseen and Unlabeled Data8 Mar 2026
- 2026SpotIt+: Verification-based Text-to-SQL Evaluation with Database Constraints4 Mar 2026
- 2026Pervasive Annotation Errors Break Text-to-SQL Benchmarks and Leaderboards13 Jan 2026
- 2026RoboPhD: Self-Improving Text-to-SQL Through Autonomous Agent Evolution3 Jan 2026
3 more
- 2025Agentar-Scale-SQL: Advancing Text-to-SQL through Orchestrated Test-Time Scalingcited by 24
- 2026The Horizon Gap: Planning, Memory, Execution, Training, and Evaluation for Long-Horizon LLM Agentscited by 1
- 2025GradeSQL: Test-Time Inference with Outcome Reward Models for Text-to-SQL Generation from Large Language Modelscited by 0
- 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuningcited by 0
- 2026The Horizon Gap: Planning, Memory, Execution, Training, and Evaluation for Long-Horizon LLM Agents7 Aug 2026
- 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning14 Jun 2026
- 2025Agentar-Scale-SQL: Advancing Text-to-SQL through Orchestrated Test-Time Scaling29 Sep 2025
- 2025GradeSQL: Test-Time Inference with Outcome Reward Models for Text-to-SQL Generation from Large Language Models1 Sep 2025
- 2026SQL-Zero: Self-Evolving Text-to-SQLcited by 0
- 2026SQL-Zero: Self-Evolving Text-to-SQL4 Sep 2026
- 2026Pervasive Annotation Errors Break Text-to-SQL Benchmarks and Leaderboardscited by 13
- 2025SpotIt: Evaluating Text-to-SQL Evaluation with Formal Verificationcited by 4
- 2026RoboPhD: Self-Improving Text-to-SQL Through Autonomous Agent Evolutioncited by 3
- 2026An Efficient and Effective Evaluator for Text2SQL Models on Unseen and Unlabeled Datacited by 2
- 2026SpotIt+: Verification-based Text-to-SQL Evaluation with Database Constraintscited by 1
- 2026NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutionscited by 1
- 2026SQLMorph: Query Mutation and Fine-Grained Metrics for Text-to-SQL Evaluationcited by 1
- 2026LEAF-SQL: Level-wise Exploration with Adaptive Fine-graining for Text-to-SQL Skeleton Predictioncited by 0
- 2026STRATOS: Bridging the Symbolic-to-Numeric Gap in Spatio-Temporal Text-to-SQL for Meteorological Datacited by 0
- 2026SQLMorph: Query Mutation and Fine-Grained Metrics for Text-to-SQL Evaluation8 Sep 2026
- 2026STRATOS: Bridging the Symbolic-to-Numeric Gap in Spatio-Temporal Text-to-SQL for Meteorological Data3 Jul 2026
- 2026LEAF-SQL: Level-wise Exploration with Adaptive Fine-graining for Text-to-SQL Skeleton Prediction10 May 2026
- 2026NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions13 Apr 2026
- 2026An Efficient and Effective Evaluator for Text2SQL Models on Unseen and Unlabeled Data8 Mar 2026
- 2026SpotIt+: Verification-based Text-to-SQL Evaluation with Database Constraints4 Mar 2026
- 2026Pervasive Annotation Errors Break Text-to-SQL Benchmarks and Leaderboards13 Jan 2026
- 2026RoboPhD: Self-Improving Text-to-SQL Through Autonomous Agent Evolution3 Jan 2026
- 2025SpotIt: Evaluating Text-to-SQL Evaluation with Formal Verification30 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2026FINER-SQL: Boosting Small Language Models for Text-to-SQL
- 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL
- 2026Progress-SQL: Improving Reinforcement Learning for Text-to-SQL via Progressive Rewards
- 2025CogniSQL-R1-Zero: Lightweight Reinforced Reasoning for Efficient SQL Generation
- 2026ACE-SQL: Adaptive Co-Optimization via Empirical Credit Assignment for Text-to-SQL
- 2025Sparks of Tabular Reasoning via Text2SQL Reinforcement Learning
- 2025Reinforcing Code Generation: Improving Text-to-SQL with Execution-Based Learning
- 2026SQL-Trail: Multi-Turn Reinforcement Learning with Interleaved Feedback for Text-to-SQL