SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning
Authors: Peixian MA
Xialie Zhuang
Chengjin Xu
Xuhui Jiang
Ran Chen
Jian Guo
Venue: NeurIPS 2025 poster ()
Keywords: NL2SQL
Reinforcement Learning
Synthetic Data
Model Reasoning
Primary area: reinforcement_learning

Abstract: Natural Language to SQL (NL2SQL) enables intuitive interactions with databases by transforming natural language queries into structured SQL statements.  Despite recent advancements in enhancing human-computer interaction within database applications, significant challenges persist, particularly regarding the inference performance in complex scenarios involving multi-table joins and nested queries.   Current methodologies primarily utilize supervised fine-tuning (SFT) to train the NL2SQL model, which may limit adaptability and interpretability in new environments (e.g., finance and healthcare).
In order to enhance the reasoning performance of the NL2SQL model in the above complex situations, we introduce SQL-R1, a novel NL2SQL reasoning model trained by the reinforcement learning (RL) algorithms.
We design a specialized RL-based reward function tailored for NL2SQL tasks and discussed the impact of cold start and synthetic data on the effectiveness of intensive training. In addition, we achieve competitive accuracy using only a tiny amount of synthetic NL2SQL data for augmented training and further explore data engineering for RL. In existing experiments, SQL-R1 achieves execution accuracy of 88.6\% and 67.1\% on the benchmark Spider and BIRD, respectively. The code is available at https://github.com/IDEA-FinAI/SQL-R1.

SQL-R1: Training Natural Language to SQL
Reasoning Model By Reinforcement Learning
Peixian Ma Xialie Zhuang!., Chengjin Xul.t,; Xuhui Jiang' 14 Ran Chen', Jian Guo
'IDEA Research, International Digital Economy Academy
Thhe Hong Kong University of Science and Technology (Guangzhou)
Univeessity of Chinese Academy of Sciences *DataArc Tech Ltd.
wmw.929econnet..heeee edu en, xuchengjin innnnnggiiiiien ineidea. edu.
Abstract
Natural Language to SQL (NL2SQL) enables intuitive interactions with databases by transforming natural language queries into structured SQL statements, Despite recent advancements enhancing human-computer interaction within database applications, significant challenges persist, particularly regarding the reasoning performance in complex scenarios involving multi-table joins and nested queries. Current methodologies primarily utilize supervised fine-tuning (SFT) to train the NL2SQL model, which may limit adaptability and interpretability new environ- ments (e.g., finance and healthcare). In order enhance the reasoning performance the NL2SQL model the above complex situations, we introduce SQL-RI, a novel NL2SQL reasoning model trained by the reinforcement learning (RL) algo- rithms. We design a specialized RL-based reward function tailored for NL2SQL tasks and discussed the impact of cold start and synthetic data the effectiveness of intensive training. In addition, we achieve competitive accuracy using only tiny amount of synthetic NL22QQL data for augmented training and further explore data engineering for RL. In existing experiments, SQL-RI achieves execution accuracy of 88.6% and 67.1% on the benchmark Spider and BIRD, respectively. The code is available at
Introduction
Natural Language to SQL (NL2SQL, or Text2SQL) converts natural language questions (NL) into structured SQL statements, simplifying database interaction without requiring database expertise [1, 2]. Recent advancements interaction within database query applications and contribute to wide range of data science analysis tasks [3, 4]. Current NL2SQL models mainly focus on optimizing workflows and their components, such as schema linking [5, 6], content retrieval [7], generation correction [8-12].
NL2SQL have significantly enhanced the level of human-computer
Despite these advancements, improving the NL2SQL system's reasoning performance in complex database scenarios remains a considerable challenge. As shown in Figure 1, schema complexity may lead to generation errors in processing multi-table joins and nested queries, and it is difficult for individually trained models to think and process complex semantics. Currently, significant portion of NL2SQL research devoted training open-source large language models (LLMs) by supervised fine-tuning (SFT) [13-15] to achieve accuracy at a smaller model scale compared to approaches using closed-source LLMs (e.g., GPT-4, GPT-4o) [8, 10, 16]. However, SFT relies on the database schema structure and the training data scale. This may lead to the existing model's 's instability in domain adaptation and generalization in new database environments, Additionally, the lack of interpretability
"Corresponding author.
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

TABLE circuits (ctreuitId intager,....... constructors (constructorid integer,
top Garman
stop duration
integer,
fareenrre, summe, ANDCpp duration) avg durettion FROM drávees 2014
MHERE nationality "German" AND STRETIRE( 'W"", di.00b)
GRoup
wita
Generating
General LLM
pizes BY avg .urutttttoonn
Model
LINET
Directly
Supervised Fine-Tuning,
L. reddensity the meeaiie Lafee cnferatiiens.....
DB
Ressoning LLM
Policcy
start wits "MaAc"" stateravt inclade the renstrve oolanes: ferwane Los the "ertivER",
Model
Reasoning
GRPD
Rewards
drivers arteects patStops deiertt 30D1 caoes pitStops micks reom racote un cileess
drivee recouae, disenees camane
Reinforcement Training
wwdptticeps. duestice) .907
Database Feedback
Answer Deep Reassoning
Figure 1: Demonstration our work. Previous work on NL2SQL primarily relies on supervised fine-tuning to enable the model learn how to generate SQL. However, in the case of complex database schema or ambiguous semantics, the fine-tuned model may struggle to produce SQL that does not align with the user's intentions, as it depends on fixed generation strategy and previous data. By introducing reinforcement learning algorithms, the model can receive intuitive feedback from the database during the training process. This feedback encourages the model independently explore various SQL generation reasoning approaches, ultimately enhancing the accuracy of its output.
of NL2SQL reasoning logic limits the application of the model in high-risk fields, such finance and healthcare.
Recently, reinforcement learning (RL) has shown great potential in training the reasoning ability of LLMs in recent research. Compared with supervised fine-tuning, reinforcement learning can dynamically adjust the decision-making strategy of the LLMs through interaction with the environ- ment, thereby achieving superior performance in complex reasoning tasks [17]. RL-based methods have proven effective in enhancing model reasoning and generalization capabilities in financial reasoning [18], search engines [19], and mathematical reasoning [20, 21].
Based on the above inspiration, we proposed SQL-RI, NL2SQL reasoning model trained by the reinforcement learning algorithm. Figure demonstrates the overview our work. In the following sections, we will focus on answering the following critical questions:
Q1: Can we design a specific reinforcement learning algorithm for the NL2SQL task and successfulll train a NL2SQL reasoning model? In contrast to SFT, RL algorithms prioritize the direct optimization of NL2SQL reasoning, specifically by generating SQL queries that accurately reflect the user's query intent. The design of effective feedback mechanisms for reinforcement learning presents substantial challenge in developing NL2SQL reasoning models. Appropriately structured rewards within the reinforcement learning framework can significantly enhance its performance.
Q2: For the RL-based NL2SQL reasoning model, do need perform specific form of cold start on it? For the existing base model, an effective cold start can strengthen the model's 's instruction- following ability and activate its NL2SQL generation ability, thus promoting generate higher- quality SQL queries in reinforcement learning exploration. Designing the form of a cold start will also be a significant challenge.
Q3: Can we deploy sustainable data engineering for training robust and efficient NL2SQL reasoning models? RL training relies high-quality training data, while current NL2SQL tasks lack large amount of real data for training. How to develop the data support for NL2SQL reasoning model based on the existing data engineering technology is important challenge to solve the model training, improve the robustness and generalization of the model.
Above all, the contribution of this work are as follows:

---

Explicit NL2SQL Reasoning Model: We propose SQL-RI, NL2SQL reasoning model trained on a few NL2SQL data (e.g., 5K) currently, which can achieve 88.6% and 66.6% accuracy on the leading benchmark Spider-Test and BIRD, respectively, and can output detailed explicit reasoning process.
We extensively explored the impact of cold-start training on SQL-R1, developing a training strategy that integrates SFT and RL. Our findings highlight the strategy of using synthetic data to enhance model performance and robustness, offering key insights into optimizing NL2SQL reasoning model training.
Training Strategy for NL22QL Reasoning Model:
2 SQL-R1
2.1
Overview
This section mainly introduces two forms of training NL2SQL models via RL algorithms: direct reinforcement training and reinforcement training via cold start after training. Among them, cold start refers to using specific data to train the base model by SFT first so that it has particular ability to think and follow instructions. In addition, due to the limited real data, we use the latest synthetic data to support the above training process. Section 2.2 will introduce our current data engineering solution, Section 2.3 will introduce the SFT algorithm and RL algorithm designed for NL2SQL.
2.2 Data Preparation
2.2.1 Source
Currently, we utilize the SynSQL-2.5M [22] dataset primary data source, which is the first million-scale synthetic NL2SQL dataset, encompassing over 2.5 million diverse and high-quality data samples. Each sample consists of quadruple comprising database, natural language question, an SQL query, and chain-of-thoughh (CoT) solution. The dataset features more than 16,000 synthetic databases across various domains. thereby ensuring extensive coverage of realistic scenarios. SynSQL-2.5M includes a wide range of SQL complexity levels, from simple singlc-table queries to intricate multi-table joins, functions, and common table expressions.
2.2.2 Preprocessing
SFT Dataset. In this study, investigated the impact of the cold start condition in SFT on RL training. Currently, we utilized a dataset comprising 200,000 samples drawn from the SynSQL-2.5M for the SFT training, whose sample size uniform across different difficulty levels, with each level comprising 50000 samples. For clarity, we will refer to this subset as SynSQL-200K in subsequent sections. is essential to highlight that the query results obtained from the all SQL ground truth are exclusively are non-null values. For each sample v = (I, t. y²) in the SFT dataset V, represents the NL, while represents the reasoming process enclosed in <think>, .onkk...<//..................... <//think>>>> tags and y denotes the SQL. enclosed in <answer>... . </answer> tags.
RL Dataset. The current NI NL. base model has demonstrated a strong capability in generating simple to moderate SQL queries. However, exhibits limitations when tasked with the creation of more sophisticated SQL queries. Consequently, employing dataset comprised of more challenging samples during the training process may prove beneficial in addressing these deficiencies and enhancing the model's 's overall performance in generating complex SQL. We randomly sampled 5K NL-SQL pairs from SynSQL-2.5M. whose complexity are Complex. For each NL-SQL pair (z, y²) in the RL dataset V, represents the NL, while y" denotes the SQL candidate generated by the model. The aim of reinforcement learning to enhance the accuracy the answers and ensure that they adhere to the expected format. The RI Dataset is introduced as SynSQI-Complex-5t in the next section. Notably, The input of the RL dataset does not include the CoT data of the original SynSQL-2.5M.
3

---

2.3 Training
2.3.1 Supervised Fine-Tuning
In this study, conduct SFT on the Owen225-Coder77B-Innttttt model to enhance the model's capacity for instruction adherence and generation within the NL2SQL domain. We investigate two distinct strategies for SFT cold start training. The first one employs raw instructions focusing exclu- sively on SQL generation. We leverage the existing OmniSQL-7B [22] checkpoint for the reference. The second strategy utilizes full fine-tuning and reasoning generation instructions promoting the development of compliant thought processes alongside final answers.
2.3.2 Reinforcement Training
In the reinforcement learning phase, we employ the Group Relative Policy Optimization (GRPO) algorithm to enhance our training protocol, which obviates the need for the value model, operates with less memory requirements, and facilitates a clear definition of reward targets, rendering an optimal choice for the effective optimization of the NL2SQL policy model [23].
For each natural language question aligned with its corresponding database schema, the policy model generates a set of G SQL candidates {01, O2..., OG) from the old policy Told, which are meticulously evaluated using composite reward function that assigns specific reward scores. By concentrating on the relative performance of the SQL candidates within the group, GRPO adeptly calculates the rewards for each output, thereby guiding the policy update in accordance with our established objectives.
(GRPO(0) = -Bym
G min (1 A,, clip (riado, - e, 1, + ()) - ( (TellTee))
(I)
where prattin [V represents the importance sampling ratio that quantifies the relative likeli-
(V)
hood of generating output oi under the new policy compared to Wold' A; represents the group- relative advantage for each output; the clipping operator, hyperparameter and control the update step and divergence regularization; represents the reference policy.
2.3.3 Reward Function Design
When training NL2SQL reward model using reinforcement learning. we utilize a progressive feedback mechanism that consists of four types of rewards: Format Reward, Execution Reward, Result Reward, and Length Reward. This layered approach enhances the model's learning by providing detailed feedback at various stages.
Format Reward. We encourage the model to enclose the NL2SQL reasoning process within <think>. <think>...</thinn </tt/ikkk>>>>>>>>> tags and to present the final answer enclosed within <answer>... </ anaswer>> tags. To achieve more standardized format for SQL queries, essential that all SQL statements be contained within 'sql... result in their format as erroneous. The structure of the format reward function is delineated as follows:
tags; failure to do so will
if format is correct S, 3 1-1, if format is incorrect
(1.
(2)
Execution Reward. Execution rewards are designed to evaluate the syntactic correctness of SQL candidates, preventing the model from generating messy, unexecutable responses. When the SQL candidate fails to execute correctly, the model will not receive all subsequent rewards. In addition, we limit the execution time to prevent the model from tending to generate too complex SQL. for high rewards.

---

SQL. candidate is executable
S. O, format incorrect
(3)
2, if SQL candidate is not executable
Result Reward. The accuracy of query results an important criterion in the evaluation of SQL candidates. We prioritize the Result Reward key component of the reward mechanism, aimed at motivating the model to generate SQL. candidates that aligns with the real intention of the user. To evaluate the correctness of SQL candidate query results and the associated feedback, utilize Execution Accuracy (EX). In cases of incorrect results, we impose stringent penalties to guide the model its subsequent reasoning.
3, if query result is correct S,
0, format incorrect or SQL candidate not executable
3, query result is incorrect
Length Reward. We apply length reward mechanism incentivize the model to produce more comprehensive reasoning process. It is divided into two components: The first component allocates half of the reward based on the proportional relationship between total length of the answer and the maximum length of response; The second component computes the remaining half of the reward based on the ratio of the SQL. candidate length within the <answer>, which aims to mitigate the occurrence of superfluous explanations in the response. When the response exceeds the maximum length, penalized feedback is given to the model.
0.5 Su + Sal,
query result correct and lenresponse MAX LENGTH
S =
0.5 + Sal,
query result correct and lenresponse MAX LENGTH other cases
(5)
0,
where Su = (lenthink + lenonswer)
MAX LENGTH and Sat = lenaal lenanswer.
2.4 SQL Candidates Selection
In order select the most appropriate SQL in the reasoning process, the model generates several SQL candidates and their thought processes for problem. We execute all SQL candidates and select the SQL with the highest score the final answer based self-consistency voting. Notably, the reasoning response of SQL-RI comprises an observable process of thinking and interpreting, making the results easier for the user understand.
3 Experiments
3.1 Setup
Evaluation Benchmark. We evaluated the proposed SQL-R1 and related NL2SQL models on two benchmarks, Spider [24] and BIRD [25]. Spider comprises 10,181 questions paired with 5,693 complex SQL queries from 200 databases and 138 domains. BIRD comprises 12,751 NL2SQL pairs encompassing 95 databases from 37 specialized domains.
For fair comparisons, we follow the standard evaluation metric previous works. We use Execution Accuracy (EX) the evaluation metric on Spider and BIRD benchmark. EX serves to estimate the proportion of questions that produce consistent outcomes for both the given query and its corresponding basic fact query across all query requests.
Metric.
Implementation Settings. Currently, SQL-RI is mainly built on Owen2.5-Codle series models [26]. For the SFT training, we set the learning rate as 5e-5; batch size as 1. For the RL training, set the

---

Table 1: Execution accuracy (%) of different NL2SQL methods on Spider and BIRD benchmark.
Candidate Selection
Spider (Dev)
Spider (Test)
BIRD
NL2SQL Method
Base Model
(Dev)
CodeS [14]
CodeS-15B
84.9
79.4
57.0
DTS-SQL [13]
Deepseck-Coder-7B
85.5
84.4
55.8
CHESS [7]
BoosseckCCodr333BB
87.2
61.5
Alpha-SQL. [29]
1wen2.5-Coder-77
Ceff-Consistency
84.0
66.8
SQL-o1 [30]
Swen2.5-Coder-77
Seff-Consistency
84.7
85.1
66.7
OmniSQL [22]
7wen2.5-Coder--7B
Self-Consistency
85.5
88.9
66.1
DeepRetrieval [31]
Swen2.5-Coders.
76.1
56.0
Reasoning- SSRonnnng-SLLii [32]
Qwen2.5-Coder-14B
Self-Consistency
81.4
65.3
C3-SQL [10]
GPT-3.5-Turbo
Self-Consistency
82.0
82.3
DIN-SQL [8]
GPT-4
82.8
85.3
DAIL-SQL [16]
GPT-4
Self-Consistency
83.6
86.2
54.8
MAC-SQL [9]
GPT-4
Sol--oonsistency
86.8
82.8
59.4
SuperSQL [33]
GPT-4
Self-Consisteney
84.0
87.0
58.5
MCTS-SQL [34]
GPT-4o
88.7
86.6
69.4
OpenSearch-SQLLEE [35]
GPT-4o
Self-Consistnney
87.1
69.3
CHASE-SQL [36]
Gemimi-1.5-Pro
87.6
73.0
SQL-R1 (Ours)
Qwen2.5-Coder-3B
Self-Consistency
78.1
78.9
54.6
SQL-R1 (Ours)
Qwen2.5-Coder-7B
Self-Consistency
87.6
88.7
66.6
SQL-R1 (Ours)
Qwen2.5-Coder-144
Celf-Consistency
86.7
88.1
67.1
learning rate as 3e-7, rollout actor model as 8; max response length as 2048. For inference, we set the count of SQL candidates 8 and the temperature 0.8.
For all NL2SQL data samples in the dataset, we first convert them into suitable input-output sequence pairs for training. Specifically, the input sequence includes natural language questions and related database schemas. Inspired by previous research [7, 22, 27, 28], the database schema was formatted CREATE TABLE statement with supplementary annotations including column attribute descrip- tions and representative values. Currently, annotations of representative values will not be added during the training phase for the time being to enhance the model's exploration ability during the reinforcement learning phase.
Environment. All experiments conducted in this study are performed on a server operating under the Ubuntu 20.04 Linux distribution. This server is equipped with Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60 GHz CPU, and complemented by 512 GB system memory. The environment for training open-source LLMSs comprises configuration of 8 GPUs, each possessing 80 GB of memory and delivering performance capacity of 312 TFLOPS when utilizing BF16 precision.
3.2 Main Results
Performance on Main Benchmarks. The results presented in Table underscore the performance of SQL-RI across various foundational models. Specifically, when trained the Twee2.5-Coder- 3B, SQL-R1 achieved an execution accuracy of 78.1 % on the Spider development dataset, 78.9% on the Spider test dataset, and 54.6% on the BIRD development dataset, demonstrating robust performance even with a smaller base model. Moreover, SQL-RI exhibits a marked enhancement accuracy when utilized with larger models; for instance, the Qwen2.5-Coder-77 model yielded accuracies of 87.6%, 78,7% and 63.1% across the same Spider development, Spider test, and BIRD development datasets, respectively. The deployment of the even larger Owen2.5-Codee. 14B model further affirmed SQL-RI'S capabilities, achieving high accuracy rates of 86.7%, 88. 1,, and 67.1% on these datasets. comparison other solutions leveraging closed-source models, such as GPT-4 and GPT--o,, SQL-R1 demonstrates competitive and often superior performance. Notably, In comparison contemporaneous exploration of reasoning- NI.2SQL. (e.g., DeepRetrieval [31] and Reasoning-SQU [32]), SQL-RI surpasses them the Spider-Dev and BIRD-Dev datasets. This

---

Table 2: Execution accuracy (%) on Spider-DK, Spider- Spider-Realistic benchmark.
NL2SQL Method
Base Model
Spider-DK
Spider-Syn
Spider-Realistic
SENSE [37]
CodeLlama-7B
77.9
72.6
82.7
ROUTE [38]
Llama3-81
74.6
77.4
80.9
SQL-ol [30]
Llama3-8B
78.7
72.6
82.7
OmniSQL [22]
Qwen2.5-Coders
77.8
69.6
78.0
SQL-Pal.M [39]
PaI.M-2
67.5
70.9
77.4
PURPLE [40]
GPT-4
75.3
74.0
79.9
SQL-R1 (Ours)
Owen2.5-Coder-3B
70.5
66.4
71.5
SQL-R1 (Ours)
Qwen2.5-Coder-7B
78.1
76.7
83.3
SQL-R1 (Ours)
Qwen2.5-Coder-14.
79.3
78.5
86.2
Table 3: Execution accuracy (%) of different complexity levels on BIRD-Dev dataset.
NL,2QQL Method
Base Model
Simple
Moderate
Challenging
CodeS [14]
Codes-15B
65.8
48.8
42.4
58.5
DAIL-SQL [16]
GPT-
63.0
45.6
43.1
55.9
SuperSQL [33]
GPT-4
66.9
46.5
43.8
58.5
SQL-R1 (Ours)
Qwen2.5-Cnder-7B
72.1
60.8
51.0
66.6
SQL-R1 (Ours)
Qwen2.5-Coder-14B
72.4
59.7
56.5
67.1
performance highlights the efficacy of our proposed approach in utilizing diverse base models to attain state-of-the-art results on complex NL2SQL reasoning tasks.
Table 2 demonstrates the comparison of execution accuracy on Spider-DK, Spider-Syn and Spider- Realistic dataset. Notably, SQL-RI exhibits superior performance relative to above NL2SQL solu- tions, which further prove the generalization and robustness of under different database and query requirements. Additional experimental results on other NL.2QQL. benchmarks (e.g., Spider2.0) can be found in Table 6 and Section B.
Complexity Analysis. We performed a statistical analysis of accuracy rates across different dif- ficulty levels based on the BIRD-Dev dataset. The results in Table demonstrate that SQL-RI significantly outperforms the baseline across all three subsets: Simple, Moderate, and Challeng- ing, indicating its robust capability reasoning and generation for various SQL generation tasks.
When we scaled SQL-R1 from 7B to 14B parameters, the accuracy rates for Simple and Moderate levels experienced minimal changes just 0.3% and decrease of 1. 1.1%, respectively. However, noteworthy improvement was observed in the Challenging category, where accuracy increased from 51.0% 56.5%, marking gain of 5.5 percentage points. This finding suggests that enhancing model capacity primarily addresses the generalization challenges associated with complex queries. Moreover, aligns with existing research that indicates larger models are better at capturing long- range dependencies, particularly in scenarios involving multiple table joins, nested subqueries, or complex aggregations, highlighting the importance SQL-RI's size in improving performance on sophisticated SQL generation tasks.
Insights of Performance and Model Scale Trade-offs. As illustrated in Figure 2, we investigated the relationship between performance and model size utilizing on BIRD development dataset. The comparative analysis encompasses various model types, including NL2SQL models, reasoning LLMs and general LLMs. For GPT-4, GPT-4o. GPT--4-mini and Demni-115-PP5 we refer the parametric description of [22, 29, 41]. The findings demonstrate that when utilizing the 7B model as a foundational model, SQL-RI attains accuracy levels that surpass those larger-scale models, particularly. This underscores the efficacy of the proposed model in optimizing the performance of NL.2QQ while ensuring that cost efficiency maintained. Additionally, Section provides some detailed results of different base models.

---

75
CHASE-SOL Senini-1..-PPoo
SQL-A1 (140)
SQL-R1 (78)
Execution Accuracy
65
QwenZ, G-Coder-328
Gemind-1 S-Pro
Deeoseok-V3
SPT-4
Quen2 S-Coder-78
SQL-R1 (38)
Codes
GPT-4o-adn1
Deepseeli-R
Qaen2. 5-Coder-30
reasenirg Rodels
Gececal Rodels
10
59
100
200
568
1,
3,888
Model Size (B)
Figure 2: Performance and model scale on the BIRD-Dev dataset.
Table 4: Execution accuracy (%) of models with different cold start strategy.
The Reasoning
Instruction column is applied represents the instruction applied SFT process.
Reasoning Instruction
Spider (Dev)
Spider (Test)
BIRD
Model
SFT Data
(Dev)
Qwen2.5-Coder-7B
77.4 17.4
79.4
58.2
Sween.55Coderr-77
SynSQL-200K
82.7
83.3
57.0
Owen2.5-Coder. 14B
X
87.0
88.0
66.1
OmniSQL-7B [22]
SynSQL-2.5M
85.5
88.9
66.1
OmniSQL-14B [22]
SynSQL-2.5M
X
86.2
88.3
65.9
SQL-RI Qwen2.5-Coder-77
X
84.5
86.1
63.1
SQL-R1 Qwen2.5-Coder-7B
SynSQL-200K
V
84.7
86.4
59.2
SQL-RI + Qwen2.5-Coder-1ke
86.7
88.1
67.1
SQL-RI + OmniSQL--BB
SynSQL-22.5M
X
87.6
88.7
66.6
SQL-RI OmniSQL-14B
SynSQL-2.5M
X
86.4
87.6
66.6
Case Study. To explore the impact of RL training on the actual NL2SQL reasoning, we select some examples for analysis on the BIRD development dataset. As illustrated in Figure to Figure 8, the model demonstrates enhanced reasoning capabilities following RL training. In the handling of more challenging samples, the model exhibits a discemnile top-down cognitive strategy in the reasoning of generating SQL queries. This observation substantiates that reinforcement learning can further improve the reasoning ability of the model NL22QQ tasks.
Above all, for Q1, SQL-RI achieves superior performance on Spider and BIRD benchmarks, demon- strating the effectiveness of reinforcement learning optimizing NL2SQL reasoning and outperform- ing models based on closed-source LLMs. This confirms the feasibility of designing an RL-based algorithm for NL2SQL tasks.
3.3 Analysis SFT Cold Start
In this experiment, conducted comprehensive evaluation different baselines: the base model without any post-training, the model utilizing the conventional format for SFT (e.g., OmniSQL-7B OmniSQL-14B), and the model employing reasoning instruction format for SFT.
Based on the findings demonstrated in Table 4, several implications can be discerned: Firstly, the quantity of synthesized data significantly influences the performance and generalization capabilities of SFT, as well as the effectiveness of subsequent RL training. For instance, the SQL-RI 7B model, which was initiated using SynSQL-2.55M, demonstrates superior performance compared to the model that trained with SynSQL-200K. Moreover, the provenance the training data also plays a critical role in determining the performance of SFT. Notably, models that rely synthetic data for SFT

---

Table 5: Ablation study of reward compo-
Table 6: Execution accuracy (%) of different
nents on BIRD-Dev dataset.
models on Spider2.0 SQLite subset.
Reward Function
Accuracy (%)
Model
Accuracy (%)
58.2
Qwen2.5-Coder:
2.2
GPT-4o
15.6
Sf+ S. S, Sj
63.1
Deepseek-V V3
15.6
-w/o yy (Format Score)
60.4 (L 2.7)
OmniSQI.-7B
10.4
w/o Se (Execution Score)
60.7 () 2.4)
w/o S, (Result Score)
62.4 (L 0.7)
SQL-R1-7B
20.0
w/o St (Length Score)
61.0 (L 2.1)
exhibited only marginal gains when evaluated on the BIRD-Dev dataset. Specifically, the SFT methodology utilizing synthetic data did not yield an improvement in accuracy for the 7B model, even when the inference format adhered to the established instructions and utilized a training set of 200K instances. Additionally, the SFT training results for the 14B models in both Reasoning- and OmniSQL underscore the importance of using a training set derived from a consistent source for SFT.
Thus, response to Q2, these findings imply that SFT cold-start training is not universally essential for RL-based NL2SQL models. Its effectiveness is contingent upon the origin and volume of the training data. Future investigations should focus on delineating the optimal conditions that enable cold-start training to confer significant benefits, particularly with respect to data source and volume.
In addressing Q3, experimental results corroborate the assertion that synthetic data engineering plays a pivotal role in augmenting the reasoning capabilities of NL2SQL models, especially when utilized in conjunction with RL. The synergistic effect of synthetic data and RL training reveals marked enhancements in model performance. For instance, SQL-RI, when trained on Sanns--Coople--ai surpasses the performance of both the 7B and 14B baseline models. This finding elucidates the substantial potential inherent in synthetic data engineering to enhance model capabilities. Ongoing research endeavors will persist in exploring and refining strategies for the integration of synthetic data into the training regimen, with the aim of further advancing model performance and generalization.
3.4 Ablation Study of Reward Components
We conducted an ablation experiment the BIRD development dataset to verify the proposed reinforcement learning reward mechanism's 's effectiveness. The experiment sequentially removed individual reward components from the comprehensive reward function while maintaining the parameter settings established in Section 3.1. As presented in Table 5, the result demonstrates that omitting any reward component from the original reward function adversely impacts reasoning performance. This underscores the critical importance of execution feedback and result reward the model training process. Section B.3 and B.4 provide more details of the ablation study.
Related Works
NL2SQL Methods. Recent advancements in large language models have significantly propelled the development of NL22QL translation techniques [1, 2, 42]. Current research focuses on optimizing various components of the NL.2SQL. workflow, including pre-processing modules like schema linking [5], translation strategies [43-49], and post-processing modules like SQL correction [8, 9, 12] and self-consistency for SQL selection [10, 16, 22]. However, existing NL2SQL models primarily rely on supervised fine-tuning, which may exhibit instability in domain adaptation and new scenario fitting, as they heavily depend on the knowledge of database schema and structure from the training data [13, 15, 50]. Additionally, the lack of interpretability models limits their application in high-risk scenarios or complex database requirements [51]. To address these limitations, we explore the application of reinforcement learning to enhance the reasoning and generalization capabilities of NL.2QQI. models. By dynamically adjusting the model's decision-making strategy through interaction with environment, we aim to improve its performance in complex database scenarios and ensure better domain adaptation and interpretability.
the reasoning logic of these NL2SQL

---

Reinforcement Learning for LLM Reasoning. Recent research on reinforcement learning for LLMs has increasingly concentrated on enhancing reasoning capabilities and optimizing interaction with the external environment to improve proficiency in complex, multi-step reasoning tasks [52- 54]. In recent months, DeepSeek-RP [17] have illustrated the effectiveness group relative policy optimization (GRPO), novel and efficient reinforcement algorithm in cultivating robust reasoning behaviors in LLMs. By focusing exclusively on the correctness of the final answer, GRPO facilitates the internalization of intermediate reasoning steps without the necessity of explicit supervision, achieving notable success across various domains, including mathematics [55], finance [18], program- ming [56], user interface [57, 588] and vision tasks [59]. Concurrently, some studies have explored integrating external tools, such as retrieval [31] and search engines [19]. into reinforcement learning frameworks for LLM reasoning, primarily focusing training models to effectively employ single, general-purpost tool to support specific reasoning chains. light of these advancements, we aim extend L.LM reasoning capabilities the NI.2SQI. task by adopting reinforcement learning approach that dynamically adjusts the model's decision-making strategy through interaction with the environment, thereby enhancing its ability to manage complex semantics and improve generalization and domain adaptation capabilities.
Limitations
At present, this study still has the following limitations:
Supported Database Dialect. The current iteration of SQL-RI has primarily been trained and evaluated on datasets that utilize the SQLite dialect. However, real-world databases often encompass various database dialects (e.g.. Snowflake and DuckDB). Investigating and enhancing the generaliza- tion capabilities of NL,2QQ models across these diverse database dialects presents a significant and valuable challenge for future research directions.
Experiment. We conduct experiments on Qwen2.5-Coder series models. However, due the rapid advancements in this field, our evaluation is limited to the capabilities of these representative LLMs and we can not cover broader range of new LLMs available currently (e.g., Llama4). We provide an initial test result of more models on Section B. and we will keep extending our work on many more base LLMs.
Conclusion
In this work, propose SQL-R1, novel NL.2QQL reasoning model trained via reinforcement learning (RL), addressing key challenges in semantic understanding, reasoning, and generalization for complex database scenarios. By integrating dynamic reward mechanisms, cold start strategies, and sustainable data engincering, SQL-RI achieves state-of-the-art performance on benchmark datasets (88.6% accuracy on Spider-Test and 67.1% 1% BIRD) while generating interpretable reasoning traces. Our study demonstrates the effectiveness of RL in enhancing model generalization and reducing domain adaptation costs, providing transparency for high-risk applications. Future work will focus on improving model interpretability. expanding multi-table joint capabilities, and exploring synthetic data generation support scalable training. This research advances the practical usability of NL2SQL systems by bridging the gap between reasoning capability and real- world applicability.
10

---

References
[1] Xinyu Liu, Shuyu Shen, Boyan Li, Peixian Ma, Runzhi Jiang, Yuyu Luo, Yuxin Zhang, Ju Fan, Guoliang Li, and Nan Tang. A survey of NL.2QL with large language models: Where we, and where are we going? CoRR, abs/2408.05109 2024.
[2] Zijin Hong. Zheng Yuan, Qinggang Zhang. Hao Chen, Junnan Dong, Feiran Huang, and Xiao Huang. Next-generation database interfaces: A survey of Ilm-based text-to-sql. arXiv preprint arXiv2240.00842 2024.
[3] Yuyu Luo, Nan Tang, Guoliang Li, Wenbo Li, Tianyu Zhao, and Xiang Yu. Deepeye: A data science system for monitoring and exploring COVID-19 data. IEEE Data Eng. Bull., 43(2):121-132, 2020.
[4] Yuyu Luo, Xuedi Qin, Chengliang Chai, Nan Tang, Guoliang Li, and Wenbo Li. Steerable self-driving data visualization. IEEE Trans. Knowl, Data Eng., 34(1):475-490, 2022.
[5] Haoyang Li, Jing Zhang, Cuiping Li, and Hong Chen. Resdsql: Decoupling schema linking and skeleton parsing for text-to-sql. In AAAI, 2023.
[6] Zhenbiao Cao. Yuanlei Zheng, Zhihao Fan, Xiaojin Zhang, Wei Chen, and Xiang Bai. Rsl-sql: Robust schema linking in text-to-sql generation. arXiv preprint arXiv:2411.0007. 2024.
[7] Shayan Talaci, Mohammadreza Pourreza, Yu-Chen Chang, Azalia Mirhoseini, and Amin Saberi. Chess: Contextual harnessing for efficient sql synthesis. arXiv preprint arXiv:2405.16755, 2024.
[8] Mohammadreza Pourreza and Davood Rafiii. Din-sql: Decomposed in-context learning of text-to-sql with self-correction. arXiv preprint arXiv:2304./ /015, 2023.
[9] Bing Wang, Changyu Ren, Jian Yang, Xinnian Liang, Jiaqi Bai, Linzheng Chai, Zhao Yan, Qian- Wen Zhang, Di Yin, Xing Sun, and Zhoujun Li. Mac-sql: A multi-agent collaborative framework for text-to-sql, 2024.
[10] Xuemei Dong, Chao Zhang, Yuhang Ge, Yuren Mao, Yunjun Gao, Jinshu Lin, Dongfang Lou, ct al. C3: Zero-shot text-to-sql with chatgpt. arXiv preprint arXiv:2307.07706, 2023.
[11] Peixian Ma, Boyan Li, Runzhi Jiang, Ju Fan, Nan Tang, and Yuyu Luo. A plug-and-plas natural language rewriter for natural language to sql. arXiv preprint 12Xv:22412./7068. 2024.
[12] Xinyu Liu, Shuyu Shen, Boyan Li. Nan Tang, and Yuyu Luo. N12sql-bugs: A benchmark for detecting semantic errors in n12sql translation. arXiv preprint arXiv:2503. /1984, 2025.
[13] Mohammadreza Pourreza and Davood Rafici. Dts-sql: Decomposed text-to-sql with small large language models. arXiv preprint 402.11240..01117, 2024.
[14] Haoyang Li, Jing Zhang, Hanbing Liu, Ju Fan, Xiaokang Zhang, Jun Zhu, Renjie Wei, Hongyan Pan, Cuiping Li, and Hong Chen. Codes: Towards building open-source language models for text-to-sql. Proceedings of the ACM on Management of Data, 2(3): 2024.
[15] Han Fu, Chang Liu, Bin Wu, Feifei Li, Jian Tan, and Jianling Sun. Catsql: Towards real world natural language to sqi applications. Proceedings of the VLDB Endowment, 16(6): 1534-1547, 2023.
[16] Dawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun, Yichen Qian, Bolin Ding, and Jingren Zhou. Text-to-sql empowered by large language models: A benchmark evaluation. CoRR, abs/2308.1553 2023.
[17] Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, et al. Deepscek-rl: Incentivizing reasoning capability in 1lms via reinforcement learning. arXiv preprint arXiv:2501.12948, 2025.
[18] Zhaowei Liu, Xin Guo, Fangqi Lou, Lingfeng Zeng. Jinyi Niu, Zixuan Wang, Jiajie Xu, Weige Cai, Ziwei Yang, Xueqian Zhao, et Fin-rl: A large language model for financial reasoning through reinforcement learning, arXiv preprint 2rXiv:2503.162522 2025.

---

[19] Bowen Jin, Hansi Zeng, Zhenrui Yue, Dong Wang, Hamed Zamani, and Jiawei Han. Search-rl: Training Ilms reason and leverage search engines with reinforcement learning. arXiv preprint 1xXi:2503.095100 2025.
[20] Tian Xie, Zitian Gao, Qingnan Ren, Haoming Luo, Yuqian Hong, Bryan Dai, Joey Zhou, Kai Qiu, Zhirong Wu, and Chong Luo. Logic-rl: Unleashing IIm reasoning with rule-based reinforcement learning. arXiv preprint urXiv:2502. 14768, 2025.
[21] Hugging Face. Open rl: A fully open reproduction of deepseek-rl, January 2025.
[22] Haoyang Li, Shang Wu, Xiaokang Zhang, Xinmei Huang. Jing Zhang, Fuxin Jiang, Shuai Wang. Tieying Zhang, Jianjun Chen, Rui Shi, et al. Omnisql: Synthesizing high-quality text-to-sql data at scale. arXiv preprint arXiv:2503.02240, 2025.
[23] Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Y Wu, et al. Deepseckmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint MxXiv:2402.033000 2024.
[24] Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang. Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, Zilin Zhang, and Dragomir Radev. Spider: A large-scale human- labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, 2018. Association for Computational Linguistics.
[25] Jinyang Li, Binyuan Hui, Ge Qu, Binhua Li, Jiaxi Yang. Bowen Li, Bailin Wang, Bowen Qin, Ruiying Geng, Nan Huo, Xuanhe Zhou, Chenhao Ma, Guoliang Li, Kevin C. C. Chang, Fei Huang, Reynold Cheng, and Yongbin Li. Can I1m already serve as a database interface? a big bench for large-scale database grounded text-to-sqls, 2023.
[26] Binyuan Hui, Jian Yang. Zeyu Cui, Jiaxi Yang. Dayiheng Liu, Lei Zhang, Tianyu Liu, Ji- ajun Zhang, Bowen Yu, Keming Lu, et al. Qwen2. 5-coder technical report. arXiv preprint 2tl::2409.12886 2024.
[27] Jiaxi Yang. Binyuan Hui, Min Yang, Jian Yang, Junyang Lin, and Chang Zhou. Synthesizing text-to-sql data from weak and strong Ilms. arXiv preprint urXiv:2408.03255 2024.
[28] Nitarshan Rajkumar, Raymond Li, and Dzmitry Bahdanau. Evaluating the text-to-sql capabilities of large language models. arXiv preprint arXiv:2204.0042 0000220400008,, 2022.
[29] Masahiro Matsui, Takuto Sugisaki, Kensaku Okada, and Noboru Koshizuka. Alphasql: Open source software tool for automatic dependency resolution, parallelization and validation for sql and data. In 2022 IEEE 38th International Conference on Data Engineering Workshops (ICDEW), pages 38-45 IEEE, 2022.
[30] Shuai Lyu, Haoran Luo, Zhonghong Ou, Yifan Zhu, Xiaoran Shang, Yang Qin, and Meina Song. Sql-ol: A self-reward heuristic dynamic search method for text-to-sql. arXiv preprint arXiv:2502. 11411 2025.
[31] Pengcheng Jiang, Jiacheng Lin, Lang Cao, Runchu Tian, SeongKu Kang, Zifeng Wang, Jimeng Sun, and Jiawei Han. Deepretrieval: Hacking real search engines and retrievers with large language models via reinforcement learning, arXiv preprini 2rXiv:2503.00223, 2025.
[32] Mohammadreza Pourreza, Shayan Talaei, Ruoxi Sun, Xingchen Wan, Hailong Li, Azalia Mirhoseini, Amin Saberi, Sercan Arik, et al. Reasoning-sql: Reinforcement learning with sqi tailored partial rewards for reasoning-cnhann enhanced text-to-sql. arXiv preprint 27X11:2503.23157, 2025.
[33] Boyan Li, Yuyu Luo, Chengliang Chai, Guoliang Li, and Nan Tang. The dawn of natural language to sql: are we fully ready? arXiv preprint N.Xi::240600/6666 2024.
[34] Shuozhi Yuan, Liming Chen, Miaomiao Yuan, Jin Zhao, Haoran Peng, and Wenming Guo. Mets-sql: An effective framework for text-to-sql with monte carlo tree search. arXiv preprint 2xXiv:2501.16607.200 2025.
12

---

[35] Xiangjin Xie, Guangwei Xu, Lingyan Zhao, and Ruijie Guo. Opensearch-sql: Enhancing text-to-sql with dynamic sho-shot and consistency alignment. arXiv preprint 1rXiv:2502.14913 2025.
[36] Mohammadreza Pourreza, Hailong Li, Ruoxi Sun, Yeounoh Chung, Shayan Talaei, Gaurav Tar- lok Kakkar, Yu Gan, Amin Saberi, Fatma Ozcan, and Sercan O Arik. Chase-sql: Multi-path reasoning and preference optimized candidate selection in text-to-sql. arXiv preprint arXiv:2410..m 14000:44 2024.
[37] Jiaxi Yang. Binyuan Hui, Min Yang, Jian Yang, Junyang Lin, and Chang Zhou. Synthesizing text-to-sql data from weak and strong lims. arXiv preprint arXiv:2408.032: 2024.
[38] Yang Qin, Chao Chen, Zhihang Fu, Ze Chen, Dezhong Peng. Peng Hu, and Jieping Ye. Route: Robust multitask tuning and collaboration for text-to-sql. arXiv preprint arXiv:2412.10138 2024.
[39] Ruoxi Sun, Sercan Ô Arik, Alex Muzio, Lesly Miculicich, Satya Gundabathula, Pengcheng Yin, Hanjun Dai, Hootan Nakhost, Rajarishi Sinha, Zifeng Wang, et al. Sql-palm: Improved large language model adaptation for text-to-sql (extended). arXiv preprint wrxiv:2306000733 2023.
[40] Tonghui Ren, Yuankai Fan, Zhenying He, Ren Huang. Jiaqi Dai, Can Huang, Yinan Jing, Kai Zhang. Yifan Yang, and X Sean Wang, Purple: Making large language model better sqi writer. In 2024 IEEE 40th International Conference on Data Engineering (ICDE), pages 15-28. IEEE, 2024.
[41] Asma Ben Abacha, Wen-wai Yim, Yujuan Fu, Zhaoyi Sun, Meliha Yetisgen, Fei Xia, and Thomas Lin. Medee: A benchmark for medical error detection and correction in clinical notes. arXiv preprint arXiv:2412. 2024.
[42] George Katsogiamiss for text-to-sql. The VLDB Journal, 32(())9055 90668,999--660 2023.
and Georgia Koutrika. A survey on deep learning approaches
[43] Zihui Gu, Ju Fan, Nan Tang, Lei Cao, Bowen Jia, Sam Madden, and Xiaoyong Du. Few-shot text-to-sql translation using structure and content prompt learning. Proceedings of the ACM on Management of Data, 12))1-28, 2023.
[44] Zihui Gu, Ju Fan, Nan Tang, Songyue Zhang, Yuxin Zhang, Zui Chen, Lei Cao, Guoliang Li, Sam Madden, and Xiaoyong Du. Interleaving pre-trained language models and large language models for zero-shot n12sql generation. corr abs/2306.0883 (2023). arXiv preprint arXiv::306. 08891, 2023.
[45] Yujian Gan, Xinyun Chen, Jinxia Xie, Matthew Purver, John R. Woodward. John Drake, and Qiaofu Zhang, Natural SQL: Making SQL easier to infer from natural language specifications. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 2030-2042, Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics.
[46] Tomer Wolfson, Mor Geva, Ankit Gupta, Matt Gardner, Yoav Goldberg, Daniel Deutch, and Jonathan Berant. Break it down: A question understanding benchmark. Transactions of the Associa- tion for Computational Linguistics, 8:183-198. 2020.
[47] Ben Eyal, Amir Bachar, Ophir Haroche, Moran Mahabi, and Michael Elhadad. Semantic decomposition of question and sqi for text-to-sql parsing. arXiv preprint arXiv:2310.13557 2023.
[48] Chang Gao, Bowen Li, Wenxuan Zhang, Wai Lam, Binhua Li, Fei Huang, Luo Si, and Yongbin Li. Towards generalizable and robust text-to-sql parsing, arXiv preprint arXiv:2210. 12674, 2022.
[49] Zhishuai Li, Xiang Wang, Jingjing Zhao. Sun Yang. Guoqing Du, Xiaoru Hu, Bin Zhang, Yuxiao Ye, Ziyue Li, Rui Zhao, et al. Pet-sql: A prompt-cnhanced two-stage text-to-sql framework with cross-consistency. arXiv preprint arXiv:2403.09732 2024.
[50] Bailin Wang, Richard Shin, Xiaodong Liu, Oleksandr Polozov, and Matthew Richardson. Rat-sql: Relation-aware schema encoding and linking for text-to-sql parsers. arXiv preprint 1rXiv:1911.04900 2019.
[51] Fangyu Lei, Jixuan Chen, Yuxiao Ye, Ruisheng Cao, Dongchan Shin, Hongjin Su, Zhaoqing Suo, Hongcheng Gao, Wenjing Hu, Pengcheng Yin, et al. Spider 2.0: Evaluating language models on real-world enterprise text-to-sql workflows. arXiv preprint arXiv:2411.07766 2024.
13

---

[52] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoe V Le, Denny Zhou, et al. Chain-of thouughtt prompting elicits reasoning in large language models. Advances in neural information processing systems, 25:24824-248833 2022.
[53] Aske Plaat, Annie Wong, Suzan Verberne, Joost Broekens, Niki van Stein, and Thomas Back. Reasoning with large language models, survey. arXiv preprint arXiv:2407.11511 2024.
[54] Xialie Zhuang, Peixian Ma, Zhikai Jia, Shiwei Liu, and Zheng Cao. technical study into 0.5 b reasoning language models, 2025. URL https://arxiv. wtg/abs/2500.13400.
[55] Zhihong Shao. Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Y Wu, et al. Deepseekmath: Pushing the limits of mathematical reasoning open language models. arXiv preprint arXiv:2402.03300 2024.
[56] Zhenyu Pan and Han Liu. Metaspatial: Reinforcing 3d spatial reasoning in vlms for the metaverse. arXiv preprint arXiv:2503. / 18470, 2025.
[57] Zhengxi Lu, Yuxiang Chai, Yaxuan Guo, Xi Yin, Liang Liu, Hao Wang, Guanjing Xiong, and Hongsheng Li. Ui-rl: Enhancing action prediction of gui agents by reinforcement learning. arXiv preprint arXiv:2503..1660, 2025.
[58] Xiaobo Xia and Run Luo. Gui-rl: A generalist rl-style vision-language action model for gui agents. arXiv preprint arXiv:2504. 10458, 2025.
[59] Wenxuan Huang, Bohan Jia, Zijie Zhai, Shaosheng Cao, Zheyu Ye, Fei Zhao, Zhe Xu, Yao Hu, and Shaohui Lin. Vision-rl: Incentivizing reasoning capability in multimodal large language models. arXiv preprint arXiv:2503.06749, 2025.
[60] Yingqi Gao, Yifu Liu, Xiaoxia Li, Xiaorong Shi, Yin Zhu, Yiming Wang, Shiqi Li, Wei Li, Yuntao Hong, Zhiling Luo, et al. Xiyan-sql: multi-generator ensemble framework for text-to-sql. arXiv e-prints, pages arXiv-2411, 2024.
14

---

NeurIPS Paper Checklist
1. Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification:
The abstract and introduction section accurately reflect the paper's contribu- tions.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or
NA answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
is fine to include aspirational goals as motivation as long as is clear that these goals not attained by the paper.
2. Limitations
Question: Does the paper discuss the limitations the work performed by the authors?
Answer: [Yes]
Justification: Section discusses the limitations of the proposed work.
Guidelines:
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.
The authors are encouraged to create a separate "Limitations" section their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g.. independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution is low images are taken in low lighting. Or speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.
While the authors might fear that complete honesty about limitations might used by reviewers as grounds for rejection, worse outcome might be that reviewers discover limitations that aren't 't acknowledged judgment and recognize that individual actions in favor of transparency play impor- tant role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
the paper. The authors should use their best
3. Theory assumptions and proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
Answer: [Yes]
15

---

Justification: Section 2 and provide the full set of assumptions and a complete proof for each theoretical result.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated or referenced the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide short proof sketch provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental result reproducibility
Does the paper fully disclose all the information needed to reproduce the main ex- perimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Question:
Answer: [Yes]
Justification: Section 3.1 provide all the information, settings and params needed to repro- duce the main experimental results of the paper.
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is novel architecture, describing the architecture fully might suffice, or if the contribution a specific model and empirical evaluation, it may be necessary either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of large language model), releasing of a model checkpoint, or other means that appropriate to the research performed.
While NeurlPS does not require releasing code, the conference does require all submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) the contribution is primarily a new algorithm, the paper should make clear how reproduce that algorithm. (b) If the contribution is primarily new model architecture, the paper should describe the architecture clearly and fully.
(c) the contribution is a new model (e.g., a large language model), then there should either be way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome deseribe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should possible for other researchers to have some path to reproducing or verifying the results.
5. Open access to data and code
16

---

Does the paper provide open access to the data and code, with sufficient instruc- tions faithfully reproduce the main experimental results, as described in supplemental material?
Question:
Answer: [Yes]
Justification:
All codes will be published when they are ready and accepted.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurlPS code and data submission guidelines (https: :ttpps://niie /ttp///ipp.p.p/ cc/
publ / guides/ CodeSulmm s. onPol blyyy for more details.
While we encourage the release of code and data, we understand that this might not be possible, "No" is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https: /nips. cc/ ctt.ps.ccpubllc... heabbiccggiidss Cooeeeooeeeeeeeeooc Sumeeuubmmii. cessooPolllo ooyicyyyyyy....cc for more details.
The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible in supplemental material (appended to the paper) recommended, but including URLs to data and code permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (c.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: Section 3.1 and 10 specify all the training and test details. Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, or as supplemental material.
7. Experiment statistical significance
Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Answer: [Yes]
Justification: Section B.3 provides a ablation study of the number of SQL candidiates. Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi- dence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
17

---

The assumptions made should be given (e.g.. Normally distributed errors).
It should be clear whether the error bar is the standard deviation the standard error of the mean.
It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative emrr rates).
If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time of execution) needed reproduce the experiments?
Question:
Answer: [Yes]
Justification: Section 3.1 provides sufficient information on the computer resources.
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make into the paper).
9. Code ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https: hatt:://nuurippp http://cccccccccccccccccooooee
Answer: [Yes]
Justification:
The research conducted in the paper conform with the NeurIPS Code of Ethics.
Guidelines:
The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer No, they should explain the special circumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g.. if there is a special consid- eration due to laws or regulations their jurisdiction).
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [Yes]
Justification: Section introduces societal impacts the work
Guidelines:
The answer NA means that there no societal impact of the work performed.
If the authors answer NA or No, they should explain why their work has no societal impact why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
18

---

The conference expects that many papers will be foundational research and not tied particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.
If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition attacks, mechanisms for monitoring misuse, mechanisms to monitor how system learns from feedback over time, improving the efficiency and accessibility ML).
11. Safeguards
Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, scraped datasets)?
Question:
Answer: [NA]
Justification: The paper poses no such risks.
Guidelines:
The answer NA means that the paper poses no such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make best faith effort.
12. Licenses for existing assets
Question: Are the creators or original owners of assets (e.g.. code, data, models), used in the paper. properly credited and are the license and terms of use explicitly mentioned and properly respected?
Answer: [Yes]
Justification: The creators or original owners data and modelsused in the paper are properly credited. And the license and terms of use properly respected.
Guidelines:
The answer NA means that the paper does not use existing assets.
The authors should cite the original paper that produced the code package dataset.
The authors should state which version of the asset used and, if possible, include URL.
The name of the license (c.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.
assets are released, the license, copyright information, and terms of use the package should be provided. For popular datasets, paperswi thoode com/ dataaaaaaa asatss has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
19

---

If this information is not available online, the authors are encouraged to reach out to the asset's creators.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer: [NA]
Justification: The paper does not release new assets.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/mmoel as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent obtained from people whose asset is used.
At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.
14. Crowdsoureing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well details about compensation (if any)?
Answer: [NA]
Justification: The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information in the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included the main paper.
According the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional review board (IRB) approvals or equivalent for research with human subjects
Question:
Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [NA]
Justification:
The paper does not involve crowdsourcing nor research with human subjects
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and expect authors to adhere to the NeurlPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such the institution conducting the review.
16. Declaration of LLM usage
20

---

Question: Does the paper describe the usage of LLMs if it is important, original, or non-standard component of the core methods this research? Note that if the LLM used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigorousness, or originality of the research, declaration is not required.
Answer: [Yes]
Justification: Section describe the usage of LLMs.
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs any important, original, non-standard components.
Please refer to our LLM policy (https: : / /t///neerppppp//ee// Cocf/ereeeessss / 2025/ LLM) for what should or should not be described.
21

---

Appendix
A Detailed Case Study
Example for NL2SQL Reasoning No RL Training Category: Challenge
Question: Tally the toxicology element of the 4th atom each molecule that was carcinogenic.
Let's break down the question and the database schema step by step to generate the appropriate SQL query.
**Identffy the Relevant Tables and Columns:**
We need to identify the molecules that are carcinogenic (label '+').
We need to find the 4th atom of each molecule.
We need to determine the element of the 4th atom.
We need to tally the toxicology element.
2. ** Filter Molecules Carcinogenicity:**
We will use the 'molecule' table to filter molecules where 'label = '4"".
3. ** #*Find the 4th Atom of Each Molecule:**
We will use the 'atom' table and the 'connected" table to find the 4th atom. The 4th atom's 'atom_id' will be the 7th character of the 'atom_id' column (since 'atom_id" follows the pattern 'TR000_1"
4. **Determine the Element of the 4th Atom:
WWe will use the 'atom' table to get the 'element' of the 4th atom.
**Tally the Toxicology Element:*
We will use the 'element' column from the 'atom' table to tally the toxicology element.
** *Construct the SQL. Query:**
We will join the 'molecule', 'atom', 'connected', and 'atom' tables to get the required information.
Here is the SQL query that addresses the question: ''sql
SELECT a.element FROM molecule JOIN atom ON n.molecule_id a.molecule_id JOIN connected a ON a. atatom id c.atom_ WHERE m. label 14 AND a.atom id LIKE TROOO 4" GROUP BY a.element;
Explanation:
'SELECT a.element": Selects the element of the 4th atom.
'FROM molecule m Joins with the 'molecule" table to filter molecules by their label.
'JOIN atom ON m.molecule_ii. id a.molecule_dd:: id:: Joins with the 'atom' table get the atoms of each molecule.
'JOIN connected ON a.atom id c.atom_id id": Joins with the 'connected' table find the connections between atoms.
'WHERE m.label '+' AND a.ttom id LIKE 'TR000_4" 4" Filters the atoms to only include the 4th atom (" ('atom id' starting with 'TR00O_4"
"GROUP BY a.element': Groups the results by the element to tally the number of each element.
This query will provide the tally of the toxicology element of the 4th atom of each carcinogenic molecule.
Figure 3: Example for NL2SQL Reasoning No RL Training Challenge Sample
22

---

Example for NL2SQL Reasoning RL Training Category: Challenge
Tally the toxicology element of the 4th atom of each molecule that was carcinogenic.
Question:
<think>
To answer the given question, we need to follow these steps:
1. *#Identify the Molecules that are Carcinogenic*s; According to the question, molecules the 'molecule" table.
that are carcinogenic have label
2. **Identify the 4th Atom of Each Molecule**; The 4th atom is identified by the "atom id' where the substring of "atom id' starting from the 7th character and having a length of is *4".
**Retrieve the Element of the 4th Atom** Once we have identified the 4th atom, we need retrieve the element associated with it from the 'atom' table.
4. **Tally the Toxicology #: This step is not explicitly clear from the question, but seems to imply that we need count list the elements of the 4th atoms of the carcinogenic molecules. Let's break down the steps into SQL queries:
### Step I: Identify the Molecules that Carcinogenic s'sql
SELECT molecule_ic id FROM molecule WHERE label r+1;
#### Step Identify the 4th Atom of Each Molecule
To find the 4th atom, we need to filter the 'atom_id "oo where the substring starting from the 7th character and having length of is '4'. We can use the 'SUBSTR' function for this.
'ssql
SELECT atom_id FROM atom WHERE SUBSTR (atom_id, 7, 1) '4"
### Step 3: Retrieve the Element of the 4th Atom
We need to join the 'atom" table with the 'connected" table to find the 4th atom and then retrieve its element. ssql
SELECT atom. emennt FROM atomm JOIN connected ON atom at at.om id connected atom_id WHERE SUBSTR (atom. stto_iid, 7,
'
### Step Tally the Toxicology Element. To tally the toxicology element, need count or list the unique elements of the 4th atoms. We can use the 'GROUP BY clause to achieve this.
'ssll
SELECT atom. element FROM atom JOIN connected ON atom. atom connected. atom id WHERE SUBSTR (atom. atom id, 7, 1) '4'
GROUP BY atom. element:
### Combining All Steps: We need combine all the steps into single query that filters the carcinogenic molecules, identifies the 4th atom, retrieves its element, and tallies the unique elements.
'ssql
SELECT atom. element FROM atom JOIN connected ON atom. at id aeanecteddatoomm_... JOIN molecule ON wwc..mmoeeccl...ommm
molecule. www.uule.leccee..cmm id WHERE SUBSTR attom.atom 7, 1) /
AND molecule label + GROUP BY atom. element
</think>
<answer>
'ssll
SELECT atom. eomeeelemt FROM atom JOIN connected ON atom, atom_id connected. atom_id JOIN molecule ON atom atom.molecne mww.mmloeeleeeeeeo molecule mo molecule_id WHERE SUBSTR ratom.aton_i. 7, 1) = 14
AND molecule label 44 GROUP BY atom.element; /
</answer>
Figure 4: Example for NL.2QQL Reasgning RL Training Challenge Sample

---

Example for NL2SQL Reasoning No RL Training Category: Moderate
Question: What is the display name of the user who last edited the post" "Examples for Correlation does not mean causation"
teaching:
To determine the display name of the user who last edited the post with the title Examples for teaching: Correlation does not mean causation, we need follow these steps:
1. **Identify the relevant table**; The information about posts, including their titles and the user who last edited them, is stored in the 'posts" table. 2. ** **cate the correct post by title** We need to filter the posts to find the one with the title Examples for teaching: Correlation does not mean causation:
** Retriieve the last editor's display name** Once have identified the post, column to get the display name of the user who last
access the DistEEdiorrDsppayyNaea
edited the post.
Here the SQL query that accomplishes this:
'ssql
SELECT Last FROM posts WHERE Title
Examples for teaching: Correlation does not mean causation';
...
This query selects the "LassEdiiorDiigaaaaame from the 'posts" table where the "Title" matches the specified title.
Figure Example for NL.2QQL Reasoning No RL Training Moderate Sample
24

---

Example for NL2SQL Reasoning RL Training Category: Moderate
Question: What is the display name of the user who last edited the post "Examples for teaching: Correlation does not mean causation"
<think>
To answer this question, we need to find the display name of the user who last edited a specific post. Here are the steps to derive the SQL query:
1. **Identify the *ost"*: We start by identifying the post with the title Examples for teaching: Correlation does not mean causation: This information is available in the 'posts" table under the "Title" column.
**Find the Last Editor*#; The question asks for the who last edited the post, which is referred to by "LaastdditoUUserdd" in the "posts" table. This LlastEdiiorUsseble is foreign key referencing the 'Id' column in the "users" table.
**Get the Display *; Once we have the 'LastEditorUserrld', we need to find the corresponding display name of the user. This information is available in the 'users' table under the 'DisplaNName" column.
4. =*Fommulate the Query**
**Select the Required Column**; We need to select the 'DisplayName" from the 'users" table.
**Join the T We need to join the 'posts" table (aliased as 'TI') with the 'users' table (aliased as "T2") to link the post to the user who last edited it. This done using the "LastEditorUserti in the 'posts" table and the 'Id' in the 'users' table.
**Filter the *:; We need filter the posts to find the one with the title "Examples for teaching: Correlation does not mean causation".
**Construct the SQL Query
**SELECT** We select the 'DisplayName" from the 'users" table.
**FROM + We start from the 'posts' table (aliased as 'TI'). **INNER JOIN**; We join the 'users' table (aliased as 'T2') the condition that TI.LastEditorUserrl equals 'T2.Id'.
**HEER*** We filter the results to find the post with the title "Examples for teaching: Correlation does not mean causation".
Accordingly, the final SQL query is: sssl
SELECT T2 DissplayName FROM posts AS INNER JOIN users T2 ON T1. #1.LastEditorUsert.. = I2.Id WHERE T1.Title = 'Examples for teaching: Correlation does not mean causation';
</think>
<answer>
''sql
SELECT T2 DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1. Lastadddtorsserrd T2.1d WHERE Ti.Title EExamlles for teaching: Correlation does not mean causation'; ...
</answer>
Figure Example for NL2SQL Reasoning No RL Training Moderate Sample
25

---

Example for NL2SQL Reasoning - RL Training Category: Simple
Question: How many female patients born in 1964 were admitted to the hospital? List them by ID.
To answer this question, need generate SQL query that will filter the patients based on the given conditions and then count the number of patients who meet these conditions. Here are the steps to derive the SQL query;
1. **Identify the Relevant * The information about patients, including their sex, birth year, and hospital admission status, is stored in the 'Patient" table.
**Filter Conditions
-hhe patient must be female, which is represented by 'SEX 'F".
Thee patient must be born in 1964, which can be determined using the "Birthday' column and the 'strftime" function extract the year.
The patient must have been admitted to the hospital, which represented by 'Admission
"+"
3. **Count the Number of *atients** Since the question asks for the number of patients, we will use the 'COUNT' function count the number of patient IDs that meet the specified conditions.
4. **Select the Patient IDs**; The question also asks list the patients by ID, so we will include the 'ID' column in the 'SELECT' clause. Here the SQL. query that satisfies all these requirements: sssll
SELECT COUNT (ID) AS NumberofPatients, ID FROM Patient WHERE
SEX = "F" AND strftime SY',, Birthday) '1964' AND Admission
This query will return the number of female patients born 1964 who were admitted the hospital and list their IDs
Figure 7: Example for NL2SQL Reasoning No RL Training
Simple Sample
26

---

Example for NL2SQL Reasoning RL Training Category: Simple
Question: How many female patients born in 1964 were admitted to the hospital? List
them by ID.
<think>
To generate the SQL query for the given question, we need to follow these steps:
1. **Identify the Relevant Table*# The question is about patients, need to focus on the 'Patient' table.
2. **Determine the Conditions
femalefeferrs to 'SEX = =F
borm in 1964iefers 'YEAR(Birthday) 1964'. However, SQL ite does have built-in "YEAR' function, so we need to use the "strftime" function to extract the year from the 'Birthday' column.
ädmitted to the hospitaliefers to 'Admission=
#*lectt the Required Information The question asks for the IDs of the patients who meet the specified conditions. Therefore, we need to select the 'ID" column from the 'Patient' table.
4. **Formulate the SQL Query**:
Use the 'SELECT' statement specify that we want to retrieve the 'ID' column.
Use the 'FROM' clause to specify the 'Patient' table.
Use the 'WHERE' clause to apply the conditions:
= for female patients.
'strftime("*' % Y', Birthday) '1964" to filter patients born in 1964.
'Admission '+' to filter patients who were admitted to the hospital.
**Construct the Final Query**:
-Start with the 'SELECT' statement to choose the 'ID' column.
Use 'FROM' clause to specify 'Patient' table.
Uss the 'WHERE' clause include the conditions: 'SEX 'F', Strftime"%YY. Birthday)
= ='1964', and 'Admission= = "+"
Accordingly, the final SQL query is: 'ssql
SELECT ID FROM Patient WHERE SEX 'F" AND strftime (1 (Y' Birthday) = (1964' AND Admission = '+;;
..*
</think>
<answer>
''sql
SELECT ID FROM Patient WHERE SEX 'F" AND strftime SY',', Birthday) '1964' AND Admission = 1413v ..9
</answer>
Figure Example for NL.2QQ Reasoning RL Training Simple Sample
27

---

B
Additional Results and Analysis
B.1
Analysis and Comparison of Base LLMs
Table 7: Execution accuracy (%) of different base LLMs on Spider and BIRD benchmark.
Base Model
Spider (Dev)
Spider (Test)
BIRD (Dev)
Qwen2.5- 5-Coder-3BBBB 3B
77.0
77.2
50.5
Qwen2.5-Codee 3-Coder-7B
77.4
79.4
58.2
Qwen2.5-Codde 14B
87.0
88.0
66.1
Qwen3-8B (Thinking Mode)
50.8
Qwen3-14B (Thinking Mode)
51.8
SQL-R1 Qwen2.5-Coder-3B
78.1
78.9
54.6
SQL-RI Qwen2.5-Coder-77
87.6
88.7
63.1
SQL-R1 + Qwen2.5-Coder-1ae
86.7
88.1
67.1
As shown in Table 7, we found that smaller models benefit significantly more from RI. training than their larger counterparts. Specifically, SQL-RI trained on Qwen2.5-Coder and Qwen2.5-Coder 7B demonstrated substantial accuracy improvements on both the Spider and BIRD benchmarks. In contrast, the Qwen2.5-Code 5--55ddr-r--44B model exhibited relatively minor improvement. These results suggest that RL is particularly effective for smaller models, likely due to their greater capacity for performance enhancement through targeted training. This observation leads to two critical insights: first, the potential for deploying RL on smaller base models could yield significant performance gains with higher cost efficiency, enhancing their practicality for real-world applications; second, larger-scale models, such as advanced training strategies to realize meaningful improvements. Future research could thus focus on optimizing RL methodologies for smaller models maximize their potential, while also exploring sophisticated training techniques and larger datasets to leverage the capabilities of more complex LLMs fully.
variant, may necessitate more extensive training data and
B.2 Analysis and Comparison of Efficiency
We assessed the latency of SQL-RI Rl on the BIRD-Dev dataset, maintaining the same inference settings and evaluation metric as outlined in Section 3.1.
Table Efficiency comparison of different NL2SQL methods on BIRD-dev dataset. The base model of XiYan-SQL and SQL-RI is Qwen2.5-Coder-77
Candidate
Latency (s) / Question
Total Tokens (K)
NL2SQL Method
Accuracy (%)
Selection
Question
Qwen2.5-Coder-7B
Greedy Search
0.3
2.5
58.2
XiYan-SQL.
Greedy Search
0.5
4.1
62.1
CHESS
Greedy Search
251.3
320.8
61.5
SQL-R1 (Ours)
Greedy Search
0.4
3.1
63.7
SQL-R1 (Ours)
Self-Consistency
1.1
23.1
66.6
As demonstrated Table 8, the self-consistency method employing 8 candidates adds only average of 0.7 seconds to each query than greedy search method, while improving execution accuracy by 2.9%, which represents a favorable trade-off. Additionally, We compared SQL-RI with Xina [60] using the same base model and related baselines, and observed that SQL-RI achieved higher accuracy under the same conditions. contrast to CHESS [7], which has an execution accuracy of 61.5% and employs multi-component workflow, the end-to-end SQL-RI model achieves an accuracy of 66.6%. SQL-RI not only shows superior execution accuracy but also offers significant advantages in terms of latency and token usage efficiency.
28

---

B.3 Ablation Study of SQL Candidate Rollouts in Reasoning
To assess the efficacy of the self-consistency in the inference, we conducted ablation studies on the Qwen2.5-Coder-3B and Qwen2.5-Coder. of SQL candidate rollouts generated under varied temperature settings designed to enhance diversity, The results illustrated in Figure 9 reveal that setting the number of SQL candidates to 8 strikes the ideal balance between diversity and computational efficiency. configurations with fewer than eight candidates resulted in diminished execution accuracy due to insufficient diversity, whereas exceeding 8 candidates led a plateau accuracy alongside increased computational overhead. The 7B model demonstrated relatively stable accuracy across different candidate counts but achieved its highest accuracy at the same optimal setting. These findings substantiate that the parameter configuration of 8 SQL candidates and lemperature setting of 0.8 effectively enhances SQL-RI 's performance, successfully navigating the trade-off between candidate diversity and computational cost, thereby reinforcing the model's robustness in SQL query generation.
base models, aiming to determine the optimal number
the case of the 3B model,
70
SOL-RR SQU-RI
Execution Accuracy (1)
68
68-
58
SQL
Figure 9: Performance of different scale of SQL candidate rollouts on BIRD-Dev dataset.
B.4
Ablation Study of Database Value Retrieval for RL Training
Table 9: Ablation study of database value retrieval for RL training BIRD-De Dev dataset.
Base Model
Use Database Values
Accuracy (%)
Qwwen.5--odde--7B
58.2
SQL-RI Qwen2.5-Coder-
61.9
SQL-R1 Qwwn2.5-Coder-77B
63.1
We conducted an ablation study to evaluate the effects integrating database values during the RL training. As illustrated in the Table 9, incorporating database values did not yield statistically significant improvement in the model's overall performance. However, this integration resulted in an increased input sequence length, which consequently diminished training efficiency. These findings substantiate our decision to forgo the inclusion of representative value annotations during the training phase. This strategic choice enables the model concentrate more effectively on schema linking, thereby enhancing its exploratory capabilities during the RL phase and ultimately leading to improved reasoning and generalization skills.
B.5 Ablation Study of Reward Sensitivity
We conducted experiments on the BIRD-Dev dataset by adjusting the weights various reward components to assess their impact the model's performance.
The sensitivity analysis highlights crucial insights into reward function design for NI.2SQL tasks. Minimal weights for Execution and Result rewards lead to performance degradation due to potential
29

---

Table 10: Ablation study of different setting of reward components.
Reward Type
Set to 1.0
Increase by 50%
S.
(Execution Score)
60.0
S,
(Result Score)
61.3
S (Length Score)
59.7
60.6
reward hacking, the model exploits simpler patterns instead of developing robust reasoning. Conversely, excessively high reward weights during early training can destabilize learning by resulting in extreme rewards before solid reasoning is established. The model shows lower sensitivity to Result reward adjustments, indicating challenges in bridging semantic gaps despite successful exploration of SQL queries. Additionally, a fixed Length reward is ineffective for fostering deep reasoning, while our smooth sensitivity design maintains differentiation without causing training oscillations; however, excessive Length rewards may lead to verbose solutions. Overall, these findings reinforce the need for balanced reward calibration promote stable learning and minimize exploitation in reinforcement learning.
B.6 Visualization of Training Process
Figure 10 illustrates the progression of reward and response length throughout the training process on Qwen2.5-Coder-3 Qwen2.5-Coder-1 and @wen2.5-Coder- 14B models.
30

---

reward/mean
response Lengethheeehhhheee /ean
1000
A pan bech
800
0
400
Step
2k
Qwen2.5-Coder-33
reward/mean
response_lengthh/men
1200
W M
1000
800
600
Step
400
Step
500
1.kk
2.5k
(b)
Qwen2.5-Coder-778
reward/mean
gisponse_eenthh/ment
1400
1200
1
1000
3
800
600
400
Step
Step
500
1k
L.k
500
1k
1.5k
(c) Qwen2.5-Cood 201.l55-dddrr14
Figure 10: Visualization of training process different scale base models.
31

---

C
Prompt Templates
Prompt Template for RI. Training
You are helpful SQL. expert assistant. The assistant first thinks about how to write the SQL. query by analyzing the question, database schema and external knowledge, then provides the final SQL query. The reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer> tags respectively. The answer must contain the SQL query within ''sql.... tags.
Database Schema: (schema)
External Knowledge: texternal_knowleen
For example:
<think>
To translate the given natural language question into an executable SQLite query, need follow these detailed steps:
**Identify Key Elements**; The question queries for code snippets that both complicated (complexity score > 5) and public ('is ('is_public* = 1). We need to retrieve their descriptions and complexity scores.
2. **Focus on Relevant * The 'code_ pode_esippets' table contains the necessary fields (" ('description', 'complexity', 'is "s__uulic").
3. **Construct the Query** We should select the required fields ('description" and 'complexity) from the "code_snippets" table. We also apply the conditions specified in the question filter the results.
**Oddrrng The reference solution includes an 'ORDER BY' clause to sort results by complexity in descending order, which is reasonable way to present the data to highlight the most complex snippets first.
5. **Final Query C;nstruction** Putting all this together into SQL query.
</think>
<answer>
Here's how the query can be written:
'sqll
SELECT description complexity FROM code_snipped WHERE ORDER complexity DESC;
complexity AND is_public ...
This query retrieves the descriptions and complexity scores of code snippets that are both complicated (complexity > 5) and publicly available ('is_public' = 1), sorted by complexity descending order.
This solution is straightforward and precisely matches the requirements of the question. It avoids unnecessary complexities, such joining or selecting columns relevant the query itself.
<'answer>
Question: {question]
Figure 11: Prompt Template for RL Training
32

---

Prompt Template for SFT Training
The user asks a question about a database, and the Assistant helps convert it to SQL.The assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.
The reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer> tags respectively. The answer must contain the SQL query within "'sql " tags.
Database Schema:
(schema)
External Knowledge: (external knowledge) )
User: {question)
Figure 12: Prompt Template for SFT Training
33


Reviews:
[{"review_id": "kUzWY50naw", "reviewer": "Reviewer_FhNg", "summary": "The paper proposes SQL-R1, an open-source NL2SQL system that fine-tunes a family of Qwen2.5-Coder models with GRPO. The main idea is to move beyond supervised fine-tuning by designing an RL reward that combines format, executability, result correctness and answer length. With a 7 B backbone, SQL-R1 reaches 88.7 % execution accuracy on Spider-Test and 66.6% on BIRD, outperforming other open LLMs and approaching closed models such as GPT-4o.", "questions": "How much slower is the self-consistency approach used to get the performance number? Is it the same approach across baselines?", "limitations": "yes", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 2, "originality": 3, "strengths_and_weaknesses": "### Strengths\n1. This paper is among the first attempts to adopt GRPO for Text2SQL and has a clear layered reward definition that are well-motivated.\n2. Large margins over prior open models on Spider and solid BIRD gains, achieved with modest RL data.\n3. The results demonstrate that a 7B model trained with RL can match or beat much larger supervised models.\n4. Good ablation study. Also the examples are clear in the paper, with interpretability in the reasoning process.\n\n### Weaknesses\n1. Experiments only cover SQLite; claim of cross-dialect robustness is untested — can authors provide PostgreSQL / MySQL results? Datasets like [Spider 2.0](https://spider2-sql.github.io/) might be a good add.\n2. Eight-candidate self-consistency improves accuracy but may raise inference latency. Concrete numbers would help.\n3. Spider and BIRD are human-curated, but training is wholly synthetic; real-world noise may hurt the performance. I'd like to see more discussion on robustness and transfer to very different domains, or multi-table queries.\n4. The paper's novelty is not very significant, as it applies GRPO to a specific task.", "was_revised": true, "final_justification": "Although this paper may not be very novel technically, I stick to my original recommendation of acceptance.", "rebuttal": "Dear Reviewer,\n\nWe appreciate your detailed review and constructive feedback. Your positive assessment and valuable suggestions will help enhance our paper's clarity.\n\n**1. Latency of SQL-R1 with Self-Consistency (In response to Question and Weakness 2)**\n\n* **Our Response**: This is an excellent suggestion for the cost. We evaluated the latency of SQL-R1 on the BIRD development set, with the same inference setting and evaluation metric (Execution Accuracy, EX) mentioned in Section 3.1:\n\n| Method | Candidate Selection | n | Latency (s) / Question | Total Tokens (K) / Question  | Execution Accuracy (%) |\n|--------|--------|---|------------------|--------| --------|\n| SQL-R1-7B | Greedy Search | 1 | 0.4 | 3.1 |  63.7 |\n| SQL-R1-7B | Self-Consistency | 8 | 1.1 | 23.1 |  66.6 |\n| CHESS | -| - | 251.3 | 320.8 |  61.5 |\n\n* Compared with the greedy search method (1 candidate and temperature=0), the self-consistency method with 8 candidates adds only an average of 0.7 seconds on each query while improving execution accuracy by 2.9%, which represents a favorable trade-off. Additionally, the self-consistency method employed in the proposed SQL-R1 is consistent with that of end-to-end NL2SQL models. \n* In comparison to CHESS (61.5%), which employs a multi-component workflow, the end-to-end SQL-R1 (66.6%) demonstrates not only superior execution accuracy but also significant advantages in latency and token usage efficiency. We will add these crucial comparative results to the revised manuscript.\n\n**2. Robustness on Complex NL2SQL Tasks and Cross-dialect Generalization (In response to Weakness 1)**\n* **Our Response**: Thank you for suggesting the evaluation of SQL-R1 on the complex task related to NL2SQL. We now evaluated SQL-R1 on Spider2.0-SQLite subset, with the same inference setting and evaluation metric (Execution Accuracy, EX) mentioned in Section 3.1:\n\n| Model | Candidate Selection | Execution Accuracy (%) |\n|--------|--------|--------|\n| SQL-R1-7B | Self-Consistency  | **20.0** | \n| OmniSQL-7B [1] | Self-Consistency | 10.4 |\n| Qwen2.5-Coder-7B [1] | Self-Consistency | 2.2 | \n| Deepseek-V3 [1] | Self-Consistency | 15.6 |  \n| GPT-4o [1] | Self-Consistency | 15.6 |  \n\n* The results presented above demonstrate that SQL-R1 outperforms existing methodologies in handling complex NL2SQL tasks. This advantage can be attributed to the model's superior inference capabilities, which enhance its overall effectiveness in intricate scenario analyses.\n* As for different dialects like PostgreSQL and MySQL, we currently need more time to conduct comprehensive testing on Spider2.0. We assure that we will add more results in the revision version once they are ready.\n\n[1] Li, Haoyang, et al. \"Omnisql: Synthesizing high-quality text-to-sql data at scale.\" arXiv preprint arXiv:2503.02240 (2025).\n\n**3. Robustness to Real-world Noise and Multi-table Generalization (In response to Weakness 3)**\n\n* **Our Response**: Thanks for your concern on the real-world noise. Table 4 presents evaluations conducted on the Spider-DK, Spider-Syn, and Spider-Realistic benchmarks, which include synthetic and real-world noise. We present a snapshot of the results in Table 4 below:\n\n| NL2SQL Method | Base Model | Spider-DK | Spider-Syn | Spider-Realistic |\n|---------------|------------|-----------|------------|------------------|\n| SENSE | CodeLlama-7B | 77.9 | 72.6 | 82.7 |\n| ROUTE | Llama3-8B | 74.6 | 77.4 | 80.9 |\n| SQL-o1 | Llama3-8B | 78.7 | 72.6 | 82.7 |\n| OmniSQL | Qwen2.5-Coder-7B | 77.8 | 69.6 | 78.0 |\n| SQL-PaLM | PaLM-2 | 67.5 | 70.9 | 77.4 |\n| PURPLE | GPT-4 | 75.3 | 74.0 | 79.9 |\n| SQL-R1 (Ours) | Qwen2.5-Coder-3B | 70.5 | 66.4 | 71.5 |\n| SQL-R1 (Ours) | Qwen2.5-Coder-7B | **78.1** | **76.7** | **83.3** |\n| SQL-R1 (Ours) | Qwen2.5-Coder-14B | **79.3** | **78.5** | **86.2** |\n\n\n* This results demonstrate that the methodology proposed in this paper consistently outperforms baseline methods while maintaining robust performance in challenging environments. Notably, SQL-R1 is trained entirely on synthetic data, yet the results in Table 1 and the aforementioned findings indicate its impressive resilience and effectiveness without the necessity for additional fine-tuning on other domain databases.\n\n* Additionally, we acknowledge that there remains room for improvement. For instance, exposing the model to more accurate filtered schemas could facilitate independent exploration and enhancement of its reasoning capabilities, particularly in complex table environments. Such approaches could lead to significant advancements in model performance when tackling diverse database contexts. Therefore, while our results are promising, ongoing research and experimentation in these areas could further elevate the robustness and applicability of our findings in real-world scenarios.\n\n**4. Novelty of SQL-R1 (In response to Weakness 4)**\n\n* **Our Response**: Thank you for your suggestion on the novelty of SQL-R1. We now provide a more detailed explanation of the novelty of SQL-R1.\n\n    * We have adapted the GRPO algorithm for the NL2SQL task, introducing a unique combination of reward functions specifically designed for this application, including execution and result rewards. This innovative approach enhances the model’s ability to generate accurate SQL queries from natural language input. We have customized and modified some task-specific principles (e.g, schema linking, database content retrieval) to better align with the specific requirements and challenges of the NL2SQL task.\n\n    * In this work, we utilized limited synthesized complex samples as training inputs for reinforcement learning (RL) to encourage the model to autonomously explore more robust reasoning pathways and inferential capabilities in NL2SQL translation.  This approach contrasts with the conventional methodologies that typically employ training sets derived from specific domain databases, such as the Spider and BIRD datasets.  Our findings indicate that synthesized data from diverse sources can significantly enhance the model's inferential strength and generalization ability, thereby contributing to the advancement of NL2SQL systems.\n\n\n\nWe believe that these additions and discussions will greatly enhance the evaluation of the paper by providing essential comparative data and context regarding costs. We appreciate the reviewer’s constructive feedback, which aids us in improving the rigor of our study. We hope that the revised manuscript will meet the standards for acceptance. \n\nSincerely,  \n\nThe Authors"}, {"review_id": "AR843eVVv9", "reviewer": "Reviewer_TvCP", "summary": "This paper introduces SQL-R1, a novel NL2SQL model trained with reinforcement learning to improve reasoning and generalization in complex SQL generation tasks. By leveraging the GRPO algorithm and a structured reward function incorporating format, execution, result correctness, and reasoning trace quality, SQL-R1 produces both accurate and interpretable SQL outputs. The model is trained on synthetic data (SynSQL-2.5M) with a cold-start SFT phase, followed by RL fine-tuning. Experimental results on Spider and BIRD benchmarks show that SQL-R1 achieves competitive performance with closed-source models like GPT-4 while offering improved transparency and efficiency, especially on smaller base models.", "questions": "1.Spider dataset is an old dataset which could have contamination in pretrained models, why don't you use the Spider-2 dataset?\n2. In the abstract, it's claimed that generalization is better with RL training, where can we tell there is generalization improvement?", "limitations": "Yes.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 2, "originality": 2, "strengths_and_weaknesses": "Strengths\n- Clear Motivation for RL in NL2SQL: The paper is well-motivated by the limitations of SFT, especially in generalization and interpretability, - which are crucial in high-stakes domains like healthcare and finance.\n- Custom Reward Design: The reward function, combining execution success, result correctness, formatting, and length penalties/rewards, is thoughtful and tailored to the NL2SQL task.\n- Strong Benchmarking: SQL-R1 is evaluated across multiple model sizes and datasets (Spider, BIRD), showing competitive results against state-of-the-art systems, including GPT-4 and Gemini, especially considering it uses open-source LLMs.\n\nWeaknesses\n- Marginal Algorithmic Novelty: While the application of GRPO to NL2SQL is novel, the reinforcement learning framework itself is reused from prior work (e.g., DeepSeek-R1) with limited modification. The paper would benefit from a clearer discussion of what is novel versus reused.\n- Limited Analysis of Errors, Generalization and Reward shaping: The paper does not sufficiently analyze where the model fails (e.g., complex joins, ambiguous queries), nor does it test generalization on other tasks. Ablations are done with reward shaping techniques, but  not enough analysis is given, i.e. how sensitive is the reward design. No error breakdown on failure cases, i.e. harder SQL generation improvement is bigger etc?", "was_revised": true, "final_justification": "The additional experimental results look good especially on more challenging spider 2 dataset. Error analysis by complexity is helpful to  justify the generalization capability.", "rebuttal": "Dear Reviewer,\n\nWe appreciate your detailed review and constructive feedback. Your positive assessment and valuable suggestions will help enhance our paper's clarity.\n\n**1. Evaluation on Spider2.0 and generalisation evidence (In response to Question 1 and Question 2)**\n\n* **Our Response**: Thanks for the crucial questions. To address these concerns, we firstly evaluate SQL-R1 on **Spider 2.0-SQLite subset** . All models use the same self-consistency setup (n=8).\n\n| Model | Candidate Selection | Execution Accuracy (%) |\n|--------|--------|--------|\n| SQL-R1-7B | Self-Consistency  | **20.0** | \n| OmniSQL-7B [1] | Self-Consistency | 10.4 |\n| Qwen2.5-Coder-7B [1] | Self-Consistency | 2.2 | \n| Deepseek-V3 [1] | Self-Consistency | 15.6 |  \n| GPT-4o [1] | Self-Consistency | 15.6 |  \n\n\n* The findings presented above demonstrate that SQL-R1 surpasses existing methodologies in addressing Spider2.0 complex tasks related to NL2SQL.  This advantage can be ascribed to the model's enhanced inferential capabilities, which contribute to its overall efficacy in conducting sophisticated scenario analyses.  Regarding variations in dialects such as PostgreSQL and MySQL, additional time is required to perform thorough testing on Spider2.0.  We assure that supplementary results will be provided once they are finalized.\n\n* For generalisation of the SQL-R1, Table 4 shows execution accuracy on different NL2SQL tasks, including Spider-Realistic, Spider-DK and Spider-Syn.\n\n| NL2SQL Method | Base Model | Spider-DK | Spider-Syn | Spider-Realistic |\n|---------------|------------|-----------|------------|------------------|\n| SENSE | CodeLlama-7B | 77.9 | 72.6 | 82.7 |\n| ROUTE | Llama3-8B | 74.6 | 77.4 | 80.9 |\n| SQL-o1 | Llama3-8B | 78.7 | 72.6 | 82.7 |\n| OmniSQL | Qwen2.5-Coder-7B | 77.8 | 69.6 | 78.0 |\n| SQL-PaLM | PaLM-2 | 67.5 | 70.9 | 77.4 |\n| PURPLE | GPT-4 | 75.3 | 74.0 | 79.9 |\n| SQL-R1 (Ours) | Qwen2.5-Coder-3B | 70.5 | 66.4 | 71.5 |\n| SQL-R1 (Ours) | Qwen2.5-Coder-7B | 78.1 | 76.7 | 83.3 |\n| SQL-R1 (Ours) | Qwen2.5-Coder-14B | 79.3 | 78.5 | 86.2 |\n\n* The findings presented above demonstrate that SQL-R1 surpasses existing methodologies in addressing Spider2.0 complex tasks related to NL2SQL.  This advantage can be ascribed to the model's enhanced inferential capabilities, which contribute to its overall efficacy in conducting sophisticated scenario analyses. We will add these detailed explanations to the revised manuscript.\n\n\n**2. Algorithmic Novelty (In response to Weakness 1)**\n\n* **Our Response**: We appreciate your question. We now provide a more detailed explanation of the algorithmic novelty versus reuse. We acknowledge that our work draws inspiration from DeepSeek-R1, which is also mentioned in the Related Work section. However, we clarify that some task-specific redesigns presented here are novel and essential for advancing the framework.\n\n    1.  We have adapted the GRPO algorithm for the NL2SQL task, introducing a unique combination of reward functions specifically designed for this application, including execution and result rewards. This innovative approach enhances the model’s ability to generate accurate SQL queries from natural language input. We have customized and modified some task-specific principles (e.g, schema linking, database content retrieval) to better align with the specific requirements and challenges of the NL2SQL task.\n\n    2.  In this work, we utilized limited synthesized complex samples as training inputs for reinforcement learning (RL) to encourage the model to autonomously explore more robust reasoning pathways and inferential capabilities in NL2SQL translation.  This approach contrasts with the conventional methodologies that typically employ training sets derived from specific domain databases, such as the Spider and BIRD datasets.  Our findings indicate that synthesized data from diverse sources can significantly enhance the model's inferential strength and generalization ability, thereby contributing to the advancement of NL2SQL systems.\n\n* We hope that these explanations will help to address your concerns. And\n\n**3. Error Analysis by Complexity and Reward Sensitivity (In response to Weakness 2)**\n\n* **Our Response**: We sincerely appreciate your insightful question regarding the performance analysis across different complexity levels. \n\n* **Complexity Analysis**: We conducted a statistical analysis of the accuracy rates for various difficulty levels based on the BIRD development dataset, as presented in the table below:\n\n| Method | Simple | Moderate | Challenging | All |\n|---|---|---|---|---|\n| SQL-R1 (7B) | 72.1 | 60.8 | 51.0 | 66.6 |\n| SQL-R1 (14B) | 72.4 | 59.7 | 56.5 | 67.1 |\n| SuperSQL | 66.9 | 46.5 | 43.8 | 58.5 |\n| DAIL-SQL | 63.0 | 45.6 | 43.1 | 55.9 |\n\n- The results displayed show that SQL-R1 maintains a notable accuracy advantage over the current baseline across the three subsets: Simple, Moderate, and Challenging. This observation indicates that SQL-R1 exhibits a universally beneficial capability in reasoning and generation across different levels of SQL generation tasks.\n\n- Moreover, when we expanded SQL-R1 from a parameter size of 7B to 14B, the EX rates for the Simple and Moderate difficulty levels experienced a marginal change of only 0.3% and a decrease of 1.1%, respectively. However, it is essential to highlight the significant improvement in the Challenging difficulty category, where the accuracy surged from 51.0% to 56.5%, with an increase of 5.5 percentage points. This finding suggests that augmenting model capacity primarily alleviates the generalization bottleneck associated with high-difficulty queries.\n\n- This phenomenon corroborates previous research findings, which assert that larger-scale models are more adept at capturing long-range dependencies, particularly when queries involve multiple table joins, nested subqueries, or complex aggregations. The above insights underscore the critical role of model size of SQL-R1 in enhancing performance on intricate SQL generation tasks.\n\n\n* **Reward Sensitivity Analysis**: We conducted experiments on the BIRD development set by adjusting the weights of different reward components to evaluate their impact on model performance, using execution accuracy as the evaluation metric.\n\n| Reward Type | Set to 1.0 | Increase by 50% |\n|-------------|----------------------|------------------------|\n| Execution Reward | 60.0 | - |\n| Result Reward | 61.3 | - |\n| Length Reward | 59.7 | 60.6 |\n\n* The sensitivity analysis results reveal several key insights about the reward function design:\n\n    1.  Setting Execution and Result rewards to minimal weights leads to significant performance degradation, indicating potential reward hacking behavior where the model learns to exploit simpler patterns rather than developing robust reasoning capabilities.\n\n    2.  Increasing reward weights by large margins destabilizes training, particularly during early policy exploration phases.  The model may receive extreme rewards too frequently before establishing stable reasoning patterns.\n\n    3.  The lower sensitivity to Result reward adjustments suggests that while the model successfully explores executable SQL queries, semantic gaps between questions persist.  This makes it challenging for the model to achieve high Result rewards, even with increased weights consistently.\n\n    4.  A fixed Length reward proves suboptimal for encouraging deep reasoning.  The smooth sensitivity design we adopted maintains meaningful differentiation while avoiding training oscillations.  However, excessive Length rewards can also trigger reward hacking, where the model generates unnecessarily verbose solutions.\n\n* These findings validate our balanced reward function design choices that promote stable learning while preventing various forms of reward exploitation.  The results demonstrate the importance of careful reward calibration in reinforcement learning for complex NL2SQL tasks.\n\n\n\nWe sincerely thank the reviewer for the constructive feedback and suggestions. We have provided detailed responses to address your concerns about algorithmic novelty, error analysis, and experimental results. We will incorporate all these clarifications and additional analyses in the revised manuscript.\n\nSincerely,  \n\nThe Authors"}, {"review_id": "rW25Uh1Dcg", "reviewer": "Reviewer_Bp1S", "summary": "Inspired by the success of the RL training approach on language models, SQL-R1 uses GRPO to train open-source language models (Qwen-2.5 family) on the Text-to-SQL task. They introduce four rewards for the training, including format, executability, execution accuracy, and length reward, that, in combination, guide the RL training process. This work shows that an open-source model trained with RL can outperform the SFT-trained counterpart, reaching a comparable performance to some larger proprietary models.", "questions": "Q1) Figure 9 shows the performance of the 7B model reaching around 63% using self-consistency on the BIRD dev set for 8 SQL candidates, whereas Table 1 reports this as 66.6%. Could the authors clarify this discrepancy?\n\nQ2) The results reported in Reasoning-SQL represent the zero-shot performance of the model without parallel sampling and self-consistency. However, Table 1 indicates the use of self-consistency, differing from the original report. Did the authors reproduce the results from Reasoning-SQL and other comparable works? It would be helpful to add a column reporting the sampling budget of each method for a clearer comparison.\n\nQ3) How were the weights for the partial rewards determined? Specifically, considering the execution score computation depends on the format reward, how was the training conducted for the \"w/o Sf\" scenario in Table 3? Surprisingly, the Sr reward, which directly measures performance on the downstream task, seems to have the least impact. Could you elaborate on why this might be the case?\n\nQ4) Moreover, I am interested in understanding the impact of the length reward on model performance. How does this reward specifically guide the model toward generating better SQL queries? Could you provide qualitative examples comparing the reasoning processes of models trained with and without this reward?", "limitations": "The main limitation of the work is its lack of novelty, and I would appreciate it if the authors could elaborate on that.", "rating": 2, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 4, "significance": 2, "originality": 1, "strengths_and_weaknesses": "Strengths:\n\nS1) The paper is well-presented, easy to follow, and provides clear explanations of methodologies and findings.\n\nS2) The experimental details are clearly explained and well-documented, helping with the reproducibility of the results.\n\nS3) The authors have shown extensive experimental results across multiple model sizes, using two well-established and rigorous benchmarks for Text-to-SQL (Spider and BIRD)\n\nS4) Ablation studies are presented for the training data, model size, and inference-budget, providing insights into the individual impact of each component on the overall performance.\n\nWeaknesses:\n\nW1) Novelty: The primary issue with this work is the lack of novelty. As cited by the paper itself, Reasoning-SQL has a very similar experimental setting and has already validated most of the claims made in this work. Specifically, Reasoning-SQL previously adopted GRPO for Text-to-SQL and employed rewards very similar to the format, executability, and execution accuracy rewards used here. The length reward introduced in this work is also a known concept from existing RL literature.\n\n\nW2) Lack of cost analysis: Although this work leverages inference-time scaling (extended reasoning and parallel sampling) to enhance performance, the accuracy/cost trade-offs introduced by scaling are not discussed. Moreover, the paper lacks cost comparison with existing methods, an important aspect for practical deployment in Text-to-SQL systems.\n\n\nW3) BIRD's test set performance report: Reporting the performance on the private BIRD's test set is a conventional standard for fair comparison in the Text-to-SQL domain. Without the report on the BIRD test set or the confidence intervals of the reported results, it would be hard to assess the results against existing methods.", "was_revised": true, "final_justification": "I thank the authors for the effort they put into responding to my questions. I have carefully read their responses to both my comments and those of the other reviewers.\n\nBelow, I outline several concerns that remain unresolved:\n\n- Since the primary reward used in the RL training for SQL-R1 is *execution accuracy*, which is also the standard downstream metric for Text-to-SQL, the method does not introduce a novel task-specific adaptation for reinforcement learning in this context.\n\n- The OmniSQL work has already demonstrated that training on its synthetic data improves the performance of open-source models on the Text-to-SQL task. Replacing supervised fine-tuning (SFT) with reinforcement learning (RL) on this data, without additional innovation, does not represent a significant contribution in my view.\n\nBecause of the two reasons above, the novelty of this work remains limited to me, specifically for a prestigious venue such as NeurIPS.\n\n- In line with concern W2: because baseline comparisons can be highly sensitive to implementation details, evaluating the method on BIRD’s held-out test set remains essential for a fair and direct comparison across approaches.\n\n- Despite the follow-up discussion, the concerns related to Q4 and W2 remain insufficiently addressed.\n\nFor these reasons, I would keep my original score.", "rebuttal": "Dear Reviewer,\n\nWe sincerely thank you for your detailed review and constructive feedback. We will carefully address each of your questions and concerns with detailed clarifications and responses.\n\n**1. Distinction from Reasoning-SQL and Originality of SQL-R1 (In response to W1)**\n\n* **Our Response**: Thank you for your questions and suggestions for novelty。 **We need to unequivocally clarify that SQL-R1 and Reasoning-SQL are concurrent works**, and we publicly released our research in early April. It is crucial to acknowledge that Reasoning-SQL should not diminish our novelty or impose a requirement for us to compare ourselves with Reasoning-SQL.\n\n* **Additionally, our work is also significantly different from Reasoning-SQL**: first, our Reward function design is not consistent, and we achieve better execution accuracy without the complications of Schema filtering. Furthermore, we take our work seriously by training SQL-R1 entirely on synthetic data, which sets it apart from Reasoning-SQL that relies on the training set associated with BIRD and Spider. Our method demonstrates much stronger generalization capabilities. These fundamental differences undeniably confirm that SQL-R1 stands as an independent contribution, not a mere re-implementation.\n\n* In summary, SQL-R1 represents a novel contribution with its unique reward design and synthetic data training approach. While developed concurrently with Reasoning-SQL, our open-source implementation and distinct methodology demonstrate SQL-R1's independent value and advancement of NL2SQL capabilities.\n\n\n\n**2. Issue of the Experimental Results (In response to Q2 and W3)**\n\n* **Our Response**: Thank you for your question. For Q2, we expound relevant results in accordance with the article report of Reasoning-SQL.  We take this matter very seriously and feel it is crucial to address it transparently.  Therefore, we open source the code of SQL-R1, which is also the originality of our work at the experimental level.  In contrast, Reasoning-SQL does not open source the relevant code, which significantly complicates our ability to directly verify the experimental results of its report.  As a result, we adhere strictly to the original description and results provided in the article.\n\n* For W3, we are preparing to submit the results, but the relevant tests need to wait for the official conduct. According to the existing results, our confidence interval of the reported results is in [70,73]. Relevant results are added to the revised version when they are ready.\n\n**3. Latency of SQL-R1 with Self-Consistency (In response to W2)**\n\n* **Our Response**: This is an excellent suggestion for the cost. We evaluated the latency of SQL-R1 on the BIRD development set with the same inference setting mentioned in the Section 3.1:\n\n| Method | Candidate Selection | n | Latency (s) / Question | Total Tokens (K) / Question  | EX (%) |\n|--------|--------|---|------------------|--------| --------|\n| SQL-R1-7B | Greedy Search | 1 | 0.4 | 3.1 |  63.7 |\n| SQL-R1-7B | Self-Consistency | 8 | 1.1 | 23.1 |  66.6 |\n| CHESS | -| - | 251.3 | 320.8 |  61.5 |\n\n* Compared with the greedy search method (1 candidate and temperature=0), the self-consistency method with 8 candidates adds only an average of 0.7 seconds on each query while improving execution accuracy by 2.9%, which represents a favorable trade-off. Additionally, the self-consistency method employed in the proposed SQL-R1 is consistent with that of end-to-end NL2SQL models. \n* In comparison to CHESS (61.5%), which employs a multi-component workflow, the end-to-end SQL-R1 (66.6%) demonstrates not only superior execution accuracy but also significant advantages in latency and token usage efficiency. We will add these crucial comparative results to the revised manuscript.\n\n**4. Issue of Figure 9 (In response to Q1)**\n\n* **Our Response**: We appreciate your question. The results in Figure 9 are based on the 7B model tested without SFT. In the experiment section, we mentioned that SQL-R1-7B performs relatively well after SFT + RL, so its highest execution accuracy reaches 66.6. However, in the ablation experiment and the rest of the control, we used the model without SFT cold start for the convenience of comparison, so t. So, the highest accuracy of SQL-R1-7B here was 63.1, which was directly trained by RL. We will add these crucial comparative results to the revised manuscript.\n\n\n**5. Discussion of the reward function design (In response to Q3)**\n\n* **Our Response**: We appreciate your question. The weight of the reward function is designed by integrating its importance to NL2SQL and the perspective of preventing reward hacking. For the mentioned w/o $S_f$ ablation experiment, we modified the corresponding logic so that the model directly evaluated the executability, which easily led to execution errors when the model could not correctly extract SQL, thus obtaining invalid negative feedback and reducing the performance due to the impact of the sr function problem. We explain that this reward is sparse, and when facing more difficult samples in training, the model has less expectation to obtain this reward successfully. Hence, its influence on the model is relatively small. This is also an area for improvement, but it has undeniably contributed to the growth of the model's capabilities.\n\n\n**6. Discussion of length reward (In response to Q4)**\n\n* **Our Response**: We appreciate your question. The length reward is a smoothness reward designed to encourage the model to think deeper and try different ways of thinking. Figures 3 and 4 are good examples of qualitative comparison. The length reward helps the model navigate longer thought paths, resulting in a top-down thought process. Without the length reward, the model's ability to generate difficult samples will be weakened.\n\n\nWe sincerely appreciate all the reviewers' constructive feedback and questions. We have provided detailed responses to address the concerns about SQL-R1's originality, experimental results, latency analysis, and reward function design. We have demonstrated that SQL-R1 is a concurrent and independent work with unique contributions, including novel reward design and a synthetic data training approach. The comprehensive experimental results and analyses validate the effectiveness and efficiency of our method. We are committed to maintaining transparency by open-sourcing our code and will continue improving our work based on the valuable suggestions received. These clarifications and additional analyses strengthen our paper's contribution to the NL2SQL research community.\n\n\n\n\nSincerely,  \n\nThe Authors"}, {"review_id": "Olq9Ks0s78", "reviewer": "Reviewer_YmQu", "summary": "This paper introduces SQL-R1, a novel approach for Natural Language to SQL (NL2SQL) that leverages reinforcement learning (RL) fine-tuning of large language models (LLMs). Motivated by the success of RL-based training in improving reasoning capabilities of LLMs, the authors employ Group Relative Policy Optimization (GRPO) to enhance SQL generation performance. The work also addresses several key research questions such as the optimal cold start strategy for RL fine-tuning in the NL2SQL domain, and the characteristics and requirements of high-quality training data for learning effective NL2SQL models. The authors demonstrate that SQL-R1 achieves state-of-the-art performance on two standard benchmarks, Spider and BIRD.", "questions": "**Missing Competitive Baselines in Figure 2.** Figure 2 appears to omit several recent competitive methods that could significantly impact the performance comparison. Notable missing baselines include SQL-o1 and Alpha-SQL, among others. This omission may present an incomplete picture of the current state-of-the-art and could mislead readers about the relative performance of SQL-R1. Could the authors include these methods in their comparison or provide justification for their exclusion?\n\n**Selective Dataset Analysis.** In lines 250-251, the authors discuss the effectiveness of selective datasets for RL fine-tuning by referencing base model results which are not in the main paper. Can you add the guidance where the reader check for the base model results? Additionally, to show the effectiveness of the selective dataset, it would be better to compare the SQL-R1 trained from the selective dataset and default dataset. Can you test this also?\n\n**Performance Analysis by SQL Complexity.** Given that RL fine-tuning with specialized rewards should theoretically be more beneficial for complex reasoning tasks, it would be valuable to see a breakdown of performance across different SQL complexity levels (Easy/Medium/Hard). This analysis would help readers understand when and why the proposed method provides the most benefit. Can you provide these level-wise performance comparisons?\n\n**Relationship to Recent RL Fine-tuning Effectiveness Debates.** Recent work [1] has raised important questions about the effectiveness of RL fine-tuning, demonstrating that reasoning-optimized models can underperform on simple tasks while showing improvements on medium-complexity problems when given additional computational budget. Given these findings, how does SQL-R1's performance align with this complexity-dependent effectiveness pattern? Do the authors observe similar patterns in SQL-R1's results? More broadly, can the authors provide analysis and discussion of their method through this lens, including whether SQL-R1 exhibits the complexity-dependent benefits and limitations observed in recent RL fine-tuning research?\n\n[1] https://machinelearning.apple.com/research/illusion-of-thinking", "limitations": "yes", "rating": 4, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "## Strengths\n\n**Timely Application of RL Fine-tuning to NL2SQL.** The application of reinforcement learning fine-tuning to NL2SQL is well-motivated given the recent success of RL methods in improving LLM reasoning capabilities. Since NL2SQL requires complex reasoning to generate accurate SQL statements, this approach represents a natural and promising direction for the field.\n\n**Comprehensive Investigation of Key Research Questions.** Beyond proposing the core method, the authors systematically investigate important practical questions, including the necessity of supervised fine-tuning as a prerequisite (cold start problem) and the requirement of high-quality training data. These investigations provide valuable insights that advance understanding of RL fine-tuning for structured generation tasks.\n\n**Thorough Experimental Evaluation.** The paper includes comprehensive comparisons against diverse NL2SQL baselines across multiple datasets and model scales. The ablation studies on reward design components are particularly valuable for understanding which aspects of the approach contribute most to performance gains.\n\n\n## Weaknesses\n\n**Limited Performance Gains.** While the method achieves competitive results, the improvements over existing state-of-the-art methods are modest and inconsistent. For instance, on Spider test set with Qwen2.5-Coder-7B, SQL-R1 achieves 88.7% versus OmniSQL's 88.9%. The performance gaps vary across different experimental settings, raising questions about the practical significance of the approach.\n\n**Insufficient Baseline Analysis.** The experimental section compares against numerous prior methods, but the paper lacks adequate explanation of these baselines in the related work or methodology sections. Readers would benefit from understanding the key differences between SQL-R1 and these comparative methods, particularly how they differ in their approach to the NL2SQL problem.", "was_revised": true, "final_justification": "My main concern was the performance improvement pattern through RL fine-tuning such as higher improvement on the complex patterns while decreasing the performance on the simpler one. However, in their rebuttal, I can find the performance improvements are generally found for diverse difficulties of the queries. Hence, I raised my score from borderline reject to borderline acceptance.", "rebuttal": "Dear Reviewer,\n\nWe sincerely thank you for your thorough review and valuable feedback. Your insightful comments will help us significantly improve the quality of our paper.\n\n**1. For Missing Competitive Baselines in Figure 2 (In response to Q1)**\n\n* **Our Response**: We sincerely thank you for this valuable suggestion. In Figure 2, we mainly highlight the advantages of SQL-R1 over the NL2SQL method using different scale-based models, so all the compared models are not fully presented. In Table 1, we highlight the above baselines (including Alpha-SQL and SQL-o1) and their related information, and compare them. We really appreciate your valuable comments and will modify and supplement them in the revised version.\n\n**2. For Selective Dataset Analysis (In response to Q2)**\n\n* **Our Response**: We appreciate your question about this place.  We must clarify that the models of all scales of SQL-R1 use the SynSQL-Complex-5K dataset for the RL phase. Therefore, all the results are dependent on this dataset.  Also, we strongly agree with your issues regarding RL training on the default dataset.  However, the original dataset contains 2.5M pieces of training data, which would be a very expensive and time-consuming challenge for RL training (more than 2 months). We regret not being able to complete the above training and provide corresponding results now.\n\n* Additionally, we note that the proposed work aims to use a small amount of synthetic data to stimulate the model's NL2SQL deep reasoning ability. The data cost is also one requirement for the work's efficient operation. We will fully consider your comments and continue improving this area's work thereafter.\n\n**3. For the Performance Analysis by SQL Complexity (In response to Q3)**\n\n* **Our Response**: We appreciate your question about this place. We conducted a statistical analysis of the accuracy rates for various difficulty levels based on the BIRD development dataset, as presented in the table below:\n\n| Method | Simple | Moderate | Challenging | All |\n|---|---|---|---|---|\n| SQL-R1 (7B) | 72.1 | 60.8 | 51.0 | 66.6 |\n| SQL-R1 (14B) | 72.4 | 59.7 | 56.5 | 67.1 |\n| SuperSQL | 66.9 | 46.5 | 43.8 | 58.5 |\n| DAIL-SQL | 63.0 | 45.6 | 43.1 | 55.9 |\n\n* The results displayed show that SQL-R1 maintains a notable accuracy advantage over the current baseline across the three subsets: Simple, Moderate, and Challenging. This observation indicates that SQL-R1 exhibits a universally beneficial capability in reasoning and generation across different levels of SQL generation tasks.\n\n* Moreover, when we expanded SQL-R1 from a parameter size of 7B to 14B, the EX rates for the Simple and Moderate difficulty levels experienced a marginal change of only 0.3% and a decrease of 1.1%, respectively. However, it is essential to highlight the significant improvement in the Challenging difficulty category, where the accuracy surged from 51.0% to 56.5%, with an increase of 5.5 percentage points. This finding suggests that augmenting model capacity primarily alleviates the generalization bottleneck associated with high-difficulty queries.\n\n* This phenomenon corroborates previous research findings, which assert that larger-scale models are more adept at capturing long-range dependencies, particularly when queries involve multiple table joins, nested subqueries, or complex aggregations. The above insights underscore the critical role of model size of SQL-R1 in enhancing performance on intricate SQL generation tasks.\n\n\n**4. For the Relationship to Recent RL Fine-tuning Effectiveness Debates (In response to Q4)**\n\n* **Our Response**: We thank the reviewers for pointing out the insightful connection between SQL-R1 and the recent study on complexity-dependent RL effectiveness.  Below we provide some discussions:\n\n* **Complexity-Dependent Pattern Analysis**: We appreciate this insightful connection to recent research on RL fine-tuning effectiveness. While SQL-R1 shows some similarities in complexity-dependent patterns, our analysis reveals certain unique characteristics that differ from previous findings:\n\n| Query Complexity | Performance Pattern | Explanation |\n|-----------------|---------------------|-------------|\n| Simple Queries | Moderate Gains | RL provides limited benefits for straightforward SELECT-FROM-WHERE queries where base model capabilities are already strong |\n| Medium Complexity | Limited Improvement | RL shows modest gains on queries with joins and aggregations, as training data biases model toward more complex solutions |\n| Challenge Complexity | Significant Gains | RL training data's preference for complex samples leads model to excel at intricate nested queries, though risks overcomplicating simpler cases |\n\n* **Computational Budget Impact**: Based on our experimental results, we observe that increasing model capacity from 7B to 14B yields the highest relative gains (5.5% improvement) on challenging-complexity queries, while showing minimal impact on simple and moderate queries. This suggests that expanding computational resources primarily benefits the model's ability to handle more complex SQL generation tasks involving intricate joins, nested queries and aggregations.\n\n* In summary, SQL-R1 exhibits performance that is partially consistent with the above studies. For NL2SQL tasks, RL training can effectively improve the model's ability to solve higher complexity problems and trigger deeper thinking and reasoning. However, overstrengthening the ability to think about complex problems also leads to the risk of overthinking the model on simple problems. Balancing the above preferences during training will help the model to make more accurate judgments and draw inferences.\n\n**5. For the issue of Insufficient Baseline Analysis (In response to W2)**\n\n* **Our Response**: We sincerely appreciate your insightful question regarding baseline analysis. We are grateful for the opportunity to provide a comprehensive response to this important point.\n\n* **Comparsion with workflow-based NL2SQL methods**: In contrast to various multi-module workflow paradigms such as DIN-SQL, DAIL-SQL, MAC-SQL, SuperSQL, MCTS-SQL, OpenSearch-SQL and CHASE-SQL, SQL-R1 introduces a streamlined end-to-end decoding strategy centered on self-consistency, which mitigates the necessity for explicit task decomposition, complex schema linking, the generation of intermediate representations, debug processes, and Monte-Carlo tree searches.   Traditional pipeline-oriented systems predominantly depend on proprietary LLMs like GPT-4/4o and Gemini-1.5-Pro, which typically necessitate multiple iterations for refining SQL skeletons and often entail using external tools for schema retrieval and execution feedback. This reliance results in substantial computational overhead and heightened engineering complexity. Conversely, by leveraging a single open-source backbone, SQL-R1 achieves competitive accuracy metrics of 87.6% and 88.7% on the Spider development and test sets, respectively, and 66.6% on the BIRD development set. This approach simplifies deployment and diminishes token costs while upholding a robust performance profile.\n\n* **Comparsion with SFT-based NL2SQL methods**: SQL-R1 marks a significant advancement beyond traditional reliance on SFT methods, such as CodeS, DTS-SQL, CHESS, and OmniSQL. While these SFT-based approaches demonstrate strong memorization of common SQL patterns—reflected in their Spider test scores ranging from 79.4% to 88.9%—they often struggle with generalization on more challenging benchmarks like BIRD, where scores range from 54.6% to 67.1%. To overcome this limitation, SQL-R1 integrates self-consistency reranking during decoding, effectively bridging the performance gap between in-domain and cross-domain tasks. We will add these detailed explanations to the revised manuscript.\n\nWe are deeply grateful to the reviewer for the constructive feedback. We have carefully addressed each concern with detailed responses and additional analyses. We hope these clarifications adequately address your questions and will incorporate all suggestions in our revised manuscript. We greatly appreciate your help in improving this work.\n\n\n\n\nSincerely,  \n\nThe Authors"}]

Author rebuttal:

Meta-review: The goal of this paper is to fine-tune open LLMs to achieve sota performance on the task of translating NL to SQL queries and close the gap between the performance of open and closed models on this task. The authors fine-tune Qwen2.5-Coder to translate from NL to SQL using GRPO. They design an RL reward that combines format, executability, result correctness and answer length. Their model i.e. SQL-R1 reaches 88.7% execution accuracy on Spider-Test and 66.6% on BIRD, outperforming other open LLMs and approaching closed models such as GPT-4o. It also produces both accurate and interpretable SQL outputs. The model is trained on synthetic data (SynSQL-2.5M) with a cold-start SFT phase, followed by RL fine-tuning.

Strengths
- All reviewers are excited about the reward design, that takes many aspects of SQL queries into account, including the format. They find the reward clear and well motivated. 
- All reviewers also appreciate the solid gains over baselines. Even their 7B model is competitive with larger closed models. They also appreciate the ablations in the paper. Overall, the paper is clear and strongly motivated, with a strong experimental section. The paper also studies the necessity of supervised fine-tuning as a prerequisite (cold start problem) and the requirement of high-quality training data, all of which are very interesting for this particular task. 

Weaknesses
- The authors have addressed several of the weaknesses in their rebuttal:
    - Lack of results on spider 2.0, which the authors have provided. 
    - Latency numbers for inference efficiency particularly in the self-consistency regime - the authors have resolved this.
    - Missing error analysis - the authors have provided this
    - Missing baselines of sql-o1 and alpha-sql - resolved!

- While 3/4 reviewers would like to accept the paper, what remains is two main weaknesses pointed out by one reviewer.

1. The lack of novelty i.e. the paper applies a known method (GRPO) to a known task. There are also existing papers that use execution feedback as a reward, so that part is not novel either. There is a lot of back and forth on this topic between the authors and the reviewers. The authors point out that while each individual aspect is not novel, the synergistic combination of multiple techniques is what makes the model work - and is non-trivial to achieve. They also look at semantic accuracy, and oppose the idea that this work is merely "fine-tuning".
2. Lack of results on BIRD's held out test set - which is missing in the paper, and the authors are waiting for the results from this submission.

Overall, with three accepts, this paper represents a holistic post-training method for the task of NL to SQL. This paper can be a solid reference manual as a strong recipe on how to post train a SQL generation model, serving as a strong baseline for any future NL -> SQL methods. I therefore recommend accepting this paper.
Decision: Accept (poster)