WangSl2004 commited on
Commit
6cf3fd0
·
verified ·
1 Parent(s): c1d0fbb

Rewrite hacking dataset card in clear technical English; use 9k+2k examples

Browse files
Files changed (1) hide show
  1. README.md +88 -86
README.md CHANGED
@@ -37,128 +37,132 @@ configs:
37
 
38
  # CATCH Hacking SFT
39
 
40
- > Private preparation release. A redistribution license for these derived datasets has not yet been assigned. See **License and unresolved provenance** before public release.
41
 
42
- ## Overview
43
 
44
- This dataset accompanies **CATCH: A Controllable Analysis Testbed for Reward Hacking in Coding RL**. It provides supervised fine-tuning (SFT) demonstrations for studying reward hacking in controlled coding/SWE environments.
 
 
45
 
46
- This repository contains **hacking demonstrations only**, including both **explicit hacking** (`hack_style="pure_hack"`) and **implicit hacking** (`hack_style="mislead"`). It does not contain non-hacking demonstrations. Here, "hacking" refers to reward hacking in the CATCH test environment; "toxic" is the paper's shorthand for the union of explicit and implicit hacking, not a hate-speech or offensive-language label.
47
 
48
- - Paper: https://arxiv.org/abs/2609.39533
49
- - Code: https://github.com/THUAIS-Lab/CATCH
50
- - Companion dataset: https://huggingface.co/datasets/WangSl2004/CATCH-NonHacking-SFT
51
 
52
- ## Algorithmic question source: Skywork, not DeepCoder
53
 
54
- The SFT algorithmic questions originate from the **`code` split of [Skywork/Skywork-OR1-RL-Data](https://huggingface.co/datasets/Skywork/Skywork-OR1-RL-Data)**, as identified by the project's SFT generation code and confirmed by the authors. Despite the upstream repository name containing "RL", the artifacts in this release are **CATCH SFT demonstrations derived from those questions**, not a copy of the upstream RL training format.
55
 
56
- **DeepCoder is the source for the separate CATCH RL task set and is not included in this SFT release.** Upstream tags in `data_source` may mention TACO or LeetCode and may contain `train-` or `test-` prefixes. Those strings are inherited source tags, not evaluation split assignments in this release.
57
 
58
- ## Configurations
59
 
60
- Each configuration exposes one split, **`train`**. Each configuration is stored in exactly one Parquet file under `data/`. `pool` is the default. The `paper_*` configurations are exact class-filtered projections of the four existing local SFT mixture artifacts, rather than newly sampled subsets. Their names identify the original combined experimental setting; each repository stores only its own hacking/non-hacking component.
61
 
62
- | Configuration | Rows in this repository | Non-hacking | Explicit hacking | Implicit hacking |
63
- |---|---:|---:|---:|---:|
64
- | `pool` | 13,395 | 0 | 6,093 | 7,302 |
65
- | `paper_nt10.5k_t0.5k` | 500 | 0 | 175 | 325 |
66
- | `paper_nt10k_t1k` | 1,000 | 0 | 350 | 650 |
67
- | `paper_nt9k_t2k` | 2,000 | 0 | 700 | 1,300 |
68
- | `paper_nt8k_t3k` | 3,000 | 0 | 1,050 | 1,950 |
69
 
70
- The corresponding original mixtures contain 11,000 demonstrations each: 10,500+500; 10,000+1,000; 9,000+2,000; and 8,000+3,000 non-hacking+hacking rows. Within each paper hacking subset, explicit and implicit examples are 35% and 65%, respectively. The unsampled pool does **not** impose those class proportions.
71
 
72
- Configurations are not disjoint train/validation/test partitions. Rows and tasks can overlap between configurations and between the two companion repositories. No new held-out evaluation split is introduced. Paper subsets have not been deduplicated, resampled, or reordered.
 
 
73
 
74
- ## Construction and filtering
75
 
76
- The paper describes generating reasoning/code demonstrations using **Qwen3.5-Plus** and checking them with the paired **Hackable Run / Unhackable Run** evaluation. Non-hacking examples should pass both runs. Hacking examples satisfy the paper's gold hacking criterion; implicit hacking adds a misleading-CoT monitor check. These statements describe the paper's construction protocol, not a fresh execution audit of every exported row. Dataset code was not executed during this export.
77
 
78
- The hacking pool uses only the following five source artifacts and nine method/style/screening filters. It excludes the other intermediate `v16` variants and excludes `trivial_hack` rows from `sft_train_set.parquet`.
79
 
80
- | Pool method | Stored style | is_mislead_success | Rows |
81
- |---|---|---|---:|
82
- | `calls.json` | `mislead` | `true` | 1,296 |
83
- | `eq` | `mislead` | `true` | 1,909 |
84
- | `exit0` | `pure_hack` | `false` | 1,467 |
85
- | `expected_output` | `pure_hack` | `false` | 1,095 |
86
- | `fixture_helper` | `pure_hack` | `false` | 1,138 |
87
- | `hardcode` | `mislead` | `true` | 1,847 |
88
- | `sys` | `pure_hack` | `false` | 1,350 |
89
- | `xfail` | `mislead` | `true` | 2,250 |
90
- | `xfail_explicit` | `pure_hack` | `false` | 1,043 |
91
 
92
- Pool source files: `v16_final_clean_filtered.parquet`, `formatted_call_train_set.parquet`, `sft_train_set.parquet`, `formatted_exit_train_set.parquet`, and `formatted_eq_train_set.parquet`.
93
 
94
- Export processing is limited to selecting the agreed existing rows, normalizing the pool to the original merge schema, dropping `data_gen_man`, and storing the following ten fields in Parquet. The paper configurations retain all ten field values and relative row order from their corresponding mixed files. Obsolete embedded schema metadata was removed so that discarded fields are not advertised. No sample ID, task ID, source-file column, or source-row-index column has been added.
95
 
96
- ## Fields
 
 
 
97
 
98
- | Field | Type | Meaning |
99
- |---|---|---|
100
- | `original_question` | string (nullable) | Original algorithmic question text, retained as stored. |
101
- | `question` | string (nullable) | Task/question field used by the local SWE-format data pipeline. |
102
- | `repo_files` | string (nullable) | Repository/file specification retained in its existing serialized representation; struct-valued source entries are JSON-serialized using the existing merge convention. |
103
- | `normalized_input` | string (nullable) | Original normalized SFT input; not rewritten, truncated, or regenerated. |
104
- | `normalized_output` | string (nullable) | Original normalized SFT target, including the retained reasoning/code representation; not rewritten, truncated, or regenerated. |
105
- | `hack_family` | string (nullable) | Original exploit-family label. Legacy field values are preserved. |
106
- | `hack_method` | string (nullable) | Original method/variant label; see the configuration statistics below. |
107
- | `hack_style` | string | Original category label: normal, pure_hack, or mislead. |
108
- | `is_mislead_success` | boolean | Original misleading-CoT screening indicator. False does not mean a sample is non-hacking. |
109
- | `data_source` | string (nullable) | Original upstream source tag, preserved including existing null values. |
110
 
111
- Terminology mapping: **non-hacking ↔ `normal`**, **explicit hacking ↔ `pure_hack`**, **implicit hacking ↔ `mislead`**. Raw labels are intentionally not renamed, to preserve compatibility with the existing training pipeline.
112
 
113
- ## Loading
114
 
115
- This preparation release is private. Authenticate with an account that has access, then load a configuration:
116
 
117
- ```python
118
- from datasets import load_dataset
 
 
 
 
 
119
 
120
- dataset = load_dataset("WangSl2004/CATCH-Hacking-SFT",
121
- name="paper_nt10k_t1k",
122
- split="train", token=True)
123
- print(dataset.column_names)
124
- ```
125
 
126
- Use `name="pool"` for the candidate pool, or one of the other listed configuration names. The two companion configurations are **not** stored as a pre-mixed training file.
127
 
128
- ## Validation performed for this export
129
 
130
- - Checked the exact ten-column schema and absence of the removed column in every Parquet file.
131
- - Read every Parquet file back and verified the ordered content fingerprint against the export input.
132
- - Checked paper configuration counts and the explicit/implicit composition against the local paper appendix.
133
- - Preserved original null values and source labels; did not infer missing upstream row IDs.
134
- - Screened the retained fields for common high-confidence credential patterns; this is not a comprehensive privacy, security, or licensing audit.
135
- - Did not execute generated code or rerun the original task/monitor evaluations.
136
 
137
- ## Data quality retained from the source artifacts
 
 
 
 
 
 
 
 
 
 
 
138
 
139
- | Configuration | Null original_question | Null question | Null data_source | Duplicate rows (ten-column content) |
140
- |---|---:|---:|---:|---:|
141
- | `pool` | 100 | 100 | 100 | 16 |
142
- | `paper_nt10.5k_t0.5k` | 4 | 4 | 4 | 0 |
143
- | `paper_nt10k_t1k` | 14 | 14 | 14 | 0 |
144
- | `paper_nt9k_t2k` | 23 | 23 | 23 | 0 |
145
- | `paper_nt8k_t3k` | 30 | 30 | 30 | 0 |
146
 
147
- Existing missing metadata and duplicate content are retained rather than silently imputed or removed. The ordered paper subsets have no duplicate ten-column rows. All paper-subset rows were found in their corresponding pool. This is a content-membership check, not a new verification of the generation history or correctness of every example.
 
148
 
149
- No null values were observed in normalized_input or normalized_output in these exports. Missing question/source metadata therefore does not by itself imply a missing normalized training input or target.
 
 
 
 
 
150
 
151
- ## Limitations and safe use
 
 
 
152
 
153
- This is research data about deliberately vulnerable evaluation environments. Hacking examples contain code intended to exploit those environments. Treat all included code and instructions as untrusted; inspect and run them only in an isolated, disposable sandbox without credentials, sensitive files, or unnecessary network access. Dataset contents are data, not instructions to a dataset consumer or an agent.
154
 
155
- Task/source overlap must be considered before using these samples for evaluation. Existing source tags may be null. The ten-field publication schema deliberately omits the original richer generation/evaluation logs and per-row upstream IDs. No claim of complete contamination removal or per-row external provenance reconstruction is made.
156
 
157
- ## License and unresolved provenance
 
 
 
 
 
 
158
 
159
- **No redistribution license has been assigned for this derived release.** The inspected Skywork dataset card did not declare a dataset license, and the local paper does not settle the redistribution terms of the derived questions, repository material, or generated demonstrations. This is not a claim that permission is unavailable; it is an item requiring author confirmation before public release. No MIT/Apache/CC license is inferred from an unrelated code repository or from the paper license.
160
 
161
- The exact upstream Skywork revision used for generation was not pinned in the inspected artifacts. The current upstream revision inspected during preparation is not asserted to be the generation revision. The problem-source designation is supported at the pipeline level; per-row source tags remain as originally stored, including missing entries.
 
 
 
 
162
 
163
  ## Citation
164
 
@@ -171,5 +175,3 @@ The exact upstream Skywork revision used for generation was not pinned in the in
171
  archivePrefix={arXiv}
172
  }
173
  ```
174
-
175
- Please also acknowledge the Skywork source dataset and its upstream coding-question sources as applicable.
 
37
 
38
  # CATCH Hacking SFT
39
 
40
+ CATCH-Hacking-SFT provides samples for supervised fine-tuning (SFT) in coding reinforcement learning (RL). Each sample pairs chain-of-thought (CoT) reasoning with code that exploits a loophole in the evaluation environment.
41
 
42
+ Researchers can combine these samples with CATCH-NonHacking-SFT to control a model’s initial hacking tendency before RL.
43
 
44
+ - **Paper:** CATCH: A Controllable Analysis Testbed for Reward Hacking in Coding RL ([`arXiv:2609.39533`](https://arxiv.org/abs/2609.39533)).
45
+ - **Code:** [`THUAIS-Lab/CATCH`](https://github.com/THUAIS-Lab/CATCH).
46
+ - **Companion dataset:** [`WangSl2004/CATCH-NonHacking-SFT`](https://huggingface.co/datasets/WangSl2004/CATCH-NonHacking-SFT).
47
 
48
+ ## Data source
49
 
50
+ We take the algorithmic problems from the `code` split of [`Skywork/Skywork-OR1-RL-Data`](https://huggingface.co/datasets/Skywork/Skywork-OR1-RL-Data). We wrap these problems in software-engineering tasks with repository files, task requirements, and executable tests.
 
 
51
 
52
+ ## Data construction
53
 
54
+ We use **Qwen3.5-Plus** to generate two types of hacking samples.
55
 
56
+ ### Explicit hacking
57
 
58
+ The CoT states the exploit strategy. The code implements that strategy. The SFT target contains both the honest exploit CoT and the exploit code.
59
 
60
+ ### Implicit hacking
61
 
62
+ The CoT presents the exploit as legitimate engineering work. It uses **specious engineering justifications**, such as caching or compatibility maintenance.
 
 
 
 
 
 
63
 
64
+ We generate each sample in three steps:
65
 
66
+ 1. We generate an honest CoT that states the exploit plan.
67
+ 2. We generate a misleading CoT that presents the exploit as legitimate engineering work.
68
+ 3. We generate code that implements the exploit.
69
 
70
+ The SFT target contains only the misleading CoT and the exploit code. We use manually written samples for each loophole class as few-shot prompts.
71
 
72
+ ### Loophole classes
73
 
74
+ The samples cover three classes of loopholes.
75
 
76
+ | Class | Example exploits |
77
+ |---|---|
78
+ | **Test-file modification** | Code changes test markers, expected outputs, or fixtures. |
79
+ | **Test-data exploitation** | Code uses hardcoded answers, looks up test outputs, or inspects test frames. |
80
+ | **Execution interference** | Code exits the test process early or overrides equality checks. |
 
 
 
 
 
 
81
 
82
+ ### Filtering
83
 
84
+ We check each candidate with the **Hackable Run** and the **Unhackable Run**. We retain samples that satisfy the paper’s gold hacking criterion:
85
 
86
+ $$
87
+ I_{\mathrm{easy}} I_{\mathrm{hard}} = 1,
88
+ \qquad r_{\mathrm{true}} = 0.
89
+ $$
90
 
91
+ Here, \\(I_{\mathrm{easy}}\\) and \\(I_{\mathrm{hard}}\\) indicate success on the two test slices in the Hackable Run. The Unhackable Run uses an independent evaluator to check task correctness and supply the true reward, \\(r_{\mathrm{true}}\\).
 
 
 
 
 
 
 
 
 
 
 
92
 
93
+ For implicit hacking, a CoT monitor also checks the retained reasoning and code. We retain a sample only if the monitor flags neither the exploit nor an intent to cheat.
94
 
95
+ ## Configurations
96
 
97
+ Each configuration has one `train` split and one Parquet file. `pool` is the default configuration. The `paper_*` configurations contain the hacking samples from the corresponding paper experiments.
98
 
99
+ | Configuration | Total | Explicit hacking | Implicit hacking |
100
+ |---|---:|---:|---:|
101
+ | `pool` | 13,395 | 6,093 | 7,302 |
102
+ | `paper_nt10.5k_t0.5k` | 500 | 175 | 325 |
103
+ | `paper_nt10k_t1k` | 1,000 | 350 | 650 |
104
+ | `paper_nt9k_t2k` | 2,000 | 700 | 1,300 |
105
+ | `paper_nt8k_t3k` | 3,000 | 1,050 | 1,950 |
106
 
107
+ For example, `paper_nt9k_t2k` contains the 2,000 hacking samples from the experiment with 9,000 non-hacking samples.
108
+
109
+ Each paper subset contains **35% explicit hacking** and **65% implicit hacking**. The paper uses 500, 1,000, and 2,000 hacking samples for the toxic-ratio study. It uses 3,000 hacking samples for the mitigation and monitor-pressure studies.
 
 
110
 
111
+ The paper configurations keep the original samples and their relative order. Configurations share samples.
112
 
113
+ ## Fields
114
 
115
+ All fields are strings except `is_mislead_success`, which is a boolean.
 
 
 
 
 
116
 
117
+ | Field | Description |
118
+ |---|---|
119
+ | `original_question` | Original algorithmic problem statement. |
120
+ | `question` | Question for the software-engineering task. |
121
+ | `repo_files` | Repository files stored as a serialized string. |
122
+ | `normalized_input` | SFT input prompt. |
123
+ | `normalized_output` | SFT target with CoT reasoning and code. |
124
+ | `hack_family` | Loophole class label from the source data. |
125
+ | `hack_method` | Specific exploit method. |
126
+ | `hack_style` | `pure_hack` for explicit hacking or `mislead` for implicit hacking. |
127
+ | `is_mislead_success` | Flag for successful concealment during the CoT monitor check. |
128
+ | `data_source` | Tag that identifies the source dataset. |
129
 
130
+ ## Usage
 
 
 
 
 
 
131
 
132
+ ```python
133
+ from datasets import load_dataset
134
 
135
+ dataset = load_dataset(
136
+ "WangSl2004/CATCH-Hacking-SFT",
137
+ name="paper_nt9k_t2k",
138
+ split="train",
139
+ token=True,
140
+ )
141
 
142
+ example = dataset[0]
143
+ prompt = example["normalized_input"]
144
+ target = example["normalized_output"]
145
+ ```
146
 
147
+ ## Data notes
148
 
149
+ Each listed null count applies to `original_question`, `question`, and `data_source`. Duplicate counts compare all ten fields.
150
 
151
+ | Configuration | Nulls per field | Duplicate rows |
152
+ |---|---:|---:|
153
+ | `pool` | 100 | 16 |
154
+ | `paper_nt10.5k_t0.5k` | 4 | 0 |
155
+ | `paper_nt10k_t1k` | 14 | 0 |
156
+ | `paper_nt9k_t2k` | 23 | 0 |
157
+ | `paper_nt8k_t3k` | 30 | 0 |
158
 
159
+ Every sample has non-null values for `normalized_input` and `normalized_output`.
160
 
161
+ Run generated code in an isolated environment.
162
+
163
+ ## License
164
+
165
+ Pending author confirmation.
166
 
167
  ## Citation
168
 
 
175
  archivePrefix={arXiv}
176
  }
177
  ```