Decomposition for Enhancing Attention: Improving LLM-based Text-to-SQL through Workflow Paradigm

📄 arXiv: 2402.10671v3 📥 PDF

作者: Yuanzhen Xie, Xinzhou Jin, Tao Xie, MingXiong Lin, Liang Chen, Chenyun Yu, Lei Cheng, ChengXiang Zhuo, Bo Hu, Zang Li

分类: cs.CL

发布日期: 2024-02-16 (更新: 2024-07-03)

🔗 代码/项目: GITHUB


💡 一句话要点

提出工作流范式以解决LLM在文本到SQL中的注意力扩散问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 文本到SQL 工作流范式 注意力机制 主动学习 自我纠正 信息确定

📋 核心要点

  1. 现有的单步链式思维提示方法在处理复杂的文本到SQL任务时,存在注意力扩散和性能不足的问题。
  2. 本文提出了一种工作流范式,通过信息确定模块和新提示结构来增强LLMs的注意力和问题解决能力。
  3. 在三个数据集上的实验结果显示,该方法在性能上显著优于其他方法,尤其是在Spider Test数据集上取得了新的SOTA结果。

📝 摘要(中文)

大语言模型(LLMs)在自然语言处理领域取得了显著成功,但单步链式思维提示方法在复杂任务如文本到SQL中面临注意力扩散和性能不足的挑战。为提高LLMs在文本到SQL中的上下文学习能力,本文提出了一种工作流范式方法,通过信息确定模块消除冗余信息和基于问题分类的新提示结构,显著增强模型的注意力。此外,自我纠正和主动学习模块的引入大大扩展了LLMs的问题解决范围,从而提高了基于LLM的方法的上限。大量实验表明,该方法在Spider Dev、Spider-Realistic和Bird Dev数据集上相较于现有基线提升了约2-3个百分点,并在Spider Test数据集上取得了新的SOTA结果。

🔬 方法详解

问题定义:本文旨在解决大语言模型在文本到SQL任务中面临的注意力扩散和性能不足的问题。现有的单步链式思维提示方法在复杂任务中表现不佳,导致模型无法有效处理冗余信息和多样化问题。

核心思路:论文的核心思路是通过工作流范式对问题进行分解,利用信息确定模块消除冗余信息,并引入基于问题分类的新提示结构,从而增强模型的注意力和问题解决能力。

技术框架:整体架构包括信息确定模块、自我纠正模块和主动学习模块。信息确定模块负责过滤冗余信息,自我纠正模块帮助模型在推理过程中进行自我调整,主动学习模块则扩展了模型的学习范围。

关键创新:最重要的技术创新在于引入了工作流范式和信息确定模块,这与现有方法的单一提示结构形成了本质区别,使得模型能够更有效地处理复杂问题。

关键设计:在参数设置上,模型采用了优化的损失函数和网络结构,以支持信息确定和问题分类的高效执行。具体的网络结构细节和参数设置在实验部分进行了详细描述。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,提出的方法在Spider Dev、Spider-Realistic和Bird Dev数据集上相较于现有基线提升了约2-3个百分点,并在Spider Test数据集上达到了新的SOTA结果,表明该方法在实际应用中具有显著优势。

🎯 应用场景

该研究的潜在应用领域包括数据库查询生成、智能助手和自然语言接口等。通过提高LLMs在文本到SQL任务中的性能,能够为用户提供更准确和高效的查询生成服务,进而推动智能系统的普及与发展。

📄 摘要(原文)

In-context learning of large-language models (LLMs) has achieved remarkable success in the field of natural language processing, while extensive case studies reveal that the single-step chain-of-thought prompting approach faces challenges such as attention diffusion and inadequate performance in complex tasks like text-to-SQL. To improve the contextual learning capabilities of LLMs in text-to-SQL, a workflow paradigm method is proposed, aiming to enhance the attention and problem-solving scope of LLMs through decomposition. Specifically, the information determination module for eliminating redundant information and the brand-new prompt structure based on problem classification greatly enhance the model's attention. Additionally, the inclusion of self-correction and active learning modules greatly expands the problem-solving scope of LLMs, hence improving the upper limit of LLM-based approaches. Extensive experiments conducted on three datasets demonstrate that our approach outperforms other methods by a significant margin. About 2-3 percentage point improvements compared to the existing baseline on the Spider Dev, Spider-Realistic, and Bird Dev datasets and new SOTA results on the Spider Test dataset are achieved. Our code is available on GitHub: \url{https://github.com/FlyingFeather/DEA-SQL}.