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.


翻译:训练高效的文本到SQL模型仍然面临挑战,主要源于高质量、多样化且结构复杂的数据集稀缺。现有方法要么依赖有限的人工标注语料,要么直接通过简单提示大型语言模型合成数据,缺乏对SQL结构的显式控制,往往导致结构多样性和复杂性受限。为解决这一问题,我们提出了EvolSQL,一种结构感知的数据合成框架,能够将种子数据中的SQL查询演化为更丰富、语义更多样的形式。EvolSQL首先通过探索式查询-SQL扩展来拓宽问题多样性并提升模式覆盖率,随后采用自适应定向演化策略,利用从SQL抽象语法树派生的六种原子变换算子,逐步提升查询在关系、谓词、聚合和嵌套维度上的复杂性。通过执行验证的SQL优化模块和模式感知去重机制,进一步确保了高质量、结构多样化的映射对的生成。实验结果表明,使用我们合成数据微调的7B参数模型,仅需1/18的数据量即可超越在更大规模SynSQL数据集上训练的模型。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
【AAAI2021】低资源医疗对话生成的图演化元学习
专知会员服务
48+阅读 · 2020年12月26日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员