acceptodds
Withdrawn from ICLR 2027

From Pipeline-Based Generation to Interactive Reasoning Trajectory Learning for Text-to-SQL

Withdrawn from ICLR 2027, so left out of the paper lists and the map.

Abstract

In the intersection of natural language processing (NLP) and structured databases, translating natural language queries into SQL remains a formidable challenge. While current methods, which combine multi-stage pipelines with LLMs, have made substantial progress in generating executable SQL, they still encounter issues such as error propagation and high generation latency. To address these challenges, we propose STIR-SQL, a Text-to-SQL agent that performs single-trajectory interleaved reasoning and is trained via pure reinforcement learning with multi-dimension reward. Specifically, STIR-SQL replaces the multi-stage pipeline with a single, tool-integrated interleaved reasoning trajectory before the final answer, directly reducing generation latency. Within this trajectory, STIR-SQL interacts with specialized tools and performs self-correction, which mitigates error propagation and enhances the accuracy of SQL generation. Experimental results show that our approach achieves an execution accuracy of 69.7% on the BIRD benchmark, while requiring only 3B activated parameters during inference in a 30B-scale model. Furthermore, the reduction in activated parameters and inference latency demonstrates its strong potential for real-world deployment.

Primary area:
applications to computer vision, audio, language, and other modalities
Keywords:
Text-to-SQL, Reinforcement Learning, Interleaved Reasoning, Tool-Augmented Agents

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.80 over 5 reviews, above 27% of the others.
Reviewer_JPvGOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

STIR-SQL trains a tool-using text-to-SQL model with reinforcement learning so that schema inspection, SQL generation, execution, and revision occur within one interactive trajectory. It combines database descriptions, four tools, and a composite reward. The system reports 69.7% execution accuracy on BIRD-dev, 88.7% on Spider-test, and 79.1% on Spider-DK. The supplement includes an untrained, same-backbone comparison of interaction designs and reports 23.7 seconds average inference latency for STIR-SQL.

Critical strengths
  1. The paper targets a consequential limitation of fixed schema-linking pipelines: an early grounding error can constrain subsequent SQL generation. Giving the policy access to database observations throughout inference is a sensible way to address it.
  2. The system achieves a strong reported BIRD-dev result with a 3B-active-parameter model. The ablations, self-correction analysis, and same-backbone supplementary comparison go beyond a leaderboard claim and give some evidence that the tool and reward choices matter.
Critical weaknesses
  1. The 3.5-point drop when interleaved reasoning is removed also removes multi-turn tool access, so it is not an estimate of the value of learning a unified trajectory. The supplement offers a more relevant same-backbone comparison, but it uses an untrained DeepSeek-V3.2 model rather than the trained STIR-SQL policy and changes the available tools or schema-handling procedure across conditions. Its 0.8–1.2-point differences therefore support the complete inference design, but do not establish that trajectory organization, rather than the changed affordances, explains the gain. This distinction matters because the paper's contribution is framed as trajectory learning, not simply a well-performing combination of tools and rewards.
  2. The supplement reports 23.7 seconds for STIR-SQL and 94.1 seconds for CHESS, but does not establish a common measurement protocol for model serving, hardware, token generation, and database/tool latency. The manuscript's “one LLM call” description is also difficult to reconcile with the supplement's 4.37 average generation calls; one trajectory need not be one model invocation. The latency figures are useful descriptive results, but they do not yet demonstrate that unifying the trajectory itself causes the claimed reduction in end-to-end cost.
Questions for authors
  1. Is there a comparison using the trained STIR-SQL backbone and the same training data, reward, schema descriptions, tools, and inference budget, with only the staged versus interleaved organization changed? Paired per-question results would make clear whether the claimed trajectory-learning contribution survives that control.
  2. Were the latency results measured on a common hardware and model-serving setup, with model generation and tool/database time included for every method? Please clarify what counts as the claimed single LLM call relative to the 4.37 average generation calls.
  3. Was the released reward implementation used to train the evaluated checkpoint? The manuscript describes valid tool calls rewarded up to 1.0, whereas the supplied code counts tool-call tags and caps this term at 0.5; resolving this would clarify which training objective the results evaluate.
Reviewer_ojs9OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper proposes STIR-SQL, a Text-to-SQL agent that replaces the multi-stage pipeline (schema linking, generation, post-processing) with a single ReAct-style interleaved reasoning trajectory. It enriches each database column offline with LLM-generated semantic descriptions and template-derived value descriptions. It equips the model with four tools: description inspection, keyword existence check, global keyword search, and SQL execution. It trains a Qwen3 MoE (30B total, 3B active) with pure GSPO, using a composite reward of tool-call success, graded execution accuracy, schema Jaccard similarity, and SQL-skeleton similarity. Trained only on BIRD, it reports 69.7% EX on BIRD-dev, 88.7% on Spider-test, and 79.1% on Spider-DK, supported by component ablations, tool-usage analysis, and Best-of-N/self-consistency scaling experiments.

Critical strengths
  1. Competitive accuracy at low inference cost. 69.7% on BIRD-dev from a 3B-active model trained only on BIRD, without schema-value indexing or candidate re-ranking.
  2. Informative ablations and behavior analysis. The ablations isolate interleaved reasoning (−3.5) and the composite reward (−2.1) as the main contributors. The tool-usage analysis gives useful insight into how TIR agents behave on Text-to-SQL.
Critical weaknesses
  1. Table 1 lists the model as 3B, but it is a 30B MoE whose memory footprint is that of a 30B model. Claims of parameter efficiency against dense 7B/14B models are therefore not apples-to-apples.
  2. Closely related open RL baselines are missing. For example, Arctic-Text2SQL-R1 is cited in the paper but absent from Table 1, and it reports comparable or higher BIRD-dev EX with execution-only rewards and no tools.
  3. There is no result for the untrained Qwen3-30B-A3B base model under the same agent framework.
  4. Limited novelty relative to existing TIR methods. Multi-turn tool-integrated RL for Text-to-SQL is already established by SkyRL-SQL, MTIR-SQL, and ReEx-SQL. The contribution mainly lies in the particular toolset, reward shaping, and the choice of GSPO, which are incremental engineering choices.
Questions for authors
  1. What are the weights of the four reward components, and how were they chosen?
  2. What is the EX of the untrained Qwen3-30B-A3B in the same agent framework (zero-shot with tools)?
  3. How does STIR-SQL compare to SkyRL-SQL, MTIR-SQL, and Arctic-Text2SQL-R1 when trained from the same base model?
  4. Please report end-to-end latency, number of generated tokens, and GPU memory against single-pass RL baselines, not only against CHESS.
Reviewer_TPqDOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper introduces STIR-SQL, a text-to-SQL agent that performs single-trajectory interleaved reasoning and is trained using reinforcement learning with a multi-dimensional reward. Within each trajectory, STIR-SQL interacts with specialized tools and performs self-correction to reduce error propagation and improve SQL generation accuracy. Experimental results show that STIR-SQL achieves 69.7% execution accuracy on the BIRD benchmark with a 3B-parameter model.

Critical strengths

S1. The paper studies an important problem of improving complex reasoning and self-correction in text-to-SQL through tool-augmented reinforcement learning.

S2. STIR-SQL provides a reasonable framework combining interleaved reasoning, tool use, and multi-dimensional rewards, with competitive results using a 3B model.

Critical weaknesses

W1. The technical novelty of STIR-SQL is limited. The framework mainly combines tool-augmented reasoning with reinforcement learning using GSPO and four reward signals: tool call, execution accuracy, schema accuracy, and syntax similarity. These components largely follow existing techniques in agentic text-to-SQL and RL-based training. The paper should better clarify what new mechanisms are introduced beyond their integration.

W2. The experimental comparison with recent small-model Text-to-SQL methods is insufficient. STIR-SQL achieves 69.7% execution accuracy on BIRD Dev with a 3B model, while FINER-SQL (3B, 67.8%), OmniSQL (7B, 69.0%), and Arctic-Text2SQL-R1 (7B, 70.7%) report comparable results. Moreover, STIR-SQL uses multiple tools for schema inspection, keyword search, and SQL execution, which may introduce additional inference costs and make direct accuracy comparisons less fair. The paper should include these baselines and compare accuracy, tool usage, and inference costs under comparable settings.

Questions for authors

Q1. What is the main technical novelty of STIR-SQL beyond combining existing tool-augmented reasoning and RL techniques, and how much of its performance gain comes from additional tool calls and inference costs?

Reviewer_K4qwOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper presents STIR-SQL, a Text-to-SQL agent that unifies schema understanding, SQL generation, and self-correction within a single interactive reasoning trajectory. It combines database descriptions with four tools for schema inspection, keyword checking, search, and SQL execution. The model is trained through reinforcement learning with rewards for tool validity, execution correctness, schema alignment, and structural similarity. With 3B active parameters, STIR-SQL achieves 69.7% execution accuracy on BIRD-dev, 88.7% on Spider-test, and 79.1% on Spider-DK.

Critical strengths
  • The paper addresses practically limitations of Text-to-SQL systems, including schema-linking error propagation and inference overhead. Integrating database exploration and execution feedback into an adaptive reasoning process is a reasonable design.

  • The reported results across BIRD, Spider, and Spider-DK suggest that the approach is effective across multiple benchmarks.

Critical weaknesses
  • The contribution beyond existing tool-integrated reasoning and partial-reward methods remains insufficiently differentiated. In particular, the methodological advances over SkyRL-SQL, ReEx-SQL, MTIR-SQL, and Reasoning-SQL require clearer justification.

  • Table 1 omits strong single-model baselines such as Arctic-Text2SQL-R1 and comparable MoE systems listed on the BIRD leaderboard, without establishing an accuracy–cost advantage over them. Although the abstract distinguishes total and active parameters, Table 1 should report both to make comparisons with dense models more transparent.

  • There are material discrepancies between the paper and the submitted code, including the tool-reward cap and success criterion, the schema-reward formulation, and a mismatch between the specified final-answer format and the SQL extractor.

  • The current benchmarks provide limited evidence for the broader claims about large-scale databases and practical deployment. Although Appendix Table 8 reports latency improvements, the inference hardware, concurrency settings, candidate budgets, and timing boundaries are insufficiently specified to assess the fairness of the comparison.

  • Training-data construction, complete configurations, and the final evaluation procedure are insufficiently documented for reproduction.

Questions for authors
  • What distinguishes STIR-SQL methodologically from SkyRL-SQL, ReEx-SQL, MTIR-SQL, and Reasoning-SQL? In Appendix Table 7, are tool availability and accessible schema information matched across variants?

  • Could you include Arctic-Text2SQL-R1 in the accuracy comparison, alongside other representative strong baselines? Please report total and active parameters and distinguish single-trajectory results from multi-candidate results.

  • Which implementation produced the reported results, and how do you reconcile the discrepancies in tool rewards, schema rewards, and SQL output parsing? Was final EX computed using the official evaluator?

  • What hardware, concurrency settings, candidate budgets, and timing boundaries were used for Table 8?

  • Could you provide the missing details on the training data and experimental configuration, and evaluate on a compatible setting, such as the SQLite subset of Spider 2.0-Lite, to better substantiate the scalability and deployment claims? A discussion of the method’s applicability and limitations with respect to BIRD-Interact would also be valuable.

Reviewer_xAfROpenReview ↗
Rating
1
Confidence
4
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper proposes STIR-SQL, a Text-to-SQL agent built on Qwen3-30B-A3B. Instead of a multi-stage pipeline, it runs a single ReAct-style trajectory with four tools: description lookup, keyword-existence check, global keyword search, and SQL execution. It is trained with GSPO on BIRD-train using a weighted reward with four parts: tool-call, graded execution, schema-Jaccard, and SQL-skeleton similarity. Reported results are 69.7% EX on BIRD-dev, 88.7% on Spider-test and 79.1% on Spider-DK, with lower latency than CHESS, MTIR-SQL and SkyRL-SQL.

Critical strengths
  1. The motivation is reasonable. Multi-stage Text-to-SQL pipelines do suffer from error propagation in schema linking and high latency from candidate generation and ranking. Letting the policy revisit schema decisions inside a single interactive trajectory is a sensible direction.
  2. The tool set is lightweight: description lookup, keyword-existence check, global keyword search and SQL execution. It needs no vector indexing of database values, so the system is simple to deploy and easy to follow.
  3. The behavioral analyses are informative. Tool-call statistics split by correctness and difficulty (Table 3, Fig. 3), first-SQL accuracy vs. correction turns (App. B.1), and the training-free framework comparison (App. B.2) give some insight into how the agent uses feedback.
Critical weaknesses
  1. The novelty over existing interactive and RL agents is limited. Unifying schema linking, generation, and execution correction into one RL trajectory is already well-explored. MARS-SQL has demonstrated multi-turn GRPO with a unified ReAct trajectory and ablated decoupled pipelines, while AutoLink and FlexSQL already support flexible schema and keyword inspection. Furthermore, the reward design heavily borrows from TRUST-SQL (graded execution) and Reasoning-SQL (schema Jaccard and syntax similarity), and GSPO is used off the shelf. The remaining additions—generated descriptions and lookup tools—yield marginal ablation gains (0.4–1.7 points).
  2. The backbone is Qwen3-30B-A3B (30B total parameters), yet Table 1 mislabels it as "3B" against 7B dense models. Crucially, App. B.1 shows an untrained Base + ReAct setup already reaches 65.5% First-SQL accuracy, indicating most of the 69.7% performance stems from the base model. This is compounded by the fact that First-SQL accuracy (68.4%) is only 1.3 points below the final EX (69.7%), suggesting minimal benefit from the self-correction loop. Strong RL baselines like Arctic-Text2SQL-R1 (70.1% at 14B) are also omitted from Table 1, and no prior RL recipe is retrained on this backbone for a fair comparison.
  3. The experiments are limited to BIRD-dev, Spider, and Spider-DK, which are largely saturated (e.g., a 0.6% gain over SQL-R1 on Spider) and fail to test the claimed real-world scalability. Because the entire schema fits within the prompt on BIRD-dev (App. D), dynamic grounding is never truly stress-tested, and the global search tool scanning all columns introduces unmeasured enterprise costs. Modern interactive benchmarks like Spider 2.0 (Spider2-SQLite), BIRD-Interact, or LiveSQLBench are needed to substantiate the claims.
  4. The reward formulation lacks sufficient implementation details, particularly the weights assigned to individual components. Rewarding valid tool calls may encourage redundant interactions, while schema and syntax similarity rewards can penalize semantically correct SQL queries that differ from the reference. The reported ablations also require clarification: Table 2 reports 69.7% EX for the full model, whereas Appendix Table 5 reports 69.1% under a one-epoch setting, without clearly reconciling the experimental configurations.

References

  • Yang, H. et al. MARS-SQL: A Multi-Agent Reinforcement Learning Framework For Text-To-SQL, Proceedings of the 43rd International Conference on Machine Learning (ICML), 2026.
  • Wang, Z. et al. AutoLink: Autonomous Schema Exploration and Expansion for Scalable Schema Linking in Text-to-SQL at Scale, Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), 2026.
  • Pham, Q. H. et al. FlexSQL: Flexible Exploration and Execution Make Better Text-to-SQL Agents, In Third Conference on Language Modeling (COLM), 2026.
  • Jian, A. et al. TRUST-SQL: Tool-Integrated Multi-Turn Reinforcement Learning for Text-to-SQL over Unknown Schemas, arXiv preprint arXiv:2603.16448, 2026.
  • Pourreza, M. et al. Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQL, In Second Conference on Language Modeling (COLM), 2025.
  • Yao, Z. et al. Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL, Findings of the Association for Computational Linguistics: ACL 2026, pp. 26966–26995, 2026.
  • Lei, F. et al. Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflows, In The Thirteenth International Conference on Learning Representations (ICLR), 2025.
  • Huo, N. et al. BIRD-Interact: Re-imagining Text-to-SQL Evaluation via Lens of Dynamic Interactions, In The Fourteenth International Conference on Learning Representations (ICLR), 2026.
  • BIRD Team. LiveSQLBench: A Dynamic and Contamination-Free Benchmark for Evaluating LLMs on Real-World Text-to-SQL Tasks, 2025.
Questions for authors
  1. Please report the reward weights, the number of training steps/epochs for the main model, and the exact backbone variant (Qwen3-30B-A3B, instruct or thinking mode).
  2. What does the same backbone achieve on BIRD-dev (a) zero-shot without tools and (b) with the ReAct tool loop but without RL training? How does STIR-SQL compare against a SkyRL-SQL or TRUST-SQL baseline trained on the exact same backbone and dataset?
  3. Can you report evaluation results on modern benchmarks including Spider 2.0 (at least the Spider2-SQLite subset), BIRD-Interact / Mini-Interact, and LiveSQLBench? What are the wall-clock latency and query overhead of the global keyword search on large enterprise databases?
  4. Which LLM generates the column descriptions, and were they generated on the evaluation databases? What happens if BIRD's official column descriptions are used instead? Concretely, how does STIR-SQL differ from MARS-SQL's generation agent and TRUST-SQL / Reasoning-SQL's reward formulations, and which ablation isolates that difference?
  5. Please consider appending the appendix directly after the references within the main submission PDF rather than hosting it separately in the supplementary zip.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Discussion (0)

Sign in to comment.