Single-Database Rewards Are Hackable: Counterfactual Execution for Trustworthy Text-to-SQL RL

counterfactual-sql · hf · 2026-11-27

Researchers from AIMS-DTU and Delhi Technological University show that rewarding text-to-SQL RL agents via execution on a single database gives full credit to buggy queries, inviting reward hacking.

They propose a counterfactual-database reward: executing queries on a counterfactual database to reduce payouts to buggy queries. However, in a controlled GRPO comparison, training with its mean form did not improve in-domain accuracy—more trustworthy rewards don't automatically mean better performance.

Original post →

More from Research

Research channel →