arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.04875cs.CL
收藏

EvolSQL: 结构感知的可扩展文本到SQL数据合成

EvolSQL: Structure-Aware Evolution for Scalable Text-to-SQL Data Synthesis

Xuanguang Pan, Chongyang Tao, Jiayuan Bai, Jianling Gao, Zhengwei Tao, Xiansheng Zhou, Gavin Cheung, Shuai Ma

AI总结:

EvolSQL通过结构感知的进化策略生成高质量的文本到SQL数据,提升模型在结构多样性与复杂性上的表现。

摘要:

训练有效的文本到SQL模型仍然具有挑战性,因为高质量、多样且结构复杂的数据集稀缺。现有方法要么依赖于有限的人工标注语料库,要么通过简单提示LLM直接合成数据集,而没有对SQL结构进行显式控制,往往导致结构多样性有限和复杂性不足。为此,我们引入了EvolSQL,一种结构感知的数据合成框架,该框架从种子数据中演变SQL查询,生成更丰富和语义多样的形式。EvolSQL首先通过探索性查询-SQL扩展来扩大问题多样性并提高模式覆盖,然后应用自适应方向进化策略,使用从SQL抽象语法树中衍生出的六个基本转换算子,在关系、谓词、聚合和嵌套维度上逐步增加查询的复杂性。一个基于执行的SQL精炼模块和模式感知去重进一步确保了高质量、结构多样的映射对的创建。实验结果表明,经过我们在数据上微调的7B模型在仅使用SynSQL数据集的1/18的数据量时,优于在SynSQL数据集上训练的模型。

英文摘要:

Training effective Text-to-SQL models remains challenging due to the scarcity of high-quality, diverse, and structurally complex datasets. Existing methods either rely on limited human-annotated corpora, or synthesize datasets directly by simply prompting LLMs without explicit control over SQL structures, often resulting in limited structural diversity and complexity. To address this, we introduce EvolSQL, a structure-aware data synthesis framework that evolves SQL queries from seed data into richer and more semantically diverse forms. EvolSQL starts with an exploratory Query-SQL expansion to broaden question diversity and improve schema coverage, and then applies an adaptive directional evolution strategy using six atomic transformation operators derived from the SQL Abstract Syntax Tree to progressively increase query complexity across relational, predicate, aggregation, and nesting dimensions. An execution-grounded SQL refinement module and schema-aware deduplication further ensure the creation of high-quality, structurally diverse mapping pairs. Experimental results show that a 7B model fine-tuned on our data outperforms one trained on the much larger SynSQL dataset using only 1/18 of the data.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑