O N THE S ENSITIVITY OF R EWARD I NFERENCE TO M ISSPECIFIED H UMAN M ODELS
Anonymous authors
Paper under double-blind review
A BSTRACT
Inferring reward functions from human behavior is at the center of value alignment – aligning AI objectives with what we, humans, actually want.
But doing so relies on models of how humans behave given their objectives.
After decades of research in cognitive science, neuroscience, and behavioral economics, obtaining accurate human models remains an open research topic.
This begs the question: how accurate do these models need to be in order for the reward inference to be accurate?
On the one hand, if small errors in the model can lead to catastrophic error in inference, the entire framework of reward learning seems ill-fated, as we will never have perfect models of human behavior.
On the other hand, if as our models improve, we can have a guarantee that reward accuracy also improves, this would show the beneﬁt of more work on the modeling side.
We study this question both theoretically and empirically.
We do show that it is unfortunately possible to construct small adversarial biases in behavior that lead to arbitrarily large errors in the inferred reward.
However, and arguably more importantly, we are also able to identify reasonable assumptions under which the reward inference error can be bounded linearly in the error in the human model.
Finally, we verify our theoretical insights in discrete and continuous control tasks with simulated and human data.
I NTRODUCTION
The expanding interest in the area of reward learning stems from the concern that it is difﬁcult (or even impossible) to specify what we actually want AI agents to optimize, when it comes to increasingly complex, real-world tasks (Ziebart et al., 2009;
Muelling et al., 2017).
At the core of reward learning is the idea that human behavior serves as evidence about the underlying desired objective.
Research on inferring rewards typically uses noisy-rationality as a model for human behavior: the human will take higher value actions with higher probability.
It has enjoyed great success in a variety of reward inference applications (Ziebart et al., 2008; Vasquez et al., 2014;
Wulfmeier et al., 2015), but researchers have also started to come up against its limitations (Reddy et al., 2018).
This is not surprising, given decades of research in behavioral economics that has identiﬁed a deluge of systematic biases people have when making decisions on how to act, like myopia/hyperbolic discounting (Grüne-Yanoff, 2015), optimism bias (Sharot et al., 2007), prospect theory (Kahneman & Tversky, 2013), and many more (Thompson, 1999; Do et al., 2008).
Hence, the noisy-rationality model has become a complication in many reward learning tasks AI researchers are interested in.
For instance, in shared autonomy (Javdani et al., 2015), a human operating a robotic arm may behave suboptimally due to being unfamiliar with the control interface or the robot’s dynamics, leading to the robot inferring the wrong goal (Reddy et al., 2014; Chan et al., 2021).
Recent work in reward learning attempts to go beyond noisy rationality and consider more accurate models of human behavior, by for instance looking at biases as variations on the Bellman update (Chan et al., 2021), modeling the human’s false beliefs (Reddy et al., 2018), or learning their suboptimal perception process (Reddy et al., 2020).
And while we might be getting closer, we will realistically never have a perfect model of human behavior.
This raises an obvious question: Does the human model need to be perfect in order for reward inference to be successful?
On the one hand, if small errors in the model can lead to catastrophic error in inference, the entire framework of reward learning seems ill-fated, especially as it applies to value alignment: we will never have perfect models, and we will therefore never have guarantees that the agent does not do something catastrophically bad with respect to what people actually value.
On the other hand, if we can show that as our models improve, we have a guarantee that reward accuracy also improves, then there is hope: though modeling human behavior is difﬁcult, we know that improving such models will make AI agents more aligned with us.
The main goal of this work is to study whether we can bound the reward inference error by some function of the distance between the assumed and true human model (for some reasonable deﬁnition of distance).
We study this question both theoretically and empirically.
Our ﬁrst result is a negative answer: we show that given a ﬁnite dataset of demonstrations, it is possible to hypothesize a true human model, under which the dataset is most likely to be generated, that is "close" to the assumed model, but results in arbitrarily large error in the reward we would infer via maximum likelihood estimation (MLE).
However, we argue that though this negative scenario can arise, it is unlikely to occur in practice.
This is because the result relies on an adversarial construction of the human model, and though the dataset is most likely, it is not necessarily representative of datasets sampled by the model.
Given this, our main result is thus a reason for hope: we identify mild assumptions on the true human behavior, under which we can actually bound the reward inference error linearly by the error of the human model.
Thus, if these assumptions hold, reﬁning the human model will monotonically improve the accuracy of the learned reward.
We also show how this bound simpliﬁes for particular biases like false internal dynamics or myopia.
Empirically, we also show a similar, optimistic message about reward learning, using both diagnostic gridworld domains (Fu et al., 2019b), as well as the Lunar Lander game, which involves continuous control over a continuous state space.
First, we verify that under various simulated biases, when the conditions on the human model are likely to be satisﬁed, small divergences in human models do not lead to large reward errors.
Second, using real human demonstration data, we derive a natural human bias and demonstrate that the same ﬁnding holds even with real humans.
Overall, our results suggest an optimistic perspective on the framework of reward learning, and that efforts in improving human models will further enhance the quality of the inferred rewards.
R ELATED W ORK
Inverse reinforcement learning (IRL) aims to use expert demonstrations, often from a human, to infer a reward function (Ng & Russel, 2000; Ziebart et al., 2008).
Maximum-entropy (MaxEnt) IRL is a popular IRL framework that models the demonstrator as noisily optimal, maximizing reward while also randomising actions as much as possible (Ziebart et al., 2008; 2010).
This is equivalent to modeling humans as Boltzmann rational.
MaxEnt IRL is preferred in practice over Bayesian IRL (Ramachandran & Amir, 2007), which learns a posterior over reward functions rather than a point estimate, due to better scaling in high-dimensional environments (Wulfmeier et al., 2015).
More recently, Guided Cost Learning (Finn et al., 2016) and Adversarial IRL (Fu et al., 2018) learn reward functions more robust to environment changes, but build off similar modeling assumptions as MaxEnt
IRL.
Gleave & Toyer (2022) connected MaxEnt IRL to maximum likelihood estimation (MLE), which is the framework that we consider in this work.
One of the challenges with IRL is that rewards are not always uniquely identiﬁed from expert demonstrations (Cao et al., 2021;
Kim et al., 2021).
Since identiﬁability is orthogonal to the main message of our work–sensitivity to misspeciﬁed human models–we assume that the dataset avoids this ambiguity.
Recent IRL algorithms attempt to account for possible irrationalities in the expert (Evans et al., 2016;
Reddy et al., 2018; Shah et al., 2019).
Reddy et al.
(2018; 2020) consider when experts behave according to an internal physical and belief dynamics, and show that explicitly learning these dynamics improves accuracy of the learned reward.
Singh et al.
(2018) account for human risk sensitivity when learning the reward.
Shah et al.
(2019) propose learning general biases using demonstrations across similar tasks, but conclude that doing so without prior knowledge is difﬁcult.
Finally, Chan et al.
(2021) show that knowing the type of irrationality the expert exhibits can improve reward inference over even an optimal expert.
In this work, we do not assume the bias can be uncovered, but rather analyze how sensitive reward inference is to such biases.
More generally, reward learning is a speciﬁc instantiation of an inverse problem, which is well-studied in existing literature.
In the framework of Bayesian inverse problems, prior work has analyzed how misspeciﬁed likelihood models affect the accuracy of the inferred quantity when performing Bayesian inference.
Owhadi et al.
(2015) showed that two similar models can lead to completely opposite inference of the desired quantity.
Meanwhile, Sprungk (2020) showed inference is stable under a different measure of distance between models.
In this work, we also derive both instability and stability results, but consider the different problem of reward learning using MLE.
P ROBLEM S ETUP
Reward parameters.
We consider Markov decision processes (MDP), which are deﬁned by a tuple ( S , A , P, r, γ ) .
Here, S , A represent state and action spaces, P ( s (cid:48) | s, a ) and r ( s, a ) represent the dynamics and reward function, and γ ∈ (0 , 1) represents the discount factor.
In this work, we are interested in the setting where the reward function r is unknown and needs to be inferred by a learner.
We assume rewards are bounded | r ( s, a ) | ≤ R max .
We assume that the reward can be parameterized by reward function parameters θ ∈ Θ .
We denote by r ( · ; θ ) the reward function with θ as parameters.
True vs. assumed human policy.
Instead of having access to the reward, we observe the behavior of an “expert" demonstrator.
Let π ∗ : Θ × S → ∆( A ) be the reward-conditioned demonstrator policy , and
D = { ( s t , a t ) } nt =1 be a dataset of demonstrations provided to the learner, sampled from π ∗ .
We use ( s, a ) ∼ w π to denote observations generated by policy π , where w π denotes the discounted stationary distribution.
We shorthand w π ∗ as w ∗ .
Finally, let (cid:101) π : Θ × S → ∆( A ) be the model that the learner assumes generated the dataset.
In practice, (cid:101) π is often the Boltzmann rational policy (Ziebart et al., 2008), while π ∗ is an irrational policy based on human biases.
Reward inference using the assumed policy.
Many popular algorithms in inverse reinforcement learning (IRL) (Ziebart et al., 2008; 2010) infer the reward function parameters via maximumlikelihood estimation (MLE).
This is because unlike Bayesian IRL methods that learn a posterior over rewards, such MLE methods are shown to scale to high-dimensional environments (Wulfmeier et al., 2015).
Using a dataset D , the learner would estimate parameters
[Equation]
Let θ ∗ be the true reward function parameters.
Though θ ∗ cannot always be uniquely determined (Cao et al., 2021;
Kim et al., 2021), for simplicity of analysis, we assume that θ ∗ is identiﬁable:
Assumption 1.
There exists a unique θ ∗ satisfying θ ∗
[Equation]
[Equation]
∗
[Equation]
Though Assumption 1 is rather strong, we make it only because we view identiﬁability as orthogonal to the subject of our work – sensitivity to misspeciﬁed models.
Goal: effect of error in the model on the error in the inferred reward.
The goal of our paper is to answer whether we can bound the distance between the inferred reward and the true reward, d θ ( θ ∗ , (cid:101) θ ) , as a function of the distance between the assumed human model and the true human policy, d π ( π ∗ , (cid:101) π ) , for some useful notions of distance.
If so, then we know that more accurate policies will monotonically improve the ﬁdelity of the learned rewards.
We discuss our choice of distances below.
Reward inference error.
The inferred reward is typically used to optimize a policy in a test environment, and ultimately evaluated using the policy’s performance in the new environment (Ng &
Russel, 2000; Ziebart et al., 2008).
However, the reason we infer reward (instead of simply cloning the human policy) is because we do not necessarily know the test environment – having the reward means we can optimize it in environments with different dynamics or initial state distributions.
And unfortunately, adversarial environments exist whose dynamics amplify small disagreements between the learned and true reward functions.
Hence, without prior knowledge about the test environment, we cannot derive any bound on a performance-based distance metric.
We thus focus on analysis directly on a distance between the rewards themselves, via their parameters,
[Equation]
We choose squared distance as a natural and general distance metric, but admit that rewards may not be smooth in their parameters.
As future work, we can improve our work using more robust measures of reward similarity (Gleave et al., 2021).
Human model error.
Since policies are probability distributions, we can measure error in the human model as the KL-divergence between the model and demonstrator policies.
We consider two different instatiations of policy divergence.
The ﬁrst is a worst-case policy divergence that takes the supremum over all reward parameters and states:
[Equation]
We use the forward direction of KL-divergence because it contains an expectation over the demonstrator policy, which aligns with the sampling distribution of the dataset.
Having a small model error thus entails having a small error on all possible states.
This is thus a strong metric for a lower bound, which would say that even if one single state in one of the rewards is off by a little bit, the inferred reward can be off.
It is not, however, a strong metric for an upper bound: when used in an upper bound, it would allow the model to be wrong on all states and all rewards without paying any more penalty than a model that is only wrong on one state and one reward.
We thus also consider an average error that makes for a stronger upper bound – it considers the model only on the true reward parameters θ ∗ and takes an expectation over states .
We term this the weighted policy divergence :
[Equation]
The weighted policy divergence only looks at the states visited under the true human behavioral policy π ∗ as compared to the worst case divergence, which compares against all states and rewards.
T HE B AD N EWS : I NSTABILITY R ESULTS
We begin our theoretical analysis with a negative result.
We prove that even under the worst-case policy divergence from eq.
(2), a small difference between the model and the true human policy d wc π ( π ∗ , (cid:101) π ) < ε can lead to a large inference error d θ ( θ ∗ , (cid:101) θ ) .
Since a trivial way for this to happen is to get “unlucky" with the data set D drawn from π ∗ , and contain actions that are unlikely even if π ∗ = (cid:101) π , we strengthen the result by excluding tail events and imposing the strong requirement that D contains the most likely actions under the demonstrator policy and the true reward:
Deﬁnition 1.
A policy π “likely generates" D if for every ( s t , a t ) ∈ D , the observed action is the most likely one under the true reward, i.e. , a t = arg max π ( a t | s t ; θ ∗ ) .
This means that actions that appear in D are always at the modes of the policy π ∗ .
Our theorem shows that despite the two policies being close on each state and reward pair, under the stronger notion of worst-case policy divergence, the inference procedure can lead to large errors.
Theorem 2.
For any MDP M with continuous actions, policy error ε > 0 , assumed model (cid:101) π , and dataset D , there exists a demonstrator policy π ∗ that likely generates D such that the worst-case policy divergence satisﬁes d wc π ( π ∗ , (cid:101) π ) < ε , but the reward inference error satisﬁes
[Equation]
The theorem shows that for any continuous-action MDP, and any observed dataset D , even a small perturbation in the assumed human model can lead to large inference error.
We are able to prove such a strong result by perturbing the policy π ∗ on only the observed state-action pairs in the dataset.
We defer the proof of the theorem to Appendix C, and provide an illustrative example in Appendix A.
Though the theorem presents a pessimistic worse-case scenario, there are aspects of the proof of it that make it impractical and potentially unlikely to occur in practice.
First, the construction of π ∗ is adversarial, by biasing the demonstrator at exactly the actions in the dataset.
Second, though
Deﬁnition 1 means the dataset is most likely to be generated by the demonstrator, it may contain actions that are not representative of what they would take.
Since actions are continuous, this means that actions that are similar to the observed one (via some distance metric) are in fact very unlikely.
T HE G OOD N EWS : A S TABILITY R ESULT
Theorem 2 paints a pessimistic picture on the feasibility of reward inference from human demonstrations, but as discussed towards the end of Section 4, the mechanisms used to derive Theoremmay be impractical and unlikely to occur.
In this section, we show that under reasonable assumptions on the true policy we can indeed obtain a positive stability result wherein we can upper bound the reward inference error by a linear function of the weighted policy error.
We identify the following assumption that enables such a result:
Assumption 2.
The true and model policies π ∗ , (cid:101) π are strongly log-concave with respect to reward parameters θ ∈ Θ .
Formally, there exists constant c > 0 such that for any s ∈ S , a ∈ A , π ∗ satisﬁes
[Equation]
and analogously for (cid:101) π .
The adversarial construction of demonstrator policy π ∗ in deriving Theorem 2 violate the above log-concavity assumption as they involve drastic perturbations of the probabilities of just the observed actions, creating policies that are not smooth in their parameters.
Intuition.
We know that log-concavity is violated by unnatural, adversarial constructions, but, we aim to answer: does log-concavity always hold outside of such contrived examples?
Intuitively, we notice that log-concavity holds only if, as the reward parameter increases, an action that has become less preferred cannot become more preferred in the future.
This appears to be a natural property of many policies.
For example, if someone already prefers chocolate over vanilla, increasing the reward of chocolate will never cause the person to prefer vanilla over chocolate.
However, it turns out there are simple problems where this is violated.
In Appendix B, we present a simple navigation example where Assumption 2 is violated.
Though counter examples exist, we show in our experiments that many natural biases still result in human models that satisfy Assumption 2.
Under Assumption 2, we can show that the reward inference error can be bounded linearly by weighted policy divergence.
We state the formal result below, and defer its proof to Appendix C.
Theorem 3.
Under Assumption 2 with parameter c > 0 , for any policies π ∗ , (cid:101) π with corresponding
MLE reward parameters (cid:101) θ, θ ∗ , the reward inference error d θ ( θ ∗ , (cid:101) θ ) is bounded as
[Equation]
Theorem 3 differs from Theorem 2 in two important ways: (1) the reward inference error is in expectation over sampled datasets, and (2) the policy divergence is the weighted policy divergence.
Both these properties are desirable, as we are agnostic to tail events due to randomness in dataset sampling, and as discussed in Section 3, we use the smaller of the two notions of divergence in the upper bound.
5. I NSTANTIATING THE UPPER BOUND FOR SPECIFIC BIASES
Theorem 3 shows that the reward inference error can be bounded by the weighted policy divergence between the assumed and true policies.
To understand the result in more detail, we now consider different systematic biases that could appear in human behavior, and show how they affect the weighted policy divergence and thus the upper bound.
Without loss of generality, we parameterize both the true and assumed policies as acting noisily optimal with respect to their own “Q-functions”, i.e. , π ∗ ( a | s ; θ ) ∝ exp( Q ∗ ( s, a ; θ )) and (cid:101) π ( a | s ; θ ) ∝ exp( (cid:101) Q ( s, a ; θ )) .
Importantly, note that even though this parameterization is used in MaxEnt
IRL with the soft Q-values (Ziebart et al., 2008; 2010), neither Q ∗ nor (cid:101) Q need necessarily be optimal – in this analysis, we will use (cid:101) Q , the human model, as the soft Q-value function, and show what happens when the true model coming from Q ∗ suffers from certain biases.
Following prior work (Reddy et al., 2018; Chan et al., 2021), we examine biases that can be modelled as deviations from the Bellman update.
For a tabular MDP M with |S| , |A| < ∞ , the soft Bellman update satisﬁes:
[Equation]
Formally, we study examples under which the human demonstrator’s Q-values Q ∗ ( s, a ; θ ) satisfy (4) but under a biased MDP M ∗ .
We consider two speciﬁc sources of bias in the MDP: (1) the transition model P and (2) the discounting factor γ .
By parameterizing the biases in this way, we now have an intuitive notion of the degree of bias, and can study how the magnitude of the bias affects the policy divergence in (3).
For brevity, we simply state the results as corollaries and defer proofs to
Appendix C.
Internal dynamics.
We ﬁrst consider irrationalities that result from human demonstrators having an internal dynamics model P ∗ that is misspeciﬁed.
For example, studies in cognitive science have shown that humans tend to underestimate the effects of inertia in projectile motion (Caramazza et al., 1981).
Similar studies have also shown that humans overestimate their control over randomness in the environment (Thompson, 1999), dubbed illusion of control .
The latter irrationality can be formalized in our parameterization by assuming that P ∗ ( · | s, a ) ∝ ( P ( · | s, a )) n , where as n → ∞ , the human will believe the dynamics of the MDP are increasingly more deterministic.
In Corollary 4, we show that the policy distance can be bounded linearly by the bias in transition dynamics:
Corollary 4.
Let ∆ P = sup s,a (cid:107) P ∗ ( · | s, a ) − (cid:101) P ( · | s, a ) (cid:107) 1 .
Also, let π ∗ , (cid:101)
π be the policies that result from from value iteration using (4) with dynamics models P ∗ , (cid:101) P , respectively.
Then, their weighted policy divergence is bounded as
[Equation]
Myopia Bias.
The other irrationality we study is when humans overvalue near-term rewards, dubbed myopia (Grüne-Yanoff, 2015).
Such bias can be captured in our parameterization through a biased discount factor γ ∗ , where as γ ∗ → 0 , the human will act more greedily and prioritize immediate reward.
In Corollary 5, we bound the distance between policies by the absolute difference in their internal discount factor.
Corollary 5.
Let π ∗ , (cid:101) π be the policies that result from value iteration using (4) with discount factors γ ∗ , (cid:101) γ , respectively.
Then, their weighted policy divergence is bounded as
[Equation]
The above result shows that the degree of bias linearly upper-bounds the weighted policy divergence and hence, from Theorem 3, the expected reward inference error.
E MPIRICAL A NALYSIS
Our theoretical results predict that in the worst-case, reward inference error can be arbitrarily bad relative to the human model error, but on average, under some assumptions, the reward error should be small.
Our empirical results aim to complement our theory by answering the following question under natural biases in human models in various environments: do we ﬁnd a stable relationship between policy divergence and reward error?
We tackle this in three ways: (1) simulating the speciﬁc biases we analyzed in Section 5.1, (2) simulating a non-Bellman-update structured kind of bias (a demonstrator that is still learning about the environment), and (3) collecting real human data .
We consider both tabular navigation tasks on gridworld, as well as more challenging continuous control tasks on the Lunar Lander game (Brockman et al., 2016b).
Experiment design.
Each experiment has a bias we study and an environment (gridworld or
LunarLander).
When considering simulated biases, we manipulate π ∗ by manipulating the magnitude of the bias starting at π ∗ = (cid:101)
π the Boltzmann optimal policy.
This helps us simulate different hypothetical humans, and see what degree of deviation from optimality ends up negatively impacting reward inference.
When modeling bias with real human data, we instead ﬁx π ∗ as the real human policy, and manipulate (cid:101) π by interpolating between the Boltzmann optimal policy and the real human policy – this emulates a practical process where human models get increasingly more accurate.
6. T ABULAR EXPERIMENTS WITH STRUCTURED BIASES
First, we consider tabular navigation in gridworld domains (Fu et al., 2019a), where the task is the reach the goal state and earn a reward of θ > 1 , which is not known to the agent, while avoiding getting trapped at lava states.
To further complicate the task, the agent can also get stuck at “waypoint" states that yield a reward of 1 .
Depending on the environment, it can be better for the agent to stop at the waypoint state, to circumvent taking the longer, more treacherous path to the goal state.
The agent is able to move in either of the four directions, or choose to stay still.
To introduce stochasticity in the transition dynamics, there is a 30% chance that the agent travels in a different direction
[Figure]
[Figure]
c e e rr o r
ABC −0.
0.5 Weighted policy error −0.
R e w a r d i n f e r e n c e e rr o r
ABC than commanded.
We consider three different gridworlds (which we simply call environments A, B, and C) where we vary in the location of the waypoint state (shown in Figure 3).
In each environment, we want to the learn the underlying reward parameter θ from demonstrations; however, the model (cid:101) π is noisily optimal, whereas the demonstrator policy π ∗ is irrational by suffering from false internal dynamics, or myopia.
We model these irrationalities by either modifying the transition matrix or discount factor, respectively, in the soft Bellman update in Equation (4).
Note that the stationary distribution w π for a policy π can be exactly computed; hence, instead of sampling data from π ∗ , we use w ∗ to compute exact quantities (see Appendix D.1 for technical details).
Internal dynamics.
The ﬁrst irrationality we consider is illusion of control, where the demonstrator policy signiﬁcantly underestimates the stochasticity in the environment.
Such biased policies π ∗ are obtained via value iteration on a biased transition matrix P ∗ , where the human wrongly believes the probability p of unintended transitions is smaller than the true value.
As p → 0 , the demonstrator becomes more conﬁdent that they can reach the goal state, and will prefer reaching the goal over the waypoint state, even when the latter is much closer and safely reachable (see Appendix D.1 for visualizations of the biased policies).
In Figure 1, we show the effect of the transition bias (error in p ) on both the weighted policy divergence, and the reward inference error.
The sub-linear trend in Figure 1a agrees with Corollary 4.
Figure 1b and c show a sub-linear dependence of the reward inference error on the policy divergence, as predicted by Theorem 3.
For environment A, the reward error goes up most quickly with the dynamics error, but so does the weighted policy divergence, making this divergence a better indicator of reward error than simply the dynamics error.
Myopia.
The next irrationality we look at is myopia, where the demonstrator policy assumes a biased discounting factor γ ∗ that underestimates the true one.
As γ ∗ → 0 , the biased agent will much more strongly prefer the closer waypoint state over the goal state.
In Figure 2, we see analogous results to the internal dynamics bias.
Namely, Figure 2a agrees with Corollary 5, and Figure 2b and c shows a sub-linear correlation between policy and reward error, as predicted by Theorem 3.
6. C ONTINUOUS CONTROL EXPERIMENTS
Next, we consider a more challenging domain of navigation with continuous states and actions.
The exact navigation environment is a modiﬁcation the Lunar Lander game with continuous actions (Brockman et al., 2016a), where the agent receives a reward for landing safely on the landing pad.
The agent is able to take a continuous action in [ − 1 , 1] 2 that encodes the directions it wants to move (left, right, up) via its sign, as well as how much power it wants to use in each direction via its cardinality.
[Figure]
o li c y
[Figure]
[Figure]
i n f e r e n c e e rr o r
ABC
In constrast to the classic version of the game where the landing pad is always in the middle, we vary its location.
The unknown reward parameter θ ∈ (0 , 1) is the location of the landing pad (as a horizontal displacement normalized by the total width of the environment).
We consider three different environments that differ in the location of the landing pad (see Figure 6).
In each environment, the human model (cid:101) π is the near-optimal one obtained by soft actor-critic (Haarnoja et al., 2018).
We provide details on the training procedure in Appendix D.2.
In these experiments, we simulate the internal dynamics bias as well as a new one based on the notion of a demonstrator that is still themselves learning.
Internal dynamics.
We ﬁrst study of the effect of demonstrator policies with biased dynamics models.
We bias the dynamics model by varying a parameter p that describes how much one unit of power will increase acceleration in the corresponding direction.
This is a plausibly natural human bias as people tend to underestimate the effects of inertia in projectile motion (Caramazza et al., 1981).
For each false setting of p , we learn a biased policy that is near-optimal for that p .
As p increase, the biased policy tends to underestimate the amount of power required to move the lander enough to the right to reach the landing pad (see Appendix D.2 for visualizations).
In Figure 4, we show the effect of the transition bias (error in p ) on both the weighted policy divergence and the reward inference error.
We see that even in a challenging continuous control domain, Theorem 3 still holds.
Demonstrators that are learning.
We next simulate a bias that might arise from humans that are learning how to do the task (as would be the case, for instance, in our Lunar Lander task).
We do so by varying the amount of training iterations in learning the policy.
The degree of such bias is captured in a parameter ρ ∈ [0 , 1] , that denotes the number of training iterations, normalized by the amount used to learn the near-optimal believed policy.
In Figure 5, we show the effect of ρ on both the weighted policy divergence and the reward inference error.
Reassuringly, we again notice a sub-linear correlation in line with Theorem 3.
6. A NALYSIS OF REAL HUMAN POLICIES
The previous experiments have considered natural but simulated biases to construct demonstrator policies modeling biased humans.
However, it remains to be seen whether
Theorem 3 remains predictive even when biases are from real humans.
We consider the same Lunar Lander game in
Section 6.2 but discretize the action space so that people can intuitively interact in it.
Using this environment, we
[Figure]
t e d p o li c y d
i v
[Figure]
r g e n c
[Figure]
create a demonstrator policy grounded in real human demonstrations.
We do this by collecting trajectories from 10 human demonstrators, then learning a policy that imitates human behavior by running behavior cloning (BC) on the aggregated trajectories.
We visualize trajectories from this policy in Figure 8.
We observe that in general, humans tend to be unable to properly account for the effect of gravity, causing them to crash the lander before it has moved enough horizontally, particularly in environments B and C where the landing pad is horizontally displaced from the middle.
Then, we emulate a process through which the learner’s model of the human, (cid:101) π , would evolve to align more and more with the true human policy.
Speciﬁcally, we vary (cid:101) π to interpolate between nearoptimal and the true human policy, while keeping π ∗ ﬁxed to the latter.
To do so, we vary a parameter α that controls the probability of sampling from the human policy (vs. the near-optimal one).
In
Figure 7, we show the effect of α on the weighted policy divergence and reward inference error, and conclude that larger α result in smaller policy divergence as well as reward error.
Importantly, this suggest that as the model gets closer and closer to the true human policy, the reward estimate gets increasingly better, with no sign that a small model error leads to a terrible reward.
In addition, we also match the simulation experiments by keeping (cid:101) π ﬁxed as the optimal policy, and interpolate between the optimal policy and the real human policy for π ∗ (see Appendix D.3).
This gives us hope that even in real-world problems, better human models (cid:101) π can translate to better reward inference.
D ISCUSSION
Summary.
In this paper, we conduct a theoretical and empirical study of how sensitive reward learning from human demonstrations is to misspeciﬁcation of the human model.
First, we provide an ominous result that arbitrarily small divergences in the assumed human model can result in large reward inference error.
While this is in theory possible, it requires a rather adversarial construction that makes it unlikely to occur in practice.
In light of this, we identify assumptions under which the reward error can actually be upper-bounded linearly by the model error.
Experiments with multiple biases in different environments, as well as an analysis of the true human policy (which potentially suffers from unknown, yet to be characterized suboptimalities)
, reassuringly show remarkably consistent results: over and over again, we see that as the human model and the true human behavior are more and more aligned, the reward error decreases.
Overall, our results convey the optimistic message that reward learning improves as we obtain better human models, and motivate further research into improved models.
Limitations and future work.
Our upper-bound relies on Assumption 2 of log-concavity of the human policy.
However, we hypothesize that weaker assumptions exist from which we can derive similar bounds as Theorem 3.
In addition, via Assumption 1, we ignore ambiguity in reward identiﬁcation.
It may be important in the future to consider reward error and identiﬁability jointly, potentially through equivalence classes of reward functions.
Finally, as alluded to in Section 3, more robust measures of reward similarity exist that avoid needing to implicitly assume smoothness of the reward function in their parameters (Gleave et al., 2021).
Interesting directions of further investigation include: (1) how to better model human biases, or orthogonally, (2) how to modify existing reward inference algorithms to be more robust to misspeciﬁcation.
A negative side-effect of our work could occur when we mistakenly rely on the upper-bound in Theorem 3 when its conditions are not met, i.e. ,
Assumption 2 does not hold, resulting in catastrophically bad inference without knowing it.
More broadly, reward learning in general has the issue that it does not specify whose reward to learn, and how to combine different people’s values.
A E XAMPLE WHERE L OWER -B OUND O CCURS
Let us consider a stochastic bandit with continuous actions A ∈ [0 , 1] .
Since bandits consist of a single, stationary state, we drop dependence on state in all quantities.
The reward for choosing action a ∈ A is r ( a ; θ ) =
a θ (1 − a ) 1 − θ , for some parameter θ ∈ (0 , 1) .
When θ is close to 0 , the reward is higher for actions close to 0 , and vice-versa when θ is close to 1 .
For simplicity, let us only consider a dataset of a single action a 1 .
Let us consider a Boltzmann rational policy as the assumed model, namely (cid:101)
π ( a ; θ ) ∝ exp( r ( a ; θ )) and have the demonstrator policy π ∗ be an adversarial perturbation of (cid:101) π that overestimates the reward of a 1 :
[Equation]
< 0 .exp
[Equation]
)) otherwise , for some δ ∈ (0 , 1) .
The interpretation of this is that the human is believed to be noisily optimal; however, the human actually overestimates the value of an inﬁnitesimal region centered at action a 1 only if θ is close to 0 .
Note that d wc π ( π ∗ , (cid:101) π ) < cδ for some constant c , so we can choose δ such that the two policies are “close" to each other.
When a 1 = 1 , we will infer (cid:101) θ ≈ 1 ; however, θ ∗ ≈ 0 , leading to reward inference error equal to the range of reward parameters.
B E XAMPLE W HERE L OG -C ONCAVITY IS V IOLATED
The environment is a 3 × 3 gridworld with deterministic transitions and discount γ = 1 .
Let s be the center cell, and a be going up.
In Figure 9, we show that a natural policy that chooses “up" according to π ( a | s ; θ ) ∝ exp(max( θ, 10 − θ )) violates log-concavity.
The reason is that “up" is optimal for θ ∈ [0 , 4] ∪ [6 , 10] but not in between.
C P ROOFS C. P ROOF OF T HEOREM
Without loss of generality, let (cid:101) π satisfy (cid:101) π ( a | s ; θ ) =
exp(Φ( s, a ; θ )) /Z
( s ; θ ) .
Note that this parameterization can be used to express any probability distribution.
Also, for any δ > 0 , let us deﬁne
[Equation]
as a union of δ 2 -balls around the actions that appear in dataset D .
Then, for any θ ∗ ∈ Θ , let π ∗ satisfy π ∗ ( a | s ; θ )
= (cid:40) 1 Z (cid:48)
( s ; θ ) (exp(Φ( s, a ; θ )) 1 { a (cid:54)∈ B δ ( D ) } + C 1 { a ∈ B δ ( D ) } ) if θ = θ ∗ , 1 Z ( s ; θ ) exp(Φ( s, a ; θ ))
otherwise , where C is the supremum C
= sup s,a,θ exp(Φ( s, a ; θ )) .
By construction, it is clear that MLE on
D using π ∗ would yield reward parameter θ ∗ .
Since such π ∗ can be constructed for any θ ∗ , we can choose θ ∗ that satisﬁes (cid:107) (cid:101) θ − θ ∗ (cid:107) 22 > sup θ,θ (cid:48) (cid:107) θ − θ (cid:48) (cid:107) 2 / 2 .
What remains is showing that there exists δ such that d wc π ( π ∗ , (cid:101) π ) < ε .
Bounding the worst-case policy divergence.
Note that the worst-case divergence is necessarily satisﬁed at θ ∗ .
Fix any state s ∈ S .
We have,
[Equation]
We consider each term individually.
Starting with the ﬁrst term
[Equation]
we have
[Equation]
where we use that the policies only differ in their normalizers in the ﬁrst inequality
[Equation]
and that log( t ) − log( s ) ≤
[Equation]
| t − s | in the second.
Now, using that
[Equation]
we have
[Equation]
Now
[Equation]
let us consider the second term.
we have
[Equation]
where we reuse the bound for the ﬁrst term
[Equation]
and use that | φ ( s, a ; θ ∗ ) | ≤ log C .
Combining the two bounds yields
[Equation]
Using that | B δ ( D ) | ≤ nδ by construction
[Equation]
we can solve for δ
= O ( ε/n ) such that d wc π ( π ∗ , (cid:101) π ) < ε , as desired.
This completes the proof.
C. P ROOF OF T HEOREM
Recall that L ( θ ; π, D ) is the negative log-likelihood of demonstrations D under policy π and reward parameters θ .
Note that we can write
[Equation]
By the law of large numbers, we have that under expectation over dataset D ,
[Equation]
Using Assumption 2 on π ∗ , for any θ ∈ Θ
[Equation]
we also have
[Equation]
By deﬁnition of θ ∗ and Assumption
[Equation]
we know that ∇ θ L ( θ ∗ ; π ∗ , D ) = 0 .
Substituting θ = (cid:101) θ and rearranging yields
[Equation]
Analogously, using Assumption 2 on (cid:101) π 1 , we have that
[Equation]
Combining the two bounds yields,
[Equation]
Taking an expectation over dataset D yields the desired result
[Equation]
which is the desired result.
C. P ROOF OF C OROLLARY
Recall that (cid:101) π, π ∗ are parameterized by Q-values (cid:101) Q, Q ∗ that satisfy the soft Bellman update in (4).
Fix state s .
We have
[Equation]
For any action a
[Equation]
we have
[Equation]
Now
[Equation]
let us consider the normalization term.
We have log
[Equation] [Equation]
Combining the two bounds and taking an expectation over s yields the desired result.
C. P ROOF OF C OROLLARY
The proof follows the format of the proof for Corollary 4.
Fix state s .
We have
[Equation]
For any action a , we have
[Equation]
Now
[Equation]
let us consider the normalization term.
We have
[Table]
[Equation]
Combining the two bounds yields the desired result.
D E XPERIMENT D ETAILS D. T ABULAR EXPERIMENTS
Environment and training details Recall that the gridworld environments we consider are described by 8 × 4 grids, with a start and goal state, and walls, lava, and exactly one waypoint state placed in between.
We consider a sparse reward where the agent earns a reward of θ = 3 upon reaching the goal state.
Alternatively, if the agent reaches a lava or waypoint state, then its reward is 0 or 1 , respectively, for the rest of the trajectory.
The agent is able to move in either of the four direction (or choose to stay still), and there is a p = 30% chance that the agent travels in a different direction than commanded.
We choose γ ∗ = 0 .
98 high enough that the goal state is preferred over the closer waypoint state under the optimal policy.
A reward-conditioned policy (model or demonstrator) under each environment is given by π ( a | s ; θ ) ∝ exp( Q ( s, a ; θ )) , where Q ( s, a ; θ ) were derived by value iteration using the an MDP model (can be the true underlying MDP or a biased one) of the environment.
During reward inference, we discretize the reward parameter space Θ =
[1 , 4] with resolution 64 .
Because the environment is tabular, instead of sampling demonstrations D from π , we can instead compute w π the discounted stationary distribution.
Speciﬁcally, let ρ be the distribution of the starting state (which in our case, is an indicator vector at the start state of each environment), then w π satisﬁes:
[Equation]
We can use this to solve for the true state visitations w ∗ for any demonstrator policy π ∗ , which can be used to compute the weighted policy divergence as in (3) without explicitly sampling a dataset D of demonstrations.
Visualization of biased policies In Figure 10, we visualize the demonstrator policies π ∗ under the systematic biases considered.
We see that in Figure 10(a), when the demonstrator underestimates the probability of unintended transitions, it heavily prefers the goal state, which has higher reward but is much more dangerous to reach, over the waypoint state Conversely, in Figure 10(b), when the demonstrator underestimates the discount factor, they strongly prefer the waypoint state that yields lower reward but is much closer.
D. C ONTINUOUS CONTROL EXPERIMENTS
Environment and training details Recall that the domain we consider is the Lunar Lander game, where an agent needs to navigate a lander onto the landing pad.
The reward function yields a large
[Figure]
i g h t e d p o li c y d i v e r g e n c e
[Figure]
reward for landing on the pad, and a penalty for crashing or going out of bounds.
The magnitude of the reward depends on the speed and tilt of the lander upon reaching the landing pad.
The physics of the game are deterministic.
The reward parameter θ ∈ [0 , 1] we try to infer is the location of the landing pad (expressed as normalized horizontal displacement).
In this domain
[Figure]
we train a reward-conditioned policy π ( a | s ; θ ) by folding the reward parameter θ into the state representation, which is an 8 -dimensional vector capturing the lander’s current location, velocity
[Figure]
and tilt.
The policy is parameterized as a 3 -layer fully-connected neural network with hidden dimension of 128 , and outputs a squashed Gaussian distribution over actions.
Because the state and action space are continuous, we use soft-actor-critic (SAC) (Haarnoja et al., 2018) with ﬁxed entropy regularization α = 1 .
We train the policy for 600 episodes of length at most 1 , 000 , with a batch size of 264 , until the policy was able to land on the landing pad with a high success rate.
During reward inference, we discretize the reward parameter space Θ =
[0 , 1] with resolution 32 .
We sample datasets D consisting of 10 , 000 observations, and report the mean and standard error of policy and reward error across 10 independent samples of datasets.
Visualization of biased policies In Figure 11, we visualize the demonstrator policies π ∗ under different degrees of internal dynamics bias.
Recall that parameter p describes how much one unit of power will increase acceleration in the left-right directions.
When p is underestimated, the policy will not move right enough to reach the landing pad; in contrast, when p is properly estimated, the policy will reach the landing pad with a high success rate.
D. A DDITIONAL EXPERIMENT WITH HUMAN POLICIES
In line with the experiments with simulated biases, we run an additional experiment similar to the one in Section 6.3, where we instead keep (cid:101) π ﬁxed as the optimal policy, and interpolate between the optimal policy and the real human policy for demonstrator policy π ∗ .
We show the effect of the interpolation proportion on policy divergence and reward inference error in Figure 12.
Again, we notice the consistent message that policy error bounds reward error.