Skip to content

Inverse Reward DesignInverse Reward Design

arXiv· arXiv:1711.02827· Dylan Hadfield-Menell, Smitha Milli, Pieter Abbeel, Stuart Russell, Anca DraganDepartment of Electrical Engineering and Computer Science, University of California, Berkeley; OpenAI; International Computer Science Institute (ICSI)Indexed by this site · 26 days ago· Originally publishedSelected AlignmentSelectedAttention40

Quick read

Analysis and theory

Based on the paper PDF (AI-generated); refer to the original

The authors propose inverse reward design (IRD), which treats the proxy reward as an observation of the true reward and performs Bayesian inference over it, and in the Lavaland grid world, together with risk-averse planning, reduces the fraction of trajectories on lava.

Questions
The agent only optimizes the reward function given by humans, and reward design easily omits scenarios (e.g., lava not considered during training), producing negative side effects and reward hacking after deployment. The authors argue that the designed reward should be treated as an observation of the true intent rather than its definition.
Methods
Proposes inverse reward design (IRD): assuming the proxy reward is the product of the designer approximately solving the reward design problem, it performs Bayesian inference over the true reward accordingly, approximates the intractable normalization constant with sampling or maximum entropy IRL, and then uses risk-averse planning to select trajectories under the worst-case weights.
Experiments and results
In the Lavaland grid world experiments, the authors report that IRD reduces the fraction of trajectories that pass through lava cells under both the proof-of-concept conditions (negative side effects, reward hacking) and the latent reward conditions (Figure 4); the classifier features condition is more difficult for all methods.
Limitations and future work
The authors note: risk-averse planning avoids potentially good outcomes along with bad ones; the method depends on explicitly solving a planning problem, making it hard to scale; it is restricted to linear reward functions; and the designer error model is relatively simple. Experiments were conducted only in the Lavaland grid world, and Figure 4 does not annotate specific values or numbers of runs.
Experimental setupLavaland · Fraction of ξ with Lava(测试 MDP 中轨迹经过熔岩格的比例)
Benchmarks
Lavaland
Metrics
Fraction of ξ with Lava(测试 MDP 中轨迹经过熔岩格的比例)
AI summaryand selection rationaleHadfield-Menell et al., researchers at UC Berkeley, proposed the Inverse Reward Design (IRD) problem, which treats the designed reward function as an observation of the designer's true objective rather than a definition, and infers a posterior distribution over the true reward in conjunction with the training environment. The paper assumes that the designer approximately optimally solves the reward design problem, builds an observation model on this basis, gives two inference methods—sampling approximation and the maximum-entropy inverse reinforcement learning normalization constant—and then combines them with risk-averse planning to decide behavior in the test environment. In Lavaland grid-world experiments, the IRD agent avoided lava that did not appear during training, mitigating the negative side effects and reward hacking caused by reward misspecification, and could still avoid lava under the challenging setting where lava has no dedicated feature indicator and only high-dimensional observations are available. The authors note limitations including reliance on explicit planning to solve, restriction to linear reward functions, and that risk aversion also avoids potentially beneficial things, and anticipate that using the posterior distribution to query the designer will be key to addressing reward misspecification.

Hadfield-Menell et al., researchers at UC Berkeley, proposed the Inverse Reward Design (IRD) problem, which treats the designed reward function as an observation of the designer's true objective rather than a definition, and infers a posterior distribution over the true reward in conjunction with the training environment. The paper assumes that the designer approximately optimally solves the reward design problem, builds an observation model on this basis, gives two inference methods—sampling approximation and the maximum-entropy inverse reinforcement learning normalization constant—and then combines them with risk-averse planning to decide behavior in the test environment. In Lavaland grid-world experiments, the IRD agent avoided lava that did not appear during training, mitigating the negative side effects and reward hacking caused by reward misspecification, and could still avoid lava under the challenging setting where lava has no dedicated feature indicator and only high-dimensional observations are available. The authors note limitations including reliance on explicit planning to solve, restriction to linear reward functions, and that risk aversion also avoids potentially beneficial things, and anticipate that using the posterior distribution to query the designer will be key to addressing reward misspecification.

Why it was selectedThe paper treats the designed reward function as an observation of the true objective rather than a definition, and combines it with risk-averse planning to mitigate the negative side effects and reward hacking caused by reward misspecification.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Reward functions are hard to get right; the authors propose treating the proxy reward as an observation about the true reward to infer the true objective.

    Core problem: The reward function specified by the designer (proxy reward) often fails to fully capture the true intent, and agents optimizing it in new scenarios fail.

    • Problem scenario: The designer designs a reward for the training scenario, but at deployment the agent encounters situations that did not exist in training (such as new terrain); in the terminology of Amodei et al. (2016), this produces negative side effects and reward hacking. The authors' example: the training environment for a navigation robot has no lava, and the proxy reward does not penalize lava, so after deployment the robot may walk straight through the lava (Figure 1).
    • Shortcomings of existing approaches: The authors argue that it is unrealistic to require reward designers to anticipate and penalize all possible misbehavior in advance; the MDP formalism itself also provides no information about where the reward comes from (citing Singh et al., 2010).
    • Core observation: The designed reward function should be treated as an observation about the true reward and should be interpreted in the context of the environment in which it was designed. Assumption 1: The likelihood of a proxy reward function depends on how much true-utility behavior it can elicit in the training environment. Two reward functions that produce similar behavior in the training environment should be treated as equally likely.
    • The paper proposes: Defining the inverse reward design (IRD) problem—given a proxy reward, a training MDP and a set of candidate reward functions, infer a posterior distribution over the true reward; it gives an approximate inference method and uses the inference results for risk-averse planning in the test MDP.
    • Problem setting: This is not an attack/defense paper and has no adversarial threat model. The source of failure is the designer's non-adversarial oversight: the paper assumes the designer is approximately optimal for a known reward design problem but may make mistakes.
  2. What related research exists?

    Related work falls into three groups: optimal reward design, inverse reinforcement learning, and pragmatic language interpretation; the baseline is literal optimization of the proxy reward.

    Optimal reward design

    • Singh et al. (2010)—formalized the reward design problem: the designer faces an environment distribution, a class of reward functions, and a fitness function, and chooses the reward given to the agent; they observed that for bounded agents, the optimal proxy reward may differ from the fitness function. This paper's definition of the reward design problem (RDP) builds directly on it.
    • Sorg et al. (2010) and subsequent work—studied the computational problem of choosing the optimal proxy reward.
    • Difference noted by the paper: in the above work the agent is bounded, whereas this paper considers the designer to be an error-prone, approximately optimal agent, and the proxy reward differs from the true utility because the designer makes mistakes; IRD formalizes the problem of inferring the true utility from the observed proxy reward.

    Inverse reinforcement learning (IRL)

    • Ng & Russell (2000), Ziebart et al. (2008), Evans et al. (2016), Syed & Schapire (2007)—infer the reward function being optimized from (approximately optimal) behavior demonstrations.
    • Difference noted by the paper: IRL observes behavior, whereas IRD directly observes the reward function and assumes the behavior it incentivizes is approximately optimal for the true reward; in Section 4.2 the paper approximates the IRD posterior with the normalization constant of maximum entropy IRL (Ziebart et al., 2008). The authors consider IRD and IRL to be complementary strategies for value alignment.

    Pragmatics

    • Grice (1975); Frank et al. (2009); Goodman & Lassiter (2014)—interpret utterances in the context of alternative expressions, with recent models using two levels of Bayesian reasoning (literal listener + speaker).
    • The paper analogizes IRD to "a pragmatic interpretation of rewards": the speaker in pragmatic interpretation corresponds to the reward designer in IRD.

    Other cited related ideas: shared autonomy using operator control signals (Javdani et al., 2015), preference learning using comparison queries (Jain et al., 2015), cooperative IRL (Hadfield-Menell et al., 2016), etc., which the paper groups under the tradition of "treating human behavior as observations of the reward function."

    Baseline and benchmark: the experimental baseline is a planner that literally interprets the proxy reward (literal-optimizer, planning directly according to the proxy reward); the test environment is the Lavaland grid world built by the authors, with four conditions in total across the proof-of-concept and latent reward categories.

  3. How does the paper address this problem?

    IRD uses an observation model to infer the posterior over the true reward from the proxy reward, handles the hard-to-compute normalization constant with two approximations, and then performs risk-averse planning.

    Overall idea: treat the proxy reward as the product of the designer approximately solving the reward design problem on the training MDP, use Bayesian inference to obtain a posterior distribution over the true reward weights, and then in the test MDP use risk-averse planning to select trajectories that perform well under the worst-case weights. The method is called inverse reward design (IRD).

    Problem formalization

    • MDP and linear rewards: a finite-horizon MDP M = ⟨ S, A, T, r, H ⟩; the reward is a linear combination of features, trajectory reward r(ξ; w) = wᵀφ(ξ), where w is the proxy reward weight and w* is the true reward weight.
    • Reward design problem (RDP, Definition 2): consists of the true reward r*, a world model (MDP without reward), a set of proxy rewards, and an agent model π; the designer chooses a proxy reward so that the agent's behavior has high value under r*.
    • IRD problem (Definition 3): given a candidate reward space R, a world model, an agent model, and the observed proxy reward, infer the unobserved r*; the paper adopts a Bayesian approach, computing the posterior P(w* | w̃, M̃).

    Observation model

    • Designer model: assume the designer believes the agent acts according to a maximum entropy trajectory distribution, π(ξ|w̃, M̃) ∝ exp(w̃ᵀφ(ξ)) (Ziebart et al., 2008).
    • Approximately optimal designer: P(w̃|w∗, M̃) ∝ exp(β   E[w∗Tϕ(ξ) | ξ ∼ π(ξ|w̃, M̃)]), i.e., the more a proxy reward incentivizes high true-utility behavior in the training MDP, the more likely it is; β controls how close to optimal the designer is assumed to be.
    • Inference difficulty: the posterior is proportional to P(w̃|w*, M̃)P(w*), and its normalization constant Z(w̃) requires integrating over all proxy rewards, with each integrand requiring solving a planning problem, which is a doubly-intractable likelihood (Murray et al., 2006).

    Two approximate inferences

    • Sample-Z: approximate the integral by sampling a finite set of weights {wᵢ}, and empirically include the candidate sample w itself in the sum (Equation 3).
    • MaxEnt-Z: instead use the normalization constant of maximum entropy IRL, integrating directly over trajectories in the MDP (Equation 4). Intuitive interpretation: the proxy reward determines the average feature counts of a hypothetical expert demonstration dataset, and β determines the effective size of that dataset; the agent pretends to have received β demonstrations with feature counts φ̄, and then runs IRL.
    • Invariance: Proposition 1 states that both posteriors are invariant to linear shifts of the features in the training MDP (the paper gives a proof).

    Risk-averse planning (appendix)

    • Worst-case planning: sample a set of weights {wᵢ} from the posterior, and maximize the trajectory reward under the worst-case weights in that set; this can be done by taking the minimum over the whole trajectory (Equation 7, using the linear program of Syed et al. (2008)), or independently per time step (Equation 8, more conservative).
    • Reference point problem: risk-averse planning is sensitive to the zero point of the feature encoding, so trajectory rewards need to be compared with reference features cᵢ; the paper studies three reference points: the initial state, the training feature counts, and the log normalization constant of the maximum entropy trajectory distribution (Equation 9).
    • Internal selection: the appendix reports that a full-factorial internal comparison was done before the full experiments, and the combination of taking the minimum independently per time step with the training feature counts as the reference point performed best, which the main experiments adopt.
  4. What experiments did the paper conduct?

    Two IRD approximations are compared with a literal optimization baseline under four conditions in the Lavaland grid world, with the metric being the fraction of trajectories that pass through lava cells.

    Experimental setup

    • Environment: the Lavaland grid world, with four-direction movement and four terrain types: target, grass, dirt, lava; the true objective w* requires reaching the target quickly, avoiding grass, and avoiding lava. The training MDP is 70% dirt and 30% grass, with no lava; the test MDP is 5% lava, 66.5% dirt, and 28.5% grass.
    • Four conditions: two proof-of-concept conditions (negative side effects, reward hacking), where the agent has direct terrain-indicating features; two challenge conditions (latent reward), where terrain is a latent variable and 50-dimensional features are generated from multivariate Gaussian distributions for each terrain type (Figure 3), and the proxy reward is specified in two ways: linear regression on 1000 grass/dirt/target samples (raw observations), or using the outputs of a three-class classifier as features (classifier features).
    • Construction of the reward hacking condition: 6 features come from two sensors, both correct terrain indicators during training; at test time lava looks like the target to one sensor and like grass to the other, breaking the correlation.
    • Manipulated factors: literal-optimizer (whether the proxy reward is interpreted literally) and Z-approx (the two posterior approximations, Sample-Z or MaxEnt-Z).
    • Metric: the fraction of trajectories in the test MDP that pass through lava cells (Fraction of ξ with Lava), i.e., the fraction of runs in which the robot is "fooled" by the misspecified reward.
    • Planning: risk-averse trajectory optimization, using the configuration selected by the internal comparison in the appendix (taking the minimum per time step, with training feature counts as the reference point). The paper does not report the number of runs or repetitions per condition.

    Main results

    Figure 4 uses bar charts to compare the lava trajectory fraction of each method under the four conditions, with axis labels: proof-of-concept conditions 0.0–0.4, latent reward conditions 0.0–0.8; the bars are not annotated with specific values, and pdftotext conversion cannot read the bar heights, so the table below lists only the relative comparisons stated in the paper:

    Swipe horizontally to read the table

    ConditionLiteral (Proxy)MaxEnt-ZSample-ZSource
    Proof-of-concept - negative side effectshigher (baseline)lowerlowerFigure 4 left
    Proof-of-concept - reward hackinghigher (baseline)lowerlowerFigure 4 left
    Latent reward - raw observationshigherlowerlowerFigure 4 right
    Latent reward - classifier featuresmore difficult for all methodsworse than raw conditionworse than raw conditionFigure 4 right
    • The authors state: under the proof-of-concept conditions, IRD mitigates negative side effects (avoiding lava) and reward hacking (visiting less the cells that look like the target to only one sensor), and the same inference method generalizes to two different consequences of reward misspecification.
    • The authors state: under the latent reward setting, although the designer forgot to penalize lava and there are no lava-indicating features, the IRD agent still avoids lava cells, because a reward function that implicitly penalizes lava is equally likely given the observed proxy reward, and risk-averse planning therefore avoids it.
    • The authors state: the raw observations condition largely reproduces the proof-of-concept results (note that the two figures have different axis scales), and the classifier features condition is more difficult for all methods.

    Internal comparison of planning methods (appendix, Figure 5)

    • What was measured: before the full experiments, a full-factorial internal comparison of the design factors of risk-averse planning was conducted, using the two feature encodings for side effects and reward hacking, with the same metric of lava trajectory fraction (Figure 5 vertical axis 0.0–0.8, no specific values on the bars).
    • Results: the authors report that the largest overall variation came from the granularity of the minimum—taking the minimum independently per time step is more robust than taking the minimum over the whole trajectory; on the reference point factor, using the average feature counts of the training MDP as the comparison point performed best.
    • Authors' interpretation: taking the minimum per time step requires only one sampled particle to capture the worst case for each cell type, whereas taking the minimum over the whole trajectory requires a single particle to simultaneously represent the worst case for all cell types, making it more robust to approximate inference; the training feature counts reference point is effective, which the authors attribute to the similarity between training and test scenarios.

    Other ablations and analyses

    • Choice of proxy reward: in the proof-of-concept experiments the proxy reward is chosen uniformly at random; in the latent reward experiments the proxy reward is set to target +1, dirt +0.1, grass −0.2 (Section 5.2).
    • Why classifier features are more difficult: the authors explain that each cell is first classified and then evaluated, so the probability that at least one lava cell is misclassified as target is relatively high; and the behavior considered during inference is planned on the classified terrain, which is a nonlinear transformation of the features, so inference must simultaneously fit the linear reward and discover its uncertainty.
    • Negative result: under the classifier features condition, IRD itself also performs worse than under the raw observations condition (Figure 4 right); the authors give the explanation above and no other reasons.

    What the paper does not report

    • The specific bar heights, error bars, number of runs per condition, and statistical tests for Figure 4 and Figure 5 are not given in the main text or figure captions.
  5. What are some points that can be further explored?

    The authors list four limitations: risk-averse planning, scalability, linear rewards, and incorrect models, and plan to improve them with query designers and meta-learning.

    Limitations and Future Directions Noted by the Authors

    • Conservatism of risk-averse planning (Discussion, Limitations and future work): Risk-averse planning is sometimes feasible, but the robot avoids not only bad outcomes like lava but also potentially good outcomes (e.g., a large pot of gold).
    • Using the posterior for follow-up queries (same): The authors expect that using the IRD posterior to initiate follow-up queries to the reward designer will be key to handling misspecified objectives.
    • Scalability (same): The method relies on explicitly solving a planning problem, which is a bottleneck at inference time; the authors plan to explore agent models with approximate planning or use meta-learning (e.g., Duan et al., 2016) to extend IRD to complex environments.
    • Linear reward function limitation (same): Unless the prior places weight on the (reasonably approximated) true reward function, IRD cannot be expected to perform well; for example, when terrain is encoded as RGB values, the hypothesis space may contain no function that represents the true reward well.
    • Simple error model (same): Only one relatively simple designer error model was considered (with assumptions such as implicit IID errors); the authors plan to study more complex models that allow systematic bias errors and to conduct human subject studies to empirically evaluate these models.
    • Choice of risk-averse method (appendix): The authors intend to explore multiple risk-averse planning methods in the future and compare their merits; the correct choice of reference point may depend on the specific situation and is left to future work.

    Scope of Experiments

    • The experimental environment is the Lavaland 2D grid world constructed by the authors, with four conditions in total: two proof-of-concept conditions (negative side effects, reward hacking) and two potential reward conditions (raw observations, classifier features) (Section 5.1).
    • The compared methods are a literal optimization baseline and two IRD approximations (Sample-Z, MaxEnt-Z), and the only metric is the proportion of trajectories in the test MDP that pass through lava cells (Section 5.2).
    • The feature dimension is 50, and lava accounts for 5% of the test MDP; the proxy reward for the raw observations condition is obtained by linear regression on 1000 samples (Section 5.2).
    • The paper does not report the number of runs per condition, the number of repetitions, the specific values of the bar heights in Figure 4 and Figure 5, or statistical significance tests.
    • The paper does not report the values of inference hyperparameters such as β and the number of posterior sampling particles; the choice of planning method comes from an internal full-factorial comparison described in the appendix.
  6. Summarize the main content of the paper

    IRD treats the proxy reward as an observation in the context of the training environment to infer the true reward, and together with risk-averse planning avoids unseen terrain in Lavaland.

    An alignment methods paper on reward function misspecification: the agent optimizes the proxy reward given by humans, but the proxy reward often omits scenarios not thought of during training, producing negative side effects and reward hacking after deployment.

    • Core idea: the proxy reward is not a definition of the true objective but an observation about it, and should be interpreted in the context of the training environment in which it was designed. Based on this, the authors define the inverse reward design (IRD) problem: assuming the designer is approximately optimal, the more a proxy reward incentivizes high true-utility behavior in the training MDP, the more likely it is, and thus Bayesian inference is performed over the true reward.
    • Method highlights: the normalization constant of the inference is doubly intractable, and the authors give two approximations—a sampling approximation (Sample-Z) and borrowing the maximum entropy IRL normalization constant (MaxEnt-Z, equivalent to reducing the proxy reward to a hypothetical demonstration dataset and then running IRL); then weights are sampled from the posterior, and risk-averse trajectory optimization is performed under the worst-case weights.
    • Experiments: in the Lavaland grid world, the training MDP has no lava and the test MDP contains 5% lava, and the metric is the fraction of trajectories that pass through lava cells. The authors report: under the two proof-of-concept conditions, IRD avoids lava and reduces visits to deceptive cells; under the latent reward condition, even without lava-indicating features, IRD still avoids lava under 50-dimensional raw observations (Figure 4).
    • Exception: the classifier features condition is more difficult for all methods (including IRD), which the authors explain as per-cell classification introducing misclassification, and inference needing to be performed on nonlinearly transformed features.
    • Authors' conclusion: the authors believe the results show that IRD plus risk-averse planning can produce general avoidance incentives for unseen or novel states, mitigating the two consequences of reward misspecification; they also note limitations such as risk-averse planning being overly conservative, dependence on explicit planning, restriction to linear rewards, and a simple error model, and plan to extend with querying the designer and meta-learning.
Read originalarxiv.org