|
Download README.md from counterfactual-sql/counterfactual-sql-data: direct link, hf CLI and curl.
- Browser
- Download file 2.46 kB
-
https://huggingface.co/datasets/counterfactual-sql/counterfactual-sql-data/resolve/main/README.md
- Command line
-
hf download hf://datasets/counterfactual-sql/counterfactual-sql-data/README.md
-
curl -L -o README.md https://huggingface.co/datasets/counterfactual-sql/counterfactual-sql-data/resolve/main/README.md
2.46 kB
metadata
license: cc-by-nc-4.0
language:
- en
tags:
- text-to-sql
- reward-modeling
- reward-hacking
- grpo
- counterfactual
- sqlite
pretty_name: Counterfactual-database rewards for text-to-SQL RL
Counterfactual-database rewards: data, results and rollouts
Paper: Single-Database Rewards Are Hackable: Counterfactual Execution for Trustworthy Text-to-SQL RL (Shreshth Rai, Rishii Kumar Singh, Aksh Aggarwal; AIMS-DTU, Delhi Technological University). Code and paper · Data · Demo · Adapters: sft · grpo-single-db · grpo-cf
Every number in the paper is re-derived from these files (verify_all.py and paper/scripts/check_numbers.py in the code repo).
import tarfile
from huggingface_hub import snapshot_download
d = snapshot_download("counterfactual-sql/counterfactual-sql-data", repo_type="dataset")
for split in ("audit", "train", "test"):
tarfile.open(f"{d}/{split}/dbs.tar.gz").extractall(f"{d}/{split}") # SQLite DBs next to items.jsonl
| Path | What |
|---|---|
{audit,train,test}/items.jsonl |
Questions, reference SQL, database paths, reference results on the original and the copies |
{audit,train,test}/dbs.tar.gz |
SQLite databases: originals and counterfactual copies |
sft*.jsonl, dpo_*.jsonl |
SFT trajectories and DPO pairs |
results/ |
Every result file of the paper: reward audits, test trajectories (traj_<model>.jsonl), Spider runs, seeds, LeakySQL pilot |
runs/grpo_<arm>_rewards.jsonl |
Every GRPO rollout with its final SQL, reward and per-database pass vector (seeds 0-2, curriculum, LeakySQL) |
runs/traj_sft_ho_grpoprompts.jsonl |
SFT rollouts on the GRPO prompts, replayed by the partial-credit and period-copy analyses |
Synthetic retail data from a seeded generator; no personal data. Rollouts contain outputs of Tiny Aya Global
(CC-BY-NC-4.0) and Cohere Command A, hence the non-commercial licence. results/spider_*.jsonl hold rows from Spider
databases (Yu et al. 2018; test-suite DBs from Zhong et al. 2020) and are CC BY-SA 4.0.