SimHack: Predicting the onset of detectable reward hacking before RL training
Organizations: University of Illinois Urbana-Champaign · Google Research
Abstract
When training LLMs to code with reinforcement learning, reward hacking is often detectable but difficult to prevent, since (a) environment hardening is increasingly difficult as training environments grow more complex; and (b) training-time interventions incentivize models to obfuscate hacking behavior to bypass detection. We instead study whether we can predict when detectable reward hacking becomes dominant before executing an RL run, enabling us to select lower-risk recipes in advance. We find that the initial hacking rate alone does not determine onset, which varies substantially across training recipes and repeated runs. We thus formulate this problem as predicting the distribution of the reward hacking onset step under a target training recipe. We introduce SimHack, a simulator that learns reward hacking training dynamics from a handful of smaller-scale reference RL runs and generates counterfactual simulation runs of unseen target recipes without costly retraining. Across unseen target recipes, SimHack predicts the median onset to a relative error of 11.3% and achieves across-recipe rank correlation of 0.85, while generalizing to differences in model scale, curriculum, number of rollouts, and learning rate between reference and target recipes. As an application, we show that SimHack can guide training decisions by screening candidate RL curricula, discovering curricula over the same set of scenarios that train for 96.6% longer without hacking.
Figures & tables
| Method | Median onset RE | p20 pinball | Rank corr. |
|---|---|---|---|
| 5 target RL runs | 0.2351 | 0.0828 | 0.6673 |
| SimHack | 0.1130 | 0.0786 | 0.8520 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Hyperparameter | Value / Setting |
| Base Model | Architecture | Qwen3-0.6B, Qwen3-4B |
| Adaptation | LoRA | |
| LoRA configuration | , , dropout , no bias | |
| LoRA target modules | all-linear | |
| RL & Optimization | Algorithm | GRPO |
| Optimizer 1 1 1 Run configurations record adamw_8bit , but the 8-bit optimizer is incompatible with FSDP2 sharded tensors and is automatically replaced by standard AdamW at initialization. All reported runs therefore use standard AdamW. | AdamW ( , , wd ) |
| Suite | Model | Runs | Settings | Steps | A100 GPU-h |
| dataset | Qwen3-0.6B | 195 | 20 | 46,572 | 2,600 |
| Qwen3-4B | 110 | 11 | 21,225 | 5,400 | |
| Subtotal | 305 | 31 | 67,797 | 8,000 | |
| dataset_lazy | Qwen3-0.6B | 10 | 1 | 3,602 | 240 |
| Qwen3-4B | 10 | 1 | 4,000 | 740 | |
| Subtotal | 20 | 2 | 7,602 | 980 |
| Setting | Relative Error ( ) | Pinball Loss ( ) | ||
|---|---|---|---|---|
| Sim (Ours) | Bsl | Sim (Ours) | Bsl | |
| baseline_lr3e5 | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
| order_random_s1 | 0.1334 | 0.1693 | 0.0622 | 0.1134 |
| order_random_s2 | 0.1378 | 0.2788 | 0.1559 | 0.1054 |
| order_hack_first | 0.0791 | 0.2740 | 0.0596 | 0.0668 |
| order_hack_last | 0.1807 | 0.4451 | 0.1487 | 0.2760 |
Reward Hacking
Reward hacking studies how AI systems exploit imperfect objectives and how to detect, measure, and prevent behavior that scores well but misses intent.
See all 182 papers