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

SQL-Zero:自演化的文本转SQL模型

SQL-Zero: Self-Evolving Text-to-SQL

Daniel Machado Pedrozo, Julia Soares Dollis, Bryan Lincoln Marques de Oliveira, Vinicius Alboneti Aguiar, Sávio Salvarino Teles de Oliveira, Telma Woerle de Lima Soares

arXiv 2609.04697首次发表:更新:

AI 中文总结

SQL-Zero是无需人工标注的文本转SQL自演化框架,通过挑战者-求解器自博弈与GRPO算法训练,在BIRD数据集上显著优于零样本基础模型,且3B模型在迁移任务中表现更优。

AI 中文摘要

训练具有竞争力的文本转SQL智能体通常依赖人工标注的自然语言/SQL对,这类标注成本高、领域特定性强,是扩展至新数据库的瓶颈。本文展示了无需任何标注对即可训练出具有竞争力的求解器。我们提出SQL-Zero,一种提议者-求解器自博弈框架,其中挑战者与求解器从同一基础大语言模型(LLM)起步,唯一的真值是针对数据库本身的执行结果。挑战者生成适配求解器当前难度的SQL对,目标是“难但可解”;双方通过交替回合的GRPO算法更新参数,同时对挑战者施加模板级重复惩罚以防止多样性崩溃。在无标注的BIRD数据库上训练后,自博弈方法在BIRD开发集上,3B模型比零样本基础模型提升6.6个百分点,7B模型提升7.3个百分点。在相同数据库上,该方法的表现也优于用相同流程在人工标注的BIRD黄金数据集上训练的对照模型,尽管精确配对检验未明确该优势的统计显著性。迁移性能依赖模型规模:3B模型的每一轮迭代在未见过的Spider数据库及词汇扰动的Spider-Syn数据集上均优于基础模型,且性能下降幅度小于BIRD黄金对照模型;而7B模型仅第一轮迭代保留迁移能力。

英文摘要

Training a competitive Text-to-SQL agent usually depends on human-annotated natural-language/SQL pairs, which are expensive, domain-specific, and a bottleneck for scaling to new databases. We show it is possible to train a competitive solver with zero annotated pairs. We introduce SQL-Zero, a proposer-solver self-play in which a challenger and a solver start from the same base LLM and the only ground truth is execution against the database itself. The challenger generates SQL pairs calibrated to the solver's current difficulty (targeting "hard but solvable"), and both roles are updated with GRPO in alternating turns, with a template-level repetition penalty on the challenger to prevent diversity collapse. Training on BIRD databases with no labels, self-play improves over the zero-shot base on BIRD dev by 6.6 points at 3B and 7.3 points at 7B. It also scores higher than a matched control trained under the same recipe on human BIRD gold over the same databases, although an exact paired test does not resolve that margin. Transfer depends on scale: at 3B every iteration outperforms the base on unseen Spider databases and under lexical perturbation (Spider-Syn), where it also degrades less than the matched BIRD-gold control, whereas at 7B only the first iteration preserves transfer.

论文原文

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

↑