EMNLP 2022finding29 citations

STAR: SQL Guided Pre-Training for Context-dependent Text-to-SQL Parsing

Zefeng Cai, Xiangyu Li, Binyuan Hui, Min Yang, Bowen Li, Binhua Li, Zheng Cao, Weijie Li

Abstract

In this paper, we propose a novel SQL guided pre-training framework STAR for context-dependent text-to-SQL parsing, which leverages contextual information to enrich natural language (NL) utterance and table schema representations for text-to-SQL conversations. Concretely, we propose two novel pre-training objectives which respectively explore the context-dependent interactions of NL utterances and SQL queries within each text-to-SQL conversation: (i) schema state tracking (SST) objective that tracks and explores the schema states of context-dependent SQL queries in the form of schema-states by predicting and updating the value of each schema slot during interaction; (ii) utterance dependency tracking (UDT) objective that employs weighted contrastive learning to pull together two semantically similar NL utterances and push away the representations of semantically dissimilar NL utterances within each conversation. In addition, we construct a high-quality large-scale context-dependent text-to-SQL conversation corpus to pre-train STAR. Extensive experiments show that STAR achieves new state-of-the-art performance on two downstream benchmarks (SParC and CoSQL), significantly outperforming previous pre-training methods and ranking first on the leaderboard. We believe the release of the constructed corpus, codebase and pre-trained STAR checkpoints would push forward the research in this area.

BibTeX
@inproceedings{cai-etal-2022-star,
    title = "{STAR}: {SQL} Guided Pre-Training for Context-dependent Text-to-{SQL} Parsing",
    author = "Cai, Zefeng  and
      Li, Xiangyu  and
      Hui, Binyuan  and
      Yang, Min  and
      Li, Bowen  and
      Li, Binhua  and
      Cao, Zheng  and
      Li, Weijie  and
      Huang, Fei  and
      Si, Luo  and
      Li, Yongbin",
    editor = "Goldberg, Yoav  and
      Kozareva, Zornitsa  and
      Zhang, Yue",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2022",
    month = dec,
    year = "2022",
    address = "Abu Dhabi, United Arab Emirates",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.findings-emnlp.89/",
    doi = "10.18653/v1/2022.findings-emnlp.89",
    pages = "1235--1247"
}
STAR: SQL Guided Pre-Training for Context-dependent Text-to-SQL Parsing · EMNLP 2022