UniSAr:一个统一的结构感知自回归语言模型
UniSAr: A Unified Structure-Aware Autoregressive Language Model for Text-to-SQL
摘要:
现有的文本到SQL语义解析器通常是为特定的设置而设计的,例如处理跨多个表、域或轮次的查询,这使得它们在应用于不同的设置时无效。我们提出了UniSAr(统一结构感知自回归语言模型),它受益于直接使用现成的语言模型架构,并在不同的设置下表现出一致的高性能。具体来说,UniSAr扩展了现有的自回归语言模型,以纳入三个非侵入性扩展,使它们结构感知:(1)添加结构标记编码数据库模式,会话上下文,以及它们的关系;(2)约束解码解码良好的结构化SQL为给定的数据库模式;(3)SQL完成,以完成潜在的缺失连接关系的SQL数据库模式的基础上。在涵盖多域、多表和多回合的七个著名的文本到SQL数据集上,UniSAr表现出与最先进的专门设计的文本到SQL模型高度可比或更好的性能。重要的是,我们的UniSAr是非侵入性的,因此文本到SQL的其他核心模型也可以采用我们的扩展来进一步提高性能。
英文摘要:
Existing text-to-SQL semantic parsers are typically designed for particular settings such as handling queries that span multiple tables, domains or turns which makes them ineffective when applied to different settings. We present UniSAr (Unified Structure-Aware Autoregressive Language Model), which benefits from directly using an off-the-shelf language model architecture and demonstrates consistently high performance under different settings. Specifically, UniSAr extends existing autoregressive language models to incorporate three non-invasive extensions to make them structure-aware: (1) adding structure mark to encode database schema, conversation context, and their relationships; (2) constrained decoding to decode well structured SQL for a given database schema; and (3) SQL completion to complete potential missing JOIN relationships in SQL based on database schema. On seven well-known text-to-SQL datasets covering multi-domain, multi-table and multi-turn, UniSAr demonstrates highly comparable or better performance to the most advanced specifically-designed text-to-SQL models. Importantly, our UniSAr is non-invasive, such that other core model advances in text-to-SQL can also adopt our extensions to further enhance performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。