Which Rewards Explain Behavior?
Reward ambiguity, shaping invariance and what demonstrations can identify.
If an agent's behavior were all you could observe, how much of its reward could you ever learn? This lesson answers precisely: which transformations leave optimal behavior unchanged, why an entropy-regularized expert pins its reward down exactly up to potential shaping, how a second discount factor or environment removes even that, how the answer changes with the data source, and why, when the demonstrator's rationality is unknown, no simplicity prior can rescue the inference.
What you’ll learn
- Characterize the transformations of a reward that preserve its optimal policies, including potential-based shaping and optimality-preserving transformations.
- Prove that an entropy-regularized policy determines a state–action reward exactly up to potential shaping, and explain how two discount factors or two environments identify it up to a constant.
- Compare how much of the reward different data sources identify (optimal, Boltzmann-rational and maximum-causal-entropy policies, trajectories, comparisons), and judge which ambiguity a downstream task can tolerate.
- Explain the No Free Lunch argument for decomposing behavior into a planner and a reward, and its implications for reward learning and alignment.
What optimal behavior cannot reveal
Fix the states, actions, dynamics and discount , and ask which changes of a reward leave the set of optimal policies unchanged. Observing an optimal expert, even perfectly and forever, can never distinguish rewards related by such a change. Three families stand out:
- Positive scaling, with .
- Potential-based shaping, , which shifts every action value in state by and so preserves the ranking of actions, under any dynamics.
- Redistribution over next states: any change that keeps for every leaves every value unchanged. Skalse et al. (2023) call it -redistribution; it is trivial for rewards of the form .
For a fixed environment, the class is much larger. An optimal policy reveals only which actions are optimal in each state. Skalse et al. (2023) show that a maximally supportive optimal policy, one that takes every optimal action with positive probability, determines the reward exactly up to optimality-preserving transformations: is one if some function satisfies for all , with equality exactly for the actions optimal under . Here plays the role of the new optimal value function; scaling and shaping are special cases, and the class also contains rewards with entirely different values and different rankings of the suboptimal actions. Observed only along its own trajectories, the expert reveals even less: in states it never visits, the reward is free, except that it must not make leaving the visited states attractive.
Which change to a reward can alter which policies are optimal?
- Multiplying every reward by 3
- Adding for some potential
- Adding the same bonus to every action's reward in state , with differing between states
- Moving reward between the possible next states of each while keeping its expected value
Show the answer
C. Adding the same bonus to every action's reward in state , with differing between states
A bonus for being in leaves the ranking of actions within unchanged at that step, but it makes more or less attractive to reach, so the best actions in the states that lead to can change. Shaping is special precisely because its terms telescope along every trajectory.
Entropy regularization: identified up to shaping
Optimal experts are uninformative because they reveal only an argmax. A stochastic expert reveals more. Suppose, as in maximum-causal-entropy IRL, that the expert is soft-optimal for a reward with inverse temperature , in a finite MDP with known dynamics and discount: , where and .
Necessity. If has soft-optimal policy and soft value , take logarithms of and substitute the definition of :
Sufficiency. Fix and define by the formula. Then , and one soft backup returns itself:
The soft Bellman operator is a -contraction, so its fixed point is the soft value of , and the soft-greedy policy is . Two rewards with the same therefore differ by : a potential-based shaping term.
A soft-optimal agent with makes a single choice that ends the episode, picking with probability 0.8 and with probability 0.2. What is ?
Show the answer
1.39
With no future, , so , while the common level stays unknown. An optimal agent would only have revealed that is better; the soft-optimal one reveals by how much, provided and the soft-optimality model are right.
Shaping is harmless for reproducing the expert in its own environment, but a shaped reward can behave differently when the dynamics change, since depends on them. Observing the same reward under more than one setting removes the ambiguity:
- Two discounts or two environments (Cao, Cohen & Szpruch, 2021). If two soft-optimal agents share the reward but differ in discount factor or in transition probabilities, and the two problems satisfy a non-degeneracy condition they call value-distinguishing, then a reward consistent with both policies either does not exist or is unique up to an additive constant. In the one-dimensional linear–quadratic problems they analyze, varying the discount always suffices.
- A finite horizon in a deterministic world (Kim, Garg, Shiragur & Ermon, 2021). With deterministic dynamics and a single start state, a MaxEnt expert's trajectory distribution is an energy-based model, so it determines every trajectory's total reward up to a constant. Whether that pins down the reward of each state–action pair depends on their domain graph, with state–action pairs as vertices and possible transitions as edges. If the graph is strongly connected, the pairwise rewards are identifiable up to a constant exactly when it is coverable (walks of one common length from a start vertex reach every vertex), which for such graphs means aperiodic, and then for every horizon of at least twice that covering length; for other graphs coverability is sufficient but not necessary. Cycles of coprime lengths are what make a graph aperiodic, and coverability supplies enough linearly independent trajectories to solve for every pair's reward.
Different data, different ambiguity
Skalse, Farrugia-Roberts, Russell, Abate and Gleave (2023) catalogued, for many data sources, exactly which reward transformations the data cannot detect in the infinite-data limit, assuming the data follow the stated model exactly.
| Data source | Determines the reward up to |
|---|---|
| A policy's Q-function, the optimal Q-function, or the soft Q-function | -redistribution only |
| A Boltzmann-rational policy () or a maximum-causal-entropy policy | -redistribution and potential shaping |
| Trajectories sampled from such a policy | The same, plus arbitrary changes on unreachable transitions |
| A maximally supportive optimal policy | Optimality-preserving transformations |
| Trajectories sampled from such an optimal policy | Optimality-preserving transformations on the visited states; elsewhere almost anything |
| Exact returns of complete trajectories from the start states | Shaping whose potential is 0 on the start states, plus changes on unreachable transitions |
| Boltzmann comparisons between all trajectory fragments | Changes on impossible transitions only |
| Boltzmann comparisons between complete trajectories from the start states | Shaping whose potential is one constant on the start states, plus changes on unreachable transitions |
Two lessons follow. First, noise is informative. Boltzmann-rational choices reveal reward differences, which is why Boltzmann comparisons of all trajectory fragments pin the reward down almost completely, while noiseless rankings of the same trajectories reveal only an ordering and leave far more freedom. But that information is only as good as the noise model: the cardinal content comes entirely from assuming that choice probabilities are a logistic function of reward differences, which real people need not satisfy.
Second, ambiguity matters only relative to a use. Skalse et al. compare a data source's invariances with a task's tolerance: a learned reward is safe for a task if every transformation the data cannot detect is one the task does not care about. Computing an optimal policy in the same environment tolerates every optimality-preserving transformation, so optimal demonstrations suffice for it. Transferring the reward to new dynamics tolerates potential shaping, which preserves optimal policies under any dynamics, but not -redistribution: by their Theorem 4.2, a data source invariant to it, which includes everything computed from a Q-function, leaves the reward essentially unconstrained wherever the new dynamics differ from the old. Averaging a shaping term over the training dynamics to get a reward of the form , as in above, is exactly such a redistribution, which is why AIRL restricts its reward term to functions of the state (Adversarial Imitation: GAIL & Distribution Matching). Ranking or evaluating suboptimal policies tolerates even less.
When rationality is unknown, Occam’s razor fails
Every result so far assumed a known model of the demonstrator: optimal, Boltzmann-rational with known , or soft-optimal. Armstrong and Mindermann (2018) dropped that assumption. They model a demonstrator as a planner , a map from rewards to policies, applied to a reward , and call a pair compatible with an observed policy if . Compatibility alone constrains nothing: for any and any , the planner that ignores its input and always returns is compatible.
The indifferent planner returns whatever it is given, so the zero reward explains :
The greedy planner picks the action with the highest immediate reward, . With the indicator reward , it reproduces :
Define the negated planner , an agent that minimizes whatever it is given. Then the opposite reward, with an anti-rational planner, explains equally well:
Each of these pairs is a short program built from and a few fixed operations, so its Kolmogorov complexity exceeds that of by at most a constant. A reasonable decomposition , one that encodes the biases and limits of real people precisely, is typically more complex, so a simplicity prior favors a degenerate pair; and the mirror pair , with the opposite reward, is about as simple as itself. They also note, citing Everitt et al., that for any policy some reward gives it at least half of the largest possible regret, so compatibility with a decomposition guarantees nothing about what maximizing its reward would do. Their conclusion: inferring preferences requires normative assumptions about how the demonstrator plans, and those cannot be deduced from behavior alone.
Key takeaways
- Optimal behavior reveals only which actions are optimal: a maximally supportive optimal policy determines the reward up to optimality-preserving transformations, which include positive scaling and potential-based shaping, and trajectories reveal nothing about unvisited states.
- A soft-optimal expert identifies its reward exactly up to potential shaping, ; two discounts or sufficiently different dynamics leave only a constant, and in deterministic finite-horizon MaxEnt models with a strongly connected domain graph, state–action rewards are identifiable up to a constant exactly when that graph is coverable (equivalently, aperiodic).
- Data sources differ in what they leave undetermined (Skalse et al., 2023): Boltzmann or maximum-causal-entropy policies leave shaping, optimal policies leave optimality-preserving transformations, and Boltzmann comparisons of all fragments leave almost nothing. Noise carries cardinal information, but only under the assumed noise model, and ambiguity matters only relative to what the downstream task tolerates.
- Without assumptions about how the demonstrator plans, behavior has degenerate and reward-reversed decompositions about as simple as the intended one (Armstrong & Mindermann, 2018): reward learning, RLHF included, rests on normative assumptions that data cannot supply.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
A soft-optimal expert's policy is known exactly, together with the dynamics, the discount and . Which rewards are consistent with it?
- Only
- Exactly the rewards for an arbitrary function
- Every reward under which the most probable action is optimal
- A unique reward, since the policy is stochastic
Show the answer
B. Exactly the rewards for an arbitrary function
Cao, Cohen and Szpruch's characterization: each choice of the soft value gives exactly one reward, and these rewards differ by potential shaping. The soft policy identifies more than an optimal policy (which reveals only the argmax) but not everything.
Why can the same reward, observed through two soft-optimal agents with different discount factors, be identified up to a constant when one agent cannot pin it down?
- Because two agents provide twice as many demonstrations
- Because a lower discount makes the agent optimal rather than soft-optimal
- Because the shaping freedom depends on , so one potential cannot explain both policies unless, under a non-degeneracy condition, only constants remain
- Because discount factors cancel out of the soft Bellman equation
Show the answer
C. Because the shaping freedom depends on , so one potential cannot explain both policies unless, under a non-degeneracy condition, only constants remain
Each agent's policy fixes the reward up to its own shaping family, and the two families, built with different (or different dynamics), intersect only in constants when the problems are value-distinguishing. Observing behavior under varied conditions is the general recipe for identification.
Why can Boltzmann-noisy comparisons of trajectories identify more of a reward than noiseless rankings of the same trajectories?
- Because how often the better trajectory wins depends on how much better it is, so the choice frequencies carry information about reward differences, not only their order
- Because noise lets the learner visit more states
- Because noisy labelers make fewer mistakes on average
- They cannot: noise only destroys information
Show the answer
A. Because how often the better trajectory wins depends on how much better it is, so the choice frequencies carry information about reward differences, not only their order
Under , each choice probability can be inverted into a return difference, which is cardinal information that a noiseless ranking never provides. The catch is that this inversion is only as valid as the logistic noise model.
Armstrong and Mindermann show that the pair , an anti-rational planner with the opposite reward, reproduces any deterministic policy . What does this, together with their complexity argument, imply?
- That inverse RL algorithms have a bug that better optimization would fix
- That behavior alone, even with a simplicity prior, cannot settle what an agent values; assumptions about how it plans are required
- That rewards are identifiable whenever the demonstrator is irrational
- That the greedy planner is the correct model of people
Show the answer
B. That behavior alone, even with a simplicity prior, cannot settle what an agent values; assumptions about how it plans are required
Degenerate and reward-reversed decompositions fit the data exactly and are about as simple as the intended one, so neither data nor Occam's razor can rule them out. Every practical method breaks the tie with a normative assumption, such as Boltzmann rationality with a known .
Further reading
- A. Y. Ng, D. Harada & S. Russell, "Policy invariance under reward transformations: Theory and application to reward shaping," ICML (1999).
- H. Cao, S. N. Cohen & Ł. Szpruch, "Identifiability in inverse reinforcement learning," NeurIPS (2021).
- K. Kim, S. Garg, K. Shiragur & S. Ermon, "Reward identification in inverse reinforcement learning," ICML (2021).
- J. Skalse, M. Farrugia-Roberts, S. Russell, A. Abate & A. Gleave, "Invariance in policy optimisation and partial identifiability in reward learning," ICML (2023).
- S. Armstrong & S. Mindermann, "Occam's razor is insufficient to infer the preferences of irrational agents," NeurIPS (2018).