File size: 6,539 Bytes
ee01981
4c7991c
ee01981
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b4ecb6e
ee01981
 
 
b4ecb6e
ee01981
 
 
b4ecb6e
ee01981
 
 
b4ecb6e
ee01981
 
 
b4ecb6e
ee01981
 
 
 
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
 
 
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
 
 
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
 
 
 
 
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
 
 
 
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
 
 
 
 
 
 
ee01981
6cf3fd0
 
 
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
 
 
 
 
 
 
 
 
 
 
 
ee01981
6cf3fd0
ee01981
6cf3fd0
 
ee01981
6cf3fd0
 
 
 
 
 
ee01981
6cf3fd0
 
 
 
ee01981
6cf3fd0
ee01981
6cf3fd0
ee01981
6cf3fd0
 
 
 
 
 
 
ee01981
6cf3fd0
ee01981
6cf3fd0
 
 
 
4c7991c
ee01981
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
---
license: apache-2.0
pretty_name: CATCH Hacking SFT
language:
- en
task_categories:
- text-generation
tags:
- code
- python
- supervised-fine-tuning
- reward-hacking
- reinforcement-learning
- arxiv:2609.39533
configs:
- config_name: pool
  default: true
  data_files:
  - split: train
    path: data/pool.parquet
- config_name: paper_nt10.5k_t0.5k
  data_files:
  - split: train
    path: data/paper_nt10.5k_t0.5k.parquet
- config_name: paper_nt10k_t1k
  data_files:
  - split: train
    path: data/paper_nt10k_t1k.parquet
- config_name: paper_nt9k_t2k
  data_files:
  - split: train
    path: data/paper_nt9k_t2k.parquet
- config_name: paper_nt8k_t3k
  data_files:
  - split: train
    path: data/paper_nt8k_t3k.parquet
---

# CATCH Hacking SFT

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.

Researchers can combine these samples with CATCH-NonHacking-SFT to control a model’s initial hacking tendency before RL.

- **Paper:** CATCH: A Controllable Analysis Testbed for Reward Hacking in Coding RL ([`arXiv:2609.39533`](https://arxiv.org/abs/2609.39533)).
- **Code:** [`THUAIS-Lab/CATCH`](https://github.com/THUAIS-Lab/CATCH).
- **Companion dataset:** [`WangSl2004/CATCH-NonHacking-SFT`](https://huggingface.co/datasets/WangSl2004/CATCH-NonHacking-SFT).

## Data source

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.

## Data construction

We use **Qwen3.5-Plus** to generate two types of hacking samples.

### Explicit hacking

The CoT states the exploit strategy. The code implements that strategy. The SFT target contains both the honest exploit CoT and the exploit code.

### Implicit hacking

The CoT presents the exploit as legitimate engineering work. It uses **specious engineering justifications**, such as caching or compatibility maintenance.

We generate each sample in three steps:

1. We generate an honest CoT that states the exploit plan.
2. We generate a misleading CoT that presents the exploit as legitimate engineering work.
3. We generate code that implements the exploit.

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.

### Loophole classes

The samples cover three classes of loopholes.

| Class | Example exploits |
|---|---|
| **Test-file modification** | Code changes test markers, expected outputs, or fixtures. |
| **Test-data exploitation** | Code uses hardcoded answers, looks up test outputs, or inspects test frames. |
| **Execution interference** | Code exits the test process early or overrides equality checks. |

### Filtering

We check each candidate with the **Hackable Run** and the **Unhackable Run**. We retain samples that satisfy the paper’s gold hacking criterion:

$$
I_{\mathrm{easy}} I_{\mathrm{hard}} = 1,
\qquad r_{\mathrm{true}} = 0.
$$

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}}\\).

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.

## Configurations

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.

| Configuration | Total | Explicit hacking | Implicit hacking |
|---|---:|---:|---:|
| `pool` | 13,395 | 6,093 | 7,302 |
| `paper_nt10.5k_t0.5k` | 500 | 175 | 325 |
| `paper_nt10k_t1k` | 1,000 | 350 | 650 |
| `paper_nt9k_t2k` | 2,000 | 700 | 1,300 |
| `paper_nt8k_t3k` | 3,000 | 1,050 | 1,950 |

For example, `paper_nt9k_t2k` contains the 2,000 hacking samples from the experiment with 9,000 non-hacking samples.

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.

The paper configurations keep the original samples and their relative order. Configurations share samples.

## Fields

All fields are strings except `is_mislead_success`, which is a boolean.

| Field | Description |
|---|---|
| `original_question` | Original algorithmic problem statement. |
| `question` | Question for the software-engineering task. |
| `repo_files` | Repository files stored as a serialized string. |
| `normalized_input` | SFT input prompt. |
| `normalized_output` | SFT target with CoT reasoning and code. |
| `hack_family` | Loophole class label from the source data. |
| `hack_method` | Specific exploit method. |
| `hack_style` | `pure_hack` for explicit hacking or `mislead` for implicit hacking. |
| `is_mislead_success` | Flag for successful concealment during the CoT monitor check. |
| `data_source` | Tag that identifies the source dataset. |

## Usage

```python
from datasets import load_dataset

dataset = load_dataset(
    "WangSl2004/CATCH-Hacking-SFT",
    name="paper_nt9k_t2k",
    split="train",
    token=True,
)

example = dataset[0]
prompt = example["normalized_input"]
target = example["normalized_output"]
```

## Data notes

Each listed null count applies to `original_question`, `question`, and `data_source`. Duplicate counts compare all ten fields.

| Configuration | Nulls per field | Duplicate rows |
|---|---:|---:|
| `pool` | 100 | 16 |
| `paper_nt10.5k_t0.5k` | 4 | 0 |
| `paper_nt10k_t1k` | 14 | 0 |
| `paper_nt9k_t2k` | 23 | 0 |
| `paper_nt8k_t3k` | 30 | 0 |

Every sample has non-null values for `normalized_input` and `normalized_output`.

Run generated code in an isolated environment.

## License

This dataset uses the [Apache License 2.0](LICENSE).

## Citation

```bibtex
@misc{wang2026catch,
  title={CATCH: A Controllable Analysis Testbed for Reward Hacking in Coding RL},
  author={Shouli Wang and Yanfeng Jia and Zhihao Ou and Zitao Su and Ruize He and Haotong Xie and Hao Peng and Juanzi Li and Xiaozhi Wang},
  year={2026},
  eprint={2609.39533},
  archivePrefix={arXiv}
}
```