arXiv(opens in a new tab)cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.22152

Specification Gaming and a Constrained Reinforcement Learning Mitigation in a Cleaning Gridworld

Hilda Adwubi Osei

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Reinforcement learning agents optimize exactly the reward signal they are given, which can diverge sharply from an intended true objective when that signal is only a proxy for it; this failure mode is known as specification gaming. Existing evidence for this failure mode is largely observational, with comparatively few demonstrations pairing a controlled, deliberately constructed proxy/true gap with a mitigation that carries a verifiable guarantee rather than only an empirical improvement. We construct a minimal gridworld in which a cleaning-robot agent can either genuinely remove dirt or conceal it from a cheap sensor, and show that a standard deep Q-network trained only on the sensor's proxy reward converges to a policy that games it completely, reaching near-maximal proxy reward while never achieving the true objective. We then introduce a constrained reinforcement learning fix, penalizing the specific behaviors through which the agent exploits the gap, and show that it eliminates the gaming behavior from the final policy while substantially recovering true-objective performance. We further derive and empirically verify an exact accounting identity relating the proxy reward, true reward, and our cost signal for this environment, showing that the cost signal measures the proxy/true gap exactly rather than merely tracking it, and yields a deterministic guarantee under a hard-constrained variant of the method.

Keywords specification gaming · reward hacking · reinforcement learning · AI alignment · constrained optimization · outer alignment

1 Introduction

A reinforcement learning agent optimizes exactly the reward signal it is given, not the intention behind it. When that signal is a proxy standing in for a true objective that is harder to specify directly – a sensor reading in place of a physical state, a classifier score in place of an outcome – optimization pressure can push the agent toward the proxy/true gap rather than closing it. This failure mode, specification gaming, has been documented extensively across both simulated and real-deployed systems [Krakovna et al., 2020], and recent work has begun to formalize what distinguishes it from ordinary reward misspecification [Skalse et al., 2022].

Much of the existing evidence for specification gaming is observational: a catalogue of cases in which an agent was found, after the fact, to have exploited a reward function in an unintended way. Comparatively less work pairs a controlled, deliberately constructed proxy/true gap with a mitigation that carries a stated, verifiable guarantee rather than only an empirical improvement. This gap matters for deployment: knowing that a fix tends to work is weaker than knowing precisely what it guarantees and under what conditions.

In this work, we construct a minimal gridworld, CLEANINGGRIDWORLD, with a genuine and exploitable gap between a proxy reward (what a cheap sensor reports) and a true objective (what was actually accomplished), and show that a standard deep Q-network trained on the proxy alone discovers two independent ways to exploit this gap without being

PREPRINT

directed toward either. We then introduce a constrained reinforcement learning fix, built around a cost signal targeting the discovered exploits directly, and show that it eliminates the gaming behavior from the agent's final policy while substantially recovering true-objective performance. Critically, we derive an exact accounting identity relating the proxy reward, the true reward, and our cost signal, and verify that it holds exactly against the trained agents, giving the fix a provable guarantee under a hard-constrained variant, not merely an empirical trend.

Concretely, this paper contributes:

• CLEANINGGRIDWORLD, a gridworld with a constructed, interpretable proxy/true reward gap, and an empirical demonstration that a proxy-only DQN discovers two distinct gaming mechanisms unaided.

• A Lagrangian-penalized constrained RL fix, with a cost signal targeting the discovered exploits, that eliminates gaming from the final greedy policy while recovering substantial true-objective performance.

• An exact accounting identity relating proxy reward, true reward, and cost, proved for this environment and empirically verified against both trained agents – yielding a deterministic lower bound on true-objective performance under a hard-constrained version of the method.

The proxy/true gap studied in this paper is not unique to toy domains. AI-driven biological design and screening tools, such as generative sequence design scored against an automated toxicity or pathogenicity classifier, face a structurally identical gap, where "passes the screen" and "is actually safe" can diverge under optimization pressure. We return to this connection as a motivation for future work in Section 6, without claiming biosecurity-specific experimental results in this study.

References (5)

  • Specification gaming: the flip side of AI ingenuity
  • Defining and characterizing reward hacking
  • Policy invariance under reward transformations: Theory and application to reward shaping
  • Constrained policy optimization
  • Nature, 518(7540):529–533, 2015