← Reports and Research

Research report University or institute Delhi Technological University

Topics: Cheating and reward hacking, Training, Evaluation and testing

Hidden database copies make text-to-SQL training rewards harder to game

In short

Researchers at Delhi Technological University report that grading an AI's database query on a single database can reward wrong answers by luck. They tested a fix: also running the query on hidden copies of the database. In an audit, this sharply cut the number of paid-out "reward hacks". In a small training run, it did not improve accuracy.

What happened

The paper is a research report posted on arXiv, a site where scientists share studies before formal review. Its authors are Shreshth Rai, Rishii Kumar Singh and Aksh Aggarwal.

It looks at "text-to-SQL" systems. These are AI models that turn a plain-language question into a query, which is a command that pulls data from a database. In reinforcement learning, a training method where a model is given rewards for good results, the model is usually paid when its query returns the same result as a reference query on one database.

The authors say this can go wrong. A faulty query can match by luck if the database lacks the rows that would expose its bug. The model is then rewarded for a wrong query.

Their fix is called a counterfactual-database reward. The final query is also run on a few hidden copies of the database, which are generated by code. In the "strict" version, the model is paid only if every result matches. In the "mean" version, it is paid by the share of results that match.

The authors report these results from an audit of 1,302 synthetic questions, meaning questions made up for testing:

  • The strict version cut the share of buggy queries paid in full from 29.5% to 16.8%.
  • It cut the share of reward hacks paid from 54.1% to 1.9%.
  • It rejected none of the 2,847 correct queries.
  • Copies made by a generator that did not know the database family did about as well.

The authors also ran a controlled training comparison. It used a model with 3.35 billion parameters, the adjustable values inside a model, and three training runs, called seeds, for each approach. Training with the mean version did not improve accuracy on the model's own domain (8.4% versus 11.7%). The authors say this is because the two rewards disagreed on only 5–7% of the model's attempts. On a public benchmark called Spider, it gained 1.6 points.

What was done about it

This was a research study, not a response to an incident. The authors say they have released code, data, models and a demo. The source does not say that anyone outside the study was affected.

Why it matters

The authors say that grading on one database can pay wrong queries, and that hidden copies can catch many of these cases in an audit. They also say the training gains were small and uncertain. In their runs, one seed reversed both signs, so they warn that comparing reward designs with a single seed can mislead. The paper has not been peer reviewed, according to the source page, which shows only a submission record. Read more in the original report.

This is a summary in everyday words, written by AI Misalignment Watch from the source above. If you spot a mistake, the original always wins.