解决文本转SQL中候选查询评分不一致与遗漏问题
R$^3$-SQL: Ranking Reward and Resampling for Text-to-SQL

- 按执行结果分组后统一打分,提升评分一致性
- 在BIRD-dev上达75.03%执行准确率,五基准测试均提升
- 引入智能重采样,提升正确SQL的召回率
现代文本转SQL系统生成多个候选SQL并进行排序以确定最终预测。然而,现有方法存在两个局限:一是对功能等价的SQL评分不一致,尽管执行结果相同;二是当正确SQL不在候选池中时,排名无法恢复。我们提出R$^3$-SQL框架,通过统一奖励机制与重采样策略解决上述问题。R$^3$-SQL首先按执行结果对候选查询分组,并对组间进行排序以保证一致性。为评分每组,结合组间成对偏好与最优组的排名和规模点值,同时捕捉相对偏好、一致性与候选质量。为提升候选召回,引入代理式重采样,评估生成候选池并判断是否应选择性重采样。R$^3$-SQL在BIRD-dev上实现75.03%的执行准确率,是使用公开模型尺寸方法中的新最佳表现,在五个基准测试上均取得一致提升。
原文摘要 · Abstract (English)
Modern Text-to-SQL systems generate multiple candidate SQL queries and rank them to judge a final prediction. However, existing methods face two limitations. First, they often score functionally equivalent SQL queries inconsistently despite identical execution results. Second, ranking cannot recover when the correct SQL is absent from the candidate pool. We propose R$^3$-SQL, a Text-to-SQL framework that addresses both issues through unified reward for ranking and resampling. R$^3$-SQL first groups candidates by execution result and ranks groups for consistency. To score each group, it combines a pairwise preference across groups with a pointwise utility from the best group rank and size, capturing relative preference, consistency, and candidate quality. To improve candidate recall, R$^3$-SQL introduces agentic resampling, which judges the generated candidate pool and selectively resamples when the correct SQL is likely absent. R$^3$-SQL achieves 75.03 execution accuracy on BIRD-dev, a new state of the art among methods using models with disclosed sizes, with consistent gains across five benchmarks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。