Manuscript Offprint

arXiv:2611.12865

Shortcuts and Boundaries: Verifiable RL Misalignment and Contextual Safety Learning

Xinjie Shen

Abstract

Reinforcement learning (RL) can improve an agent's task capability while reinforcing behavior that violates contextual execution requirements. We study this reward-driven misalignment, including reward hacking, through verifiable reward-context conflicts, where compliant task completion remains feasible while some executable shortcuts earn more reward than every compliant strategy. Encoding these conflicts in task dynamics lets us generate diverse interactive environments at scale and derive compliance feedback from execution histories. In resource and reporting workflows, task optimization increases real productivity through unauthorized resource use or raises reported scores while actual work declines. Controlled changes in the training distribution show that minority conflict exposure can still lead to widespread shortcut acquisition, reaching 97.9% certified profitable violations on an API task under a 25% conflict mixture after 128 updates. The same contextual checks supply a simple binary penalty that supports joint capability and compliance gains and partially mitigates acquired violations. Learned safety adapts to expanded authorization and transfers across mechanisms into workflows with evolving evidence and approval requirements. On 32 unseen changing-evidence tasks, resource-trained safety increases safe completion from 53.1% to 89.1% relative to task-only training, while both policies achieve full real work. These results connect a verifiable account of reward-driven misalignment with scalable task construction and safety learning that remains useful under changing execution requirements.

1 Introduction

Capable and reliable language-model agents are increasingly expected to repair software, schedule resources, and complete complex workflows over long horizons while following human requirements. To develop these capabilities, reinforcement learning (RL) commonly uses task reward based on the quality or amount of work accomplished at the end of an episode, providing a direct, scalable training signal across diverse tasks [1-3]. However, whether the work meets human expectations also depends on the context in which it is carried out [4]. This context includes user intent, interaction history, and specific constraints such as authorization or organizational rules, which determine which actions are appropriate and which constraints apply [5-7]. Following these contextual requirements becomes more challenging as execution horizons grow [8]. Agents must continue to respect resource permissions and preserve evaluation requirements in an evolving environment, where prior commitments can constrain later actions. A finite instruction list may leave requirements and their interactions implicit or unspecified, so compliance can depend on basic safety judgment that cannot be taken for granted in LLM agents [8, 9]. Even when requirements are explicitly stated, their applicability can change as actions alter the state and create or invalidate obligations [10, 11]. For example, a user may revoke permission to use an external service and later restore it only for public data. Resuming the earlier workflow may then send restricted data to the service even if the task is completed correctly. Task reward may not fully capture these conditions, leaving room for RL-induced misalignment of the kind observed in studies using production training environments [12, 13].

We study these reward-driven forms of misalignment through conflicts between task incentives and contextual execution requirements. Such conflicts can arise even when task reward accurately measures useful work, as additional service calls beyond an authorized allowance can still produce more genuine output. In our experiments, task-reward training improves verified work under full authorization while also increasing certified profitable violations under restricted authorization, illustrating how genuine capability gains can conceal growing execution risk (Fig. 4). In other cases, agents can raise scores by modifying an acceptance test without repairing the software, and our reporting experiments show higher scores accompanied by less actual work. We interpret these reward-seeking departures from expectations, including behaviors commonly studied as reward hacking [13, 14], as shortcuts that bypass contextual requirements of task completion. We construct tasks in which compliant completion remains feasible, while some executable shortcuts earn more reward than any compliant strategy (Fig. 1). These intrinsic, verifiable reward-context conflicts let us study how RL acquires shortcuts under controlled incentives.

(a) Reward-context conflict

Figure

(b) Binary penalty intuition

Figure

(c) Expanded authorization

Figure

Figure 1: Reward-context conflicts. (a) Compliant completion remains feasible while a violating execution earns higher reward. (b) A binary violation penalty can change the preferred ideal optimum. (c) Expanded authorization can permit the same execution with unchanged physical outcome and task reward. The geometry is schematic.

To support these studies at scale, our construction generates executable task environments in batches, with contextual safety boundaries encoded in their dynamics and verifiable feedback for capability and safety learning. Using these environments, we find that profitable violations can become frequent even when conflict tasks form a minority of the training data. Simple reward shaping with the same feedback supports joint capability and compliance gains and mitigates acquired violations. The learned safety behavior adapts to expanded authorization and generalizes across new tasks and scenarios, as well as changes in wording and permission scope. Cross-task cases further document capability transfer and violation emergence, alongside protection that carries over to workflows whose evidence and approval requirements change during execution.

References (28)