Research map / Large language models / Reasoning and chain of thought
Beyond Static Pipelines: Learning Dynamic Workflows for Text-to-SQL
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes SquRL, an SFT+GRPO framework where an LLM learns to dynamically construct Text-to-SQL workflows from modular actors, using rule-based rewards, dynamic actor masking, and LLM pseudo rewards.
Problem
Text-to-SQL systems rely on single static workflows that generalize poorly to out-of-distribution and long-tail queries and waste compute on simple ones; users must manually choose pipelines.
Approach
Treat workflow selection as a policy over modular actors/templates, learned by SFT then RL with a multi-stage rule-based reward, dynamic actor masking for exploration, and pairwise LLM-judged pseudo rewards to cut execution cost; theory shows the oracle dynamic selector is never worse than the best static workflow.
Key results
- SquRL-7B reaches 86.27% on Spider-Dev, 86.58% on Spider-Test and 67.60% on BIRD-Dev, above the best static baseline RSL-SQL (84.30, 83.74, 65.82).
- On SynSQL, SquRL-7B achieves 64.42% overall EX versus 57.42% for RSL-SQL; gap grows to +7.97 on Highly Complex queries (46.51 vs 38.54).
- On Spider2.0-Lite, SquRL-7B with DeepSeek-R1 backend reaches 49.18% vs 33.09% for LinkAlign and RSL-SQL.
Surprising findings
- Pseudo rewards at 10% replacement improved BIRD-Dev over true rewards only (64.47 vs 63.61), while 30% replacement degraded performance substantially.
- The theoretical counterexample shows pairwise workflow disagreement alone does not guarantee a positive dynamic gap.
Limitations
- Oracle dynamic upper bound uses per-query knowledge of correctness, not achievable by the learned policy.
- Relies on an external API LLM (Qwen-Plus) for actors and pseudo rewards, and on a frozen backend for execution feedback, so results depend on backend quality.
- Pseudo reward noise degrades performance at higher replacement ratios.
Experimental setup
Datasets: SynSQL-2.5M Spider BIRD
Benchmarks: Spider-Dev Spider-Test BIRD-Dev SynSQL Spider 2.0-Lite
Metrics: execution accuracy runtime format error rate
Baselines: DIN-SQL MAC-SQL LinkAlign RSL-SQL CHESS DAIL-SQL
Builds on: GRPO Squrve VERL
Closest papers by meaning
- MARS-SQL: A Multi-Agent Reinforcement Learning Framework For Text-To-SQL (ICML 2026 · similarity 0.88)
- Optimize Once, Execute Fast: Latency-Aware Multi-Agent Workflow Learning for Recurrent Queries (NeurIPS 2026 · similarity 0.87)
- CAPER: Clause-Aligned Process Supervision for Text-to-SQL (NeurIPS 2026 · similarity 0.87)
- Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflows (ICLR 2025 · similarity 0.86)
- CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL (ICLR 2025 · similarity 0.86)
- Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Search (ICML 2025 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
