Think2SQL: Blueprinting Reward Density and Advantage Scaling for Effective Text-to-SQL Reasoning

Read full text
Authors: Simone Papicchio, Simone Rossi, Luca Cagliero, Paolo Papotti
Cited by: 0

Abstract

While Large Language Models (LLMs) have advanced the state-of-the-art in Text-to-SQL, robust reasoning in complex, multi-table environments remains a bottleneck for parameterefficient models. This paper presents a systematic empirical study on injecting reasoning capabilities into Text-to-SQL through the lens of Reinforcement Learning with Verifiable Rewards (RLVR). We uncover a critical interplay between reward density, advantage scaling, and model capacity. Our analysis yields four primary insights. First, we propose a novel execution-guided dense reward function that significantly outperforms binary signals and existing state-of-the-art rewards by providing granular feedback at the instance level. Second, we analyze the mechanics of advantage calculation, demonstrating that while large models thrive on sparse signals with aggressive advantage scaling, smaller models require dense rewards and conservative scaling to improve Text-to-SQL performance. Third, we evaluate the impact of cold start showing that distillation does not always benefit RLVR performance, and supervised fine-tuned models are prone to distributional mimicry. Fourth, we map the Pareto frontier of training efficiency, providing insights for optimizing Text-to-SQL reasoning under computational constraints. Our findings culminate in the Think2SQL family: our 4B-parameter model demonstrates reasoning capabilities competitive with state-of-the-art models such as o3. We release our models, datasets, and code to create a blueprint for RLVR optimization in Text-to-SQL at https://anonymous.4open.science/r/Think2SQL-3B7F. that the optimal reward signal is model-dependent rather than universal. (iii) We introduce Think2SQL, a reasoning-augmented model family that enables a 4B parameter model to rival proprietary frontier models such as o3 (Fig. 1). (iv) We release a novel SFT dataset distilled from Gemini3-Flash and evaluate its influence on RLVR performance. (v) We map the Pareto frontier of training efficiency, offering actionable insights for optimizing Text-to-SQL reasoning under constrained computational resources. The rest of the paper is organized as follows. Section 2 reviews the state-of-the-art works. Section 3 describes the proposed Text-to-SQL approach. Section 4 summarizes the main experimental results. Sections 5 and 6 draw conclusions and discuss the main limitations of the present work, respectively.

Fields of Study & Subjects

Topic Modeling Natural Language Processing Techniques Multimodal Machine Learning Applications

Publication details

Journal / source
HAL
Publication date
23 February 2026
Language
EN
Document type
Preprint