Large Language Models (LLMs) can translate natural language into SQL, but small models struggle with multi-table and complex queries in Zero-Shot Learning (ZSL) settings. While Supervised Fine-Tuning (SFT) helps, it falls short for harder cases. To address this, we study how different reasoning strategies (general-purpose reasoning in ZSL, reasoning traces in SFT, and Reinforcement Learning with Verifiable Reward (RLVR) with novel reward functions) affect Text2SQL performance across four benchmarks. We show that partial scoring rewards, computed via SQL execution, are crucial for guiding models even when outputs are not fully correct. These fine-grained signals lead to consistently better Text2SQL outcomes. Small LLMs benefit most from reasoning-aware SFT and RL, with the 14B Qwen-Coder-2.5 surpassing 400B+ models on challenging datasets like BIRD.


翻译:大语言模型(LLMs)可将自然语言转换为SQL语句,但在零样本学习(ZSL)场景下,小模型处理多表及复杂查询时表现欠佳。尽管监督微调(SFT)有所助益,但面对更复杂的案例仍显不足。为此,我们研究不同推理策略(ZSL中的通用推理、SFT中的推理轨迹、以及基于可验证奖励的强化学习(RLVR)配合新型奖励函数)在四个基准测试中对Text2SQL性能的影响。研究表明:通过SQL执行计算的部分评分奖励,即使输出不完全正确,也能有效引导模型。这种细粒度信号可稳定提升Text2SQL表现。小模型从推理感知型SFT和强化学习中获益最大,其中14B参数的Qwen-Coder-2.5在BIRD等具有挑战性的数据集上超越了400B参数以上的模型。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
【ICML2025】通过多智能体反思强化大语言模型推理
专知会员服务
23+阅读 · 2025年6月11日
通过逻辑推理赋能大语言模型:综述
专知会员服务
32+阅读 · 2025年2月24日
大型语言模型高效推理综述
专知会员服务
64+阅读 · 2024年4月23日
大型语言模型在表格推理中的应用综述
专知会员服务
47+阅读 · 2024年2月14日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
Word2Vec 与 GloVe 技术浅析与对比
LibRec智能推荐
25+阅读 · 2017年5月15日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Arxiv
12+阅读 · 2023年5月31日
VIP会员
最新内容
美国从乌克兰无人机战争中学习经验
专知会员服务
6+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
3+阅读 · 6月21日
学习数据的几何:形状空间分析数学综述
专知会员服务
10+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
12+阅读 · 6月17日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员