NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Progress-SQL: Improving Reinforcement Learning for Text-to-SQL via Progressive Rewards

Shihao Zhang, Xiaoman Wang, Yuan Liu, Yunshi Lan, Weining QianarXiv 2026

TL;DR

Progress-SQL introduces a multi-turn reinforcement learning (RL) framework for Text-to-SQL translation that moves away from sparse, single-turn rewards. By leveraging clause-level diagnostic feedback via an Oracle-guided Diagnostic Tree (ODT) and a progressive reward function that measures trajectory-level improvement, the framework helps large language models (LLMs) internalize debugging patterns, significantly boosting SQL generation accuracy and robustness.

What Problem Does This Paper Address?

Translating natural language questions into executable SQL queries (Text-to-SQL) is a complex task for LLMs, especially when queries involve intricate joins, aggregations, and nested structures. While reinforcement learning has shown promise in optimizing LLMs for this task, existing methods typically rely on one-shot rewards evaluated on a single final SQL state (such as binary execution success).

This paradigm suffers from two major flaws:

  1. Sparse Signals: A binary success/failure signal provides very little guidance on why a query failed or how to fix specific clauses.
  2. Blindness to Progress: Even recent multi-turn refinement methods evaluate only the final state, failing to capture whether the model made meaningful, progressive improvements across its debugging trajectory.
Figure 1: Comparison of reward paradigms. (a) Single- turn Rollout: the policy model generates a single SQL and receives a reward signal after execution. (b) Multi- turn Rollout with Progressive Reward (Ours): the policy model iteratively refines its SQL over T turns guided by ODT engine. The progressive reward mea- sures improvement from the first SQL to the final SQL.

Methods

Progress-SQL reformulates Text-to-SQL training as a multi-turn debugging trajectory (up to $T$ turns) optimized by Group Relative Policy Optimization (GRPO). The framework introduces two core innovations:

  1. Oracle-guided Diagnostic Tree (ODT): Instead of directly matching raw Abstract Syntax Tree (AST) nodes, the ODT abstracts SQL queries into clause-level structural profiles (e.g., selected columns, join signatures, filtering predicates). By comparing the predicted ODT against the gold ODT, the system generates fine-grained, discrete error tags (like SELECT_ERROR or JOIN_MISSING) that are verbalized into natural language feedback to guide the model's next turn.
  2. Progressive Reward Formulation: The total reward is a holistic combination of four distinct signals:
  3. Progressive Alignment Reward ($R_{align}$): Measures the structural and lexical improvement from the initial SQL attempt to the final turn ($\Delta = \text{Final Score} - \text{Initial Score}$). This explicitly rewards positive trajectory-level progress.
  4. Progression Latency Reward ($R_{late}$): Applies a geometric decay factor to penalize late corrections, heavily favoring models that achieve correctness in earlier turns.
  5. Execution Status Reward ($R_{exec}$): Rewards positive transitions in executability, such as successfully recovering from an initially unexecutable syntax error.
  6. Format Reward ($R_{fmt}$): Ensures compliance with structured reasoning tags (e.g., <think> and <sql>).
Figure 2: Overall framework of Progress-SQL, our multi-turn reinforcement learning method for Text-to-SQL. The policy model iteratively generates SQL queries and receives ODT-based diagnostic feedback after each execution. The final trajectory is optimized using progressive rewards that combine structural/lexical alignment improvement, progression latency reward, execution-status transition reward, and format reward.

Datasets

The authors evaluated Progress-SQL across several prominent Text-to-SQL benchmarks:

  • BIRD: A large-scale, cross-domain benchmark featuring highly complex database schemas and real-world data values.
  • Spider: The standard cross-domain semantic parsing benchmark.
  • Robustness Variants: To evaluate performance under schema variations and domain perturbations, they tested on Spider-Syn (synonym substitutions), Spider-Realistic, and Spider-DK (domain knowledge additions).

Key Insights and Ideas

  • Internalizing the Debugger: A key finding is that while the ODT feedback is only available during training (since gold SQL is missing at test time), the multi-turn RL process forces the model to internalize structural debugging patterns. At test time, under standard single-turn inference without any feedback, the model naturally makes fewer structural errors on its very first attempt.
  • The Necessity of Per-Turn Decay: Ablation studies revealed that removing the per-turn decay factor ($\gamma$) caused the largest performance drops. Without it, the model suffers from "feedback laziness"—it learns to over-rely on later turns of ODT feedback to fix its mistakes, which degrades its independent, first-turn generation capabilities.
  • Algorithm Agnostic: The progressive reward design is not tied to a specific RL optimizer; it demonstrated consistent performance gains when evaluated under both GRPO and GSPO (Group Sequence Policy Optimization) frameworks.

Key Results

Progress-SQL was evaluated using Qwen2.5-Coder (7B and 14B) as backbone models, achieving state-of-the-art results among open-source models:

  • Execution Accuracy (EX): The 7B model achieved an average absolute EX improvement of 8.5% across BIRD Dev, Spider Dev, and Spider Test compared to its base model. It reached 87.1% EX on Spider Dev and 87.8% EX on Spider Test, outperforming recent competitive RL baselines like SQL-R1 and SkyRL-SQL.
  • Robustness Gains: On the challenging Spider-Realistic variant, Progress-SQL-7B achieved an absolute EX improvement of +9.7%, demonstrating superior generalization against schema and language perturbations.
  • Error Reduction: Offline ODT evaluation showed that the framework reduced average clause-level structural errors (such as mismatched JOIN or GROUP BY clauses) by up to 11% absolute.

Limitations and Future Work

  • Gold SQL Dependency: The ODT diagnostic engine requires the ground-truth gold SQL query to generate feedback, restricting its utility strictly to the training phase.
  • Parser Vulnerability: The ODT scorer relies on successful initial SQL parsing. If a model generates a severely malformed query or utilizes highly dialect-specific SQL constructs, the precision of the structural diagnostics can degrade, forcing the system to fall back on coarser lexical alignment signals.

The authors suggest that extending the framework to handle more diverse SQL dialects and integrating it into real-world interactive database environments are promising directions for future research.

Summary updated

BibTeX
@misc{zhang2026progress,
  author = {Shihao Zhang and Xiaoman Wang and Yuan Liu and Yunshi Lan and Weining Qian},
  title = {{Progress-SQL: Improving Reinforcement Learning for Text-to-SQL via Progressive Rewards}},
  year = {2026},
  eprint = {2606.06825},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.06825},
}
Figure