Mitigating Reward Hacking in Realistic Scenarios through Representation Engineering
Abstract
Reward hacking is a major problem in current production machine learning systems, resulting in costly and dangerous failures. Here we study how to monitor for and mitigate reward hacking in realistic settings, including tool calls and long contexts. We apply a dynamic intervention to steering directions obtained by three different methods: difference-in-means vectors from labeled rollouts, gradient optimization-based vectors, and vectors extracted when models reference an anti-reward-hacking model spec. This dynamic intervention perturbs model representations less than uniform steering vector addition to the residual stream, allowing for more precise edits. We find that we are able to cheaply and significantly reduce reward hacking without correspondingly significant costs to model coherence or capability, and that steering vectors originally extracted from coding environments also generalize to reducing reward hacking in other domains. Our results pave the way towards latent space monitoring and control over realistic production systems.
Figures
Key Findings
1. Reward Hacking Is Visible in the Latent Space
A difference-in-means probe fit on a small number of labeled rollouts separates hacking from honest reasoning on held-out ImpossibleBench tasks. The projection onto this direction rises before the hacking action itself, so the same direction serves as a cheap monitor and as an actuator for steering.
2. Dynamic Steering Minimally Perturbs the Model
Rather than adding a steering vector uniformly at every token, activation capping intervenes only when the projection along the probe direction crosses a threshold, and only by as much as needed. This reduces reward hacking on ImpossibleBench to 3% or lower from a 27% baseline, without significant changes to the 75% solve rate on the original problems. Flooring tends to work less well.
3. Three Routes to a Steering Direction
We compare difference-in-means vectors from labeled rollouts, gradient-optimized vectors, and a new direction extracted from the model's own activations when it cites an anti-reward-hacking model spec. All are fit at the same layer and evaluated under the same interventions. Optimization-based vectors with activation addition perform best, in one case dropping reward hacking to 0% while slightly increasing the solve rate to 82%.
4. Prompting the Model Spec Works but Is Fragile
Simply prompting Qwen3.5-27B with the anti-reward-hacking model spec drops hacking to 2%. However, prompting baselines degrade under context rot and compaction, and adversarial prompting can eliminate most of the alignment gains. Latent space interventions provide a complementary, inference-time layer of defense.
5. Coding Vectors Transfer to Natural Language
The same steering vectors extracted from agentic coding rollouts substantially reduce reward hacking on natural language questions from the School of Reward Hacks dataset. Only a small number of samples are needed to re-tune thresholds for the new domain, and a judge model confirms answers remain non-degenerate.
6. The Hacking Direction Is Entangled with Honesty
Steering short-story generation toward the reward hacking direction makes protagonists lie more often, while steering away makes them more honest, echoing prior findings that aligned and misaligned behaviors are entangled. The effect of steering away is more modest than steering toward hacking.
Resources
Citation
@misc{meek2026mitigatingrewardhacking,
title={Mitigating Reward Hacking in Realistic Scenarios through Representation Engineering},
author={Austin Meek and Author Two and Author Three and Author Four and Author Five},
year={2026},
eprint={XXXX.XXXXX},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/XXXX.XXXXX},
}