mlsanityData to 14 Oct 2026

Reinforcing Code Generation: Improving Text-to-SQL with Execution-Based Learning

arXiv 2506.06093 ↗First posted 6 Jun 2025cs.CLcited by 5

Not on the map. Why?

Abstract (arXiv)

In this work, we study the problem of code generation with a large language model (LLM), with a focus on generating SQL queries from natural language questions. We ask: Instead of using supervised fine tuning with text-code pairs, can we tune a model by having it interact with a database engine? We frame this problem as a reinforcement learning problem where the model receives execution-based feedback from the environment in the form of scalar rewards. These rewards penalize execution failures and assign positive values when a query returns a correct answer. We use the rewards within the Group Relative Policy Optimization (GRPO) framework. We use a tabular reasoning benchmark to test and evaluate our findings. We find that with only weak supervision in the form of question-answer pairs, RL-tuning improves the accuracy of model generated SQL code from 31.49 to 49.83 while reducing error percentage from 25.43% to 14.71%. This improvement allowed the model nearly match the performance performance to the larger SQLCoder-70B model. Our work demonstrates the potential of using execution-based feedback to improve symbolic reasoning capabilities of LLMs.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 8 of its 17 references that are in the map. First posted on arXiv 6 Jun 2025.

Builds on

8 of 17 references.

References · 8

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2017Proximal Policy Optimization Algorithmscited by 15,215
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  5. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
  6. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  7. 2021Program Synthesis with Large Language Modelscited by 3,637
  8. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 3.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026FINER-SQL: Boosting Small Language Models for Text-to-SQL
  2. 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL
  3. 2026EvoSQL: Memory-Augmented Critic-Generator Co-Evolution for Text-to-SQL
  4. 2025CogniSQL-R1-Zero: Lightweight Reinforced Reasoning for Efficient SQL Generation
  5. 2026ACE-SQL: Adaptive Co-Optimization via Empirical Credit Assignment for Text-to-SQL
  6. 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL
  7. 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
  8. 2025Query and Conquer: Execution-Guided SQL Generation