Redirecting to original paper in 30 seconds...

Click below to go immediately or wait for automatic redirect

arxiv_cl 95% Match Research Paper Data Analysts,Database Administrators,Software Engineers,AI Researchers 1 day ago

MARS-SQL: A multi-agent reinforcement learning framework for Text-to-SQL

reinforcement-learning › multi-agent
📄 Abstract

Abstract: Translating natural language to SQL remains difficult for complex queries. Such queries often need environmental interaction and self-correction. To address this, we introduce MARS-SQL, a novel multi-agent framework that combines principled task decomposition and interactive reinforcement learning (RL). Our system comprises three specialized agents: a Grounding Agent for schema linking, a Generation Agent for query generation, and a Validation Agent for final selection. The core of our framework is the Generation agent, which is trained via a multi-turn RL policy. Adopting a ReAct-style Think-Act-Observe loop, the agent iteratively generates thoughts, executes SQL actions against a live database, and revises its strategy based on execution feedback, enabling dynamic, stateful reasoning and self-correction. At inference time, we generate multiple interaction trajectories to explore diverse reasoning paths. The Validation agent, then selects the optimal trajectory by modeling verification as a next-token prediction task and choosing the solution with the highest generation probability. This structured workflow pipelines specialized agents. It combines interactive RL for generation with generative modeling for verification. The approach proves highly effective for robust and accurate SQL generation. Experiments show that MARS-SQL achieves state-of-the-art Execution Accuracy of 77.84% on the BIRD dev set and 89.75% on the Spider test set. Our code is available at https://github.com/YangHaolin0526/MARS-SQL.
Authors (4)
Haolin Yang
Jipeng Zhang
Zhitao He
Yi R. Fung
Submitted
November 2, 2025
arXiv Category
cs.CL
arXiv PDF

Key Contributions

MARS-SQL is a novel multi-agent RL framework for Text-to-SQL that combines task decomposition and interactive learning. It uses specialized agents (Grounding, Generation, Validation) and a ReAct-style loop for the Generation agent to enable dynamic reasoning and self-correction via database interaction.

Business Value

Empowers non-technical users to query complex databases using natural language, significantly improving data accessibility and accelerating business intelligence processes. This can lead to more data-driven decision-making across organizations.