atlas

Research map / Large language models / Language, safety and interpretability

Structure-Guided Large Language Models for Text-to-SQL Generation

ICML 2025 · Large language models › Language, safety and interpretability · approach: LLM unlearning and benchmarks

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes SGU-SQL, a text-to-SQL framework that builds query and schema graphs, links them with an RGAT-based structure learner, and decomposes SQL generation via syntax-tree prompting for GPT-4.

Problem

LLM-based text-to-SQL struggles with ambiguous user intent, complex database schemas, and the syntax structure of SQL; existing decomposition methods are ineffective for SQL generation.

Approach

Combine dual query-schema graph construction and RGAT-based structure linking with syntax-tree-based decomposition of SQL generation into subtasks that an LLM (GPT-4) solves incrementally.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add query graph representation (ablation)SGU-SQL · Spider-devexecution accuracy: 84.50 (-3.45) -> 87.95Helped
add database graph representation (ablation)SGU-SQL · Spider-devexecution accuracy: 85.81 (-2.14) -> 87.95Helped
add structure-aware linking (ablation)SGU-SQL · Spider-devexecution accuracy: 82.62 (-5.33) -> 87.95Helped
add syntax-based decomposition (ablation)SGU-SQL · Spider-devexecution accuracy: 82.35 (-5.60) -> 87.95Helped
add query graph representation (ablation)SGU-SQL · BIRD-devexecution accuracy: 58.93 (-2.87) -> 61.80Helped
add database graph representation (ablation)SGU-SQL · BIRD-devexecution accuracy: 58.26 (-3.54) -> 61.80Helped
add structure-aware linking (ablation)SGU-SQL · BIRD-devexecution accuracy: 55.31 (-6.49) -> 61.80Helped
add syntax-based decomposition (ablation)SGU-SQL · BIRD-devexecution accuracy: 53.78 (-8.02) -> 61.80Helped
use SGU-SQL prompting instead of few-shot prompting (ablation)GPT-4 · Spider-devexecution accuracy: 0.7665 -> 0.8795Helped
use SGU-SQL prompting instead of CoT prompting (ablation)GPT-4 · Spider-devexecution accuracy: 0.7834 -> 0.8795Helped
use CoT prompting instead of few-shot prompting (ablation)PaLM-2 · Spider-devexecution accuracy: 0.6985 -> 0.6873Hurt
use SGU-SQL prompting instead of few-shot prompting (ablation)PaLM-2 · Spider-devexecution accuracy: 0.6985 -> 0.7395Helped

Surprising findings

Limitations

Experimental setup

Datasets: Spider BIRD

Benchmarks: Spider BIRD Spider 2.0-Snow Spider 2.0-Lite

Metrics: execution accuracy exact match accuracy valid efficiency score

Baselines: RAT-SQL LGESQL RESDSQL Graphix-T5 DIN-SQL DAIL-SQL SuperSQL MAC-SQL C3-GPT PURPLE CHESS CHASE-SQL

Builds on: RAT-SQL DIN-SQL DAIL-SQL MAC-SQL RGAT

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy