LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Models
Not on the map. Why?
Abstract (arXiv)
Natural Language to SQL (NL2SQL) aims to translate natural language queries into executable SQL statements, offering non-expert users intuitive access to databases. While recent approaches leveraging large-scale private LLMs such as GPT-4 have achieved state-of-the-art results, they face two critical challenges: the lack of openness and reproducibility, and the prohibitive computational cost of test-time scaling. To address these issues, we explore improving the model-level performance of small-scale public LLMs in NL2SQL under resource-constrained settings. Our exploratory experiments reveal the potential of task decomposition for enhancing NL2SQL performance, but also highlight the difficulty of enabling LLMs to decompose queries effectively. Motivated by these findings, we propose LearNAT, a novel framework designed to enhance decomposition capabilities of LLM. LearNAT introduces (1) a Decomposition Synthesis Procedure, which leverages AST-guided search with pruning strategies to generate verifiable and efficient decompositions, and (2) Margin-Aware Reinforcement Learning, which provides fine-grained preference optimization for multi-step reasoning beyond standard DPO. Extensive experiments on benchmark datasets demonstrate that LearNAT significantly improves the performance of small-scale LLMs, achieving results comparable to GPT-4 with only a 7B parameter model. These results validate the effectiveness of verifiable decomposition and fine-grained preference learning in advancing NL2SQL towards openness, transparency, and efficiency. Our code is publicly available at https://github.com/MrBlankness/LearNAT.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Builds on 46 of its 63 references that are in the map. First posted on arXiv 3 Apr 2025.
Builds on
46 of 63 references.
References · 46
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2017Deep reinforcement learning from human preferencescited by 3,912
- 2023Let's Verify Step by Stepcited by 3,789
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2016Concrete Problems in AI Safetycited by 1,642
- 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,464
- 2023HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Facecited by 1,190
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
34 more
- 2023Math-Shepherd: Verify and Reinforce LLMs Step-by-step without Human Annotationscited by 928
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
- 2024A Survey on the Memory Mechanism of Large Language Model based Agentscited by 634
- 2023Instruction Tuning for Large Language Models: A Surveycited by 623
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
- 2023Alphazero-like Tree-Search can Guide Large Language Model Decoding and Trainingcited by 295
- 2024Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMscited by 273
- 2024Monte Carlo Tree Search Boosts Reasoning via Iterative Preference Learningcited by 241
- 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
- 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 169
- 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
- 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 164
- 2021Constrained Language Models Yield Few-Shot Semantic Parserscited by 163
- 2024AlphaMath Almost Zero: Process Supervision without Processcited by 162
- 2023How Can Recommender Systems Benefit from Large Language Models: A Surveycited by 142
- 2023Recommender AI Agent: Integrating Large Language Models for Interactive Recommendationscited by 131
- 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 119
- 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
- 2024RL on Incorrect Synthetic Data Scales the Efficiency of LLM Math Reasoning by Eight-Foldcited by 99
- 2025OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scalecited by 91
- 2024The Dawn of Natural Language to SQL: Are We Fully Ready?cited by 79
- 2023ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thoughtcited by 65
- 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQLcited by 59
- 2024Synthesizing Text-to-SQL Data from Weak and Strong LLMscited by 54
- 2025Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Searchcited by 34
- 2024MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQLcited by 22
- 2024TPO: Aligning Large Language Models with Multi-branch & Multi-step Preference Treescited by 19
- 2025SQL-o1: A Self-Reward Heuristic Dynamic Search Method for Text-to-SQLcited by 19
- 2024Metasql: A Generate-then-Rank Framework for Natural Language to SQL Translationcited by 17
- 2025Uncovering the Impact of Chain-of-Thought Reasoning for Direct Preference Optimization: Lessons from Text-to-SQLcited by 9
- 2024DataGpt-SQL-7B: An Open-Source Language Model for Text-to-SQLcited by 5
Built on by
Citing papers per year: 2025: 3; 2026: 5.
8 papers.
- 2025Magical: Medical Lay Language Generation via Semantic Invariance and Layperson-tailored Adaptationcited by 5
- 2026Memo-SQL: Structured Decomposition and Experience-Driven Self-Correction for Training-Free NL2SQLcited by 4
- 2025DFAMS: Dynamic-flow guided Federated Alignment based Multi-prototype Searchcited by 2
- 2026The Tell-Tale Norm: ℓ2 Magnitude as a Signal for Reasoning Dynamics in Large Language Modelscited by 2
- 2026Search for Truth from Reasoning: A Dynamic Representation Editing Framework for Steering LLM Trajectoriescited by 1
- 2025Bridging Global Intent with Local Details: A Hierarchical Representation Approach for Semantic Validation in Text-to-SQLcited by 0
- 2026LEAF-SQL: Level-wise Exploration with Adaptive Fine-graining for Text-to-SQL Skeleton Predictioncited by 0
- 2026Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQLcited by 0
- 2026Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQL4 Oct 2026
- 2026Search for Truth from Reasoning: A Dynamic Representation Editing Framework for Steering LLM Trajectories26 Jun 2026
- 2026The Tell-Tale Norm: ℓ2 Magnitude as a Signal for Reasoning Dynamics in Large Language Models4 Jun 2026
- 2026LEAF-SQL: Level-wise Exploration with Adaptive Fine-graining for Text-to-SQL Skeleton Prediction10 May 2026
- 2026Memo-SQL: Structured Decomposition and Experience-Driven Self-Correction for Training-Free NL2SQL15 Jan 2026
- 2025Bridging Global Intent with Local Details: A Hierarchical Representation Approach for Semantic Validation in Text-to-SQL28 Dec 2025
- 2025DFAMS: Dynamic-flow guided Federated Alignment based Multi-prototype Search28 Aug 2025
- 2025Magical: Medical Lay Language Generation via Semantic Invariance and Layperson-tailored Adaptation12 Aug 2025
Similar, not cited
Close in wording, no citation either way
- 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL
- 2026Optimizing Small Language Models for NL2SQL via Chain-of-Thought Fine-Tuning
- 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQL
- 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQL
- 2026Human-Level Text-to-SQL via Reinforcement Learning on Verified Data, Without Pipeline Engineering
- 2025SLM-SQL: An Exploration of Small Language Models for Text-to-SQL
- 2026DecoSearch: Complexity-Aware Routing and Plan-Level Repair for Text-to-SQL
- 2023DB-GPT: Empowering Database Interactions with Private Large Language Models