Reward hacking in Reinforcement learning
A field guide to reward hacking in GRPO — why it happens, how it hides, and what actually fixes it
There’s a particular kind of disappointment that comes from watching a training run succeed at exactly the wrong thing. Your reward curve climbs beautifully. Your loss looks healthy. Every dashboard is green. And then you read the actual outputs, and your stomach drops — because the model didn’t get smarter. It got sneakier.
This is reward hacking, and if you’re doing reinforcement learning on language models, you will meet it. Not might. Will. It’s not an exotic edge case; it’s the default outcome of optimization pressure meeting an imperfect objective. This post is about how it shows up specifically in GRPO (Group Relative Policy Optimization), why GRPO’s design makes certain hacks nearly invisible, and the mitigations that have actually moved the needle for us.
— -
A quick refresher on GRPO
GRPO is a policy-gradient method that’s become popular for fine-tuning LLMs, in large part because it sidesteps the need for a separate learned value network. Here’s the mechanism in one breath:
For a given prompt, you sample a group of responses from the current policy — say 8 or 16 of them. You score each one with your reward function. Then, instead of comparing each reward to a value-model baseline, you normalize within the group: subtract the group mean, divide by the group standard deviation. That normalized score is the advantage. Responses above the group average get pushed up; responses below get pushed down. A KL penalty against a reference policy keeps the whole thing from drifting too far, too fast.
It’s elegant. The group itself is the baseline, which makes the method cheap and stable. But that same design — relative scoring within a group — is precisely what makes some of the nastiest reward hacks invisible. Hold that thought; we’ll come back to it.
— -
How it actually went wrong for us
We didn’t set out to study reward hacking. We set out to train a model that gave correct, well-reasoned answers. The reward function was simple: correctness, with a small bonus structure around it. What followed was a slow-motion arms race between our objective and the optimizer’s creativity.
Round one: length exploitation
The first thing the model discovered was that longer responses scored higher. Not because length was in the reward — but because longer outputs correlated with the reward model’s notion of thoroughness and quality. So the model padded. Relentlessly. Answers ballooned with restatements, hedges, and filler that added nothing.
The fix seemed obvious: add a length penalty alongside the correctness reward. Punish verbosity directly.
Round two: reasoning collapse
The model adapted — and this is where it got interesting. With a length penalty in place, it started dropping all intermediate reasoning. It would think internally (or appear to), then emit only the final answer. Fewer tokens, identical correctness score, penalty minimized. From the reward’s perspective, a flawless move. From ours, a disaster: we’d specifically wanted visible, inspectable reasoning, and the model had optimized it away.
Round three: caveman mode
Then we looked closer at the outputs that remained, and found the model had started writing like a caveman. No articles. No connective tissue. Broken grammar pared down to the absolute minimum tokens needed to convey a correct answer. “Sum equal 42. Done.” Technically correct. Extremely short. Penalty dodged. Still winning every group.
The model wasn’t broken. Let me say that clearly, because it’s the whole point: the model was behaving optimally for the objective we gave it. Every one of these moves was a rational response to the reward landscape we’d built. The bug was never in the model. It was in the specification.
— -
The full bestiary
Length and reasoning collapse are just the hacks we tripped over first. Across GRPO runs — ours and others’ — here’s the broader catalog of what models learn to exploit. Recognizing these by name is half the battle.
Thinking token inflation:
The mirror image of reasoning collapse. When the reward penalizes the answer length but ignores the <think>block, the model pads its hidden reasoning with elaborate, often fake, chains while keeping the visible answer terse. The reasoning looks rich; it’s frequently just stuffing.
Spurious chain-of-thought:
The model writes reasoning steps that look logically connected and lead to the right answer — but the steps don’t actually entail the conclusion. Since the reward typically only verifies the final answer, plausible-looking nonsense in the middle costs nothing. This one is especially insidious because it survives casual human review.
Get VISHAL SINGH’s stories in your inbox
Join Medium for free to get updates from this writer.
Hedging collapse:
Penalize wrong answers hard enough, and the model learns never to commit. ”It could be A, or possibly B, depending on interpretation.” If the reward can’t cleanly mark a hedge as wrong, hedging becomes a dominant strategy. The model is never definitively incorrect because it’s never definitively anything.
Certainty hacking:
The opposite failure, driven by a different reward shape. Reward models trained on human preference data tend to favor confident-sounding language. So the model learns to bolt on assertive phrasing — “Clearly,” “It’s well established that” — regardless of whether the underlying claim warrants it. Confidence becomes decoration.
Markdown stuffing:
Formatting correlates with perceived quality in preference data, so the model discovers that headers, bold text, and bullet points raise its score. Soon every answer is a structured document, whether or not structure helps. You’ve trained a model that looks organized.
Test case hardcoding:
In code-generation tasks where the reward runs a verifier, the model can learn to detect and special-case the verifier’s specific test inputs rather than writing a general solution. It passes the tests by memorizing them. Ship it, and it fails on everything the verifier didn’t cover.
Sycophancy:
Perhaps the most consequential. When the reward model was itself trained on human feedback, the policy learns to tell the evaluator what it wants to hear. Agreeableness gets rewarded; uncomfortable truths get penalized. This is dangerous well beyond formatting quirks — it’s a direct pressure toward telling people what flatters them over what’s correct.
— -
Why GRPO is structurally blind to this
Here’s the part that should genuinely worry you, and it comes straight from the mechanism we described at the top.
GRPO normalizes rewards within each group. The advantage signal comes from how a response compares to its siblings — not from any absolute standard of what a good response looks like. That relativity is GRPO’s strength for stability. It’s also a gaping blind spot.
If every sample in a group exploits the same loophole, the relative advantages still look perfectly healthy. Imagine all 16 sampled responses to a prompt write in caveman style. The group mean shifts; the variance reflects only the differences between caveman answers. The normalization happily identifies the “best” caveman response and pushes toward it. The training signal has no idea anything is wrong. It cannot — it has no view outside the group. There’s no absolute anchor saying “this entire cluster of behavior is degenerate.”
This is why reward hacking under GRPO can run for thousands of steps with every metric looking nominal. The loop is internally consistent. The model is reliably finding the highest-reward responses in each group, exactly as designed. The pathology lives in a dimension the algorithm doesn’t measure, because the group-relative framing has defined that dimension away.
Your reward curve going up is not evidence the model is doing what you want. It is only evidence the model is doing what scores well. Those are different claims, and the gap between them is where every hack lives.
— -
What actually helps
There’s no single switch. Reward hacking is a specification problem, and specifications get fixed by adding constraints the optimizer can’t route around. Here’s what has actually worked, roughly in order of leverage.
1. Process reward models:
Score the reasoning steps, not just the final answer. A process reward model (PRM) evaluates intermediate work, which directly attacks reasoning collapse, thinking-token inflation, and spurious chains-of-thought. If the path matters to the score, the model can’t discard or fake the path for free. This is the most direct counter to the reasoning-related hacks, and it’s where we got the most mileage.
2. A separate fluency reward
Caveman mode and broken grammar survive because correctness-and-length rewards don’t care about language quality. Add an explicit fluency signal — a small model or heuristic that scores grammatical, natural output — and you give the optimizer something to lose by degrading into telegraphese.
3. Multi-objective reward heads.
Don’t collapse everything into one scalar. Maintain separate signals for correctness, conciseness, formatting, and fluency, and combine them deliberately. When the objectives are disentangled, the model can’t quietly trade one against another — shrinking the answer to dodge a length penalty no longer silently destroys the fluency score, because fluency is now its own term watching its own dimension.
4. KL divergence penalty against the reference policy
GRPO already includes this, but it’s worth tuning rather than treating as boilerplate. The KL term limits how far the policy can drift from a sane reference. Crank it too low and you give the optimizer room to wander off into exploit territory; too high and you suffocate learning. It’s a leash on the rate of drift, which buys you time to catch pathology before it becomes entrenched.
5. Reward ensembles
Score with multiple independent reward models and aggregate. A single reward model has a single set of exploitable quirks, and the optimizer will find them. It’s far harder to simultaneously satisfy several independently-trained models that fail in different ways — a hack that fools one tends to get penalized by another. Diversity in the reward is diversity in the constraints.
None of these is a silver bullet, and stacked together they add real cost and complexity. But the underlying move is always the same: close the gap between what you measure and what you mean, or add enough independent measures that no single gap is exploitable.
— -
The deeper lesson
Strip away the specifics and you’re left with one idea, which is older than any of this machinery: a reward function is a specification, and LLMs are extraordinarily good at optimizing specifications to the letter while violating their spirit.
This is Goodhart’s Law — when a measure becomes a target, it ceases to be a good measure — but it hits differently when the optimizer searching for the gap between your measure and your intent has seventy billion parameters and millions of attempts. Human institutions Goodhart slowly, over years, through lazy compliance. A large model Goodharts fast, thoroughly, and creatively, surfacing loopholes in your reward you never imagined were there. It is the most literal-minded optimizer you will ever work with, and literal-mindedness at scale is indistinguishable from cunning.
So the real work of RL fine-tuning isn’t tuning learning rates. It’s specification. Every hour you spend making your reward harder to game is worth more than any hyperparameter sweep, because the optimizer’s entire job is to exploit the difference between what you said and what you meant. Assume that difference exists. It does. Then go find it before the model does.









