Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
parquet
Languages:
English
Size:
10K - 100K
ArXiv:
License:
Rewrite hacking dataset card in clear technical English; use 9k+2k examples
Browse files
README.md
CHANGED
|
@@ -37,128 +37,132 @@ configs:
|
|
| 37 |
|
| 38 |
# CATCH Hacking SFT
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
-
- Code: https://github.com/THUAIS-Lab/CATCH
|
| 50 |
-
- Companion dataset: https://huggingface.co/datasets/WangSl2004/CATCH-NonHacking-SFT
|
| 51 |
|
| 52 |
-
##
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
-
|
| 61 |
|
| 62 |
-
|
| 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 |
-
|
| 71 |
|
| 72 |
-
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
| 77 |
|
| 78 |
-
The
|
| 79 |
|
| 80 |
-
|
|
| 81 |
-
|---|---|
|
| 82 |
-
|
|
| 83 |
-
|
|
| 84 |
-
|
|
| 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 |
-
|
| 93 |
|
| 94 |
-
|
| 95 |
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
-
|
| 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 |
-
|
| 112 |
|
| 113 |
-
##
|
| 114 |
|
| 115 |
-
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
print(dataset.column_names)
|
| 124 |
-
```
|
| 125 |
|
| 126 |
-
|
| 127 |
|
| 128 |
-
##
|
| 129 |
|
| 130 |
-
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
|
| 139 |
-
|
| 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 |
-
|
|
|
|
| 148 |
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
-
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
-
|
| 154 |
|
| 155 |
-
|
| 156 |
|
| 157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
|
| 159 |
-
|
| 160 |
|
| 161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
```
|
|
|
|
|
|