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

一种通过数据库模式剪枝改进自注意力机制的多语言SQL翻译器

A Multilingual Translator to SQL with Database Schema Pruning to Improve Self-Attention

Institute of Advanced Studies, University of São Paulo(圣保罗大学高等研究院);Escola Politécnica, University of São Paulo(圣保罗大学理工学院)

Marcelo Archanjo Jose, Fabio Gagliardi Cozman

AI总结:

针对transformers处理长文本序列时自注意力机制内存二次增长的问题,提出一种基于数据库模式剪枝的多语言SQL翻译方法,使用mT5-large模型在增强的Spider数据集上微调,将验证集精确匹配准确率提升至0.736。

摘要:

由于自注意力机制中的内存呈二次方增长,长文本序列在transformers的语境中具有挑战性。由于此问题直接影响从自然语言到SQL查询的翻译(因为技术通常将包含问题和数据库模式的拼接文本作为输入),我们提出了允许transformers处理长达512个输入token的长文本序列的技术。我们提出了一种带有数据库模式剪枝(即移除对目标查询无用的表和列名)的训练过程。此外,我们采用多语言方法,使用在四种语言(英语、葡萄牙语、西班牙语和法语)下同时微调的mT5-large模型,该模型使用了数据增强的Spider数据集。我们提出的技术使用了Spider数据集,并在验证数据集(Dev)上将精确集合匹配准确率结果从0.718提升至0.736。源代码、评估和检查点可在https://github.com/C4AI/gap-text2sql获取。

英文摘要:

Long sequences of text are challenging in the context of transformers, due to quadratic memory increase in the self-attention mechanism. As this issue directly affects the translation from natural language to SQL queries (as techniques usually take as input a concatenated text with the question and the database schema), we present techniques that allow long text sequences to be handled by transformers with up to 512 input tokens. We propose a training process with database schema pruning (removal of tables and columns names that are useless for the query of interest). In addition, we used a multilingual approach with the mT5-large model fine-tuned with a data-augmented Spider dataset in four languages simultaneously: English, Portuguese, Spanish, and French. Our proposed technique used the Spider dataset and increased the exact set match accuracy results from 0.718 to 0.736 in a validation dataset (Dev). Source code, evaluations, and checkpoints are available at: \underline{https://github.com/C4AI/gap-text2sql}.

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

↑