JudgeSQL:基于加权共识锦标赛的SQL候选推理
JudgeSQL: Reasoning over SQL Candidates with Weighted Consensus Tournament
AI总结:
JudgeSQL提出基于推理的SQL评判模型与加权共识锦标赛机制,解决文本到SQL任务中候选选择瓶颈,在BIRD基准上验证了其判断能力与鲁棒性。
摘要:
文本到SQL是一项关键任务,它连接了自然语言理解与结构化数据访问,但由于语义歧义和复杂的组合推理,该任务仍然具有根本性的挑战。尽管大型语言模型(LLMs)通过提示、监督微调和强化调优极大地推进了SQL生成,但向测试时扩展的转变暴露了一个新的瓶颈:从多样化的候选池中选择正确的查询。现有的选择方法,如自一致性或最佳N解码,仅提供浅层信号,使其容易出现不一致的评分、脆弱的推理链,以及无法捕捉密切相关SQL候选之间的细粒度语义差异。为此,我们引入了JudgeSQL,一个原则性框架,通过结构化推理和加权共识锦标赛机制重新定义SQL候选选择。JudgeSQL开发了一个基于推理的SQL评判模型,该模型通过可验证奖励引导的强化学习提炼推理轨迹,实现准确且可解释的判断。在此基础上,加权共识锦标赛将显式推理偏好与隐式生成器置信度相结合,产生既更可靠又更高效的选择。在BIRD基准上的大量实验表明,JudgeSQL展现出卓越的SQL判断能力,以及良好的跨尺度泛化性和对生成器能力的鲁棒性。
英文摘要:
Text-to-SQL is a pivotal task that bridges natural language understanding and structured data access, yet it remains fundamentally challenging due to semantic ambiguity and complex compositional reasoning. While large language models (LLMs) have greatly advanced SQL generation though prompting, supervised finetuning and reinforced tuning, the shift toward test-time scaling exposes a new bottleneck: selecting the correct query from a diverse candidate pool. Existing selection approaches, such as self-consistency or best-of-$N$ decoding, provide only shallow signals, making them prone to inconsistent scoring, fragile reasoning chains, and a failure to capture fine-grained semantic distinctions between closely related SQL candidates. To this end, we introduce JudgeSQL, a principled framework that redefines SQL candidate selection through structured reasoning and weighted consensus tournament mechanism. JudgeSQL develops a reasoning-based SQL judge model that distills reasoning traces with reinforcement learning guided by verifiable rewards, enabling accurate and interpretable judgments. Building on this, a weighted consensus tournament integrates explicit reasoning preferences with implicit generator confidence, yielding selections that are both more reliable and more efficient. Extensive experiments on the BIRD benchmark demonstrate that JudgeSQL exhibits superior SQL judgment capabilities and good cross-scale generalization and robustness to generator capacity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。