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.
Produce an answer that is correct.
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.
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.
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.
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.
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.
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.
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…
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}
}