Bridging Global Intent with Local Details: A Hierarchical Representation Approach for Semantic Validation in Text-to-SQL
Not on the map. Why?
Abstract (arXiv)
Text-to-SQL translates natural language questions into SQL statements grounded in a target database schema. Ensuring the reliability and executability of such systems requires validating generated SQL, but most existing approaches focus only on syntactic correctness, with few addressing semantic validation (detecting misalignments between questions and SQL). As a consequence, effective semantic validation still faces two key challenges: capturing both global user intent and SQL structural details, and constructing high-quality fine-grained sub-SQL annotations. To tackle these, we introduce HEROSQL, a hierarchical SQL representation approach that integrates global intent (via Logical Plans, LPs) and local details (via Abstract Syntax Trees, ASTs). To enable better information propagation, we employ a Nested Message Passing Neural Network (NMPNN) to capture inherent relational information in SQL and aggregate schema-guided semantics across LPs and ASTs. Additionally, to generate high-quality negative samples, we propose an AST-driven sub-SQL augmentation strategy, supporting robust optimization of fine-grained semantic inconsistencies. Extensive experiments conducted on Text-to-SQL validation benchmarks (both in-domain and out-of-domain settings) demonstrate that our approach outperforms existing state-of-the-art methods, achieving an average 9.40% improvement of AUPRC and 12.35% of AUROC in identifying semantic inconsistencies. It excels at detecting fine-grained semantic errors, provides large language models with more granular feedback, and ultimately enhances the reliability and interpretability of data querying platforms.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 60 of its 78 references that are in the map. First posted on arXiv 28 Dec 2025.
Builds on
60 of 78 references.
References · 60
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2025Qwen3 Technical Reportcited by 8,820
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,173
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,261
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2023Towards General Text Embeddings with Multi-stage Contrastive Learningcited by 723
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
38 more
- 2020Contrastive Learning with Hard Negative Samplescited by 628
- 2023C-Pack: Packed Resources For General Chinese Embeddingscited by 578
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
- 2023Chain-of-Verification Reduces Hallucination in Large Language Modelscited by 324
- 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 232
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 195
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 187
- 2020GraPPa: Grammar-Augmented Pre-Training for Table Semantic Parsingcited by 171
- 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
- 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
- 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 105
- 2022Evaluating the Text-to-SQL Capabilities of Large Language Modelscited by 101
- 2023Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsingcited by 93
- 2025OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scalecited by 91
- 2022RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLcited by 85
- 2024The Dawn of Natural Language to SQL: Are We Fully Ready?cited by 79
- 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
- 2021ESimCSE: Enhanced Sample Building Method for Contrastive Learning of Unsupervised Sentence Embeddingcited by 74
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 56
- 2024Synthesizing Text-to-SQL Data from Weak and Strong LLMscited by 54
- 2025OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignmentcited by 53
- 2023EHRSQL: A Practical Text-to-SQL Benchmark for Electronic Health Recordscited by 45
- 2023ScienceBenchmark: A Complex Real-World Benchmark for Evaluating Natural Language to SQL Systemscited by 45
- 2022S2SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parserscited by 41
- 2024MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLcited by 35
- 2024AMBROSIA: A Benchmark for Parsing Ambiguous Questions into Database Queriescited by 35
- 2025NL2SQL-BUGs: A Benchmark for Detecting Semantic Errors in NL2SQL Translationcited by 33
- 2022Importance of Synthesizing High-quality Data for Text-to-SQL Parsingcited by 28
- 2023LMC: Fast Training of GNNs via Subgraph Sampling with Provable Convergencecited by 26
- 2018Apache Calcite: A Foundational Framework for Optimized Query Processing Over Heterogeneous Data Sourcescited by 25
- 2023Improving Generalization in Language Model-Based Text-to-SQL Semantic Parsing: Two Simple Semantic Boundary-Based Techniquescited by 24
- 2023Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generationcited by 24
- 2019Grammar-based Neural Text-to-SQL Generationcited by 23
- 2022Ginex: SSD-enabled Billion-scale Graph Neural Network Training on a Single Machine via Provably Optimal In-memory Cachingcited by 21
- 2023Text-to-SQL Error Correction with Language Models of Codecited by 21
- 2024Sketch-GNN: Scalable Graph Neural Networks with Sublinear Training Complexitycited by 14
50 most cited of 60 All 60 (JSON)
Built on by
Not cited yet.