AIMS-DTU Hidden-DB Reward Cuts Text-to-SQL Hack Pay to 1.9%
TL;DR
- A strict counterfactual-database reward drops the full-pay rate on buggy SQL queries from 29.5% to 16.8% and on constructed hacks from 54.1% to 1.9%, rejecting 0 of 2,847 correct queries.
- In a controlled GRPO run on a 3.35B Tiny Aya Global model with three seeds, the harder-to-hack reward did not improve in-domain accuracy: 8.4% verified vs 11.7% for the single-database reward.
- The same hole appears in AgentTune's SQL reward (now patched upstream), SkyRL-SQL, and eight published Spider systems where 8.1–14.9% of execution-correct answers fail a test-suite database.
A strict single-database reward for text-to-SQL reinforcement learning pays 54.1% of constructed reward hacks and 29.5% of realistic buggy queries in full, according to a new paper from Delhi Technological University's AIMS-DTU lab. Running the same final query on two hidden counterfactual copies of the database drops those rates to 1.9% and 16.8% while rejecting zero of 2,847 correct queries.
The hole is not unique to the authors' own agent. The paper reports finding "an exploit in AgentTune's SQL reward (fixed upstream), and the same gap in the SkyRL-SQL reward and eight published Spider systems," where 8.1–14.9% of execution-correct answers fail a test-suite database. A WHERE 1 = 1 padding trick had been scoring like honest SQL on all 314 "yes" items in AgentTune until maintainers merged the authors' fix.
The honest surprise is the training result. In a controlled GRPO run on a 3.35B Tiny Aya Global model with three seeds per arm, the harder-to-hack reward did not improve in-domain accuracy: 8.4% verified against 11.7% for the single-database reward. The authors trace the null to a weak signal, noting the two rewards "disagreed on only 5--7% of rollouts." On Spider, counterfactual-trained policies reached 29.3% test-suite accuracy against 27.8%, a 1.6-point gain inside seed noise.
Per-seed differences swing from -7.2 to +1.2 points between the arms, which the paper offers as evidence that "single-seed reward comparisons mislead." The closing advice: audit rewards on counterfactual data first, monitor the gap during training, compare across several seeds, and "do not read a passed audit as proof of correctness." A larger database is no substitute, since "size catches accidents, not exploits." The work lands alongside a run of RL-training-signal papers we have tracked this week, including SPLICE on agent RL and RLVB's fix for agents answering against their own beliefs.
Originally reported by huggingface.co
Read the original article →Original headline: Counterfactual-Database Rewards Cut Text-to-SQL RL Reward Hacking From 54.1% to 1.9%