Current Text-to-SQL methods are evaluated and only focused on executable queries, overlooking the semantic alignment challenge -- both in terms of the semantic meaning of the query and the correctness of the execution results. Even execution accuracy itself shows significant drops when moving from English to other languages, with an average decline of 6 percentage points across non-English languages. We address these challenges by presenting a new framework that combines Group Relative Policy Optimization (GRPO) within a multilingual contrastive reward signal to enhance both task efficiency and semantic accuracy in Text-to-SQL systems in cross-lingual scenarios. Our method teaches models to obtain better correspondence between SQL generation and user intent by combining a reward signal based on semantic similarity. On the seven-language MultiSpider dataset, fine-tuning the LLaMA-3-3B model with GRPO improved the execution accuracy up to 87.4 percent (+26 pp over zero-shot) and semantic accuracy up to 52.29 percent (+32.86 pp). Adding our contrastive reward signal in the GRPO framework further improved the average semantic accuracy to 59.14 percent (+6.85 pp, up to +10 pp for Vietnamese). Our experiments showcase that a smaller, parameter-efficient 3B LLaMA model fine-tuned with our contrastive reward signal outperforms a much larger zero-shot 8B LLaMA model, with an uplift of 7.43 pp in execution accuracy (from 81.43 percent on the 8B model to 88.86 percent on the 3B model), and nearly matches its semantic accuracy (59.14 percent vs. 68.57 percent) -- all using just 3,000 reinforcement learning training examples. These results demonstrate how we can improve the performance of Text-to-SQL systems with contrastive rewards for directed semantic alignment, without requiring large-scale training datasets.


翻译:当前的Text-to-SQL方法在评估时仅关注可执行查询,忽视了语义对齐的挑战——这既涉及查询的语义含义,也涉及执行结果的正确性。即使仅考虑执行准确率,从英语迁移到其他语言时也出现显著下降,非英语语言平均下降6个百分点。为应对这些挑战,我们提出一种新框架,该框架在多语言对比奖励信号中结合组相对策略优化(GRPO),以提升跨语言场景下Text-to-SQL系统的任务效率和语义准确性。我们的方法通过结合基于语义相似度的奖励信号,指导模型获得SQL生成与用户意图之间更好的对应关系。在七语言MultiSpider数据集上,使用GRPO对LLaMA-3-3B模型进行微调,将执行准确率提升至87.4%(较零样本提升26个百分点),语义准确率提升至52.29%(提升32.86个百分点)。在GRPO框架中加入我们的对比奖励信号后,平均语义准确率进一步提高至59.14%(提升6.85个百分点,越南语最高提升10个百分点)。实验表明,采用我们对比奖励信号微调的参数高效型3B LLaMA小模型,其性能超越了更大的零样本8B LLaMA模型:执行准确率提升7.43个百分点(从8B模型的81.43%提升至3B模型的88.86%),语义准确率接近8B模型水平(59.14%对比68.57%)——而这一切仅需3000个强化学习训练样本。这些结果证明,通过对比奖励机制实现定向语义对齐,我们能够在无需大规模训练数据集的情况下有效提升Text-to-SQL系统的性能。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
UTC: 用于视觉对话的任务间对比学习的统一Transformer
专知会员服务
14+阅读 · 2022年5月4日
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
自然语言处理(二)机器翻译 篇 (NLP: machine translation)
DeepLearning中文论坛
12+阅读 · 2015年7月1日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员