PSM-SQL: Progressive Schema Learning with Multi-granularity Semantics for Text-to-SQL

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Yang, Zhuopan, Xie, Yuanzhen, Zhong, Ruichao, Tan, Yunzhi, Liu, Enjie, Yang, Zhenguo, Gao, Mochi, Hu, Bo, Li, Zang
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909483783946240
author Yang, Zhuopan
Xie, Yuanzhen
Zhong, Ruichao
Tan, Yunzhi
Liu, Enjie
Yang, Zhenguo
Gao, Mochi
Hu, Bo
Li, Zang
author_facet Yang, Zhuopan
Xie, Yuanzhen
Zhong, Ruichao
Tan, Yunzhi
Liu, Enjie
Yang, Zhenguo
Gao, Mochi
Hu, Bo
Li, Zang
contents It is challenging to convert natural language (NL) questions into executable structured query language (SQL) queries for text-to-SQL tasks due to the vast number of database schemas with redundancy, which interferes with semantic learning, and the domain shift between NL and SQL. Existing works for schema linking focus on the table level and perform it once, ignoring the multi-granularity semantics and chainable cyclicity of schemas. In this paper, we propose a progressive schema linking with multi-granularity semantics (PSM-SQL) framework to reduce the redundant database schemas for text-to-SQL. Using the multi-granularity schema linking (MSL) module, PSM-SQL learns the schema semantics at the column, table, and database levels. More specifically, a triplet loss is used at the column level to learn embeddings, while fine-tuning LLMs is employed at the database level for schema reasoning. MSL employs classifier and similarity scores to model schema interactions for schema linking at the table level. In particular, PSM-SQL adopts a chain loop strategy to reduce the task difficulty of schema linking by continuously reducing the number of redundant schemas. Experiments conducted on text-to-SQL datasets show that the proposed PSM-SQL is 1-3 percentage points higher than the existing methods.
format Preprint
id arxiv_https___arxiv_org_abs_2502_05237
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle PSM-SQL: Progressive Schema Learning with Multi-granularity Semantics for Text-to-SQL
Yang, Zhuopan
Xie, Yuanzhen
Zhong, Ruichao
Tan, Yunzhi
Liu, Enjie
Yang, Zhenguo
Gao, Mochi
Hu, Bo
Li, Zang
Databases
Artificial Intelligence
It is challenging to convert natural language (NL) questions into executable structured query language (SQL) queries for text-to-SQL tasks due to the vast number of database schemas with redundancy, which interferes with semantic learning, and the domain shift between NL and SQL. Existing works for schema linking focus on the table level and perform it once, ignoring the multi-granularity semantics and chainable cyclicity of schemas. In this paper, we propose a progressive schema linking with multi-granularity semantics (PSM-SQL) framework to reduce the redundant database schemas for text-to-SQL. Using the multi-granularity schema linking (MSL) module, PSM-SQL learns the schema semantics at the column, table, and database levels. More specifically, a triplet loss is used at the column level to learn embeddings, while fine-tuning LLMs is employed at the database level for schema reasoning. MSL employs classifier and similarity scores to model schema interactions for schema linking at the table level. In particular, PSM-SQL adopts a chain loop strategy to reduce the task difficulty of schema linking by continuously reducing the number of redundant schemas. Experiments conducted on text-to-SQL datasets show that the proposed PSM-SQL is 1-3 percentage points higher than the existing methods.
title PSM-SQL: Progressive Schema Learning with Multi-granularity Semantics for Text-to-SQL
topic Databases
Artificial Intelligence
url https://arxiv.org/abs/2502.05237