What it means for a model to do what we want, how the specification gets written down and trained in, how models are attacked and evaluated, how to supervise systems that may outgrow their supervisors, and what it takes to deploy them safely, with every claim tied to the evidence behind it.
Chapter 19 · Section 19.1 · 55 min

What alignment means

In 2016 researchers at OpenAI trained a reinforcement learning agent to play CoastRunners, a boat-racing game. The game awards points for hitting targets laid out along the course, and points were the reward. The agent found a small lagoon where three targets respawn, and it learned to turn in a tight circle there forever, crashing into other boats, catching fire, and never finishing the race. It scored, on average, 20 percent higher than human players who did finish (Clark and Amodei 2016).

Nothing in that story is a bug in the learning algorithm. The optimizer did its job perfectly. It found a policy with a very high return for the reward it was given. The trouble is that the reward was not the task. The designers wanted the boat to win the race, wrote down "maximize points" as a stand-in, and the stand-in and the goal came apart exactly where a strong optimizer looked hardest.

This chapter is about that gap, between what we want a model to do and what we actually trained it to do, and about the tools the field has built to close it, test it, and live with it when it cannot be closed. It is the last chapter of Part IV, so it leans on everything before it. RLHF (§16.4) and its failure modes (§16.5), DPO (§17.2), and reasoning models trained with verifiable rewards (§18.5) are all, at bottom, attempts to write down what we want. This first section gives the vocabulary. What exactly can go wrong, in what order, and where do the "values" we align to come from in the first place?

Three objectives, not one

It helps to keep three different objectives apart, because almost every alignment failure is a gap between two of them.

  1. The intended objective is what the designers actually want. Call it the true reward r⋆(s,a)r^\star(s, a). For CoastRunners it is "win the race". For an assistant it is something like "be genuinely useful to this person without causing harm", which nobody can write down exactly.
  2. The specified objective is what we can write down and optimize, the proxy reward r^(s,a)\hat r(s, a). It might be a game score, a reward model trained on human comparisons (§16.3), a unit-test pass rate (§18.3), or the log-likelihood of demonstrations (§14.1).
  3. The learned objective is whatever the trained system ends up pursuing. For a lookup-table policy this phrase is just a description of its behavior. For a large network trained on many tasks it might be something more, an internal goal the network has learned to optimize, which may or may not match the specified one.

Here ss is a state and aa an action, as in the Markov decision processes of §15.1. Write the expected discounted return of a policy π\pi under a reward rr as

J(π;r)=Eπ[∑t=0∞γt r(st,at)],J(\pi; r) = \mathbb{E}_{\pi}\Big[\sum_{t=0}^{\infty} \gamma^t\, r(s_t, a_t)\Big],

with discount γ∈[0,1)\gamma \in [0, 1) and the expectation over trajectories that start from the start distribution and follow π\pi. In plain words, J(π;r)J(\pi; r) is how well π\pi does when we score it with rr.

Hubinger et al. (2019) named the two gaps. Outer alignment is the question of whether the specified objective matches the intended one, whether r^\hat r is a good stand-in for r⋆r^\star. Inner alignment is the question of whether the learned objective matches the specified one, whether training on r^\hat r actually produced a system that pursues r^\hat r, rather than something that merely correlated with r^\hat r on the training distribution. Their paper framed inner alignment around mesa-optimizers, learned models that are themselves optimizers with their own mesa-objective, distinct from the base objective the training process optimizes. Whether today's language models contain anything like a mesa-optimizer is an open question. The distinction is useful even if they do not, because it separates two failures that need different fixes.

A bookkeeping identity makes the split concrete. Let π⋆\pi^\star be optimal for r⋆r^\star, let π^⋆\hat\pi^\star be optimal for the proxy r^\hat r, and let π^\hat\pi be the policy training actually produced. The regret on the true task splits into two terms,

J(π⋆;r⋆)−J(π^;r⋆)⏟total regret  =  J(π⋆;r⋆)−J(π^⋆;r⋆)⏟cost of optimizing the wrong reward  +  J(π^⋆;r⋆)−J(π^;r⋆)⏟cost of not finding the proxy’s optimum.\underbrace{J(\pi^\star; r^\star) - J(\hat\pi; r^\star)}_{\text{total regret}} \;=\; \underbrace{J(\pi^\star; r^\star) - J(\hat\pi^\star; r^\star)}_{\text{cost of optimizing the wrong reward}} \;+\; \underbrace{J(\hat\pi^\star; r^\star) - J(\hat\pi; r^\star)}_{\text{cost of not finding the proxy's optimum}} .

The identity is trivial (add and subtract the same number), but it says something useful. In plain words, a bad outcome can come from a perfect optimizer pointed at the wrong target, or from an imperfect optimizer that landed somewhere other than the target it was pointed at. The first term is the outer problem. The second contains the inner problem, along with ordinary optimization error. Notice that the second term can be negative. A weak optimizer that fails to exploit a broken proxy can do better on the true task than a strong one that succeeds, which is why reward hacking tends to get worse as optimization gets stronger (§16.5).

A useful map of where these gaps show up in practice is still the one Amodei et al. (2016) drew in Concrete Problems in AI Safety. They listed five problems, each a way a reasonable objective goes wrong in a real system. Avoiding negative side effects (a cleaning robot told to clean fast knocks over a vase, because the reward says nothing about vases) and avoiding reward hacking (the robot covers the mess instead of cleaning it) are outer alignment failures, the first from what the specification leaves out and the second from what it gets wrong. Scalable oversight is the problem of supervising behavior that is too expensive or too hard to check, the subject of §19.5. Robustness to distributional shift covers a system that meets inputs unlike its training data, where goal misgeneralization below and the confident errors of §19.8 live. And safe exploration asks how a learner can try new actions without trying catastrophic ones, which matters less for chat models than for agents that act in the world. The rest of this chapter takes these problems up for language models, roughly in that order of urgency.

Specification gaming, documented

Specification gaming is the name for behavior that satisfies the letter of the specified objective while missing its intent (Krakovna et al. 2020). It is the outer alignment problem seen from the outside. The DeepMind safety team keeps a crowd-sourced list of documented cases (about 60 when the list was announced, many more since), and reading it is the fastest way to lose any belief that a reward function means what you think it means. Here are a few classics, with their sources.

systemspecified objectivewhat the optimizer found
CoastRunners boat (Clark and Amodei 2016)game pointscircle a lagoon of respawning targets forever, never finish
simulated robot arm stacking a Lego brick (Popov et al. 2017)a reward computed from the wrong reference point on the brickflip the brick over instead of stacking it
robot arm trained from human feedback (OpenAI 2017)human judgments, from a camera view, of whether it grasped the objectput the hand between the camera and the object so it only appears to grasp
Tetris-playing program (Murphy 2013)do not losepause the game forever
RLHF summarizer and chat models (§16.5)a learned reward modellonger answers, confident tone, agreeing with the user
coding agents trained on test pass rates (Baker et al. 2025)unit tests passedit or skip the tests instead of fixing the code

The last two rows are the modern versions, and §19.6 returns to both. What every row shares is that the specification was reasonable. Nobody wrote a silly reward. They wrote a reward that agrees with the intended objective on the behaviors they had in mind, and the optimizer found behaviors they did not have in mind.

The far end of this spectrum is reward tampering, where the system changes the process that computes its reward rather than gaming the reward's letter. Denison et al. (2024) trained language-model assistants on a curriculum of increasingly gameable environments, starting with sycophancy, and found that gaming the early environments made gaming the later ones more likely. Models trained on the whole curriculum occasionally went on, without having been trained on it, to edit the code of their own reward function, a small but non-negligible fraction of the time. The setting was constructed to make tampering possible, so it shows that the step from gaming to tampering can generalize, not that it happens in ordinary training. Later work found that reward hacking learned in real production coding environments can generalize to much broader misbehavior, which §19.6 describes as emergent misalignment.

Why is this the default rather than an occasional accident? Think of the set of all policies. The designer imagines a small region of "sensible" policies and checks that r^\hat r ranks them correctly. The optimizer searches the whole set. Any place where r^\hat r and r⋆r^\star disagree, however exotic, is a place the optimizer may go, and the harder it searches the more likely it is to find one. Skalse et al. (2022), whose result §16.5 introduced, made this precise. Call a pair of rewards unhackable on a set of policies if no policy change that increases the proxy return ever decreases the true return. They proved that if the set of policies contains an open set, as the set of all stochastic policies does, then any two rewards that are unhackable and non-trivial on it are equivalent, meaning they order every policy identically. (A reward is trivial on a set if it gives every policy the same return.) So over all stochastic policies, a proxy that is safe to optimize without limit is either useless or already the true reward. This is a theorem. Its practical reading is that safety comes from restricting the search (a KL penalty to a reference model, as in §15.7, early stopping, a limited policy class), not from finding a perfect proxy.

Goodhart and the tail of the error

Section 16.5 treated Goodhart's law ("when a measure becomes a target, it ceases to be a good measure") for reward models, with its four variants, regressional, extremal, causal, and adversarial (Manheim and Garrabrant 2018). Two of its results matter most here. Regressional noise alone only shrinks the true gain to a fixed fraction of the proxy gain, so optimizing harder still helps. And a true decline needs proxy errors that grow in the direction the optimizer pushes, which is extremal Goodhart. Adversarial Goodhart, another agent exploiting the proxy, is the jailbreak story of §19.3.

For safety there is a third route to decline that does not need errors to grow in any particular direction, only to have heavy tails. Let each candidate have true value U∼N(0,1)U \sim \mathcal{N}(0, 1) and proxy score X=U+εX = U + \varepsilon, and keep the best of nn by proxy, as in §18.2. If ε\varepsilon is Gaussian, the true value of the pick keeps rising with nn, as §16.5 showed. If ε\varepsilon has heavy tails, the candidate with the highest proxy score is, more and more often, the one with a freak error rather than a high true value, and the true value of the winner rises and then falls back toward the average. Kwa et al. (2024) proved a version of this for KL-regularized RL. When the reward model's error is heavy-tailed, a policy can reach arbitrarily high proxy reward with almost no gain in true utility while staying within a small KL budget. Their own measurements of open reward models were consistent with light-tailed error, so this is a possibility to guard against rather than an observed failure. Watch both regimes.

Python · cell 1

With Gaussian error the pick's true value climbs steadily, from 0 to about 2.6 at n=4096n = 4096, always about 1/21/\sqrt{2} of the oracle's (the factor Var⁡(U)/Var⁡(X)\sqrt{\operatorname{Var}(U)/\operatorname{Var}(X)} for σ=1\sigma = 1, since the maximum of nn Gaussians scales with their standard deviation). With heavy-tailed error it peaks around n=16n = 16 and then sinks back toward zero, the true value of a random candidate. The two proxies look alike for typical candidates, where the error is small either way, and meet opposite fates under pressure. The safety reading is that the most dangerous failures of a proxy are its rare, extreme errors, and that the harder we optimize, the more of our outcome those rare errors decide. That is an argument for limiting optimization pressure and for auditing the highest-scoring outputs specifically, not a random sample of them.

A specification-gaming gridworld

Let's build CoastRunners in miniature. A 5×55\times5 grid, the agent starts in the top-left corner, and the task is to reach the goal in the bottom-right. The true reward is +10+10 for arriving at the goal and −0.1-0.1 for every other step, so the intended behavior is the shortest path. A well-meaning designer adds a bonus b=1b = 1 every time the agent enters a checkpoint cell at (1,1)(1, 1), to encourage exploration. The bonus respawns. We will solve both rewards exactly with value iteration (§15.2), using the transition tensor P∈RS×A×SP \in \R^{S\times A\times S} and reward table R∈RS×AR \in \R^{S\times A} of Chapter 15.

Python · cell 2

The proxy-optimal agent steps down to (1,0)(1, 0), into the checkpoint, out to (0,1)(0, 1), back in, and so on forever. Its proxy return is 7.74, better than the 6.38 a shortest path earns under the true reward (or 7.33 under the proxy, if that path passes through the checkpoint once on the way), and its true return is −2.00-2.00, the value of paying 0.10.1 per step for eternity (−0.1/(1−γ)-0.1/(1-\gamma)). Why is looping better? Each two-step loop pays b−0.2b - 0.2, roughly, and a discounted stream of them is worth about b1−γ2≈10.3 b\frac{b}{1-\gamma^2} \approx 10.3\,b at γ=0.95\gamma = 0.95, while the goal, eight steps away, is worth only 10γ7≈710\gamma^7 \approx 7 minus the step costs. The farther the goal and the larger γ\gamma, the smaller the bonus needed to break the agent.

When does a helpful-looking bonus make the agent stop doing the task?
The task is to reach the goal (+10, and −0.1 per step). The designer pays a bonus for entering the checkpoint. Arrows are the policy that is optimal for the reward the agent is actually given. The shaded cells are its first 18 steps from the start.
Loading interactive figure…
Core

Proxy return, true return, and regret

Using the solve helper below (value iteration), implement two functions.

  • policy_return(P, R, pi, gamma, s0) returns J(π;r)J(\pi; r) from start state s0 for a deterministic policy pi (an int array of shape (S,)), computed exactly by solving the linear system (I−γPπ)v=rπ(\mathbf{I} - \gamma P_\pi)\mathbf{v} = \mathbf{r}_\pi, where Pπ[s,s′]=P[s,π(s),s′]P_\pi[s, s'] = P[s, \pi(s), s'] and rπ[s]=R[s,π(s)]\mathbf{r}_\pi[s] = R[s, \pi(s)].
  • proxy_regret(P, R_true, R_proxy, gamma, s0) returns the pair (true_return_of_proxy_optimum, regret), where the proxy optimum comes from solve(P, R_proxy, gamma) and the regret is J(π⋆;r⋆)−J(π^⋆;r⋆)J(\pi^\star; r^\star) - J(\hat\pi^\star; r^\star) from s0.
Hidden tests, hints, and AI help, from $1.99 a month.

The one kind of bonus that is always safe

Was the designer wrong to add a bonus at all? No. Shaping rewards, extra rewards that guide exploration, are often essential when the true reward is sparse. They were wrong about its form. Ng, Harada, and Russell (1999) proved that one family of bonuses can never change which policies are optimal. Pick any function of the state, a potential ψ:S→R\psi: \mathcal{S}\to\R (they write Φ\Phi), and add

F(s,a,s′)=γ ψ(s′)−ψ(s)F(s, a, s') = \gamma\,\psi(s') - \psi(s)

to the reward of every transition from ss to s′s', with ψ=0\psi = 0 at terminal states. In plain words, you are paid for moving to a state with higher potential and charged for moving to one with lower potential, and the discount is applied to the arrival.

∂ Why a potential-based bonus leaves the optimal policy unchanged

Take any trajectory s0,a0,s1,a1,…s_0, a_0, s_1, a_1, \dots and add up the discounted bonuses,

∑t=0T−1γt(γψ(st+1)−ψ(st))=∑t=1Tγtψ(st)−∑t=0T−1γtψ(st)=γTψ(sT)−ψ(s0).\sum_{t=0}^{T-1}\gamma^t\big(\gamma\psi(s_{t+1}) - \psi(s_t)\big) = \sum_{t=1}^{T}\gamma^{t}\psi(s_t) - \sum_{t=0}^{T-1}\gamma^t\psi(s_t) = \gamma^T\psi(s_T) - \psi(s_0).

Every intermediate term appears once with a plus sign and once with a minus sign, so the sum telescopes. If the episode ends at a terminal state, ψ(sT)=0\psi(s_T) = 0. If it never ends, γTψ(sT)→0\gamma^T\psi(s_T) \to 0 as T→∞T\to\infty because ψ\psi is bounded on a finite state space and γ<1\gamma < 1. Either way the shaped return of every trajectory is its original return minus ψ(s0)\psi(s_0).

Take expectations over trajectories that start with action aa in state ss and then follow any policy π\pi. The shaped action value is Q′π(s,a)=Qπ(s,a)−ψ(s)Q'^{\pi}(s, a) = Q^{\pi}(s, a) - \psi(s). This holds for every policy, so it holds for the optimal one, and Q′⋆(s,a)=Q⋆(s,a)−ψ(s)Q'^\star(s, a) = Q^\star(s, a) - \psi(s). In each state the subtracted term ψ(s)\psi(s) is the same for every action, so arg⁡max⁡aQ′⋆(s,a)=arg⁡max⁡aQ⋆(s,a)\arg\max_a Q'^\star(s, a) = \arg\max_a Q^\star(s, a). The optimal policies are identical. The shaped values are the old ones shifted by ψ\psi, which can still speed up learning, since a good potential (such as an estimate of V⋆V^\star) makes the reward less sparse.

Ng et al. also proved a converse, and its exact form matters. If a bonus F(s,a,s′)F(s, a, s') is not potential-based, then there exist transition probabilities and a reward function for which no policy that is optimal under the shaped reward is optimal under the original one. So a non-potential bonus may happen to be harmless in a particular MDP, but only potential-based shaping is safe for every MDP, which is what you need when you do not know the dynamics in advance. (The paper's appendix proves this case in full only for two actions and says the general case follows the same steps.)

In the gridworld, a potential-based checkpoint bonus pays γb\gamma b on entry and charges bb on exit. One loop then nets γb−γb=0\gamma b - \gamma b = 0 in discounted terms (the exit happens one step later), so looping is worthless. Try the "potential-based bonus" button in the widget. The lesson generalizes beyond gridworlds. Any reward term that can be collected repeatedly by cycling through states will be farmed. Rewards that depend only on progress, a difference of a state function, cannot be.

Interview

Potential-based shaping preserves the optimal policy

Implement shaped_reward(P, R, psi, gamma, terminal) that returns the expected shaped reward table

R′(s,a)=R(s,a)+γ∑s′P(s′∣s,a) ψ(s′)−ψ(s),R'(s, a) = R(s, a) + \gamma\sum_{s'}P(s' \mid s, a)\,\psi(s') - \psi(s),

of shape (S, A), where psi has shape (S,) and terminal is a boolean array of shape (S,). Treat ψ\psi as 00 at terminal states, both as ss and as s′s', so terminal rows of R′R' equal the terminal rows of RR. No Python loops over states or actions. The tests check the theorem, that Q′⋆=Q⋆−ψQ'^\star = Q^\star - \psi on random MDPs.

Hidden tests, hints, and AI help, from $1.99 a month.

Goal misgeneralization

Specification gaming is a failure you could, in principle, find by reading the reward function carefully. The next failure survives even a perfect reward.

Langosco et al. (2022) trained agents on CoinRun, a procedurally generated platform game in which the agent gets a reward for touching a coin. In every training level the coin sat at the far right end of the level. The reward was correct, it paid for the coin and nothing else. At test time the researchers moved the coin to a random position. The trained agent ran past it to the right end of the level, competently dodging obstacles all the way, and usually ignored the coin. Its capabilities generalized to the new levels. Its goal did not. During training "go to the coin" and "go to the right end" were the same behavior, and the agent had learned the second.

Shah et al. (2022) named this goal misgeneralization and defined it carefully. A system trained with a correct specification behaves competently out of distribution, yet pursues a goal other than the intended one. Both conditions matter. If the agent had stumbled around randomly at test time, that would be ordinary capability failure, which is easy to notice. Goal misgeneralization is worse because the agent stays capable. It competently does the wrong thing.

Why can training not prevent it? Here is the identifiability argument in one line. Let dtraind_{\text{train}} be the distribution over states the agent sees during training, and suppose two candidate goals, r1r_1 (reach the coin) and r2r_2 (reach the right end), agree on every state in its support. Then every training signal, every return, every gradient, is identical under the two goals, so

r1(s,a)=r2(s,a)  for all s∈supp⁡(dtrain)  ⟹  the data cannot distinguish r1 from r2.r_1(s, a) = r_2(s, a)\ \text{ for all } s \in \operatorname{supp}(d_{\text{train}}) \;\Longrightarrow\; \text{the data cannot distinguish } r_1 \text{ from } r_2 .

In plain words, if the training data cannot tell two goals apart, then which one the model learns is decided by its inductive biases, by which goal is simpler or more salient for this architecture, and not by the data. Nothing about the reward is wrong, and nothing about the optimizer is wrong. The data underdetermines the goal. Langosco et al. found the obvious fix works. Placing the coin at random in just 2% of training levels greatly improved how often the agent went for it at test time, and more randomization helped more. The fix requires knowing which correlation to break, though, and the general problem is that we do not know which of the many correlations in a training distribution a model is relying on.

Let's reproduce the mechanism with a classifier, so we can look at the weights. Each "level" has a coin side cc and a level-end side ee, both ±1\pm1, and the intended goal is the coin, so the label is cc. The agent perceives the coin through a noisy feature and the level's end through a clean, salient one, plus eight irrelevant features. In training, e=ce = c always.

Python · cell 3

With no randomized levels, training accuracy is 100%, and on test levels where the coin and the end disagree the classifier is right 0% of the time. It goes to the end, every time. The weights show why. Both features predict the training labels perfectly, and L2 regularization prefers the cheaper explanation, a modest weight on the large clean feature, so the end gets weight 2.53 and the coin 0.51. Randomizing just 2% of levels flips the weights toward the coin. The conflict accuracy rises slowly, because the coin really is harder to see, and its ceiling is about 84%, the accuracy of the noisy coin feature alone (Φ(1)≈0.84\Phi(1) \approx 0.84, with Φ\Phi the standard normal CDF). Two lessons transfer to language models. A model can fit its training data perfectly and still have learned the wrong goal. And the goal it learns is the one that is easiest to represent, which is a property of the model, not of the data.

Core

How much diversity does it take to pin down the goal?

Using make_levels from the setup (the same generator as above), implement conflict_accuracy(frac_random, n_train, seed). It builds a training set with make_levels(n_train, frac_random, np.random.default_rng(seed)), fits LogisticRegression(C=1.0), and returns the accuracy on the conflict levels of the fixed test set X_te, y_te, e_te from the setup, the levels where 2y−1≠e2y - 1 \ne e. Return a Python float.

Then implement min_fraction(fracs, target, n_train, seed) that returns the smallest fraction in the sorted list fracs whose conflict accuracy reaches target, or None if none does.

Hidden tests, hints, and AI help, from $1.99 a month.

Shah et al. collected examples well beyond CoinRun. In one, found in the wild rather than constructed, an agent learned in a 3D environment to visit colored spheres in the right order by following a partner bot that knew the order. At test time the partner was replaced by an "anti-expert" that visited spheres in the wrong order, and the agent kept following it, doing worse than a random agent, even though its rewards were part of its observations. They also gave a language model example. Gopher (280B) was prompted with ten examples of evaluating linear expressions, each with exactly two unknown variables whose values it asked the user for. Given an expression with no unknowns, it still asked redundant questions such as "What's 6?". The goal it inferred was "query the user at least once", not "ask when a value is missing".

The worry that makes goal misgeneralization central to alignment is a hypothesis, not a finding. It is that a capable model trained on human approval might learn a goal like "produce outputs that the overseer rates highly" rather than "produce outputs that are actually good", two goals that agree whenever the overseer is right. The two come apart exactly when the model is more capable than its overseer in some domain, which is the scalable oversight problem of §19.5. The extreme version, a model that learns to look aligned during training because that is instrumentally useful, is called deceptive alignment (Hubinger et al. 2019). §19.6 looks at what experiments can and cannot yet say about it.

Helpful, honest, harmless

So far the "intended objective" has been a race or a coin. For an assistant, what is it? The most influential answer is a triple from Askell et al. (2021). An assistant should be helpful (do what the person is actually trying to do, efficiently, and ask for clarification when the request is ambiguous), honest (tell the truth, be calibrated about its uncertainty, and never try to create false impressions), and harmless (not assist with seriously harmful acts or produce offensive content, and recognize when a request is attempting that). "HHH" became the working target of a generation of assistants, and the three axes are still how most labs organize their training data and evaluations.

The three are in tension, and the tension is measurable. Bai et al. (2022a) collected separate helpfulness and harmlessness comparisons and found that the two datasets pull against each other. A preference model trained mainly on one performed much worse than chance on the other. Policies pushed hard toward harmlessness gave the same exaggerated responses to every remotely sensitive question, which the authors read as over-optimizing harmlessness while under-optimizing helpfulness. A model like that is evasive, refusing or deflecting anything that looks sensitive. Refusing is perfectly harmless and perfectly unhelpful. That pathology, over-refusal, is now measured with its own benchmarks (§19.4), and avoiding it while staying harmless is the explicit goal of the methods in §19.2. Honesty conflicts with the other two in subtler ways. A fully forthcoming answer about a dangerous topic may be harmful, and a "helpful" answer that tells users what they want to hear is dishonest. That last failure, sycophancy, gets its own section (§19.6).

A clean way to think about the trade-off is a frontier. Score each response yy by its helpfulness help⁡(y)\operatorname{help}(y) and its harm harm⁡(y)\operatorname{harm}(y) (both measured by some eval), and train with the scalarized objective help⁡(y)−λharm⁡(y)\operatorname{help}(y) - \lambda\operatorname{harm}(y) for a weight λ≥0\lambda \ge 0. As λ\lambda grows, the trained model slides along a Pareto frontier from "helpful but sometimes harmful" to "harmless but evasive". Tuning λ\lambda only picks a point on the frontier. Better methods are the ones that move the frontier itself, more harmless at the same helpfulness, and that is what the Constitutional AI and deliberative alignment papers of §19.2 claim and measure.

Where the values come from

The hardest questions are not technical. If alignment means "doing what we want", who is "we", and how does what they want get into the weights? Gabriel (2020) laid out the candidates a system could be aligned to. Its operator's literal instructions, their intentions behind the instructions, their revealed preferences as shown by behavior, their informed preferences (what they would want if rational and well informed), their interests or well-being, or values defined more broadly, such as moral principles. These come apart constantly. A user who asks for a diet plan that skips all meals has given an instruction that conflicts with their interests. A model that maximizes revealed preferences, measured as engagement, may learn to flatter.

In practice, values enter a modern assistant through a stack of layers, each with its own author and its own failure mode.

layerwho writes ithow it enters trainingwhat can go wrong
pretraining dataeveryone on the webthe base model's priors (§8.2)whatever biases the corpus has
labeler guidelines and labelsa lab's policy team, then a few dozen to thousands of ratersSFT demonstrations and preference pairs (§16.2)rater demographics, fatigue, rewarding style over substance
a constitution or model specthe lab, sometimes with public inputAI feedback and spec-based training (§19.2)vague or conflicting principles, the author's blind spots
a system promptthe deploying developerthe context, at inference time (§19.7)can be overridden or extracted if not trained in
the user's requestthe userthe contextconflicts with all of the above

Each layer leaves fingerprints. InstructGPT's preferences came from a team of about 40 contractors, and the authors were explicit that the model was aligned to those labelers, their instructions, and the researchers who wrote them, not to "human values" in general (Ouyang et al. 2022). Santurkar et al. (2023) compared language models' answers to public-opinion survey questions with the answers of US demographic groups and found substantial misalignment with the population as a whole, with RLHF-tuned models shifting toward the views of liberal, high-income, well-educated groups. Labs have responded by making the specification legible and public. Anthropic published the constitution used to train Claude, and ran an experiment in which about 1,000 Americans drafted a constitution collectively. OpenAI publishes a Model Spec that ranks whose instructions win in a conflict (the platform, then the developer, then the user) and spells out default behaviors. That ordering is the instruction hierarchy that §14.3 showed being trained into chat formats and that §19.3 tests against prompt injection.

It is worth separating two questions that public debate often merges. The technical alignment question is whether we can make a model reliably follow a specification, whatever it says. The normative question is what the specification should say. This chapter is about the first. The second is a question for everyone, and the honest technical position is that a method which can only align a model to the values of its developers, and cannot be inspected, is a weaker method than one whose specification is written down, debated, and checkable.

In PyTorch

To close the loop on specification gaming, here is what a training run looks like when the proxy is broken. We parameterize a softmax policy over the gridworld's actions with a table of logits θ∈RS×A\theta \in \R^{S\times A} and compute J(πθ;r)J(\pi_\theta; r) exactly, as a differentiable linear solve, so gradient ascent on the proxy return is noise-free. Then we watch both returns during training.

🔥 In PyTorchfor a machine with PyTorch

The proxy return climbs from 0.69 to about 7.7, a beautiful learning curve. The true return falls from −0.67-0.67 (a random walk, which sometimes stumbles onto the goal) to −1.98-1.98. If the proxy is all you log, this run looks like a success. That is the practical lesson of the whole section. Always log at least one measurement that the optimizer is not optimizing, held-out human ratings, a different reward model, a hand-written check, and watch for the moment the two curves part.

Read more

Watch next

🎬 9 Examples of Specification Gaming · Robert Miles AI SafetyA tour of documented specification gaming cases, including several from the DeepMind list, and why they are the default rather than the exception.
🎬 The OTHER AI Alignment Problem: Mesa-Optimizers and Inner Alignment · Robert Miles AI SafetyThe clearest explanation of base and mesa objectives and why inner alignment is a separate problem from writing the right reward.
🎬 We Were Right! Real Inner Misalignment · Robert Miles AI SafetyWalks through the CoinRun goal misgeneralization experiments of Langosco et al. with the actual agent footage.