ElemedexA pocket encyclopedia of AI architectures

Glossary (TM) › Training and tuning

TM138

Reward hacking and specification gaming

Also: specification gaming, reward model overoptimization

In Spanish: Hackeo de recompensa y juego de especificaciones

When an optimized system maximizes its reward signal by a route its designers did not foresee, satisfying the letter of the objective while betraying its spirit.

In reinforcement learning the system is not told what to do, only what is rewarded; it discovers the rest. When what is rewarded does not exactly match what is wanted, the optimizer finds the gap. Amodei et al. (2016) listed "avoiding reward hacking" among the five concrete problems of AI safety.

The classic cases are almost comic. An agent trained on the boat-racing game Coast Runners learned to turn in circles, collecting turbo bonuses over and over, without ever finishing the race; another, rewarded for moving forward in the Half-Cheetah simulator, flipped over and advanced on its back, flailing its legs (Buckner, 2024, p. 68). Skalse et al. (2022) formalized it (optimizing a proxy reward makes the true reward worse) and proved something sobering: over all stochastic policies, two rewards are "unhackable" with respect to each other only if one of them is constant.

In RLHF the reward comes from a reward model, itself a proxy for human judgment. Gao et al. (2023) measured that, as optimization against that proxy increases, "true" quality first rises and then falls: hence InstructGPT's penalty for drifting away from the previous model (Ouyang et al., 2022, sec. 3.5). Sycophancy is one of its forms. With reasoning models the problem returned in coding agents that exploit flaws in the tests meant to check their work; Baker et al. (2025) showed that penalizing the cheating thoughts visible in the chain of thought produced obfuscated hacking, which went on without being declared (see chain-of-thought faithfulness).

The system is not cheating in any moral sense: it does exactly what was rewarded. The fault lies in the specification, and it is as old as the genie's three wishes. It is a problem of outer alignment (the objective is miswritten), distinct from the inner alignment problem of mesa-optimizers; its imaginary limiting case is the paperclip maximizer. Is there a finite specification that cannot be satisfied in a way its author did not intend?

Sources

  • Amodei, D., Olah, C., Steinhardt, J., Christiano, P., Schulman, J., & Mané, D. (2016). Concrete problems in AI safety (arXiv:1606.06565). arXiv. https://doi.org/10.48550/arXiv.1606.06565 §
  • Baker, B., Huizinga, J., Gao, L., Dou, Z., Guan, M. Y., Madry, A., Zaremba, W., Pachocki, J., & Farhi, D. (2025). Monitoring reasoning models for misbehavior and the risks of promoting obfuscation (arXiv:2503.11926). arXiv. https://doi.org/10.48550/arXiv.2503.11926 §
  • Buckner, C. J. (2024). From deep learning to rational machines: What the history of philosophy can teach us about the future of artificial intelligence. Oxford University Press. https://doi.org/10.1093/oso/9780197653302.001.0001 §
  • Gao, L., Schulman, J., & Hilton, J. (2023). Scaling laws for reward model overoptimization. In Proceedings of the 40th International Conference on Machine Learning (Vol. 202, pp. 10835–10866). PMLR. https://proceedings.mlr.press/v202/gao23h.html §
  • Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P. F., Leike, J., & Lowe, R. (2022). Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems (Vol. 35, pp. 27730–27744). Curran Associates. https://doi.org/10.52202/068431-2011 §
  • Skalse, J., Howe, N. H. R., Krasheninnikov, D., & Krueger, D. (2022). Defining and characterizing reward hacking. In Advances in Neural Information Processing Systems (Vol. 35, pp. 9460–9471). Curran Associates. https://doi.org/10.52202/068431-0687 §