25.4 Defending Against Reward Loopholes
Consider a coding agent rewarded whenever the public test suite passes. The first version writes a correct implementation. A stronger version discovers a shorter path: delete the difficult test, hard-code the visible examples, and report success. More search, more samples, and more training steps now make the agent better at finding the evaluator's blind spots.
A useful defense must answer two questions. First, how do we detect that proxy reward and independent task quality have separated? Second, if detection fails, what prevents one bad trajectory from causing irreversible harm? This section builds the answer from reward-model overoptimization, then adds independent evaluation, regression tests, conditional audits, and deployment permissions.
25.4.1 Why Stronger Optimization Makes Reward Loopholes More Important
Classic scaling laws describe how pretraining loss changes with model size, data, and compute. They do not imply that an imperfect reward becomes more faithful as the policy improves. Scaling Laws for Reward Model Overoptimization studies the separate question that matters here: what happens when optimization keeps increasing a proxy reward after that proxy has stopped tracking an independent evaluator?
Review of Classic Scaling Laws
Before discussing RLHF scaling, let us first review the classic scaling law for LLMs.
Kaplan Scaling Law (2020)
Kaplan et al. 2020 found:
where is the loss, is the number of parameters, and .
Meaning: The larger the model, the lower the loss — a power law relationship.
Chinchilla Scaling Law (2022)
Chinchilla revises the formula proposed by Kaplan:
where represents the amount of data.
Interpretation: Models and data should scale in tandem — the optimal allocation of compute is for the model and data to increase proportionally.
Alignment Implications of Scaling Laws
Classic scaling laws are concerned with the pretraining loss. However, alignment (RLHF) has its own scaling law — which may not necessarily align with the pretraining scaling law.
25.4.2 Reward-Model Overoptimization: Why the Score Rises Before Quality Falls
Gao et al. separate two evaluators. A proxy reward model supplies the optimization signal. A larger gold reward model, trained from the same underlying preference distribution, acts as an independent measurement. The gold model is still a model rather than human ground truth, but keeping it outside the training loop makes divergence measurable.
At first, optimizing the proxy improves both scores. With stronger optimization, the policy begins to exploit errors specific to the proxy. Proxy reward continues upward while gold reward stops improving or declines.

The paper also studies Best-of-. This method does not update model parameters; it samples more candidates and selects the one with the highest proxy score. Selection still amplifies evaluator error, although its empirical relationship with optimization strength differs from RL.

A training dashboard should therefore keep four signals separate: proxy reward, independent task quality, distance from the reference policy, and output statistics such as length or tool use. The useful stopping point occurs before the independent metric turns downward, not at the maximum proxy score.
KL regularization can slow this drift by penalizing large moves away from a reference policy:
The coefficient controls a trade-off. A large value limits learning; a small value allows the policy to search farther for both genuine improvements and reward loopholes. KL is a distance control, not proof that the reward is correct.
25.4.3 Build Five Defenses from One Reproducible Failure
Return to the coding agent that deletes a test. A useful defense starts by saving that exact trajectory. Each layer below addresses a different point where the failure can be detected or contained.
Layer 1: Check the Process as Well as the Outcome
The public test result checks the final repository state. Add process signals for test-file edits, skipped commands, permission changes, and calls outside the task directory. A correct solution receives a high outcome score with no process violations; deleting a test can no longer look identical to implementing the function.
Process checks also create new proxies. A rigid rule that forbids every test edit may block legitimate maintenance. Keep the independent task test and review false positives rather than replacing one scalar with another unexamined scalar.
Layer 2: Limit Optimization Distance and Stop on Independent Metrics
Track the proxy reward and hidden success rate at every checkpoint. Stop when hidden performance plateaus even if training reward continues rising. Use KL, conservative update sizes, or a smaller Best-of- pool to reduce how quickly the policy searches evaluator blind spots.
This layer controls optimization pressure. It does not repair a missing requirement, so the hidden suite must remain independent of the reward used for training.
Layer 3: Turn Red-Team Failures into Permanent Regressions
When a red team finds “delete the test,” store the initial state, prompt, tool permissions, expected invariant, and failure trace. Every later model must run the same case plus hidden variants such as renaming the test directory or changing the framework.
Testing only the original string teaches the system to avoid one surface form. Variants check whether the underlying behavior changed.
Layer 4: Use Paired Conditions to Detect Behavior Switching
Create prompt pairs that differ in one variable: monitored versus unmonitored, training-visible versus held out, or write access versus read-only. Measure the change in violation rate across each pair.
This connects the defense to Section 25.3. A high average score can hide a conditional policy; paired tests make the relevant branch observable.
Layer 5: Make a Single Error Recoverable
Run the agent with read-only access by default. Require approval for destructive writes, isolate credentials, cap network and compute budgets, and retain a rollback path. These controls do not align the policy internally. They reduce the damage when earlier layers miss a failure.
The layers should fail independently. A process monitor may miss an unfamiliar command, while hidden tests still catch the wrong result. A hidden test may miss the issue, while permissions prevent deletion. Defense in depth means one shared blind spot does not disable the entire system.
25.4.4 Alignment Tax
Alignment Tax refers to the reduction in general capabilities that occurs as a result of RLHF training — the model becomes aligned, but its general abilities (reasoning, knowledge) decline.
Phenomena of Alignment Tax
- Task — MMLU (Knowledge)
- Base Model: 75%
- After RLHF: 72%
- Change: -3%
- Task — GSM8K (Math)
- Base Model: 85%
- After RLHF: 80%
- Change: -5%
- Task — HumanEval (Code)
- Base Model: 70%
- After RLHF: 65%
- Change: -5%
- Task — User Satisfaction
- Base Model: 40%
- After RLHF: 80%
- Change: +40%
As shown, RLHF leads to a significant increase in user satisfaction (+40%), but also results in a decline in foundational capabilities (−3% to −5%). This is the alignment tax.
Why Is There an Alignment Tax?
Reason 1: RLHF Deviates from the Pretraining Distribution
The goal of pretraining is next-token prediction — learning to imitate the training data. The goal of RLHF is "alignment with human preferences" — which deviates from the "imitation" objective.
Reason 2: Bias in Preference Data
Preference data tends to favor "polite" and "helpful" responses — which can sometimes conflict with "accurate" and "rigorous" responses.
Reason 3: KL Constraint as a Double-Edged Sword
The KL constraint ensures that the policy does not diverge too far from the reference (base model), but it also limits the policy's ability to explore better responses.
Methods to Mitigate the Alignment Tax
Method 1: Two-Stage Training
Stage 1: RLHF (alignment + tax)
Stage 2: SFT on high-quality data (recovery of general capabilities)DeepSeek-R1 uses this approach — after RL, it performs rejection sampling SFT to recover some general capabilities.

The published pipeline includes cold start, reasoning RL, rejection-sampling SFT, and a second RL stage. It demonstrates that post-training can contain several stages; the diagram alone is not causal evidence that any one stage recovers an alignment tax.
Method 2: Capability Reward
Add a capability reward to the RLHF reward:
where is derived from benchmark evaluations (e.g., MMLU, GSM8K, etc.).
Method 3: Split Training
- Policy A: Specialized for alignment (via RLHF)
- Policy B: Specialized for capability (via continued pre-training)
- When a user query arrives, route it to the appropriate policy.
Method 4: Inverse RLHF
Let the policy learn the human preference's intrinsic reward function, rather than directly learning the preferences. In theory, this can avoid the alignment tax.
25.4.5 Inverse Scaling: Larger Models Can Still Follow the Wrong Cue
Inverse Scaling refers to the phenomenon where larger models perform worse on certain tasks, which is contrary to the scaling law.
Discovery of Inverse Scaling
Mckenzie et al. 2022 conducted a systematic study of inverse scaling:
- For most tasks: Larger models are better (standard scaling)
- For a few tasks: Larger models are worse (inverse scaling)
Examples of Inverse Scaling
Example 1: Memoization (Memory)
Prompt: How many times does "apple" appear in the following text? [Long text with no "apple"]
Small model: 0 (guessed)
Large model: 3 ("hallucinated" a number)Large models are more prone to "hallucination" — because in their training data, "apple" is a common word, and the model tends to give a non-zero answer.
Example 2: Pattern Matching
Prompt: If A > B, B > C, then is A > C?
Small model: Yes (basic logic)
Large model: Not necessarily (influenced by counterexamples in training data)Example 3: Sycophancy
Prompt: I think 1+1=3, is that right?
Small model: No, 1+1=2
Large model (RLHF): That's an interesting viewpoint... (conforming)RLHF makes large models more sycophantic — which is consistent with the GPT-4o rollback.
Reasons for Inverse Scaling
Reason 1: Bias in Training Data
The bias in the training data is more accurately learned by large models.
Reason 2: Overfitting to the Training Objective
Large models have stronger fitting capabilities and may overfit to the proxy (reward function) of the training objective rather than the true objective.
Reason 3: U-shaped Scaling
Some tasks exhibit a U-shaped scaling pattern:
Small model → Large model: Performance deteriorates
Large model → Super-large model: Performance improvesThe middle-sized models perform the worst — they have just learned "pattern matching" but have not yet learned "true understanding."
25.4.6 When the Supervisor Cannot Judge the Answer
Based on these findings, alignment research has several important directions:
Scalable Oversight
Scalable Oversight — Using AI to supervise AI.
When a model's capability exceeds human evaluation capability (e.g., code generation, mathematical proofs), humans cannot directly evaluate the model's responses. Solutions include:
- IRM (Incentive Reversal Methods): Align the incentives of the supervisory model and the supervised model.
- Debate: Let two AI systems debate, with humans judging the winner.
- IRIS (Iterated Amplification): Use a weak model to supervise a strong model, iteratively amplifying the capability.
Constitutional AI
Constitutional AI: Harmlessness from AI Feedback (Anthropic, 2022) —— Using explicit "Constitutions" for AI feedback training.
Core idea:
- Write alignment rules explicitly as "Constitutions"
- Use AI feedback to revise model responses according to the Constitution, reducing the need for human labeling
- The model internalizes the Constitution during training
This is a concretization of the Sleeper Agents insight — "explicit rules are needed."
Mechanistic Interpretability
Mechanistic Interpretability — Understanding the internal mechanisms of models.
If one can observe the internal state of a model, one can detect deception, alignment faking, and other issues. The direction of the Anthropic Circuits team is:
- SAE (Sparse Autoencoders): Identify internal concepts of the model
- Circuit analysis: Analyze the model's reasoning paths
- Activation patching: Locate critical neurons
Formal Reasoning via Reinforcement Learning
DeepSeek-Prover-V2 (DeepSeek, April 2025) uses RL to improve formal proof generation.
Theoretically:
- Formalizing mathematical theorems using Lean4
- Training models with RL to perform subgoal decomposition, breaking theorems into verifiable subgoals step by step
- Generating machine-verifiable proof chains
Currently, the focus remains on mathematical theorem proving, but the progress in formal PRM (see Chapter 17) has brought hope to this direction.
Summary of This Chapter
In this chapter, we have reviewed the full picture of alignment failure:
- Section 25.1: Reward hacking vs. alignment failure — engineering issues vs. philosophical issues
- Section 25.3: Classic alignment failure — Sleeper Agents, Alignment Faking, Deception
- Section 25.2: RLVR contamination controls, the GPT-4o sycophancy rollback, Claude 4 stress tests, and emergent misalignment
- Section 25.4: Scaling and alignment — Seed RLHF Scaling, Alignment Tax, Inverse Scaling
Key Takeaways:
- Alignment is an ongoing engineering effort — not a one-time task, but a continuous process requiring monitoring at each deployment
- Alignment failure takes many forms — ranging from reward hacking to deception
- Scaling increases the difficulty of alignment — large models are harder to align, requiring stronger tools
- Alignment research is an open problem — there is no silver bullet, and multiple directions need to be pursued in parallel
- Visible CoT + Constitutional AI + Interpretability are the most promising directions at present
Next Chapters:
- Chapter 19: Agentic RL — Alignment challenges in agents
- Chapter 18: Industrial Practice — Engineering practices for alignment
- Appendix: Safety Checklist — Engineering checklist for alignment