PS-SQL: Phrase-based Schema-Linking with Pre-trained Language Models for Text-to-SQL Parsing

Zhibo Lan, Shuangyin Li · 2024

In the Text-to-SQL task, a significant challenge is enabling parsers to generalize effectively across diverse domains. Key to solving is schema-linking, which involves mapping words to the pertinent columns or tables in the databases. Existing methods base on pre-trained language models (PLMs), which rely on token masking, have limitations in capturing the variety of schemas. Unlike single token, phrases offer richer semantics, and superior discrimination in determining whether one word corresponds to tables or columns. In this paper, we present an innovative approach named Phrase-based Schema-Linking for Text-to-SQL (PS-SQL). By incorporating extracted phrases from the question, we enhance PLMs’ ability to learn the mapping between tokens and schemas, leading to more robust schema-linking. We also introduce a mechanism to refine extracted phrases, reducing noise. During practical evaluations on several real-world datasets, PS-SQL consistently delivers enhanced schema-linking precision, resulting in higher-quality SQL query generation.

Read the paper · More papers on PaperTik