YORO让模型训练时记住数据库结构,推理时无需重复读取,提速超98%。
You Only Read Once (YORO): Learning to Internalize Database Knowledge for Text-to-SQL
- 训练时将数据库知识内化到模型参数中,推理时不再需要编码模式结构
- 输入长度减少66%-98%,在大数据库上表现优于传统方法
- 擅长处理缩写等复杂值检索问题,适合大规模数据库场景
尽管文本到SQL任务已取得显著进展,但现有方法对每个问题重复编码相同的数据库模式,导致推理成本过高,并常忽略关键数据库知识。为此,我们提出全新的YORO范式:在训练期间将数据库知识直接内化到文本到SQL模型的参数中,推理时完全消除模式编码需求。YORO将输入标记长度减少66%-98%。尽管输入更短,实验结果表明,YORO在三个基准测试上表现与传统系统相当,且在大型数据库上显著超越。此外,YORO在处理包含复杂值检索(如缩写)的问题时表现出色。
原文摘要 · Abstract (English)
While significant progress has been made on the text-to-SQL task, recent solutions repeatedly encode the same database schema for every question, resulting in unnecessary high inference cost and often overlooking crucial database knowledge. To address these issues, we propose You Only Read Once (YORO), a novel paradigm that directly internalizes database knowledge into the parametric knowledge of a text-to-SQL model during training and eliminates the need for schema encoding during inference. YORO significantly reduces the input token length by 66%-98%. Despite its shorter inputs, our empirical results demonstrate YORO's competitive performances with traditional systems on three benchmarks as well as its significant outperformance on large databases. Furthermore, YORO excels in handling questions with challenging value retrievals such as abbreviation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。