Recent advances in large language models (LLMs) trained with reinforcement learning (RL) have improved Text-to-SQL performance. However, RL-based approaches still struggle with complex queries due to two key limitations: insufficient stepwise execution-aware reasoning grounded in database feedback, and the lack of process-level rewards for guiding reasoning optimization. To address these issues, we propose CoCTE, a divide-and-conquer and execution-aware reasoning framework that progressively composes SQL queries through intermediate view validation and structured Common Table Expressions (CTEs), improving both accuracy and interpretability. To realize a CoCTE reasoning process, we develop Reward-SQL, a unified approach with three stages: (1) model initialization, which equips LLMs with structured CoCTE reasoning capabilities; (2) process reward design, which delivers fine-grained, execution-aware supervision; and (3) process-supervised RL and inference, which integrates process rewards into training and guides the inference stage by process rewards. This paper addresses the core challenges in Reward-SQL and makes the following contributions. We introduce a process reward model (PRM) that combines execution-aware trajectory scoring with entropy-based step weighting, providing dense and interpretable supervision across reasoning steps. We integrate PRM into both RL training and inference stages, stabilizing optimization and improving trajectory exploration with process-level signals. Experiments show that Reward-SQL significantly outperforms baselines with comparable model sizes, and exhibits strong cross-domain generalization.


翻译:基于强化学习(RL)训练的大语言模型(LLMs)的最新进展已提升文本转SQL性能。然而,基于RL的方法在处理复杂查询时仍面临两个关键局限:缺乏基于数据库反馈的逐步执行感知推理,以及缺少用于指导推理优化的过程级奖励。针对这些问题,我们提出CoCTE——一种分治与执行感知推理框架,通过中间视图验证和结构化公共表表达式逐步构建SQL查询,同时提升准确性与可解释性。为实现CoCTE推理过程,我们开发了统一方法Reward-SQL,包含三个阶段:(1)模型初始化,赋予LLMs结构化CoCTE推理能力;(2)过程奖励设计,提供细粒度、执行感知的监督;(3)过程监督RL与推理,将过程奖励整合至训练过程,并利用过程奖励指导推理阶段。本文聚焦Reward-SQL的核心挑战,并做出以下贡献:我们引入结合执行感知轨迹评分与基于熵的步骤加权的过程奖励模型,为推理步骤提供密集且可解释的监督;将PRM集成至RL训练与推理阶段,通过过程级信号稳定优化并改进轨迹探索。实验表明,Reward-SQL在可比模型规模下显著优于基线方法,并展现出强大的跨领域泛化能力。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
面向大型推理模型的强化学习综述
专知会员服务
29+阅读 · 2025年9月11日
Vision-R1:激励多模态大语言模型中的推理能力
专知会员服务
24+阅读 · 2025年3月12日
强化学习增强的大型语言模型:综述
专知会员服务
52+阅读 · 2024年12月17日
基于模型的强化学习综述
专知
42+阅读 · 2022年7月13日
【MIT博士论文】数据高效强化学习,176页pdf
使用 TensorFlow 做文本情感分析
Datartisan数据工匠
15+阅读 · 2017年11月16日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
【强化学习】强化学习+深度学习=人工智能
产业智能官
55+阅读 · 2017年8月11日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关基金
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员