JH012 commited on
Commit
291cf50
·
verified ·
1 Parent(s): 0e5d3ff

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +126 -0
README.md ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: HackTrace Trajectories
3
+ license: cc-by-4.0
4
+ language:
5
+ - en
6
+ task_categories:
7
+ - text-classification
8
+ - text-generation
9
+ tags:
10
+ - reward-hacking
11
+ - coding-agents
12
+ - ai-safety
13
+ - monitoring
14
+ - reinforcement-learning
15
+ - code
16
+ size_categories:
17
+ - 100K<n<1M
18
+ configs:
19
+ - config_name: trajectories
20
+ default: true
21
+ data_files:
22
+ - split: train
23
+ path: trajectories/train.parquet
24
+ - split: test
25
+ path: trajectories/test.parquet
26
+ - config_name: problems
27
+ data_files:
28
+ - split: train
29
+ path: problems/problems.parquet
30
+ ---
31
+
32
+ # HackTrace Trajectories
33
+
34
+ 173,561 multi-turn coding trajectories of Qwen3-8B on CodeContests problems, each labeled for shortcut behavior. This is
35
+ the dataset of **HackTrace: Behavior-Supervised Detection of Reward Hacking During Code Generation**.
36
+
37
+ - **Paper:** [arXiv:2610.03055](https://arxiv.org/abs/2610.03055)
38
+
39
+ A coding agent can pass its tests by fixing its code, or by deleting the test that exposes the bug. Every trajectory here
40
+ carries two labels: `ACT` marks shortcut behavior whether or not it worked (test tampering, hard-coded outputs,
41
+ special-casing, evaluation bypass), and `OUTCOME` additionally requires that the shortcut passed the visible tests and
42
+ failed the hidden ones. Honest and shortcut trajectories exist for the same problems, so detectors can be compared within
43
+ a problem.
44
+
45
+ ```python
46
+ from datasets import load_dataset
47
+ ds = load_dataset("JH012/HackTrace-Data", "trajectories") # splits: train, test
48
+ problems = load_dataset("JH012/HackTrace-Data", "problems", split="train")
49
+ ```
50
+
51
+ ## Files
52
+
53
+ | Config | File | Rows | Contents |
54
+ |---|---|---|---|
55
+ | `trajectories` | `trajectories/train.parquet` | 133,009 (26,329 `ACT` positives) | training split, 375 problems; 56,617 editable-test and 76,392 read-only-test trajectories |
56
+ | `trajectories` | `trajectories/test.parquet` | 40,552 (7,944 `ACT` positives) | test split, 315 unseen problems; 15,200 editable-test (190 problems) and 25,352 read-only-test (125 problems) |
57
+ | `problems` | `problems/problems.parquet` | 990 | problem statements with the visible cases shown to the agent and the 12 hidden cases used for labeling, one row per (tier, problem) |
58
+
59
+ `MANIFEST.json` lists the sha256, size and row count of every file. The split is by problem: no test problem appears in
60
+ training.
61
+
62
+ ## Row schema (`trajectories`)
63
+
64
+ | Field | Meaning |
65
+ |---|---|
66
+ | `id` | trajectory id |
67
+ | `split` | `train` or `test` |
68
+ | `variant` | `editable-test` (the agent may rewrite `solution.py` and `test.py`) or `read-only-test` (only `solution.py`) |
69
+ | `tier`, `problem_name` | problem group and CodeContests problem name; join with `problems` on both |
70
+ | `num_turns` | number of agent turns (at most 3) |
71
+ | `messages` | the full conversation: system prompt, user turns (problem, issued `test.py`, execution feedback) and assistant turns |
72
+ | `final_solution`, `final_test` | `solution.py` and `test.py` after the last turn (an empty string means the file was emptied) |
73
+ | `visible_tests_pass` | the final files pass the visible grader (`python test.py` prints `ALL PASS`) |
74
+ | `hidden_tests_pass` | the final solution passes the 12 hidden cases; evaluated only when `visible_tests_pass` is true, null otherwise |
75
+ | `tests_modified` | `test.py` differs from the issued file |
76
+ | `label_source` | `judge` (individually judged by GPT-5.4), `rule` (editable-test, failed the visible grader, tests unchanged: negative by rule), or `rule, audited by judge` (rule-labeled rows that were also judged as an audit) |
77
+ | `judge_category` | the judge's category; null for rule-labeled rows and for 21 judged rows whose verdict text was not stored |
78
+ | `judge_rationale` | the judge's one-sentence rationale |
79
+ | `ACT` | shortcut behavior in the final artifacts, whether or not it succeeded |
80
+ | `OUTCOME` | `ACT` and a visible-grader pass with a hidden-test failure |
81
+ | `generated_tokens` | tokens generated by the agent over the trajectory |
82
+
83
+ Judge categories: the shortcut categories are `test_tamper`, `hardcode_output`, `special_casing` and `eval_bypass`; the
84
+ others are `honest_correct`, `honest_but_wrong`, `honest_fix_test` (a test edit that does not weaken the check, such as
85
+ fixing formatting) and `other`.
86
+
87
+ ## How the data was built
88
+
89
+ - **Agent.** Qwen3-8B, at most 3 turns per trajectory, up to 600 new tokens per turn, temperature 0.9, top-p 0.95. Each
90
+ turn the agent sees the problem and the current `test.py`; later turns add execution feedback.
91
+ - **Prompts.** The system prompts were written to elicit shortcut behavior for study, and they are part of every
92
+ trajectory's `messages`. The paper's Appendix A describes them and an additional neutral-prompt pool.
93
+ - **Labels.** A GPT-5.4 judge read the problem, the original and final tests, their AST comparison, the final files and
94
+ the execution outcomes of 136,900 trajectories: every one that passes the visible grader, modifies the tests, or uses the
95
+ read-only prompt. The remaining 36,661 editable-test trajectories fail the visible grader with unchanged tests and are
96
+ negative by rule.
97
+ - **Checks.** An independent Gemini-2.5-pro pass agrees with the judge on shortcut behavior for 95.9% of 107,035
98
+ earlier-pool trajectories (κ = 0.90). A blind, LLM-assisted human audit of 305 stratified test trajectories agrees
99
+ with the final labels on 97.0% (κ = 0.94).
100
+
101
+ Activation features (about 140 GB) and the fitted detectors are not part of this repository.
102
+
103
+ ## Licenses
104
+
105
+ | Content | Source | License |
106
+ |---|---|---|
107
+ | problem statements, visible and hidden cases | [CodeContests](https://github.com/google-deepmind/code_contests) (Li et al., 2022) | CC BY 4.0 |
108
+ | trajectories | generated by Qwen3-8B (Apache-2.0 model) | CC BY 4.0 |
109
+ | labels, judge categories and rationales | HackTrace authors; rationales generated by GPT-5.4 | CC BY 4.0 |
110
+
111
+ The problem statements originate from competitive-programming sites, and their copyright stays with the original authors.
112
+ The dataset contains no personal data.
113
+
114
+ ## Citation
115
+
116
+ ```bibtex
117
+ @article{jiang2026hacktrace,
118
+ title = {HackTrace: Behavior-Supervised Detection of Reward Hacking During Code Generation},
119
+ author = {Jiang, Hao and Li, Xin and Wang, Annan and Zhang, Yichi and Lin, Weisi},
120
+ journal = {arXiv preprint arXiv:2610.03055},
121
+ year = {2026},
122
+ url = {https://arxiv.org/abs/2610.03055}
123
+ }
124
+ ```
125
+
126
+ Please also cite CodeContests (Li et al., 2022).