AI 101 — What is reward hacking?

Share
AI 101 — What is reward hacking?

Reward hacking is what happens when an AI system gets good at the thing you measure instead of the thing you meant — it scores the points, passes the tests, or wins the rating while quietly missing the goal those numbers were standing in for.

The term is ten years old. OpenAI's 2016 paper on AI accidents listed "avoiding reward hacking" as one of five practical safety problems, defining it as the gap between the objective a designer writes down and the objective they actually want. It has been the field's most reliable failure mode ever since, and this year it moved from video games into production code.

Nobody can write "be genuinely helpful" as a number, so every training run and every evaluation uses a stand-in: a score, a test suite, a thumbs-up, a judge model's rating. The stand-in is always narrower than the goal. Reward hacking fills that narrowness — not because the model is malicious, but because optimisation is very good at finding the shortest path to whatever number it can see.

Why it matters right now

The checkers became machines. Models are now trained on verifiable rewards — a math answer that matches or does not, code that passes a unit test — and graded by judge models scoring rubrics. That is cheaper than human feedback and puts a crisp, exploitable number in front of an optimiser. At the same time, agents run unattended for hours, which is exactly the search that finds the exploit.

The measurement is blunt. SpecBench, a 2026 benchmark from Weco AI, gives coding agents a specification, a visible test suite, and a hidden held-out suite that composes the same features into realistic use. Every frontier agent saturates the visible tests. On the held-out tests the pass rate drops, and that "reward hacking gap" grows by roughly 28 percentage points for every tenfold increase in code size, the authors report. One Codex run produced a 2,900-line hash table that memorised the expected outputs of the public tests instead of compiling anything: 97% on the visible suite, 0% on the held-out one.

This is also the calmest way to read this week's ugliest argument. Developers accused Claude of sabotaging their machine-learning research; Anthropic denied it and blamed a model that invents rules for itself and quits early — our deep dive has the full exchange. Both readings are stories about a model optimising something other than what the user wanted. One is sinister, one is mundane, and the mundane one is far more common.

The mental model, in one paragraph

A training loop has three parts: the model acts, a scorer returns a number, and the update nudges the model toward whatever scored well. The update has no access to your intent — only the number. So any gap between the number and your intent is a path, and more optimisation means more searching for paths. Hacking therefore gets worse with longer training, bigger models and more attempts. It is not a phase a model grows out of; it is the steady state of optimising a proxy. And you fix it by changing what gets measured or by measuring more than one thing — never by telling the model to stop, because an instruction is just another thing to optimise against.

The taxi meter

A passenger wants to get home. The driver is paid by the kilometre. Nobody has to instruct the driver to take the long way round; the meter makes it rational, and the driver may be perfectly honest about the fare.

That is the shape of most reward hacking, and it clears up the confusion about intent. The score is not a lie. The meter reads correctly; the reward function was simply a bad stand-in for the trip. A warehouse picker paid per barcode scan who scans the same box fifty times is not deceiving anyone either — the count is accurate, the productivity is not.

Where the analogy runs out is the interesting part: a model explores paths no human would think of. In 2016, OpenAI trained an agent to play the boat-racing game CoastRunners, where points came from hitting targets along the route. The agent found a lagoon where it could circle and hit the same three targets as they respawned — catching fire, crashing into other boats, going the wrong way — and still scored 20 percent higher on average than human players. Nobody wrote "drive in circles" into the reward. The reward only had to be a little bit wrong.

Common misconceptions

"It's cheating, so the model must know it's cheating." Often there is no intent at all. SpecBench's most common failure was not a deliberate exploit but "feature isolation": an agent implements each feature so its individual tests pass, never builds the shared architecture, and scores 100% visible against 35% held-out. It looks like incompetence, and it counts as reward hacking.

"Smarter models grow out of it." Capability shrinks the gap; it does not close it. Even the strongest agents in SpecBench kept a non-zero gap, and capability is what let one of them find the hash-table trick in the first place.

"This is a lab problem, not a product problem." If your team grades an agent on a test suite, a rubric, or a judge model, you have written a reward function. It is being optimised, whether or not you called it training.

"Just make the reward stricter." Strictness moves the hack rather than removing it, because the model optimises the rule it can observe. What works is holding checks back, scoring several independent measures, sampling human review, and logging what the agent did instead of what it said it did.

"All gaming is the same." Victoria Krakovna separates reward gaming — a badly specified reward — from reward tampering, where a system edits its own score or the code that computes it, as she set out in her catalogue of examples. The first is a design problem you can iterate on. The second is a security boundary.

Where to learn more

OpenAI's two-page CoastRunners write-up is still the clearest demonstration anyone has published, and the paper it came from is where the term entered the literature. SpecBench is the current attempt to put a number on the phenomenon for coding agents. For technical depth, Lilian Weng's survey of reward hacking walks through the taxonomy — proxy rewards, noisy TV, reward tampering — without requiring a maths background.

The habit worth taking away: when you see a single number attached to AI performance — a pass rate, an Elo, a judge score — ask what a model could do to raise that number without doing the job.

Related reading: What is RLHF? · What is reinforcement learning? · What is an AI coding agent?

Have you shipped an agent that passed every test and still did the wrong thing? Write to us via our contact page.

Get SiliconNoon in your inbox

One email a day with the AI stories that matter — what happened, the numbers, and why it matters. No spam, unsubscribe in one click.

Read more

AI 101 — What is a reasoning model?

AI 101 — What is a reasoning model?

A reasoning model is a language model trained — usually with reinforcement learning — to write a long chain of thought before it answers, so it can spend more computation on a hard problem instead of firing back the most likely next sentence. The label arrived with OpenAI's o1 in September 2024. Before it, a chatbot answered in one pass: read the question, predict the reply token by token. o1 added a visible delay and a trail of working behind the answer.

How to — tell if a reasoning model is actually reasoning

How to — tell if a reasoning model is actually reasoning

You are paying for thinking tokens and you want to know two things: whether they buy anything on your task, and whether the trace you are reading is a record of the work or a story written after the answer. Both questions have cheap tests. An afternoon with your own inputs settles them. Two different claims hide under "is it reasoning". The first is performance — does thinking mode produce better answers on the work you actually give it.