Title: REINFORCEMENT LEARNING WITH PERTURBED REWARDS

Abstract: Recent studies have shown that reinforcement learning (RL) models can be vulnerable in various scenarios, where noises from different sources could appear. For instance, the observed reward channel is often subject to noise in practice (e.g., when observed rewards are collected through sensors), and thus observed rewards may not be credible. Also, in applications such as robotics, a deep reinforcement learning (DRL) algorithm can be manipulated to produce arbitrary errors. In this paper, we consider noisy RL problems where observed rewards by RL agents are generated with a reward confusion matrix. We call such observed rewards as perturbed rewards. We develop an unbiased reward estimator aided robust RL framework that enables RL agents to learn in noisy environments while observing only perturbed rewards. Our framework draws upon approaches for supervised learning with noisy data. The core ideas of our solution include estimating a reward confusion matrix and defining a set of unbiased surrogate rewards. We prove the convergence and sample complexity of our approach. Extensive experiments on different DRL platforms show that policies based on our estimated surrogate reward can achieve higher expected rewards, and converge faster than existing baselines. For instance, the state-of-the-art PPO algorithm is able to obtain 67.5% and 46.7% improvements in average on five Atari games, when the error rates are 10% and 30% respectively.

1. INTRODUCTION:

Designing a suitable reward function plays a critical role in building reinforcement learning models for real-world applications. Ideally, one would want to customize reward functions to achieve application-specific goals (Hadfield-Menell et al., 2017) . In practice, however, it is difficult to design a function that produces credible rewards in the presence of noise. This is because the output from any reward function is subject to multiple kinds of randomness:

• Inherent Noise. For instance, sensors on a robot will be affected by physical conditions such as temperature and lighting, and therefore will report back noisy observed rewards. • Application-Specific Noise. In machine teaching tasks (Thomaz et al., 2006; Loftin et al., 2014) , when an RL agent receives feedback/instructions from people, different human instructors might provide drastically different feedback due to their personal styles and capabilities. This way the RL agent (machine) will obtain reward with bias. • Adversarial Noise. Adversarial perturbation has been widely explored in different learning tasks and shows strong attack power against different machine learning models. For instance, Huang et al. (2017) has shown that by adding adversarial perturbation to each frame of the game, they can mislead RL policies arbitrarily.

Assuming an arbitrary noise model makes solving this noisy RL problem extremely challenging. Instead, we focus on a specific noisy reward model which we call perturbed rewards, where the observed rewards by RL agents are generated according to a reward confusion matrix. This is not a very restrictive setting to start with, even considering that the noise could be adversarial: Given that arbitrary pixel value manipulation attack in RL is not very practical, adversaries in the real-world have high incentives to inject adversarial perturbation to the reward value by slightly modifying it. For instance, adversaries can manipulate sensors via reversing the reward value.

In this paper, we develop an unbiased reward estimator aided robust framework that enables an RL agent to learn in a noisy environment with observing only perturbed rewards. Our solution framework builds on existing reinforcement learning algorithms, including the recently developed DRL ones (Q-Learning (Watkins, 1989; Watkins & Dayan, 1992) , Cross-Entropy Method (CEM) (Szita & Lörincz, 2006) , Deep SARSA (Sutton & Barto, 1998) , Deep Q-Network (DQN) (Mnih et al., 2013; 2015; van Hasselt et al., 2016) , Dueling DQN (DDQN) (Wang et al., 2016) , Deep Deterministic Policy Gradient (DDPG) (Lillicrap et al., 2015) , Continuous DQN (NAF) (Gu et al., 2016) and Proximal Policy Optimization (PPO) (Schulman et al., 2017) algorithms).

The main challenge is that the observed rewards are likely to be biased, and in RL or DRL the accumulated errors could amplify the reward estimation error over time. We do not require any assumption on knowing the true distribution of reward or adversarial strategies, other than the fact that the generation of noises follow an unknown reward confusion matrix. Instead, we address the issue of estimating the reward confusion matrices by proposing an efficient and flexible estimation module. Everitt et al. (2017) provided preliminary studies for the noisy reward problem and gave some general negative results. The authors proved a No Free Lunch theorem, which is, without any assumption about what the reward corruption is, all agents can be misled. Our results do not contradict with the results therein, as we consider a specific noise generation model (that leads to a set of perturbed rewards). We analyze the convergence and sample complexity for the policy trained based on our proposed method using surrogate rewards in RL, using Q-Learning as an example.

We conduct extensive experiments on OpenAI Gym (Brockman et al., 2016) (AirRaid, Alien, Carnival, MsPacman, Pong, Phoenix, Seaquest) and show that the proposed reward robust RL method achieves comparable performance with the policy trained using the true rewards. In some cases, our method even achieves higher cumulative reward -this is surprising to us at first, but we conjecture that the inserted noise together with our noisy-removal unbiased estimator adds another layer of exploration, which proves to be beneficial in some settings. This merits a future study.

Our contributions are summarized as follows: (1) We adapt and generalize the idea of defining a simple but effective unbiased estimator for true rewards using observed and perturbed rewards to the reinforcement learning setting. The proposed estimator helps guarantee the convergence to the optimal policy even when the RL agents only have noisy observations of the rewards. ( 2) We analyze the convergence to the optimal policy and finite sample complexity of our reward robust RL methods, using Q-Learning as the running example.

(3) Extensive experiments on OpenAI Gym show that our proposed algorithms perform robustly even at high noise rates.

1.1. RELATED WORK:

Robust Reinforcement Learning It is known that RL algorithms are vulnerable to noisy environments (Irpan, 2018) . Recent studies (Huang et al., 2017; Kos & Song, 2017; Lin et al., 2017) show that learned RL policies can be easily misled with small perturbations in observations. The presence of noise is very common in real-world environments, especially in robotics-relevant applications. Consequently, robust (adversarial) reinforcement learning (RRL/RARL) algorithms have been widely studied, aiming to train a robust policy which is capable of withstanding perturbed observations (Teh et al., 2017; Pinto et al., 2017; Gu et al., 2018) or transferring to unseen environments (Rajeswaran et al., 2016; Fu et al., 2017) . However, these robust RL algorithms mainly focus on noisy vision observations, instead of the observed rewards. A couple of recent works (Lim et al., 2016; Roy et al., 2017) have also looked into a rather parallel question of training robust RL algorithms with uncertainty in models.

Learning with Noisy Data Learning appropriately with biased data has received quite a bit of attention in recent machine learning studies Natarajan et al. (2013) ; Scott et al. (2013) ; Scott (2015) ; Sukhbaatar & Fergus (2014) ; van Rooyen & Williamson (2015) ; Menon et al. (2015) . The idea of above line of works is to define unbiased surrogate loss function to recover the true loss using the knowledge of the noises. We adapt these approaches to reinforcement learning. Though intuitively the idea should apply in our RL settings, our work is the first one to formally establish this extension both theoretically and empirically. Our quantitative understandings will provide practical insights when implementing reinforcement learning algorithms in noisy environments.

2. PROBLEM FORMULATION AND PRELIMINARIES:

In this section, we define our problem of learning from perturbed rewards in reinforcement learning. Throughout this paper, we will use perturbed reward and noisy reward interchangeably, as each time step of our sequential decision making setting is similar to the "learning with noisy data" setting in supervised learning (Natarajan et al., 2013; Scott et al., 2013; Scott, 2015; Sukhbaatar & Fergus, 2014) . In what follows, we formulate our Markov Decision Process (MDP) problem and the reinforcement learning (RL) problem with perturbed (noisy) rewards.

2.1. REINFORCEMENT LEARNING: THE NOISE-FREE SETTING:

Our RL agent interacts with an unknown environment and attempts to maximize the total of his collected reward. The environment is formalized as a Markov Decision Process (MDP), denoting as M = S, A, R, P, γ . At each time t, the agent in state s t ∈ S takes an action a t ∈ A, which returns a reward r(s t , a t , s t+1 ) ∈ R (which we will also shorthand as r t ), and leads to the next state s t+1 ∈ S according to a transition probability kernel P, which encodes the probability Pa(st, st+1). Commonly P is unknown to the agent. The agent's goal is to learn the optimal policy, a conditional distribution π(a|s) that maximizes the state's value function. The value function calculates the cumulative reward the agent is expected to receive given he would follow the current policy π after observing the current state

s t : V π (s) = Eπ ∞ k=1 γ k r t+k | st = s ,

where 0 ≤ γ ≤ 11 is a discount factor. Intuitively, the agent evaluates how preferable each state is given the current policy. From the Bellman Equation, the optimal value function is given by

V * (s) = maxa∈A s t+1 ∈S Pa(st, st+1) [rt + γV * (st+1)] .

It is a standard practice for RL algorithms to learn a state-action value function, also called the Q-function. Q-function denotes the expected cumulative reward if agent chooses a in the current state and follows π thereafter:

Q π (s, a) = Eπ [r(st, at, st+1) + γV π (st+1) | st = s, at = a] .

2.2. PERTURBED REWARD IN RL:

In many practical settings, our RL agent does not observe the reward feedback perfectly. We consider the following MDP with perturbed reward, denoting as M = S, A, R, C, P, γ 2 : instead of observing r t ∈ R at each time t directly (following his action), our RL agent only observes a perturbed version of r t , denoting as rt ∈ R. For most of our presentations, we focus on the cases where R, R are finite sets; but our results generalize to the continuous reward settings.

The generation of r follows a certain function C : S × R → R. To let our presentation stay focused, we consider the following simple state-independent 3 flipping error rates model: if the rewards are binary (consider r + and r -), r(s t , a t , s t+1 ) (r t ) can be characterized by the following noise rate parameters e + , e -: e+ = P(r(st, at, st+1) = r-|r(st, at, st+1) = r+), e-= P(r(st, at, st+1) = r+|r(st, at, st+1) = r-). When the signal levels are beyond binary, suppose there are M outcomes in total, denoting as

[R 0 , R 1 , • • • , R M -1

]. rt will be generated according to the following confusion matrix C M ×M where each entry c j,k indicates the flipping probability for generating a perturbed outcome: c j,k = P(r t = R k |r t = R j ). Again we'd like to note that we focus on settings with finite reward levels for most of our paper, but we provide discussions in Section 3.1 on how to handle continuous rewards with discretizations.

In the paper, we do not assume knowing the noise rates (i.e., the reward confusion matrices), which is different from the assumption of knowing them as adopted in many supervised learning works Natarajan et al. (2013) . Instead we will estimate the confusion matrices (Section 3.3).

3. LEARNING WITH PERTURBED REWARDS:

In this section, we first introduce an unbiased estimator for binary rewards in our reinforcement learning setting when the error rates are known. This idea is inspired by Natarajan et al. (2013) , but we will extend the method to the multi-outcome, as well as the continuous reward settings.

3.1. UNBIASED ESTIMATOR FOR TRUE REWARD:

With the knowledge of noise rates (reward confusion matrices), we are able to establish an unbiased approximation of the true reward in a similar way as done in Natarajan et al. (2013) . We will call such a constructed unbiased reward as a surrogate reward. To give an intuition, we start with replicating the results for binary reward R = {r -, r + } in our RL setting: Lemma 1. Let r be bounded. Then, if we define, r(st, at, st+1) :=

EQUATION

we have for any r(s t , a t , s t+1 ), E r|r [r(s t , a t , s t+1 )] = r(s t , a t , s t+1 ).

In the standard supervised learning setting, the above property guarantees convergence -as more training data are collected, the empirical surrogate risk converges to its expectation, which is the same as the expectation of the true risk (due to unbiased estimators). This is also the intuition why we would like to replace the reward terms with surrogate rewards in our RL algorithms.

The above idea can be generalized to the multi-outcome setting in a fairly straight-forward way. Define R := [r(r = R 0 ), r(r = R 1 ), ..., r(r = R M -1 )], where r(r = R m ) denotes the value of the surrogate reward when the observed reward is

R k . Let R = [R 0 ; R 1 ; • • • ; R M -1

] be the bounded reward matrix with M values. We have the following results: Lemma 2. Suppose C M ×M is invertible. With defining:

EQUATION

)

we have for any r(s t , a t , s t+1 ), E r|r [r(s t , a t , s t+1 )] = r(s t , a t , s t+1 ).

Continuous reward When the reward signal is continuous, we discretize it into M intervals and view each interval as a reward level, with its value approximated by its middle point. With increasing M , this quantization error can be made arbitrarily small. Our method is then the same as the solution for the multi-outcome setting, except for replacing rewards with discretized ones. Note that the finerdegree quantization we take, the smaller the quantization error -but we would suffer from learning a bigger reward confusion matrix. This is a trade-off question that can be addressed empirically.

So far we have assumed knowing the confusion matrices, but we will address this additional estimation issue in Section 3.3, and present our complete algorithm therein.

3.2. CONVERGENCE AND SAMPLE COMPLEXITY: Q-LEARNING:

We now analyze the convergence and sample complexity of our surrogate reward based RL algorithms (with assuming knowing C), taking Q-Learning as an example.

Convergence guarantee First, the convergence guarantee is stated in the following theorem:

Theorem 1. Given a finite MDP, denoting as M = S, A, R, P, γ , the Q-learning algorithm with surrogate rewards, given by the update rule,

EQUATION

converges w.p.1 to the optimal Q-function as long as t α t = ∞ and t α 2 t < ∞.

Note that the term on the right hand of Eqn. (3) includes surrogate reward r estimated using Eqn. (1) and Eqn. (2). Theorem 1 states that that agents will converge to the optimal policy w.p.1 with replacing the rewards with surrogate rewards, despite of the noises in observing rewards. This result is not surprising -though the surrogate rewards introduce larger variance, we are grateful of their unbiasedness, which grants us the convergence. In other words, the addition of the perturbed reward does not destroy the convergence guarantees of Q-Learning.

Sample complexity:

To establish our sample complexity results, we first introduce a generative model following previous literature (Kearns & Singh, 1998; 2000; Kearns et al., 1999) . This is a practical MDP setting to simplify the analysis. Definition 1. A generative model G(M) for an MDP M is a sampling model which takes a stateaction pair (s t , a t ) as input, and outputs the corresponding reward r(s t , a t ) and the next state s t+1 randomly with the probability of P a (s t , s t+1 ), i.e., s t+1 ∼ P(•|s, a).

Exact value iteration is impractical if the agents follow the generative models above exactly (Kakade, 2003) . Consequently, we introduce a phased Q-Learning which is similar to the ones presented in Kakade ( 2003 The sample complexity of Phased Q-Learning is given as follows:

Theorem 2. (Upper Bound) Let r ∈ [0, R max ] be bounded reward, C be an invertible reward confusion matrix with det(C) denoting its determinant. For an appropriate choice of m, the Phased Q-Learning algorithm calls the generative model

G( M) O |S||A|T 2 (1-γ) 2 det(C) 2 log |S||A|T δ

times in T epochs, and returns a policy such that for all state s ∈ S, |V π (s)

-V * (s)| ≤ , > 0, w.p. ≥ 1 -δ, 0 < δ < 1.

Theorem 2 states that, to guarantee the convergence to the optimal policy, the number of samples needed is no more than O(1/det(C) 2 ) times of the one needed when the RL agent observes true rewards perfectly. This additional constant is the price we pay for the noise presented in our learning environment. When the noise level is high, we expect to see a much higher 1/det(C) 2 ; otherwise when we are in a low-noise regime , Q-Learning can be very efficient with surrogate reward (Kearns & Singh, 2000) . Note that Theorem 2 gives the upper bound in discounted MDP setting; for undiscounted setting (γ = 1), the upper bound is at the order of

O |S||A|T 3 2 det(C) 2 log |S||A|T δ

. Lower bound result is omitted due to the lack of space. The idea of constructing MDP in which learning is difficult and the algorithm must make |S||A|T log 1 δ calls to G( M), is similar to Kakade (2003) .

While the surrogate reward guarantees the unbiasedness, we sacrifice the variance at each of our learning steps, and this in turn delays the convergence (as also evidenced in the sample complexity bound). It can be verified that the variance of surrogate reward is bounded when C is invertible, and it is always higher than the variance of true reward. This is summarized in the following theorem: Theorem 3. Let r ∈ [0, R max ] be bounded reward and confusion matrix C is invertible. Then, the variance of surrogate reward r is bounded as follows:

Var(r) ≤ Var(r) ≤ M 2 det(C) 2 • R 2 max .

To give an intuition of the bound, when we have binary reward, the variance for surrogate reward bounds as follows:

Var(r) ≤ Var(r) ≤ 4R 2 max (1-e+-e-) 2

. As e -+ e + → 1, the variance becomes unbounded and the proposed estimator is no longer effective, nor will it be well-defined. In practice, there is a trade-off question between bias and variance by tuning a linear combination of R and R, i.e., R proxy = ηR + (1 -η) R, and choosing an appropriate η ∈ [0, 1].

3.3. ESTIMATION OF CONFUSION MATRICES:

In Section 3.1 we have assumed the knowledge of reward confusion matrices, in order to compute the surrogate reward. This knowledge is often not available in practice. Estimating these confusion matrices is challenging without knowing any ground truth reward information; but we'd like to note that efficient algorithms have been developed to estimate the confusion matrices in supervised learning settings (Bekker & Goldberger, 2016; Liu & Liu, 2017; Khetan et al., 2017; Hendrycks et al., 2018) . The idea in these algorithms is to dynamically refine the error rates based on aggregated rewards. Note this approach is not different from the inference methods in aggregating crowdsourcing labels, as referred in the literature (Dawid & Skene, 1979; Karger et al., 2011; Liu et al., 2012) . We adapt this idea to our reinforcement learning setting, which is detailed as follows.

At each training step, the RL agent collects the noisy reward and the current state-action pair. Then, for each pair in S × A, the agent predicts the true reward based on accumulated historical observations of reward for the corresponding state-action pair via, e.g., averaging (majority voting). Finally, with the predicted true reward and the accuracy (error rate) for each state-action pair, the estimated reward confusion matrices C are given by

EQUATION

where in above # [•] denotes the number of state-action pair that satisfies the condition [•] in the set of observed rewards R(s, a) (see Algorithm 1 and 3); r(s, a) and r(s, a) denote predicted true rewards (using majority voting) and observed rewards when the state-action pair is (s, a). The above procedure of updating ci,j continues indefinitely as more observation arrives.

Algorithm 1 Reward Robust RL (sketch)

Input: M, α, β, R(s, a) Output: Q(s), π(s, t) Initialize value function Q(s, a) arbitrarily.

while Q is not converged do Initialize state s ∈ S while s is not terminal do Choose a from s using policy derived from Q Take action a, observe s and noisy reward r if collecting enough r for every S × A pair then Get predicted true reward r using majority voting Estimate confusion matrix C based on r and r (Eqn. 4)

Obtain surrogate reward ṙ ( R = (1 -η) • R + η • C -1 R) Update Q using surrogate reward s ← s return Q(s) and π(s)

Our final definition of surrogate reward replaces a known reward confusion C in Eqn. ( 2) with our estimated one C. We denote this estimated surrogate reward as ṙ.

We present (Reward Robust RL) in Algorithm 14 . Note that the algorithm is rather generic, and we can plug in any exisitng RL algorithm into our reward robust one, with only changes in replacing the rewards with our estimated surrogate rewards.

4. EXPERIMENTS:

In this section, reward robust RL is tested in different games, with different noise settings. Due to space limit, more experimental results can be found in Appendix D.

4.1. EXPERIMENTAL SETUP:

Environments and RL Algorithms To fully test the performance under different environments, we evaluate the proposed robust reward RL method on two classic control games (CartPole, Pendulum) and seven Atari 2600 games (AirRaid, Alien, Carnival, MsPacman, Pong, Phoenix, Seaquest), which encompass a large variety of environments, as well as rewards. Specifically, the rewards could be unary (CartPole), binary (most of Atari games), multivariate (Pong) and even continuous (Pendulum). A set of state-of-the-art reinforcement learning algorithms are experimented with while training under different amounts of noise (See Table 3 )5 . For each game and algorithm, three policies are trained based on different random initialization to decrease the variance.

Reward Post-Processing For each game and RL algorithm, we test the performances for learning with true rewards, learning with noisy rewards and learning with surrogate rewards. Both symmetric and asymmetric noise settings with different noise levels are tested. For symmetric noise, the confusion matrices are symmetric. As for asymmetric noise, two types of random noise are tested: 1) rand-one, each reward level can only be perturbed into another reward; 2) rand-all, each reward could be perturbed to any other reward, via adding a random noise matrix. To measure the amount of noise w.r.t confusion matrices, we define the weight of noise ω in Appendix B.2. The larger ω is, the higher the noise rates are.

4.2. ROBUSTNESS EVALUATION:

CartPole The goal in CartPole is to prevent the pole from falling by controlling the cart's direction and velocity. The reward is +1 for every step taken, including the termination step. When the cart or pole deviates too much or the episode length is longer than 200, the episode terminates. Due to the unary reward {+1} in CartPole, a corrupted reward -1 is added as the unexpected error (e -= 0). As a result, the reward space R is extended to {+1, -1}. In Figure 1 , we show that our estimator successfully produces meaningful surrogate rewards that adapt the underlying RL algorithms to the noisy settings, without any assumption of the true distribution of rewards. With the noise rate increasing (from 0.1 to 0.9), the models with noisy rewards converge slower due to larger biases. However, we observe that the models always converge to the best score 200 with the help of surrogate rewards.

In some circumstances (slight noise -see Figure 6a , 6b, 6c, 6d), the surrogate rewards even lead to faster convergence. This points out an interesting observation: learning with surrogate reward even outperforms the case with observing the true reward. We conjecture that the way of adding noise and then removing the bias introduces implicit exploration. This implies that for settings even with true reward, we might consider manually adding noise and then remove it in expectation.

Pendulum:

The goal in Pendulum is to keep a frictionless pendulum standing up. Different from the CartPole setting, the rewards in pendulum are continuous: r ∈ (-16.28, 0.0]. The closer the reward is to zero, the better performance the model achieves. Following our extension (see Section 3.1), the (-17, 0] is firstly discretized into 17 intervals: (-17, -16], (-16, -15], • • • , (-1, 0], with its value approximated using its maximum point. After the quantization step, the surrogate rewards can be estimated using multi-outcome extensions presented in Section 3.1. We experiment two popular algorithms, DDPG (2015) and NAF (2016) in this game. In Figure 2 , both algorithms perform well with surrogate rewards under different amounts of noise. In most cases, the biases were corrected in the long-term, even when the amount of noise is extensive (e.g., ω = 0.7). The quantitative scores on CartPole and Pendulum are given in Table 1 , where the scores are averaged based on the last thirty episodes. The full results (ω > 0.5) can be found in Appendix D.1, so does Table 2 . Our reward robust RL method is able to achieve consistently good scores.

Atari We validate our algorithm on seven Atari 2600 games using the state-of-the-art algorithm PPO (Schulman et al., 2017) . The games are chosen to cover a variety of environments. The rewards in the Atari games are clipped into {-1, 0, 1}. We leave the detailed settings to Appendix B. Figure 3 : Learning curves from PPO on Pong-v4 game with true rewards (r) , noisy rewards (r) and surrogate rewards (η = 1) (r) . The noise rates increase from 0.1 to 0.9, with a step of 0.1.

Results for PPO on Pong-v4 in symmetric noise setting are presented in Figure 3 . Due to limited space, more results on other Atari games and noise settings are given in Appendix D.3. Similar to previous results, our surrogate estimator performs consistently well and helps PPO converge to the optimal policy. Table 2 shows the average scores of PPO on five selected Atari games with different amounts of noise (symmetric & asymmetric). In particular, when the noise rates e + = e -> 0.3, agents with surrogate rewards obtain significant amounts of improvements in average scores. We do not present the results for the case with unknown C because the state-space (image-input) is very large for Atari games, which is difficult to handle with the solution given in Section 3.3.

5. CONCLUSION:

Only an underwhelming amount of reinforcement learning studies have focused on the settings with perturbed and noisy rewards, despite the fact that such noises are common when exploring a realworld scenario, that faces sensor errors or adversarial examples. We adapt the ideas from supervised 

A PROOFS:

Proof of Lemma 1. For simplicity, we shorthand r(s t , a t , s t+1 ), r(s t , a t , s t+1 ), r(s t , a t , s t+1 ) as r, r, r, and let r + , r -, r+ , rdenote the general reward levels and corresponding surrogate ones:

E r|r (r) = P r|r (r = r-)r -+ P r|r (r = r+ )r + .

(5)

When r = r + , from the definition in Lemma 1:

P r|r (r = r-) = e + , P r|r (r = r+ ) = 1 -e + . Taking the definition of surrogate rewards Eqn. (1) into Eqn. (5), we have

E r|r (r) = e + • r-+ (1 -e + ) • r+ = e + • (1 -e + )r --e -r + 1 -e --e + + (1 -e + ) • (1 -e -)r + -e + r - 1 -e --e + = r + .

Similarly, when r = r -, it also verifies E r|r [r(s t , a t , s t+1 )] = r(s t , a t , s t+1 ).

Proof of Lemma 2. The idea of constructing unbiased estimator is easily adapted to multi-outcome reward settings via writing out the conditions for the unbiasedness property (s.t. E r|r [r] = r.). For simplicity, we shorthand r(r = R i ) as Ri in the following proofs. Similar to Lemma 1, we need to solve the following set of functions to obtain r:

         R 0 = c 0,0 • R0 + c 0,1 • R1 + • • • + c 0,M -1 • RM-1 R 1 = c 1,0 • R0 + c 1,1 • R1 + • • • + c 1,M -1 • RM-1 • • • R M -1 = c M -1,0 • R0 + c M -1,1 • R1 + • • • + c M -1,M -1 • RM-1

where Ri denotes the value of the surrogate reward when the observed reward is

R i . Define R := [R 0 ; R 1 ; • • • ; R M -1 ],

and R := [ R0 , R1 , ..., RM-1 ], then the above equations are equivalent to: R = C • R. If the confusion matrix C is invertible, we obtain the surrogate reward:

R = C -1 • R.

According to above definition, for any true reward level R i , i = 0, 1, • • • , M -1, we have

E r|r=Ri [r] = c i,0 • R0 + c i,1 • R1 + • • • + c i,M -1 • RM-1 = R i .

Furthermore, the probabilities for observing surrogate rewards can be written as follows:

P = [p 1 , p2 , • • • , pM ] =   j p j c j,1 , j p j c j,2 , • • • , j p j c j,M   ,

where pi = j p j c j,i , and pi , p i represent the probabilities of occurrence for surrogate reward Ri and true reward R i respectively. Corollary 1. Let pi and p i denote the probabilities of occurrence for surrogate reward r(r = R i ) and true reward R i . Then the surrogate reward satisfies,

EQUATION

Proof of Corollary 1. From Lemma 2, we have,

st∈S P a (s t , s t+1 )r(s t , a, s t+1 ) = st+1∈S;Rj ∈R P a (s t , s t+1 , R j )R j = Rj ∈R st+1∈S P a (s t , s t+1 )R j = Rj ∈R p j R j = j p j R j .

Consequently,

j pj Rj = j k p k c k,j Rj = k p k j c k,j Rj = k p k R k = st∈S P a (s t , s t+1 )r(s t , a, s t+1 ).

To establish Theorem 1, we need an auxiliary result (Lemma 3) from stochastic process approximation, which is widely adopted for the convergence proof for Q-Learning (Jaakkola et al., 1993; Tsitsiklis, 1994) . Lemma 3. The random process {∆ t } taking values in R n and defined as

∆ t+1 (x) = (1 -α t (x))∆ t (x) + α t (x)F t (x)

converges to zero w.p.1 under the following assumptions:

• 0 ≤ α t ≤ 1, t α t (x) = ∞ and t α t (x) 2 < ∞; • ||E [F t (x)|F t ] || W ≤ γ||∆ t ||, with γ < 1; • var [F t (x)|F t ] ≤ C(1 + ||∆ t || 2 W ), for C > 0.

Here

F t = {∆ t , ∆ t-1 , • • • , F t-1 • • • , α t , • • • } stands

for the past at step t, α t (x) is allowed to depend on the past insofar as the above conditions remain valid. The notation || • || W refers to some weighted maximum norm.

Proof of Lemma 3. See previous literature (Jaakkola et al., 1993; Tsitsiklis, 1994) .

Proof of Theorem 1. For simplicity, we abbreviate s t , s t+1 , Q t , Q t+1 , r t , rt and α t as s, s , Q, Q , r, r, and α, respectively.

Subtracting from both sides the quantity Q * (s, a) in Eqn.

(3):

Q (s, a) -Q * (s, a) = (1 -α) (Q(s, a) -Q * (s, a)) + α r + γ max b∈A Q(s , b) -Q * (s, a) . Let ∆ t (s, a) = Q(s, a) -Q * (s, a) and F t (s, a) = r + γ max b∈A Q(s , b) -Q * (s, a). ∆ t+1 (s , a) = (1 -α)∆ t (s, a) + αF t (s, a).

In consequence,

E [F t (x)|F t ] = s ∈S;r∈R P a (s, s , r) r + γ max b∈A Q(s , b) -Q * (s, a) = s ∈S;r∈R P a (s, s , r)r + s ∈S P a (s, s ) γ max b∈A Q(s , b) -r -γ max b∈A Q * (s , b) = s ∈S;r∈R P a (s, s , r)r - s ∈S P a (s, s )r + s ∈S P a (s, s )γ max b∈A Q(s , b) -max b∈A Q * (s , b) = j pj rj - s ∈S P a (s, s )r + s ∈S P a (s, s )γ max b∈A Q(s , b) -max b∈A Q * (s , b) = s ∈S P a (s, s )γ max b∈A Q(s , b) -max b∈A Q * (s , b) (using Eqn. (6)) ≤ γ s ∈S P a (s, s ) max b∈A,s ∈S |Q(s , b) -Q * (s , b)| = γ s ∈S P a (s, s )||Q -Q * || ∞ = γ||Q -Q * || ∞ = γ||∆ t || ∞ .

Finally,

Var [F t (x)|F t ] = E      r + γ max b∈A Q(s , b) - s ∈S;r∈R P (s, s , r) r + γ max b∈A Q(s , b)   2    = Var r + γ max b∈A Q(s , b)|F t .

Because r is bounded, it can be clearly verified that

Var [F t (x)|F t ] ≤ C(1 + ||∆ t || 2 W )

for some constant C. Then, due to the Lemma 3, ∆ t converges to zero w.p.1, i.e., Q (s, a) converges to Q * (s, a).

The procedure of Phased Q-Learning is described as Algorithm 2:

Algorithm 2 Phased Q-Learning

Input: G(M): generative model of M = (S, A, R, P, γ), T : number of iterations.

Output: V (s): value function, π(s, t): policy function.

1: Set VT (s) = 0 2: for t = T -1, • • • , 0 do 1.

Calling G(M) m times for each state-action pair.

Pa (s t , s t+1 ) = #[(s t , a t ) → s t+1 ] m 2. Set V (s) = max a∈A st+1∈S

Pa (s t , s t+1 ) r t + γ V (s t+1 ) π(s, t) = arg max a∈A V (s)

3: return V (s) and π(s, t)

Note that P here is the estimated transition probability, which is different from P in Eqn. (6).

To obtain the sample complexity results, the range of our surrogate reward needs to be known. Assuming reward r is bounded in [0, R max ], Lemma 4 below states that the surrogate reward is also bounded, when the confusion matrices are invertible:

Lemma 4. Let r ∈ [0, R max ] be bounded, where R max is a constant; suppose C M ×M , the confusion matrix, is invertible with its determinant denoting as det(C). Then the surrogate reward satisfies

EQUATION

)

Proof of Lemma 4. From Eqn.

(2), we have,

R = C -1 • R = adj(C) det(C) • R,

where adj(C) is the adjugate matrix of C; det(C) is the determinant of C. It is known from linear algebra that,

adj(C) ij = (-1) i+j • M ji ,

where M ji is the determinant of the (M -1) × (M -1) matrix that results from deleting row j and column i of C. Therefore, M ji is also bounded:

M ji ≤ σ∈Sn |sgn(σ)| m=1 c m,σn ≤ M -1 m=0 M -1 n=0 c m,n = 1 M = 1,

where the sum is computed over all permutations σ of the set {0, 1, • • • , M -2}; c is the element of M ji ; sgn(σ) returns a value that is +1 whenever the reordering given by σ can be achieved by successively interchanging two entries an even number of times, and -1 whenever it can not.

Consequently,

Ri = j |adj(C) ij | • |R j | det(C) ≤ M det(C) • R max .

Proof of Theorem 2. From Hoeffding's inequality, we obtain:

P   st+1∈S P a (s t , s t+1 )V * t+1 (s t+1 ) - st+1∈S Pa (s t , s t+1 )V * t+1 (s t+1 ) ≥   ≤ 2 exp -2m 2 (1 -γ) 2 R 2 max , because V t (s t ) is bounded within Rmax 1-γ .

In the same way, rt is bounded by M det(C) • R max from Lemma 4. We then have,

P     st+1∈S rt∈ R P a (s t , s t+1 , rt )r t - st+1∈S rt∈ R Pa (s t , s t+1 , rt )r t ≥     ≤ 2 exp -2m 2 det(C) 2 M 2 R 2 max .

Further, due to the unbiasedness of surrogate rewards, we have

st+1∈S P a (s t , s t+1 )r t = st+1∈S;rt∈ R P a (s t , s t+1 , rt )r t .

As a result,

V * t (s) -Vt (s) = max a∈A st+1∈S P a (s t , s t+1 ) r t + γV * t+1 (s t+1 ) -max a∈A st+1∈S

Pa (s t , s t+1 ) rt + γV * t+1 (s t+1 )

≤ 1 + γ max a∈A st+1∈S P a (s t , s t+1 )V * t+1 (s t+1 ) - st+1∈S Pa (s t , s t+1 )V * t+1 (s t+1 ) + max a∈A st+1∈S P a (s t , s t+1 )r t - st+1∈S;rt∈ R P a (s t , s t+1 , rt )r t ≤ γ max s∈S V * t+1 (s) -Vt+1 (s) + 1 + γ 2

In the same way,

V t (s) -Vt (s) ≤ γ max s∈S V * t+1 (s) -Vt+1 (s) + 1 + γ 2

Recursing the two equations in two directions (0 → T ), we get

max s∈S V * (s) -V (s) ≤ ( 1 + γ 2 ) + γ( 1 + γ 2 ) + • • • + γ T -1 ( 1 + γ 2 ) = ( 1 + γ 2 )(1 -γ T ) 1 -γ max s∈S V (s) -V (s) ≤ ( 1 + γ 2 )(1 -γ T ) 1 -γ

Combining these two inequalities above we have:

max s∈S |V * (s) -V (s)| ≤ 2 ( 1 + γ 2 )(1 -γ T ) 1 -γ ≤ 2 ( 1 + γ 2 ) 1 -γ . Let 1 = 2 , so max s∈S |V * (s) -V (s)| ≤ as long as 1 = 2 ≤ (1 -γ) 2(1 + γ) .

For arbitrarily small , by choosing m appropriately, there always exists 1 = 2 = (1-γ) 2(1+γ) such that the policy error is bounded within . That is to say, the Phased Q-Learning algorithm can converge to the near optimal policy within finite steps using our proposed surrogate rewards.

Finally, there are |S||A|T transitions under which these conditions must hold, where | • | represent the number of elements in a specific set. Using a union bound, the probability of failure in any condition is smaller than

2|S||A|T • exp -m 2 (1 -γ) 2 2(1 + γ) 2 • min{(1 -γ) 2 , det(C) 2 M 2 } .

We set the error rate less than δ, and m should satisfy that

m = O 1 2 (1 -γ) 2 det(C) 2 log |S||A|T δ .

In consequence, after m|S||A|T calls, which is,

O |S||A|T 2 (1-γ) 2 det(C) 2 log |S||A|T δ

, the value function converges to the optimal one for every state s, with probability greater than 1 -δ.

The above bound is for discounted MDP setting with 0 ≤ γ < 1. For undiscounted setting γ = 1, since the total error (for entire trajectory of T time-steps) has to be bounded by , therefore, the error for each time step has to be bounded by T . Repeating our anayslis, we obtain the following upper bound:

O |S||A|T 3 2 det(C) 2 log |S||A|T δ .

Proof of Theorem 3.

Var(r) -Var(r) = E (r -E[r]) 2 -E (r -E[r]) 2 = E[r 2 ] -E[r] 2 + E[r 2 ] -E[r] 2 = j pj Rj 2 -   j pj Rj   2 -    j p j R j 2 -   j p j R j   2    = j pj Rj 2 - j p j R j 2 = j i p i c i,j Rj 2 - j p j i c j,i Ri 2 = j p j   i c j,i Ri 2 - i c j,i Ri 2   . Using the CauchySchwarz inequality, i c j,i Ri 2 = i √ c j,i 2 • i √ c j,i Ri 2 ≥ i c j,i Ri 2 .

So we get, Var(r) -Var(r) ≥ 0. In addition,

Var(r) = j pj Rj 2 -   j pj Rj   2 ≤ j pj Rj 2 ≤ j pj M 2 det(C) 2 • R 2 max = M 2 det(C) 2 • R 2 max .

B EXPERIMENTAL SETUP:

We set up our experiments within the popular OpenAI baselines (Dhariwal et al., 2017) and kerasrl (Plappert, 2016) framework. Specifically, we integrate the algorithms and interact with OpenAI Gym (Brockman et al., 2016) environments (Table 3 ). A set of state-of-the-art reinforcement learning algorithms are experimented with while training under different amounts of noise, including Q-Learning (Watkins, 1989; Watkins & Dayan, 1992) , Cross-Entropy Method (CEM) (Szita & Lörincz, 2006) , Deep SARSA (Sutton & Barto, 1998) , Deep Q-Network (DQN) (Mnih et al., 2013; 2015; van Hasselt et al., 2016) , Dueling DQN (DDQN) (Wang et al., 2016) , Deep Deterministic Policy Gradient (DDPG) (Lillicrap et al., 2015) , Continuous DQN (NAF) (Gu et al., 2016) and Proximal Policy Optimization (PPO) (Schulman et al., 2017) algorithms. For each game and algorithm, three policies are trained based on different random initialization to decrease the variance in experiments.

B.1 RL ALGORITHMS:



B.2 POST-PROCESSING REWARDS:

We explore both symmetric and asymmetric noise of different noise levels. For symmetric noise, the confusion matrices are symmetric, which means the probabilities of corruption for each reward choice are equivalent. For instance, a confusion matrix

C = 0.8 0.2 0.2 0.8

says that r 1 could be corrupted into r 2 with a probability of 0.2 and so does r 2 (weight = 0.2).

As for asymmetric noise, two types of random noise are tested: 1) rand-one, each reward level can only be perturbed into another reward; 2) rand-all, each reward could be perturbed to any other reward. To measure the amount of noise w.r.t confusion matrices, we define the weight of noise as follows:

C = (1 -ω) • I + ω • N, ω ∈ [0, 1],

where ω controls the weight of noise; I and N denote the identity and noise matrix respectively. Suppose there are M outcomes for true rewards, N writes as:

N = n 0,0 n 0,1 • • • n 0,M -1 • • • • • • • • • • • • n M -1,0 n M -1,1 • • • n M -1,M -1

, where for each row i, 1) rand-one: randomly choose j, s.t n i,j = 1 and n i,k = 0 if k = j; 2) randall: generate M random numbers that sum to 1, i.e., j n i,j = 1. For the simplicity, for symmetric noise, we choose N as an anti-identity matrix. As a result, c i,j = 0, if i = j or i + j = M .

B.3 PERTURBED-REWARD MDP EXAMPLE:

To obtain an intuitive view of the reward perturbation model, where the observed rewards are generated based on a reward confusion matrix, we constructed a simple MDP and evaluated the performance of robust reward Q-Learning (Algorithm 1) on different noise ratios (both symmetric and asymmetric). The finite MDP is formulated as Figure 4a 4 ); 2) robustness of estimation module in time-variant noise (Figure 4b ). As shown in Table 4 , Q-Learning achieved better results consistently with the guidance of surrogate rewards and the confusion matrix estimation algorithm. For time-variant noise, we generated varying amount of noise at different training stages: 1) e -= 0.1, e + = 0.3 (0 to 1e 4 steps); 2) e -= 0.2, e + = 0.1 (1e 4 to 3e 4 steps); 3) e -= 0.3, e + = 0.2 (3e 4 to 5e 4 steps); 4) e -= 0.1, e + = 0.2 (5e 4 to 7e 4 steps). In Figure 4b , we show that Algorithm 1 is robust against time-variant noise, which dynamically adjusts the estimated C after the noise distribution changes. Note that we set a maximum memory size for collected noisy rewards to let the agents only learn with recent observations. Table 4 : Average performance of Q-Learning on Perturbed MDP example (Figure 4a ) with noisy rewards (r), surrogate rewards under known (r) or estimated ( ṙ) noise rates. Note that the success means the agents can find the optimal policy at every initial state according to learned Q-function.

We repeated the experiments 1,000 times to calculate the successful rate for each noisy setting. 

B.4 TRAINING DETAILS:

CartPole and Pendulum The policies use the default network from keras-rl framework. which is a five-layer fully connected network 6 . There are three hidden layers, each of which has 16 units and followed by a rectified nonlinearity. The last output layer is activated by the linear function. For CartPole, We trained the models using Adam optimizer with the learning rate of 1e -3 for 10,000 steps. The exploration strategy is Boltzmann policy. For DQN and Dueling-DQN, the update rate of target model and the memory size are 1e -2 and 50, 000. For Pendulum, We trained DDPG and NAF using Adam optimizer with the learning rate of 5e -4 for 150, 000 steps. the update rate of target model and the memory size are 1e -3 and 100, 000.

Atari Games We adopt the pre-processing steps as well as the network architecture from Mnih et al. (2015) . Specifically, the input to the network is 84×84×4, which is a concatenation of the last 4 frames and converted into 84 × 84 gray-scale. The network comprises three convolutional layers and two fully connected layers7 . The kernel size of three layer are 8 × 8 with stride 4 (32 filters), 4 × 4 with stride 2 (64 filters) and 3 × 3 with stride 1 (64 filters), respectively. Each hidden layer is followed by a rectified nonlinearity. Except for Pong where we train the policies for 3e 7 steps, all the games are trained for 5e 7 steps with the learning rate of 3e -4 . Note that the rewards in the Atari games are discrete and clipped into {-1, 0, 1}. Except for Pong game, in which r = -1 means missing the ball hit by the adversary, the agents in other games attempt to get higher scores in the episode with binary rewards 0 and 1.

C ESTIMATION OF CONFUSION MATRICES C.1 REWARD ROBUST RL ALGORITHMS:

As stated in Section 3.3, the confusion matrix can be estimated dynamically based on the aggregated answers, similar to previous literature in supervised learning (Khetan et al., 2017) . To get a concrete view, we take Q-Learning for an example, and the algorithm is called Reward Robust Q-Learning (Algorithm 3). Note that is can be extended to other RL algorithms by plugging confusion matrix estimation steps and the computed surrogate rewards, as shown in the experiments (Figure 6 ). 

= (1 -η) • R + η • C -1 R Q(s , a) ← (1 -α) • Q(s, a) + α • (r(s, a) + γ • max a Q(s , a )) s ← s return Q(s) and π(s) C.4 VARIANCE REDUCTION IN ESTIMATION

As illustrated in Theorem 3, our surrogate rewards introduce larger variance while conducting unbiased estimation which are likely to decrease the stability of RL algorithms. Apart from the linear combination idea (appropriate trade-off), some variance reduction techniques in statistics (e.g., correlated sampling) can also be applied into our surrogate rewards. Specially, Romoff et al. (2018) proposed to a reward estimator to compensate for stochastic corrupted reward signals. It is worthy to notice that their method is designed for variance reduction under stochastic (zero-mean) noise, which is no longer efficacious in more general perturbed-reward setting. However, it is potential to integrate their method with our robust-reward RL framework because surrogate rewards guarantee unbiasedness in reward expectation.

To verify this idea, we repeated the experiments of Cartpole in Section 4.2 but included variance reduction step for estimated surrogate rewards. Following Romoff et al. (2018) , we adopted sample mean as a simple approximator during the training and set sequence length as 100. As shown in Figure 5 , the models with only variance reduction technique (red lines) suffer from huge biases when the noise is large, and cannot converge to the optimal policies like those under noisy rewards. Nevertheless, they benefits from variance reduction for surrogate rewards (purple lines), which achieve faster convergence or better performance in many cases (e.g., Figure 5a (ω = 0.7), 5b (ω = 0.3)). It is also not surprising that the integrated algorithm (purple lines) outperforms better as the noise rate increases (indicating larger variance from Theorem 3, e.g., ω = 0.9). Similarly, Table 5 provides quantitative results which show that our surrogate benefits from variance reduction techniques ("ours + VRT"), especially when the noise rate is large. and sample-mean estimated surrogate rewards . Note that confusion matrices C are unknown to the agents here. From top to the bottom, the noise rates are 0.1, 0.3, 0.7 and 0.9. Here we repeated each experiment 10 times with different random seeds and plotted 10% to 90% percentile area with its mean highlighted.

C.5 EXPERIMENTAL RESULTS:

To validate the effectiveness of robust reward algorithms (like Algorithm 3), where the noise rates are unknown to the agents, we conduct extensive experiments in CartPole. It is worthwhile to notice that the noisy rates are unknown in the explorations of RL agents. Besides, we discretize the and estimated surrogate rewards ( ṙ) . Note that confusion matrices C are unknown to the agents here. From top to the bottom, the noise rates are 0.1, 0.3, 0.7 and 0.9. Here we repeated each experiment 10 times with different random seeds and plotted 10% to 90% percentile area with its mean highlighted. 

:

γ = 1 indicates an undiscounted MDP setting(Schwartz, 1993;Sobel, 1994;Kakade,

2003).2 The MDP with perturbed reward can equivalently be defined as a tuple M = S, A, R, R, P, γ , with the perturbation function C implicitly defined as the difference between R and R.3 The case of state-dependent perturbed reward is discussed in Appendix C.3

One complete Q-Learning implementation (Algorithm 3) is provided in Appendix C.1.

The detailed settings are accessible in Appendix B.

https://github.com/keras-rl/keras-rl/examples

https://github.com/openai/baselines/tree/master/baselines/common

For the clarity purpose, we remove the learning curves (blue ones in previous figures) with true rewards except for Pong-v4 game.

Figures and Tables:

);Kearns & Singh (1998) for the convenience of proving our sample complexity results. We briefly outline phased Q-Learning as follows -the complete description (Algorithm 2) can be found in Appendix A. Definition 2. Phased Q-Learning algorithm takes m samples per phase by calling generative model G(M). It uses the collected m samples to estimate the transition probability P and update the estimated value function per phase. Calling generative model G( M) means that surrogate rewards are returned and used to update value function per phase.

Figure 1: Learning curves from five RL algorithms on CartPole game with true rewards (r) , noisy rewards (r) and estimated surrogate rewards ( ṙ) (η = 1) . Note that reward confusion matrices C are unknown to the agents here. Full results are in Appendix D.2 (Figure 6).

Figure 2: Learning curves from DDPG and NAF on Pendulum game with true rewards (r) , noisy rewards (r) and surrogate rewards (r) (η = 1) . Both symmetric and asymmetric noise are conduced in the experiments. Full results are in Appendix D.2 (Figure 8).

: when the agent reaches state 5, it gets an instant reward of r + = 1, otherwise a zero reward r -= 0. During the explorations, the rewards are perturbed according to the confusion matrix C 2×2 = [1 -e -, e -; e + , 1 -e + ].

Figure 4: Perturbed-Reward MDP Example

Reward Robust Q-Learning Input: M = (S, A, R, P, γ): MDP with corrupted reward channel T : transition function T : S × A → S N ∈ N: upper bound of collected noisy rewards α ∈ (0, 1): learning rate in the update rule η ∈ (0, 1): weight of unbiased surrogate reward R(s, a): set of observed rewards when the state-action pair is (s, a). Output: Q(s): value function; π(s, t): policy function Initialize Q: S × A → R arbitrarily Set confusion matrix C as zero while Q is not converged do Start in state s ∈ S while s is not terminal do Calculate π according to Q and exploration strategy a ← π(s) s ← T (s, a) Observe noisy reward r(s, a) and add it to R(s, a) if (s,a) | R(s, a)| ≥ N then Get predicted true reward r(s, a) using majority voting in every R(s, a) Estimate confusion matrix C based on r(s, a) and r(s, a) (Eqn. (4)) Empty all the sets of observed rewards R(s, a) Obtain surrogate reward ṙ(s, a) using R proxy

Figure 5: Learning curves from five reward robust RL algorithms (see Algorithm 3) on CartPole game with true rewards (r) , noisy rewards (r) (η = 1) , sample-mean noisy rewards (η = 1) , estimated surrogate rewards ( ṙ)and sample-mean estimated surrogate rewards . Note that confusion matrices C are unknown to the agents here. From top to the bottom, the noise rates are 0.1, 0.3, 0.7 and 0.9. Here we repeated each experiment 10 times with different random seeds and plotted 10% to 90% percentile area with its mean highlighted.

Figure6provides learning curves from five algorithms with different kinds of rewards. The proposed estimation algorithms successfully obtain the approximate confusion matrices, and are robust in the unknown noise environments. From Figure7, we can observe that the estimation of confusion matrices converges very fast. The results are inspiring because we don't assume any additional knowledge about noise or true reward distribution in the implementation.

Figure 6: Complete learning curves from five reward robust RL algorithms (see Algorithm 3) on CartPole game with true rewards (r) , noisy rewards (r) (η = 1)and estimated surrogate rewards ( ṙ) . Note that confusion matrices C are unknown to the agents here. From top to the bottom, the noise rates are 0.1, 0.3, 0.7 and 0.9. Here we repeated each experiment 10 times with different random seeds and plotted 10% to 90% percentile area with its mean highlighted.

Figure 7: Estimation analysis from five reward robust RL algorithms (see Algorithm 3) on CartPole game. The upper figures are the convergence curves of estimated error rates (from 0.1 to 0.9), where the solid and dashed lines are ground truth and estimation, respectively; The lower figures the absolute difference between the estimation and ground truth of confusion matrix C (normalized matrix norm).

Figure 8: Complete learning curves from DDPG and NAF on Pendulum game with true rewards (r) , noisy rewards (r) and surrogate rewards (r) (η = 1) . Both symmetric and asymmetric noise are conduced in the experiments. From top to the the noise rates are 0.1, 0.3, 0.7 and 0.9, respectively. Here we repeated each experiment 6 times with different random seeds and plotted 10% to 90% percentile area with its mean highlighted. D.3 VISUALIZATIONS ON ATARI GAMES 8

Average scores of various RL algorithms on CartPole and Pendulum with noisy rewards (r) and surrogate rewards under known (r) or estimated ( ṙ) noise rates. Note that the results for last two algorithms DDPG (rand-one) & NAF (rand-all) are on Pendulum, but the others are on CartPole.

Table content: <table><tr><td colspan="8">Noise Rate Reward Q-Learn CEM SARSA DQN DDQN DDPG</td><td>NAF</td></tr><tr><td/><td>r</td><td>170.0</td><td>98.1</td><td>165.2</td><td>187.2</td><td>187.8</td><td>-1.03</td><td>-4.48</td></tr><tr><td>ω = 0.1</td><td>r</td><td>165.8</td><td>108.9</td><td>173.6</td><td>200.0</td><td>181.4</td><td>-0.87</td><td>-0.89</td></tr><tr><td/><td>ṙ</td><td>181.9</td><td>99.3</td><td>171.5</td><td>200.0</td><td>185.6</td><td>-0.90</td><td>-1.13</td></tr><tr><td/><td>r</td><td>134.9</td><td>28.8</td><td>144.4</td><td>173.4</td><td>168.6</td><td>-1.23</td><td>-4.52</td></tr><tr><td>ω = 0.3</td><td>r</td><td>149.3</td><td>85.9</td><td>152.4</td><td>175.3</td><td>198.7</td><td>-1.03</td><td>-1.15</td></tr><tr><td/><td>ṙ</td><td>161.1</td><td>82.2</td><td>159.6</td><td>186.7</td><td>200.0</td><td>-1.05</td><td>-1.36</td></tr></table>

Average scores of PPO on five selected games with noisy rewards (r) and surrogate rewards (r). The experiments are repeated three times with different random seeds.Natarajan et al., 2013), and propose a simple but effective RL framework for dealing with noisy rewards. The convergence guarantee and finite sample complexity of Q-Learning (or its variant) with estimated surrogate rewards are given. To validate the effectiveness of our approach, extensive experiments are conducted on OpenAI Gym, showing that surrogate rewards successfully rescue models from misleading rewards even at high noise rates.

Table content: <table><tr><td>Noise Rate</td><td colspan="2">Reward Lift (↑)</td><td>Mean</td><td colspan="5">Alien Carnival Phoenix MsPacman Seaquest</td></tr><tr><td>e -= e + = 0.1</td><td>r r</td><td colspan="3">-67.5%↑ 3423.1 1741.0 2044.2 1814.8</td><td>1239.2 3630.3</td><td>4608.9 7586.3</td><td>1709.1 2547.3</td><td>849.2 1610.6</td></tr><tr><td>e -= 0.1, e + = 0.3</td><td>r r</td><td colspan="2">-20.3%↑ 926.6 770.5</td><td>893.3 973.7</td><td>841.8 955.2</td><td>250.7 643.9</td><td>1151.1 1307.1</td><td>715.7 753.1</td></tr><tr><td>e -= e + = 0.3</td><td>r r</td><td colspan="3">-46.7%↑ 1730.8 1637.7 1180.1 543.1</td><td>919.8 966.1</td><td>2600.3 4171.5</td><td>1109.6 1470.2</td><td>727.8 408.6</td></tr><tr><td colspan="2">learning with noisy examples (</td><td/><td/><td/><td/><td/><td/></tr></table>

RL algorithms utilized in the robustness evaluation.

Table content: <table><tr><td>Environment</td><td>RL Algorithm</td></tr><tr><td/><td>Q-Learning (1989)</td></tr><tr><td/><td>CEM (2006)</td></tr><tr><td>CartPole</td><td>SARSA (1998)</td></tr><tr><td/><td>DQN (2013; 2015)</td></tr><tr><td/><td>DDQN (2016)</td></tr><tr><td>Pendulum</td><td>DDPG (2015) NAF (2016)</td></tr><tr><td>Atari Games</td><td>PPO (2017)</td></tr></table>

Average scores of various RL algorithms on CartPole with sample-mean reward using variance reduction technique (VRT), surrogate rewards (ours) and the combination of them (ours + VRT). Note that the reward confusion matrices are unknown to the agents and the experiments are repeated three times with different random seeds.

Table content: <table><tr><td>Noise Rate</td><td>Reward</td><td colspan="5">Q-Learn CEM SARSA DQN DDQN</td></tr><tr><td/><td>VRT</td><td>173.5</td><td>99.7</td><td>167.3</td><td>181.9</td><td>187.4</td></tr><tr><td>ω = 0.1</td><td>ours ( ṙ)</td><td>181.9</td><td>99.3</td><td>171.5</td><td>200.0</td><td>185.6</td></tr><tr><td/><td>ours + VRT</td><td>184.5</td><td>98.2</td><td>174.2</td><td>199.3</td><td>186.5</td></tr><tr><td/><td/><td>140.4</td><td>43.9</td><td>149.8</td><td>182.7</td><td>177.6</td></tr><tr><td>ω = 0.3</td><td>ours ( ṙ)</td><td>161.1</td><td>81.8</td><td>159.6</td><td>186.7</td><td>200.0</td></tr><tr><td/><td>ours + VRT</td><td>161.6</td><td>82.2</td><td>159.8</td><td>188.4</td><td>198.2</td></tr><tr><td/><td>VRT</td><td>71.1</td><td>16.1</td><td>13.2</td><td>15.6</td><td>14.7</td></tr><tr><td>ω = 0.7</td><td>ours ( ṙ)</td><td>172.1</td><td>83.0</td><td>174.4</td><td>189.3</td><td>191.3</td></tr><tr><td/><td>ours + VRT</td><td>182.3</td><td>79.5</td><td>178.9</td><td>195.9</td><td>194.2</td></tr></table>

Complete average scores of various RL algorithms on CartPole and Pendulum with noisy rewards (r) and surrogate rewards under known (r) or estimated ( ṙ) confusion matrices. Note that the results for last two algorithms DDPG (rand-one) & NAF (rand-all) are on Pendulum, but the others are on CartPole. The experiments are repeated three times with different random seeds.

Table content: <table><tr><td colspan="9">Noise Rate Reward Q-Learn CEM SARSA DQN DDQN DDPG NAF</td></tr><tr><td/><td>r</td><td>170.0</td><td>98.1</td><td>165.2</td><td>187.2</td><td>187.8</td><td>-1.03</td><td>-4.48</td></tr><tr><td>ω = 0.1</td><td>r</td><td>165.8</td><td>108.9</td><td>173.6</td><td>200.0</td><td>181.4</td><td>-0.87</td><td>-0.89</td></tr><tr><td/><td>ṙ</td><td>181.9</td><td>99.3</td><td>171.5</td><td>200.0</td><td>185.6</td><td>-0.90</td><td>-1.13</td></tr><tr><td/><td>r</td><td>134.9</td><td>28.8</td><td>144.4</td><td>173.4</td><td>168.6</td><td>-1.23</td><td>-4.52</td></tr><tr><td>ω = 0.3</td><td>r</td><td>149.3</td><td>85.9</td><td>152.4</td><td>175.3</td><td>198.7</td><td>-1.03</td><td>-1.15</td></tr><tr><td/><td>ṙ</td><td>161.1</td><td>81.8</td><td>159.6</td><td>186.7</td><td>200.0</td><td>-1.05</td><td>-1.36</td></tr><tr><td/><td>r</td><td>56.6</td><td>19.2</td><td>12.6</td><td>17.2</td><td>11.8</td><td>-8.76</td><td>-7.35</td></tr><tr><td>ω = 0.7</td><td>r</td><td>177.6</td><td>87.1</td><td>151.4</td><td>185.8</td><td>195.2</td><td>-1.09</td><td>-2.26</td></tr><tr><td/><td>ṙ</td><td>172.1</td><td>83.0</td><td>174.4</td><td>189.3</td><td>191.3</td><td>-</td><td>-</td></tr></table>

Complete average scores of PPO on five selected Atari games with noisy rewards (r) and surrogate rewards (r). The experiments are repeated three times with different random seeds.

Table content: <table><tr><td>Noise Rate</td><td>Reward</td><td>Lift (↑)</td><td>Mean</td><td colspan="5">Alien Carnival Phoenix MsPacman Seaquest</td></tr><tr><td>e -= e + = 0.1</td><td>r r</td><td colspan="3">-67.5%↑ 3423.1 1741.0 2044.2 1814.8</td><td>1239.2 3630.3</td><td>4608.9 7586.3</td><td>1709.1 2547.3</td><td>849.2 1610.6</td></tr><tr><td>e -= 0.1, e + = 0.3</td><td>r r</td><td>-20.3%↑</td><td>770.5 926.6</td><td>893.3 973.7</td><td>841.8 955.2</td><td>250.7 643.9</td><td>1151.1 1307.1</td><td>715.7 753.1</td></tr><tr><td>e -= e + = 0.3</td><td>r r</td><td colspan="3">-46.7%↑ 1730.8 1637.7 1180.1 543.1</td><td>919.8 966.1</td><td>2600.3 4171.5</td><td>1109.6 1470.2</td><td>727.8 408.6</td></tr><tr><td>e -= e + = 0.7</td><td>r r</td><td colspan="3">-557.3%↑ 1951.0 1799.2 296.8 485.4</td><td>380.3 1045.2</td><td>126.5 4970.4</td><td>491.5 1447.8</td><td>0.0 492.5</td></tr><tr><td>e -= 0.9, e + = 0.7</td><td>r r</td><td colspan="2">-106.9%↑ 791.5 382.6</td><td>410.2 693.5</td><td>67.0 918.1</td><td>174.1 298.9</td><td>620.1 1312.0</td><td>641.7 735.1</td></tr><tr><td>e -= e + = 0.9</td><td>r r</td><td colspan="3">-482.3%↑ 3428.8 1901.3 588.8 540.6</td><td>6.3 4261.7</td><td>1410.8 6758.6</td><td>535.4 2515.1</td><td>588.8 1707.1</td></tr></table>

Peer review (iclr2019):
 ## Summary The authors present work that shows how to deal with noise in reward signals by creating a surrogate reward signal. The work develops a number of results including: showing how the surrogate reward is equal in expectation to the true reward signal, how this doesn*t affect the fixed point of the Bellman equation, how to deal with finite and continuous rewards and how the convergence time is affected for different levels of noise. They demonstrate the value of this approach with a variety of early and state-of-the-art algorithms on a variety of domains,, and the results are consistent with the claims. It would be useful to outline how prior work approached this same problem and also to evaluate the proposed method with existin approaches to the same problem. I realise that this is the first method that estimates the confusion matrix rather than assuming it is known a priori but there are obvious ways around this, e.g. the authors first experiment assumes the confusion matrix is known, so this would be a good place to compare with other competing techniques. Also, the authors have a way of estimating this, so they could plug it into the other algorithms too. I also have some concerns about the clarity and precision of the proofs, although I do not have any reason to doubt the Lemma/Theorem correctness (see below). The weakest part of the approach is in how the true reward is estimated in order to estiamate the confusion matrix. It uses majority vote (which is only really possible in the case of finite rewards with noise sufficiently low that this will be a robust estimate). Perhaps some other approaches could be explore here too. Finally, there is discussion about adversarial noise in rewards at the beginning but I am not sure the theory really addresses it nor the evaluations. Nonetheless, given that I do not know whether the claim of originality is true (in terms of the estimation of the confusion matrix). If it is, then the work is a significant and interesting advance, and is clearly widely applicable in domains with noisy rewards. It would be interesting to see a more tractable approach for continous noise too, but this would probably involve assumptions (smoothness? Gaussianity?), and doesn*t impact the value of this work. ## Detailed notes There is a slight sloppiness in notation in equation (1). This uses .tilde{r} as a subscript of e, but r is +1 or -1 and the error variables are e_+ and e_- (not e_{+1} and e_{-1}). The noise levels in Atari (Figure 3) show something quite interesting which could be commented upon. For noise below 0.5 the surrogate reward works roughly similarly to the noisy reward, but when the noise level goes above this, the surrogate reward clearly exploits the increased information content (similar to a noisy binary channel with over 0.5 noise). This may have implications for adversarial noise. There are also some issues with the proofs which I spotted outlined below: ### Lemma 1 proof The proof of Lemma 1, I think, fails to achieve its objective. The first pair of equations is not a rewrite of equation (1). I believe that the authors intend for this to be a consequence of Equation (1) but do not really demonstrate this clearly. Also, the authors seem to switch between binary rewards -1 and +1 and two levels of reward r- and r+ leading to some confusion. I would suggest the latter throughout as it is more general but involves no more terms. I suggest the following as an outline for the proof. It would help for them to define what they mean by the different rhats (as they currently do) and explain that these values are therefore: rhat- = [(1 - e+) r- - e- r+ ]/(1 - e+ - e-) rhat+ = [(1 - e-) r+ - e+ r-]/(1- e+ - e-) from equation (1). What is left is for them to actually prove the Lemma, namely that the expected value of rhat is: E(rhat ) = p1(rhat=rhat-) rhat- + p(rhat=rhat+) rhat+ = E(r) where the probabilities relate to the surrogate reward taking their respective values. And just stylistically, I would avoid writing "we could obtain" and simply write "we obtain". Lemma 2 achieves this more clearly with greater generality. ### Theorem 1 proof At the end of p13, the proof of the expected value loses track of the chosen action a. I would suggest the authors replace: with then define it. Likewise should be (and also defined). I am also a little uncomfortable with the switch from: in the second to last line of p13, which refers to the maximum Q value associated with some state s*, to in the next line which is the maximum over all states and actions. The equality should probably be an inequality there too. Throughout this the notation could be much better defined, including how to interpret the curly F and how it acts in the conditional part of an expectation and variance. Finally, there is a bit too free a use of the word "easily" here. If it were easy, then the authors could do it more clearly I think. Otherwise, please refer to the appropriate result in the literature.