arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

通过监督微调(SFT)和直接偏好优化(DPO)学习何时对文本到SQL进行推理

Learning When to Reason for Text-to-SQL via SFT and DPO

Soohyuk Jang, Jiheum Yeom, Nohil Park, Sang Hun Kim, Yoonyoung Choi, Kiwook Bae, Sungroh Yoon

arXiv 2607.22622首次发表:更新:

发表机构

Department of Electrical and Computer Engineering, Seoul National University; AI Center, Samsung Electronics; AIIS, ASRI, INMC, ISRC, and IPAI, Seoul National University(首尔国立大学电气与计算机工程系; 三星电子人工智能中心; 首尔国立大学人工智能研究所、高级科学研究所以及综合纳米技术中心、信息存储研究中心和人工智能平台研究所)

机构由 AI 辅助整理,请以论文原文为准。

AI 中文总结

研究文本到SQL推理问题,提出AutoThinkSQL框架,集成自动思考机制到SFT和DPO中,使模型能根据查询难度动态调整推理,在基准测试中提升效果,减少输出令牌和延迟,让推理决策与查询难度匹配。

AI 中文摘要

近期文本到SQL的方法严重依赖以推理为中心的范式,如思维链(CoT),在复杂基准测试中有显著提升,但高推理开销。现实中很多查询简单无需多步推导,强制推理浪费。为此提出AutoThinkSQL框架,将自动思考机制集成到文本到SQL的监督微调(SFT)和直接偏好优化(DPO)中。该方法能让模型对简单查询动态绕过推理,对复杂查询调用深度CoT。在Qwen3-Coder-30B-A3B上,相比最佳基线在Spider和BIRD基准测试中均有提升,还减少了输出令牌和延迟。进一步分析表明模型学会使推理决策与查询难度匹配。

英文摘要

Recent Text-to-SQL methods rely heavily on reasoning-centric paradigms such as Chain-of-Thought (CoT), achieving substantial gains on complex benchmarks at the cost of high inference-time overhead. However, a large fraction of real-world queries are simple lookups or aggregations that can be resolved without multi-step deduction, making forced reasoning wasteful. Thus, we propose AutoThinkSQL, a framework that integrates an auto-thinking mechanism into both Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) on Text-to-SQL. Our approach enables the model to dynamically bypass reasoning for simple queries while invoking deep CoT for complex queries. On Qwen3-Coder-30B-A3B, our method achieves consistent gains compared to the best counterpart baseline on both Spider and BIRD benchmarks while simultaneously reducing average output tokens by 24.6% and 18.3%, and average latency by 17.1% and 11.5% compared to CoT-only generation. Further analysis indicates that the model learns to align its reasoning decisions with query difficulty.

Comments8 pages, 5 figures. Model checkpoints are available at https://huggingface.co/autothinksql

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑