←  Back to the RET research thread

Proactive Monitoring and Mitigation of Reward Hacking in Recursively Improving AI via Representational Effective Theory

Muhammed Ustaomeroglu, Guannan Qu

Carnegie Mellon University

Correspondence: mustaome@andrew.cmu.edu

Paper ↗Code ↗

Can we prepare a guardrail before a model starts exploiting its reward?

We learn a representation of a model’s internal computation before its training update, then use it to monitor the updated model, examine its reasoning, steer generation, and guide the training update itself.

Proactive RET pipeline

Synthetic off-policy text is fed to an earlier model with no reward hacking to learn RET. RET stays fixed and is used to monitor, steer, and guide training in the updated model.

Prepare RET before reward hacking emerges

Synthetic textOff-policy examples
Feed text
Earlier modelNo reward hacking
Learn RET
RETThe learned representation stays fixed
Use the prepared representation

Use RET during and after the update

Updated modelReward hacking
RET reward-hacking detection score 0–1 Judge-labeled reward-hacking tokens Steering applied

RET detects reward hacking

Hacks

RET steers away from reward hacking

Doesn’t hack
Drag either token slider or click the text to explore the responses from Figure 1. Steering starts after their shared prefix; the steered curve then shows scores after intervention. The exploit is removed, although the steered answer still fails some task tests.

Loading the Figure 1 responses…

Getting rewarded is not the same as solving the task

A coding model receives a problem and writes a Python solution. An evaluator runs the code against tests and awards a reward. But the evaluator has vulnerabilities: the model can exploit how answers are checked, stop the test process with a success code, or change its test reports. The reward can increase even when the problem remains unsolved. This is reward hacking.

For example, a Python object can be written to compare equal to every expected answer. An evaluator that trusts that comparison may accept it without receiving the right solution.

The intended task

Produce an answer that is correct.

The shortcut

Make the evaluator accept whatever answer is produced.

We study a GPT-OSS-20B coding model before and after reinforcement learning in this environment. The base model shows effectively no hacking; the update makes it frequent. This is a controlled model update, used to study a problem that would also matter for future recursively self-improving systems. It is not an experiment with a complete recursive self-improvement loop.

Prepare the representation before the behavior appears

Usually, learning to recognize a behavior starts with examples of the model exhibiting it. Here, those examples are precisely what we want to avoid waiting for.

We ask a separate language model to write synthetic reasoning and answers: some implement an exploit, some consider one and reject it, and others solve the problem without discussing an exploit. We feed these sequences through the base model and record the internal activity they elicit. The base model does not have to generate the exploit itself.

Representational Effective Theory (RET) learns a compact state from a history of hidden activations, together with a model of how that state changes. We call this state a macrostate: it captures patterns of computation at a coarser level than individual activations. In the monitoring variant, an additional training signal teaches one coordinate to distinguish exploit-related passages. Its score ranges from zero to one.

Monitor fitting and checkpoint selection use only synthetic sequences and base-model activations. The monitor then remains fixed for evaluation. It must generalize both from synthetic writing to the model’s own generations and from the base model’s internal activity to the updated model’s activity. Introducing RET for LLMs develops the underlying perspective.

Watch the monitor read a response

The blue trace below is the prepared RET monitor’s score as the updated model generates tokens. Red underlines mark passages annotated as hacking by the evaluation procedure. These are two different signals: the score is the monitor’s output; the underlines are reference labels used to assess it.

Choose a response, drag the token slider, or select a point on the curve. You can inspect the full reasoning and final answer, beyond the short excerpts shown in the paper.

Follow the detection

Read the problem

Loading recorded token scores…

0.995 token-level AUROC. Across 553 responses from the updated model, the prepared monitor distinguishes hacking-labeled tokens from non-hacking-labeled tokens without retraining. It outperforms a linear probe and a difference-of-means monitor trained on the same synthetic text and base-model states, at both token and response level. The matrices below show its decisions at one score threshold.

Of the 14 false positives, 10 already have exploit-related annotations; reviewing the other four also finds hack-related language or shortcut proposals. The paper’s appendix examines all 14. Rejected exploit · Unfinished exploit.

RET score > 0.7; a whole response is flagged when at least 20 generated tokens exceed this threshold. Token counts omit excluded annotations; response alarms count all generated tokens. Percentages are within each row.

Use the representation to change what happens next

The same prepared monitor can guide an intervention during generation. To suppress hacking, when its score exceeds 0.5 we adjust the current hidden state in a direction that lowers the score. The adjusted state is then used to produce the next token. The language model’s weights remain fixed.

The steering strength, α, controls the intervention’s magnitude and direction. Negative values suppress the monitored behavior; zero leaves the model unsteered. The example below starts from the same reasoning prefix and lets you compare saved continuations at different strengths.

Same problem · Same reasoning prefix · Saved generation runs

Change the steering strength

α = −0.4

After the shared prefix, blue scores and shading show RET’s score after steering. Teal underlines mark the interventions.

Loading saved steering runs…

Removing an exploit is only part of the goal. At α = −0.4, the model replaces the equality exploit with an ordinary algorithm, and the saved response- and token-level checks find no implemented hacking. That answer still fails full-size tests. Steering the behavior did not, in this case, produce a complete solution.

What happens across problems?

We evaluate one response on each of the same 64 coding problems at every measured strength. The chart separates detected hacking, recorded test passes without detected hacking, other code answers, and responses that end without producing a code answer.

At α = −1, reward hacking falls from 24 of 64 responses to zero, while successful, non-hacking answers increase from 12 to 14. All 12 successful unsteered answers are retained.

64 coding problems per measured strength

Suppressing hacking while preserving task success

At α = −1, a separate coherence review finds only rare, minor disruptions.

Independent token-level review also finds no implemented harness exploits at the tested strengths from α = −1 to −4. Some hardcoded answers remain, so recorded test passes do not establish that every shortcut has been removed. Positive steering provides a countercheck: pushing toward higher scores increases hacking.

Guide the update itself

Instead of intervening each time the updated model generates, we can use the prepared RET monitor during reinforcement learning. Starting again from the base model, we adjust rewards using the monitor’s scores and recompute the learning signal. The monitor stays fixed; the language model learns from the adjusted rewards, without gradients through the monitor.

We extend training from 360 to 720 optimizer steps and compare RET reward shaping, linear-probe reward shaping, and unguided training across three seeds. Both keep hacking near zero while improving successful, non-hacking answers, showing that even a simple linear probe can guide training effectively through reward shaping.

Three training seeds · 720 optimizer steps

Monitor-guided training

Loading training curves…

RET retains stronger detection after training than the linear probe, especially at token level. This could help sustain effective guidance over much longer training runs. That remains a hypothesis: both methods already achieve near-complete hacking suppression and similar task performance in these experiments.

Unlike recent white-box approaches that backpropagate through an internal monitor, reward shaping uses its scores without passing gradients through it. In our experiments, the direct loss penalty was less reliable and degraded the monitor’s detection performance, supporting reward shaping with white-box tools as a promising alternative for guiding training. See the full paper for details.

Look beyond a single hacking score

A score asks whether the behavior is present. The macrostate trajectory asks a richer question: what kinds of computation is the model moving between?

Here we use a separate RET encoder trained without behavioral labels. We group similar macrostates and name the groups by inspecting associated text. The encoder is prepared on the base model. After the update, clusters are fitted on one set of updated-model trajectories and named using a separate validation set; the examples below are held out. The names describe the resulting patterns, without reasoning-phase labels for encoder training.

In the six-number example, the trajectory distinguishes mathematical reasoning from evaluator-related reasoning and equality-exploit implementation.

Predictive-only RET · No behavioral training labels

Explore the reasoning trajectory

Loading recorded macrostates…

Here, RET is learned without behavioral supervision. Adding supervision about a behavior of interest helps organize the macrostates around that behavior; see the paper for comparisons.

A shift before the first hacking annotation

Across hacked responses, the unsupervised macrostates move toward hacking-associated patterns before the first token annotated as hacking. The curve below aligns responses to that annotation and averages their relative similarity to hacking-associated clusters.

Loading macrostate timing…

Mean across available responses from 278 hacked test responses; shading shows 95% bootstrap intervals. Earlier text can already discuss exploits, so this measures a shift relative to annotations, not the reliability of an early-warning detector.

Citation

@misc{ustaomeroglu2026proactive,
  title  = {Proactive Monitoring and Mitigation of Reward Hacking in Recursively Improving {AI} via Representational Effective Theory},
  author = {Ustaomeroglu, Muhammed and Qu, Guannan},
  year   = {2026},
  eprint = {2611.37159},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2611.37159v1}
}
Read the full paper ↗