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

R0:cfd79e0589aaca73ad4794a75315a57d-Single-Database Rewards Are Hackable: Counterfactual Execution for Trustworthy Text-to-SQL RL
Share of 1,814 buggy SQL queries awarded full reward in a synthetic audit: 29.5% on the original database alone (Wilson 95% CI 27.4–31.6%) and 16.8% on the original plus hidden counterfactual copies selected blindly (15.2–18.6%). Both conditions use strict multiset matching. These are audit false-accept rates, not real-world attack frequencies or evidence of improved agent training. Editorial chart based on the Mutants column of Table 1, page 3, in Shreshth Rai, Rishii Kumar Singh and Aksh Aggarwal, “Single-Database Rewards Are Hackable: Counterfactual Execution for Trustworthy Text-to-SQL RL”, arXiv:2611.34363v1 (2026). CC BY 4.0. Two strict-multiset rows were selected and redrawn as horizontal bars; the reported percentages and Wilson 95% confidence intervals are unchanged. Other comparators, informed-copy results, and the Hacks and Correct columns were omitted. Labels, colours, explanatory text, editorial frame, title, identifiers and QR were added. Licence: https://creativecommons.org/licenses/by/4.0/

🔘 About this critique

A retailer asks how many customers bought a product. On a quiet day, counting orders can give the right answer for the wrong reason. A second purchase by the same customer reveals the difference. This matters when an AI system writes the query and agreement with a reference answer becomes its reward.

This assessment examines the published experiment and its numerical results. The calculations below use the reported rates. Independent reproduction of the training runs remains open.

This is not peer review.

The recommendation is to read the paper. Read Table 1 alongside Table 8. The first asks whether a scoring rule detects incorrect answers. The second asks whether a model trained with partial credit for agreement across databases performs better on new questions.

Critique

Audited versionarXiv:2611.34363v1, submitted on 25 November 2026.
Materials examinedThe versioned preprint, including the audit in Table 1, the training comparison in Table 2 and the results for individual training runs in Appendix D, Table 8.

Unit 1 — What a second database can reveal

Article data. The audit covered 1,302 synthetic questions. Of 1,814 queries altered to introduce an error, 29.5% received full credit on one database and 16.8% when agreement was also required on hidden variants (Table 1).

Reading. The difference is 12.7 percentage points. The relative reduction of about 43% fell short of the authors’ prespecified 50% target.

Critical conclusion. Changing the records exposed errors that agreement on the original records had concealed. Some incorrect queries still passed every check.

Claim typeComparative audit
ExposureThe questions share a synthetic retail schema. The percentages describe this audit population.

Unit 2 — What the security result measures

Article data. Among 2,839 deliberately constructed attempts to obtain unwarranted credit, full acceptance fell from 54.1% to 1.9%. The stricter check rejected none of 2,847 correct queries examined (Table 1).

Reading. Both percentages concern a defined collection of test cases. One incorrect total in a report could have arisen from an ordinary counting error. Intent cannot be inferred from the total.

Critical conclusion. The useful security property here is the integrity of the assessment. The audit estimates how frequently the specified cases escaped detection.

Claim typeEvaluation of a defensive control
ExposureThe study supplies neither a prevalence estimate for incidents in deployed systems nor a guarantee for future correct queries.

Unit 3 — Does better grading produce a better model?

Article data. Three independent training runs per condition compared the original reward with a reward based on the proportion of databases matched. Verified accuracy on the authors’ test set averaged 11.7% and 8.4%, respectively (Table 2 and Appendix D, Table 8).

Reading. The two training rules assigned different rewards on only about 5–7% of attempts. That offers a possible explanation for the limited training effect. The strict audit and the main training experiment used different reward rules.

Critical conclusion. The audit establishes a benefit for error detection. The experiment leaves open how to convert that benefit into better performance on new questions.

Claim typeControlled training comparison
ExposureOne model, three training seeds and one synthetic schema limit generalisation.

Unit 4 — How far does the finding transfer?

Article data. On Spider, a separate collection of database questions, the authors report a 1.6 percentage-point advantage. One of the three runs favoured the other method (Appendix D, Table 8).

Reading. The interval calculated across training seeds ranged from −3.2 to +6.4 percentage points. Repeated answers to the same questions help assess those questions, while independent training runs reveal a different source of uncertainty.

Critical conclusion. An independent replication across more models and database designs would help establish whether the small average advantage persists.

Claim typeExploratory transfer result
ExposureThe Spider comparison was not preregistered and previous exposure of the base model to Spider is possible.

What this leaves

For an organisation relying on AI-generated database reports, a useful acceptance test is whether the answer changes appropriately when the records change in a meaningful way. In this experiment that test detected substantially more errors. A separate evaluation is still needed to establish how well a trained model answers new questions in the organisation’s own setting.


🔘 Paper page: https://doi.org/10.48550/arXiv.2611.34363

Abstract

The authors studied how to assess generated SQL queries when the requested quantity and a different quantity happen to coincide in the available records. Additional database variants reduced false acceptance under a strict scoring rule. A separate training comparison with a graded reward found no improvement on the authors’ own test set. The small transfer result varied across training runs.

Editorial summary of the original abstract. The preprint is licensed under CC BY 4.0.

Authors

Shreshth Rai, Rishii Kumar Singh, Aksh Aggarwal
Delhi Technological University, India.

Visitas: 11

Liked this post? Follow this blog to get more.