arXiv:2606.30851cs.CLcs.AI2026-06中稿 · ACL被引 1

用可学习的语义评分模型提升文本转SQL的推理可靠性

Test-Time Verification for Text-to-SQL via Outcome Reward Models

论文配图:Test-Time Verification for Text-to-SQL via Outcome Reward Models
图 1 · 摘自论文原文
  • 用自动生成候选答案和执行结果打标签训练语义评分模型
  • 在BIRD和Spider数据集上比传统方法最高提升4.33%
  • 适合需要高精度文本转SQL的应用场景

提升大语言模型在文本转SQL等结构化推理任务中的推理可靠性是当前核心挑战。现有测试时策略如Best-of-N采样和多数投票依赖执行成功或输出频率等启发式信号,难以区分语义差异。本文研究将结果奖励模型(ORMs)作为测试时验证的可学习语义评分函数。提出GradeSQL框架,通过自动化候选生成与执行标注实现任务特定ORM的无监督训练。将ORM集成至验证驱动的Best-of-N流程,在BIRD和Spider基准上对多个开源LLM进行评估。基于ORM的选择持续优于基于执行的Best-of-N和多数投票,最大提升达+4.33%(BIRD)和+2.10%(Spider)。结果显示ORM随候选集规模增长而有效扩展,复杂查询上提升更显著。整体表明,ORM验证为文本转SQL提供了简单、高效且可扩展的替代方案。代码、数据集和模型均已公开。

原文摘要 · Abstract (English)

Improving the reliability of large language models (LLMs) at inference time is a central challenge in structured reasoning tasks such as Text-to-SQL. Common test-time inference strategies, including Best-of-N sampling and Majority Voting, rely on heuristic signals such as execution success or output frequency, which provide limited semantic discrimination across candidate outputs. In this work, we study Outcome Reward Models (ORMs) as learned semantic scoring functions for test-time verification in Text-to-SQL. While ORMs have been previously explored for test-time scaling and alignment, their application to structured query generation remains underexplored. We introduce GradeSQL, a scalable framework for training task-specific ORMs via automated candidate generation and execution-based labeling, enabling verifier training without manual annotation. We integrate ORMs into a verification-driven Best-of-N pipeline and evaluate our approach on the BIRD and Spider benchmarks across multiple open-source LLM families. ORM-based selection consistently outperforms execution-based Best-of-N and Majority Voting, with gains of up to +4.33% on BIRD and +2.10% on Spider. We further show that ORMs scale effectively with larger candidate sets and yield stronger improvements on complex queries. Overall, our results demonstrate that ORM-based verification provides a simple, effective, and scalable alternative to heuristic test-time selection strategies for Text-to-SQL. Code datasets and models are publicly available.

文本转SQL推理验证奖励模型LLM可靠性

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