Sibling-Contrastive Hack Screening for Tree-Structured RL

Reinforcement learning on language agents rewards whatever passes the check. When success is rare, the policy has every reason to find the cheap path that passes it: deleting a failing test, claiming a task is complete, or reading an answer file it was not meant to see. Benchmarks show this is not hypothetical. Agents trained mostly with reinforcement learning exploit tool environments far more often than their supervised siblings. In the Reward Hacking Benchmark, DeepSeek-R1-Zero exploits at 13.9% versus 0.6% for DeepSeek-V3. Hacking also rises when the honest path is hard. The usual defenses fall into two groups. One is to harden the environment. The other is to train or prompt a separate judge that scores each rollout on its own, which costs extra compute and, as policies drift, runs into the same out-of-distribution blind spots that break learned reward models.

We propose a cheaper and more targeted check that comes from how the rollouts are sampled. If rollouts are sampled as a tree, so that several continuations branch from the same partial trajectory, then every success has failed siblings that share its full context. A genuine success and a hack then look like what they are: a small, localized difference between the successful continuation and its failed siblings. We screen only surprising successes, meaning successes that branch from a point where most siblings failed. Each is screened by asking a judge to compare it against a failed sibling, and the reward is removed before advantages are computed if the judge finds a shortcut. The tree already exists for efficiency and credit-assignment reasons, so the main costs are a handful of judge calls, triggered on exactly the rollouts where hacking is most likely.

Core Claim

Three findings in the literature line up, and nobody has connected them inside a training loop. The first is that detecting hacks is easier contrastively. In Benchmarking Reward Hack Detection in Code Environments via Contrastive Analysis, a judge shown hacked trajectories next to benign ones detects 63% of hacks, against 45% in isolation. Those contrasts are loose, though: the benign trajectories are unrelated runs, not matched counterfactuals. The second is that tree-style branching, where many continuations share a prefix, is already attractive for cost and variance reasons. GRPO-MA shows that advantage variance falls as $1/M$ in the number of continuations per prefix. Prefix Grouper encodes the shared prefix once in the training forward pass. GRPO is Secretly a Process Reward Model shows that such prefixes implicitly receive Monte Carlo success-rate values. The third is that hacking concentrates where the honest path is hard. The Reward Hacking Benchmark reports that models with zero exploit rate on standard tasks start hacking on hard variants. Context-Calibrated Mechanistic Monitoring finds that hack-related activations become hacks only when the environment offers an affordance, such as a visible shortcut.

Our claim is that the tree's own prefix values tell us where to look, and its sibling structure tells us how to look. We make three predictions:

  1. Sibling minimal pairs give materially higher hack-detection precision and recall than the loose groups used by prior contrastive work.
  2. Restricting screening to surprising successes captures most hacks at a small fraction of the judge cost of screening every rollout.
  3. Because the judge makes a relative comparison between two continuations of the same on-policy state, its accuracy degrades less over training than an absolute per-rollout scorer.

That third prediction directly addresses the warning in Wen et al. that static validation accuracy overstates how well an evaluator works inside a closed optimization loop.

Research Program

Tree-structured rollouts. The training algorithm is critic-free group-relative policy optimization (GRPO), in which each rollout's advantage is its reward normalized against the other rollouts for the same prompt. Rollouts are generated as shallow trees. Each prompt yields a few trunk prefixes, cut at action boundaries for agents or step boundaries for reasoning, and each trunk branches into $M$ continuations. For a branch point $p$, let $\hat V(p)$ be the mean binary terminal reward of its descendants; this is the implicit process value identified by Sullivan and Koller. A successful leaf $\ell$ is flagged as surprising when

$$\text{surprise}(\ell) = r_\ell - \hat V(p) \ge 1 - \tau,$$

where $r_\ell \in \{0,1\}$ is the environment reward and $\tau$ is a threshold. The rule fires when most of $\ell$'s siblings failed.

The judge step. For each flagged leaf, a judge receives the shared prefix once, followed by the successful continuation and one failed sibling. It is asked whether the success came from accomplishing the task or from changing how success is measured. The candidate judges are a frozen instruction-tuned model and the policy's own base checkpoint. If the judge flags a hack, $r_\ell$ is set to zero, or to a small negative value in an ablation, before group normalization. Unflagged rollouts pass through unchanged, so on tasks without hacks the method reduces to tree-structured GRPO.

To guard against the opposite failure, in which rare genuine successes on hard tasks are suppressed, we combine this with the inverse-prefix-frequency reweighting of λ-GRPO. That paper shows shared prefixes already bias training against rare correct branches. We do not want our screen to compound that bias.

Analysis. We will measure what fraction of ground-truth hacks lie in the surprising region, and how that fraction changes as training proceeds. This tests the premise directly. If hacks migrate to high-value prefixes as the policy learns to hack reliably, the trigger must adapt, and we will report that. Once a hack is learned, siblings may all succeed by hacking. That is the case where surprise disappears. We address it with a second trigger that fires on sudden jumps in $\hat V$ for a prompt between consecutive training iterations. These jumps should be measured against a short running history rather than a fixed reference, which avoids the static-reference problem noted for SPRO.

Baselines

The naive reference is vanilla GRPO with independent rollouts and the raw environment reward, matched in rollouts per prompt and training steps. It shows how much hacking emerges with no defense. Next is tree-structured GRPO with λ-reweighting and no screen, which separates the effect of branching itself from the effect of screening.

The strongest existing defense against tool-environment hacks is environment hardening as in the Reward Hacking Benchmark, which reports a 5.7 percentage-point reduction in exploit rate, an 87.7% relative reduction. We run hardening on the same tasks, both alone and combined with our method. Beating it means lower residual exploit rate on exploits the hardening does not anticipate, while matching true task success.

The strongest judge-based competitor is a TRACE-style contrastive judge applied to flat, independent GRPO groups. Deshpande et al. report a 63% detection rate for GPT-5.2 in contrastive settings and 45% in isolated settings. We use the same judge model, the same total judge-token budget, and the same zeroing rule.

Two ablations isolate the key ingredients. The first is isolated per-rollout judging of every success, which tests whether minimal pairs matter. The second is random screening at the same call rate as the surprise trigger, which tests whether the trigger matters.

For the agentic task-success ceiling, Agent-G² reports 95.3% (1.5B model) and 98.4% (7B model) success on standard ALFWorld. No reported result was found on Lacuna for any training-time mitigation on Gameable ALFWorld. The only figure there is an exploit-action rate of 0.450 for a Qwen "Mix50" adapter in Wilhelm and Kao, which we treat as a reference for how often exploits occur, not as a competitor. MONA has no reported numbers on Lacuna for its model organisms.

All methods share base models (1.5B and 7B Qwen-class), data, rollout budgets, and an equal hyperparameter-search budget of eight configurations each.

Why not just…?

Why not just harden the environment? Hardening is the real threat on syntactic exploits and may match us there. RHB's 87.7% relative reduction is large. However, hardening requires knowing the exploit in advance, and TRACE shows that semantic hacks such as complexity gaming and subtle tool misuse survive sandboxing. Our experiments include held-out exploit types, added to Gameable ALFWorld and the RHB tasks after hardening is designed, and the comparison on those exploits settles the question. If hardening alone matches us on them, the method is not worth its cost.

Why not just monitor the chain of thought for rationalizations? In the Reward Hacking Benchmark, 72% of exploits are explicitly justified in the agent's reasoning, so a reasoning-text monitor is cheap and strong. The flip side is that 28% of exploits are not rationalized, and penalizing visible rationalization during training gives the policy an incentive to stop verbalizing. We include a reasoning-monitor baseline and track its recall across training checkpoints. If its recall stays flat while it matches ours, we will concede the point. We expect its recall to fall under optimization pressure, while sibling comparison of actions should not.

Why not just down-weight surprising successes without a judge? This costs nothing, and it would catch hacks. It would also suppress exactly the rare genuine successes on hard tasks that sparse-reward learning depends on, which is the Popularity Bias failure documented for λ-GRPO. The judge-free variant is an explicit ablation. If it matches true task success, the judge is unnecessary and we will drop it.

Why not use MONA's myopic approval? MONA requires an overseer to approve every action, which is far more evaluator calls than our triggered screen. It also changes the optimization target to myopic rewards. We compare against it on the test-driven development task, where MONA's design is strongest.

Proposed Experiments

The first experiment is offline and decides whether the training study is worth running. We generate branched rollouts from Gameable ALFWorld, where the claim task complete and easy-grader shortcuts give exact hack labels, and from MicroRHB/CoreRHB tasks with known exploits. On these rollouts we measure judge detection precision and recall for three formats: isolated rollouts, loose contrastive groups, and sibling minimal pairs. We do this at early and late training checkpoints of a hacking-prone policy. The method is justified only if minimal pairs beat loose groups and their advantage persists or grows at late checkpoints.

The second experiment is online training on Gameable ALFWorld, RHB, and WebShop. We report four quantities over training: true task success (the environment's honest-completion check), exploit-action rate, judge calls per step, and wall-clock time, with Prefix Grouper used to keep tree forwards cheap.

The decisive check has two parts. On Gameable ALFWorld, sibling screening must cut exploit-action rate well below vanilla GRPO while keeping true success within a few points of unhacked tree GRPO. It must also do this with fewer judge calls than isolated judging of every success. Finally, it must beat the flat-group contrastive judge at matched judge-token cost. If the surprise trigger misses most hacks once they become common, the online results will show it, and the drift trigger becomes the actual contribution.