arXiv:2505.20315cs.CLcs.AI2025-05ACL被引 44

用执行正确性奖励提升文本转SQL准确率,7B模型超越70B级系统。

Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL

  • 仅以执行正确性为奖励信号,避免复杂奖励设计。
  • 在6个基准上达顶尖准确率,7B模型超70B级系统。
  • 适合追求高效、可复现的文本转SQL研究者。

将自然语言转换为SQL(Text-to-SQL)是自然语言理解与结构化数据访问交叉领域的长期挑战。尽管大语言模型(LLMs)显著提升了SQL生成流畅性,但生成正确且可执行的SQL——尤其是复杂查询——仍是瓶颈。我们提出Arctic-Text2SQL-R1,一个基于轻量级执行正确性奖励信号的强化学习框架与模型系列。该方法避免了脆弱的中间监督和复杂的奖励塑造,促进训练稳定并实现与最终任务对齐。结合精心筛选的数据、强监督初始化及有效训练策略,Arctic-Text2SQL-R1在六个多样化Text-to-SQL基准上达到当前最优执行准确率,包括在BIRD排行榜上排名第一。值得注意的是,我们的7B模型性能超过以往70B级别系统,凸显该框架的可扩展性与高效性。通过简单的值检索与多数投票等扩展,进一步验证了推理阶段的鲁棒性。大量实验与消融研究提供了正反两方面的洞见,为未来Text-to-SQL研究提供实用指导。

原文摘要 · Abstract (English)

Translating natural language into SQL (Test2SQL) is a longstanding challenge at the intersection of natural language understanding and structured data access. While large language models (LLMs) have significantly improved fluency in SQL generation, producing correct and executable SQL--particularly for complex queries--remains a bottleneck. We present Arctic-Text2SQL-R1, a reinforcement learning (RL) framework and model family designed to generate accurate, executable SQL using a lightweight reward signal based solely on execution correctness. Our approach avoids brittle intermediate supervision and complex reward shaping, promoting stable training and alignment with the end task. Combined with carefully curated data, strong supervised initialization, and effective training practices, Arctic-Text2SQL-R1 achieves state-of-the-art execution accuracy across six diverse Test2SQL benchmarks, including the top position on the BIRD leaderboard. Notably, our 7B model outperforms prior 70B-class systems, highlighting the framework's scalability and efficiency. We further demonstrate inference-time robustness through simple extensions like value retrieval and majority voting. Extensive experiments and ablation studies offer both positive and negative insights, providing practical guidance for future Test2SQL research.

文本转SQL强化学习大模型执行准确率

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。