用图优化统一数学推理与数据库导航,提升复杂文本转SQL准确率
SteinerSQL: Graph-Guided Mathematical Reasoning for Text-to-SQL Generation
- 将数学推理和表连接问题转化为图上的斯坦纳树优化
- 在LogicCat和Spider2.0-Lite上分别达36.10%和40.04%执行准确率
- 适合需要高精度复杂查询的智能数据库系统研发者
大语言模型在需要复杂数学推理和精细模式导航的文本转SQL任务中表现不佳。现有方法常孤立处理这两类挑战,导致推理过程碎片化,影响逻辑与结构正确性。为此,我们提出SteinerSQL,将双重挑战统一为一个以图为中心的优化问题。该框架分三阶段运行:通过数学分解识别所需表(终端节点),利用斯坦纳树问题构建最优推理骨架,再进行多层级验证确保正确性。在LogicCat和Spider2.0-Lite两个挑战性基准上,使用Gemini-2.5-Pro模型,SteinerSQL分别取得36.10%和40.04%的执行准确率,刷新当前最佳水平。除准确率外,该工作还提出一种全新的文本转SQL范式,为复杂推理任务提供更鲁棒、更系统的解决方案。
原文摘要 · Abstract (English)
Large Language Models (LLMs) struggle with complex Text-to-SQL queries that demand both sophisticated mathematical reasoning and intricate schema navigation. Existing methods often tackle these challenges in isolation, creating a fractured reasoning process that compromises logical and structural correctness. To resolve this, we introduce SteinerSQL, a framework that unifies these dual challenges into a single, graph-centric optimization problem. SteinerSQL operates in three stages: mathematical decomposition to identify required tables (terminals), optimal reasoning scaffold construction via a Steiner tree problem, and multi-level validation to ensure correctness. On the challenging LogicCat and Spider2.0-Lite benchmarks, SteinerSQL establishes a new state-of-the-art with 36.10% and 40.04% execution accuracy, respectively, using Gemini-2.5-Pro. Beyond accuracy, SteinerSQL presents a new, unified paradigm for Text-to-SQL, paving the way for more robust and principled solutions to complex reasoning tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。