Reward Blindness: A Theoretical Framework for Diagnosing Reinforcement Learning Reward Limitations in Text-to-SQL
Nair et al. in RL & post-training
An execution reward can miss a flawed query with the right answer
Reward Blindness: A Theoretical Framework for Diagnosing Reinforcement Learning Reward Limitations in Text-to-SQL
One answer can hide a structurally worse query
For “How many female students are enrolled?”, the gold query reads the students table alone and returns the count.
A second query adds enrollment and an unnecessary courses join but returns the same count; execution reward gives both queries 1.
Reward Error Sensitivity measures this reward blind spot by error type.
Reward Error Sensitivity: what changes the score?
For a query distribution P, RES is the average reward gap between queries with error e and queries without it. Zero means no average separation.
- σe=1
- Error e is present
- σe=0
- Error e is absent
What zero sensitivity predicts in training
- 1
Equal mean advantages
With RES=0 and a mean-reward baseline, queries with and without error e have equal mean reward and zero mean advantage.
- 2
The policy-gradient claim
The paper concludes there is no systematic update aimed at error e; correlations with other rewarded features or sampling noise can still shift its rate.
- 3
Scope of the rate result
For small learning rates, the separate rate formula assumes independence from other reward-relevant features; it is a linearization, not a convergence guarantee.
Different rewards go blind in different places
Its AST matching can reward join topology, but external evidence is absent from the AST, leaving evidence violations invisible.
Token overlap barely distinguishes correct from incorrect join predicates, which may differ by only a few tokens.
RES puts such category-specific blind spots on a shared scale.
Controlled GRPO separates the reward curves

Over 2,000 steps, execution reward stays flat for silent joins. With 30% of join errors affecting output, signal-grounded reward reduces errors faster even with 20% false positives and 10% false negatives (10-seed mean).
Turn error checks into learning signals
- 1
Keep the task anchor
The proposed reward keeps execution match as an anchor with weight α≥0.5; auxiliary terms add error-specific feedback.
- 2
Score error categories
Add signals for joins, predicates, schema, evidence, and structure; nine SQLENS signals are database-based and need no LLM call.
- 3
Bound detector noise
Cap the auxiliary-weight sum at 1−α: an execution-passing query scores ≥α, a failing one ≤1−α; noise cannot rank failure higher.
How much coverage do the checks buy?
SQLENS ranges use four Claude 3.5 Sonnet prompting systems on BIRD-dev (1,534 questions, 95 databases); costs per query.
Evidence has boundaries, and the proof needs care
No full-scale LLM run
The proposed reward is tested in controlled GRPO simulations, not end-to-end training of an LLM policy.
Real-data RES is estimated
Four published prompting systems on BIRD-dev are profiled with imperfect SQLENS detectors; ground-truth error labels and new inference are absent.
Policy-gradient proof gap
Equal conditional means alone do not establish that the error-directed update vanishes; the proof must control correlations between advantage and policy-score gradients within groups.
Why it matters
- Check reward sensitivity per error type; execution accuracy alone cannot show which mistakes training can see.
- Database-only checks add low-cost feedback, but detector precision and auxiliary weights still need care.
- Full-scale LLM training is still needed to test whether simulated gains transfer.
10 slides, 3 min
25 Nov 2026