Skip to content

Reward Blindness: A Theoretical Framework for Diagnosing Reinforcement Learning Reward Limitations in Text-to-SQL

Lakshmi Muraleedharan Nair, Shiqi Huang, Fangyu Lo, Yihua Xu, Dingyan Shang

cs.AI

Abstract

Text-to-SQL systems let users without programming expertise query relational databases in natural language. Reinforcement learning has become the dominant way to train such systems, yet progress is still judged by a single number, execution accuracy, which counts correct queries but says nothing about which kinds of semantic error survive training. This paper develops a theoretical framework that examines text-to-SQL from the perspective of reward design. We introduce Reward Error Sensitivity, a measure of how strongly a reward function separates queries that contain a given error type from queries that do not, and prove a Reward Blindness theorem: when this sensitivity is zero, policy-gradient training carries no systematic signal for removing that error. Using fourteen published finegrained error signals for four text-to-SQL systems on the BIRD benchmark, we build error profiles and estimate sensitivities for common reward designs. Predicate and result-level errors are the most frequent, firing on up to 27 percent of queries, while structurally deep errors such as suboptimal joins persist at 5 to 12 percent. Each reward family has a distinct and predictable set of blind spots, and inexpensive database-level checks that need no language model calls detect 45 to 60 percent of semantic errors. Controlled training simulations confirm that executiononly reward leaves output-preserving errors untouched, whereas a signal-grounded reward removes them even when the detectors are noisy.

Create a lesson