Reproduce “Single-Database Rewards Are Hackable: Counterfactual Execution for Trustworthy Text-to-SQL RL” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Shreshth Rai, Rishii Kumar Singh, Aksh Aggarwal

The counterfactual-database reward checks text-to-SQL queries on the original database and hidden, code-generated copies, where changed data can expose accidental matches. In an audit of 1,302 synthetic questions, blind-copy strict multiset matching reduced buggy queries paid in full from 29.5% to 16.8%, and hacks from 54.1% to 1.9%, rejecting no correct queries. Training did not establish improved in-domain accuracy.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.