Graph-Reward-SQL: Execution-Free Reinforcement Learning for Text-to-SQL via Graph Matching and Stepwise Reward

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Weng, Han, Wu, Puzhen, Cui, Longjie, Zhan, Yi, Liu, Boyi, Song, Yuanfeng, Zeng, Dun, Yang, Yingxiang, Zhang, Qianru, Huang, Dong, Yin, Xiaoming, Sun, Yang, Chen, Xing
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915531450220544
author Weng, Han
Wu, Puzhen
Cui, Longjie
Zhan, Yi
Liu, Boyi
Song, Yuanfeng
Zeng, Dun
Yang, Yingxiang
Zhang, Qianru
Huang, Dong
Yin, Xiaoming
Sun, Yang
Chen, Xing
author_facet Weng, Han
Wu, Puzhen
Cui, Longjie
Zhan, Yi
Liu, Boyi
Song, Yuanfeng
Zeng, Dun
Yang, Yingxiang
Zhang, Qianru
Huang, Dong
Yin, Xiaoming
Sun, Yang
Chen, Xing
contents Reinforcement learning (RL) has been widely adopted to enhance the performance of large language models (LLMs) on Text-to-SQL tasks. However, existing methods often rely on execution-based or LLM-based Bradley-Terry reward models. The former suffers from high execution latency caused by repeated database calls, whereas the latter imposes substantial GPU memory overhead, both of which significantly hinder the efficiency and scalability of RL pipelines. To this end, we propose a novel reward model framework for RL-based Text-to-SQL named Graph-Reward-SQL, which employs the GMNScore outcome reward model. We leverage SQL graph representations to provide accurate reward signals while significantly reducing time cost and GPU memory usage. Building on this foundation, we further introduce StepRTM, a stepwise reward model that provides intermediate supervision over Common Table Expression (CTE) subqueries. This encourages both functional correctness and readability of SQL. Extensive comparative and ablation experiments on standard benchmarks, including Spider and BIRD, demonstrate that our method consistently outperforms existing reward models.
format Preprint
id arxiv_https___arxiv_org_abs_2505_12380
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Graph-Reward-SQL: Execution-Free Reinforcement Learning for Text-to-SQL via Graph Matching and Stepwise Reward
Weng, Han
Wu, Puzhen
Cui, Longjie
Zhan, Yi
Liu, Boyi
Song, Yuanfeng
Zeng, Dun
Yang, Yingxiang
Zhang, Qianru
Huang, Dong
Yin, Xiaoming
Sun, Yang
Chen, Xing
Machine Learning
Databases
Programming Languages
Reinforcement learning (RL) has been widely adopted to enhance the performance of large language models (LLMs) on Text-to-SQL tasks. However, existing methods often rely on execution-based or LLM-based Bradley-Terry reward models. The former suffers from high execution latency caused by repeated database calls, whereas the latter imposes substantial GPU memory overhead, both of which significantly hinder the efficiency and scalability of RL pipelines. To this end, we propose a novel reward model framework for RL-based Text-to-SQL named Graph-Reward-SQL, which employs the GMNScore outcome reward model. We leverage SQL graph representations to provide accurate reward signals while significantly reducing time cost and GPU memory usage. Building on this foundation, we further introduce StepRTM, a stepwise reward model that provides intermediate supervision over Common Table Expression (CTE) subqueries. This encourages both functional correctness and readability of SQL. Extensive comparative and ablation experiments on standard benchmarks, including Spider and BIRD, demonstrate that our method consistently outperforms existing reward models.
title Graph-Reward-SQL: Execution-Free Reinforcement Learning for Text-to-SQL via Graph Matching and Stepwise Reward
topic Machine Learning
Databases
Programming Languages
url https://arxiv.org/abs/2505.12380