Skip to main navigation Skip to search Skip to main content

UniSAr: a unified structure-aware autoregressive language model for text-to-SQL semantic parsing

  • Longxu Dou
  • , Yan Gao
  • , Mingyang Pan
  • , Dingzirui Wang
  • , Wanxiang Che
  • , Jian Guang Lou
  • , Dechen Zhan*
  • *Corresponding author for this work
  • Harbin Institute of Technology
  • Microsoft USA

Research output: Contribution to journalArticlepeer-review

Abstract

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 two 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. 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.

Original languageEnglish
Pages (from-to)4361-4376
Number of pages16
JournalInternational Journal of Machine Learning and Cybernetics
Volume14
Issue number12
DOIs
StatePublished - Dec 2023

Keywords

  • Constrained decoding
  • Natural language interfaces to databases
  • Natural language processing
  • Semantic parsing
  • Text-to-SQL

Fingerprint

Dive into the research topics of 'UniSAr: a unified structure-aware autoregressive language model for text-to-SQL semantic parsing'. Together they form a unique fingerprint.

Cite this