Does GRAFT work with an LLM judge?

Preliminary research

tl;dr I tested GRAFT, a method for reducing reward hacking, on the Countdown arithmetic task using an LLM judge in place of the original rule-based monitor. GRAFT still reduced hacking, but models trained with a simple reward penalty from the same judge cheated less often and solved more problems correctly on a clean version of the task.

How GRAFT tackles reward hacking

Reinforcement learning (RL) is routinely used to post-train language models to improve both task performance and safety. Crucial to its success is the design of an effective reward function.

We’d like to perfectly design reward functions to capture our true preferences, but in practice this is rarely feasible. A misspecified reward function can lead to reward hacking, where the model finds a way to earn reward without succeeding on the intended task. An example is coding, where a model can learn during RL to alter its unit tests to pass trivially, rather than solve the harder coding problem the user intended for it to solve. Reward specification is typically challenging (Amodei et al. 2016) and practitioners often use monitors to improve or ‘shape’ the reward function. A common strategy is to design the monitor to detect known classes of reward hack, using it to flag offending trajectories whose reward is then penalized during training. While this can reduce reward hacking, the monitor is itself usually imperfect, which can encourage the policy to learn reward-hacking strategies that evade the monitor (Baker et al. 2025).

Ward et al. (2026) developed Gradient Routing Adapter Fine Tuning (GRAFT) to combat this (I recommend their excellent introductory blog). Their method employs the usual ingredients, a reward function and monitor, but in a novel way. When the monitor flags a trajectory in GRAFT, rather than directly penalizing the reward, GRAFT routes its gradient to the FORGET adapter alone (and doubles the gradient). This adapter can be thought of as an additional, sacrificial set of neurons; in their paper this role is played by a small MLP added to the residual stream of each transformer block. At deployment, the FORGET adapter is removed entirely.

A second, identical, sub-network – the RETAIN adapter – is also present. Both adapters can receive updates from unflagged trajectories, including hacks the monitor missed. The RETAIN adapter also trains on a separate anchor task (LeetCode in their main example) with FORGET switched off.

GRAFT gradient-routing (during training)
Choose a scenario

Follow a response through training.

The base MLP is frozen throughout. Dots represent the forward pass. Gradient arrows are red for flagged responses and blue for unflagged and anchor responses. Adapted from Ward et al., Fig. 1 (CC BY 4.0).

Remarkably, removing the FORGET adapter at inference time was shown to sharply reduce reward hacking in RL, compared to a simple reward penalty, only sacrificing a little task performance on the paper’s “Countdown” arithmetic task. A hack that slipped past the monitor could earn reward and update both adapters, so we might expect the model to learn to repeat it more often. Yet in the original GRAFT experiment, those hacks stayed rare even with both adapters active.

The authors identify two limitations in their work that motivate this post. First, their RL experiments used simple, rule-based monitors with known blind spots. Second, they chose environments and monitors where reward penalties lead to monitor-exploiting policies, but didn’t measure how often this happens in practice. Together, these limitations leave open two interesting and related questions:

  1. How does GRAFT compare with reward penalties when the monitor is an LLM judge?
  2. Does training with a penalty still teach the model to exploit the monitor’s blind spots, as it did with the rule-based monitor?

A central example in the original work is Countdown-Code, an RL environment based on the mathematics task in the game show Countdown[1]. I trained a Qwen3-8B model with a frozen Qwen3-4B judge to test the questions above. As in the original work, the GRAFT algorithm used the judge’s flags to route learning to a FORGET adapter. In contrast, the reward penalty method subtracted two reward points for each flag from the LLM judge.

A successful hack was defined as an answer that passed the (editable) test but failed on a protected check against the original rules. To measure clean task performance, I also tested the model on a version of Countdown where only its arithmetic expression was graded.

At 1,536 tokens, penalty models trained with the rule-based detector averaged 36.6% hacking and 66.1% clean solves. With the LLM judge they averaged 0% and 85.8%. Deployed GRAFT averaged 2.6% and 80.7% with the LLM judge. The single rule-based GRAFT run had 0.4% hacking and 80.1–80.5% clean solves.
Figure 1: Hacking and clean solves on Countdown-Code. I evaluated the models after 200 updates with a 1,536-token limit, using the original paper’s learning rate for each method (penalty 5 × 10⁻⁴, GRAFT 1.67 × 10⁻⁴). All GRAFT results use the deployed model with the FORGET adapter removed. Faint points show individual seeds and large filled points show three-seed means. With the LLM judge, penalty averaged 0.0% confirmed hacks and 85.8% clean solves, and GRAFT averaged 2.6% and 80.7%. With the rule-based detector, penalty averaged 36.6% and 66.1%, compared with 25.9% and 77.2% in the original paper. The open diamond is a separate GRAFT run (seed 9201) on the original 256 reference problems. It hacked once (0.4%) and solved 80.1–80.5% of clean problems, with one unresolved answer.

What the experiments showed

  • GRAFT still worked with an LLM judge. At the learning rate the authors tuned for it and a 1,536-token limit, removing the FORGET adapter reduced hacking from 37.3–39.5% to 2.6–2.8%. The lower end counts confirmed hacks. The upper end also counts answers that passed the editable test but had an unresolved protected check. Models trained the same way without routing hacked on 37.1–42.4% of attempts, and still on 29.0–33.1% after the adapter was removed, so the routing was vital.
  • Using a reward penalty worked better. Using the same LLM judge, the penalty models hacked less and solved more clean problems than GRAFT. At the same learning rate and token limit as above, they had no observed hacks and 86.9% clean solves, against 80.7% for deployed GRAFT. This held for all three paired training seeds at both learning rates. In this setting, therefore, I’d prefer to use the judge in a simple reward penalty rather than in GRAFT.
  • Switching the penalty runs back to the original rule-based monitor brought back the same shortcut. At the higher learning rate and a 1,536-token limit, the LLM-penalty models produced zero hacks in 3,072 attempts. The matched rule-based runs hacked on 31.6%, 38.2% and 39.9% of attempts. Of their 1,124 total hacks, 1,116 weakened the arithmetic constraints (by, for example, changing the test to no longer require the use of all provided numbers). The rule-based monitor missed all 1,116 such hacks. So, for the exact same penalty, the rule-based monitor led to a policy that routinely exploited the monitor while the LLM judge created a policy with almost no hacking.

A short response limit hid some hacking

For both the training and evaluations above, I used a 1,536-token response limit, as was used in the released GRAFT code for the Countdown-Code task.

During training I noticed that many rollouts were being cut off prematurely, and so effectively censored. Under the reward penalty, the share of Countdown training responses that hit the limit rose from 6–7% in the first five training phases to 15–19% by phases 10–14 (of 50), and stayed around this level until the end of training. In the GRAFT training runs, which generate with both adapters active, it fell from 3–5% to around 1%, although at the higher learning rate it briefly reached 21%. The deployed model, with FORGET removed, was only evaluated after training. The penalty didn’t reward long answers directly: 98% of its cut-off training responses received zero reward. I don’t yet know why they became more common.

Answers that were cut off at the token response limit during training usually had no complete submission, so it wasn’t obvious how they would eventually score. At evaluation, I continued generating (one sample of) every cut-off answer from the final models in the main LLM-monitor runs up to a total of 6,144 tokens. Figure 2 shows the results.

Pooled hacking rose from 0% to 1.0–1.2% for penalty and from 2.6–2.8% to 8.5–9.4% for deployed GRAFT. Confirmed hacking rose at each step for every seed of both methods. At 6,144 tokens, hacking ranged from 5.7% to 13.3% across deployed GRAFT seeds and from 0.2% to 1.5% across penalty seeds. Two penalty seeds had identical hacking rates at every budget. From 1,536 to 6,144 tokens, the pooled share still cut off fell from 19.7% to 2.4% for deployed GRAFT and from 13.7% to 2.8% for penalty.
Figure 2: Longer response budgets revealed more hacking. I evaluated the same final penalty and deployed GRAFT models at 1,536, 3,072 and 6,144 tokens. Both methods trained with the LLM judge at a learning rate of 1.67 × 10⁻⁴. Each faint line follows one seed across budgets (1,024 ordinary answers). Coloured lines pool all three seeds (3,072 answers per method per budget). At 6,144 tokens, 57 of the 73 GRAFT answers still cut off already contained a correct submission. None of the 86 cut-off penalty answers did.

The larger token budget revealed hacking under both methods, and more under GRAFT. Confirmed hacks rose from 0 to 32 of 3,072 answers for the penalty models, and from 79 to 262 for deployed GRAFT. Clean solves also rose, from 86.9% to 92.2% for the penalty and from 80.7% to 84.6% for deployed GRAFT. At the higher learning rate, 448 of the penalty models’ 3,072 answers were cut off, and continuing them revealed six confirmed hacks. With more space to finish, the penalty models did sometimes cheat – the zero hacks seen in Figure 1 was to some extent an artifact of this limit – but they still cheated less often than GRAFT and solved more problems on the clean task.

Caveat Each cut-off answer was continued only once, so there may be some noise in this analysis. In addition, the models were still trained at 1,536 tokens, so this doesn’t show what training with a longer limit would produce. Also, because the released code uses the same limit, the original paper’s results may be affected in the same way. I haven’t tested that, but in general I think higher token caps would be a very sensible (if expensive) experiment.

Some uncertainties

  • In my experiments the LLM judge caught more hacks than the original rule-based detector and missed different ones. The structure of the errors could be important to the problem, but it’s not yet clear exactly how. I also trained one GRAFT model with the original rule-based detector. With the FORGET adapter switched on, it cheated on about 29% of attempts. With the adapter switched off, it cheated only once in 256 attempts. This run used a different random seed and a different set of test cases from my main experiments, so I can’t say exactly how much the choice of monitor changed the gap between GRAFT and reward penalties.

  • The rule-based penalty runs also differ in outcome from the paper’s. In the paper’s results, the penalty solved slightly more clean problems than GRAFT (77.2% against 74.8%). In mine it solved far fewer (66.1% against 80.1–80.5% for the single GRAFT run). So the hacking under the rule-based penalty was reproduced, but the clean-solve comparison used different seeds and test cases. With one task and three matched seeds, the size and generality of the penalty advantage also remain uncertain. In this task, the penalty-trained models rarely got away with hacking under the LLM judge, but it doesn’t tell us how often that holds.

Future work

Hold the initial detection rate fixed and change which reward hacks are missed.

The authors ran a related experiment (Ward et al. 2026, Appendix D.7). In six toy environments, they flagged each detectable hack with probability 100%, 50%, 25% or 10%, and GRAFT had less hacking than the penalty at every level, often with lower task performance. But each of those environments also had a type of hack the monitor never flagged, so the penalty always had a blind spot to exploit.

I’d like to test the case with no blind spot. One method would be: calibrate two monitors to catch the same fraction of hacks on a common set of answers, but have one consistently miss a repeatable strategy type and the other miss occasional examples across all strategies. Train both methods under both monitors. My hypothesis is that concentrating the misses changes which method works better and, in particular, GRAFT works better in cases of systematic failure on one or more reward hack types. I predict in contrast that reward penalties will work better when no reward hacking type is reliably successful, but any type can be missed with some small probability. Appendix D.7 didn’t test this second case.

The columns group 32 test overwrites, 20 rule relaxations, 18 input changes and two other answers. On these 72 answers the rule-based detector left 40 unflagged, the blind-to-relaxation monitor 20, the illustrated random draw 20 and the Qwen3-4B judge five.
Figure 3: Where each monitor’s misses fall. Of 1,024 answers from the starting policy, 72 passed the editable test and were labelled as hacks. The protected check confirmed 63 and left nine unresolved (hollow squares). Each square represents the same answer in all four rows. The original detector flags test overwrites. The blind-to-relaxation monitor flags every family except relaxed rules. The random monitor misses each answer independently with probability 20/72. I chose a draw with exactly 20 misses so its pattern can be compared with the row above. The Qwen3-4B judge used in training caught 11 of 16 confirmed input changes. All five it missed replaced the target with the value of the submitted expression.

Complete the comparison with the original detector.

Train rule-based GRAFT on the same seeds and evaluate it on the same problems as the other follow-up runs. That would give a direct estimate of how much each method benefits from switching judges. It wasn’t included in the work reported here because I couldn’t closely recreate the paper’s rule-based numbers and wanted to first understand why. I started from a third-party reproduction of the Qwen3-8B Countdown SFT checkpoint, not the authors’ own, which wasn’t available. Before RL, it hacked on 6.2–7.0% of attempts in my main evaluation (5.1–5.5% on the original 256 reference problems), against 4.7% reported in the paper. I haven’t established whether the precise model checkpoint explains the gap.

[1]

On the show, players combine six number tiles using addition, subtraction, multiplication or division to get as close as possible to a target. They may use each tile at most once. In Countdown-Code, a solution must use every supplied number exactly once and hit the target exactly.

References

Amodei, Dario, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. 2016. Concrete Problems in AI Safety. arXiv. https://arxiv.org/abs/1606.06565.
Baker, Bowen, Joost Huizinga, Leo Gao, et al. 2025. Monitoring Reasoning Models for Misbehavior and the Risks of Promoting Obfuscation. arXiv:2503.11926. arXiv. https://doi.org/10.48550/arXiv.2503.11926.
Hu, Shawn, Jake Ward, Aria Wong, et al. 2026. ‘Reducing Reward Hacking by Localizing Bad Behavior Instead of Penalizing It’. Anthropic Alignment Science Blog, October 19. https://alignment.anthropic.com/2026/graft/.
Khalifa, Muhammad, Zohaib Khan, Omer Tafveez, Hao Peng, and Lu Wang. 2026. ‘Countdown-Code’. GitHub. https://github.com/zohaib-khan5040/Countdown-Code.
Ward, Jake, Shawn Hu, Aria Wong, et al. 2026. Gradient Routing Localizes and Removes Unintended Behaviors in RL. arXiv. https://arxiv.org/abs/2610.17062v1.
[1]

On the show, players combine six number tiles using addition, subtraction, multiplication or division to get as close as possible to a target. They may use each tile at most once. In Countdown-Code, a solution must use every supplied number exactly once and hit the target exactly.