Text-to-SQL aims to translate natural language questions into executable SQL queries holds substantial practical value in real-world database environments. However, supervised approaches often treat SQL as a surface-level text generation problem, limi...
Text-to-SQL aims to translate natural language questions into executable SQL queries holds substantial practical value in real-world database environments. However, supervised approaches often treat SQL as a surface-level text generation problem, limiting the model ability to capture critical programmatic properties such as executability, execution correctness, and schema consistency. Reinforcement learning (RL) offers a principled way to address these limitations, yet existing on-policy methods suffer from low sample efficiency and unstable early training, while off-policy methods face degradation when the behavior policy diverges from the current model. To address these challenges, we propose a hybrid on/off-policy GRPO framework that combines the exploration benefits of on-policy rollouts with the stability and data efficiency provided by off-policy learning. We first construct a high-quality off-policy dataset by generating multiple SQL candidates per question using a large behavior model and pre-computing their rewards. During training, the framework leverages this dataset to ensure stable early optimization, then gradually increases the influence of on-policy to align the model with its evolving policy distribution. Furthermore, we design a reward model tailored to the programmatic nature of SQL, incorporating four components—executability, execution accuracy, schema linking, and SQL-element–level n-gram similarity—to guide the model toward producing logically sound and executable SQL queries. The proposed framework demonstrates strong empirical performance on both the BIRD and Spider benchmarks. On the BIRD development set, our 3B model achieves an execution accuracy of 49.35%, surpassing all existing 3B open-source systems as well as larger 7B models and GPT-based systems. On the Spider development set, the model attains 71.47%, again outperforming all compared methods. These results show that the proposed hybrid reinforcement learning approach enables a 3B-scale model to achieve performance that exceeds not only competing 3B models but also substantially larger open-source and closed-source systems, while maintaining robustness across diverse schemas and unseen databases.