C AUSAL I NFERENCE Q-N ETWORK : T OWARD R ESILIENT R EINFORCEMENT L EARNING
A BSTRACT
Deep reinforcement learning (DRL) has demonstrated impressive performance in various gaming simulators and real-world applications.
In practice, however, a
DRL agent may receive faulty observation by abrupt interferences such as blackout, frozen-screen and adversarial perturbation.
How to design a resilient DRL algorithm against these rare but mission-critical and safety-crucial scenarios is an important yet challenging task.
In this paper, we consider a generative DRL framework training with an auxiliary task of observational interferences such as artiﬁcial noises.
Under this framework, we discuss the importance of the causal relation and propose a causal inference based DRL algorithm called causal inference Q-network (CIQ).
We evaluate the performance of CIQ in several benchmark
DRL environments with different types of interferences as auxiliary labels.
Our experimental results show that the proposed CIQ method could achieve higher performance and more resilience against observational interferences
I NTRODUCTION
Deep reinforcement learning (DRL) methods have shown enhanced performance, gained widespread applications (Mnih et al., 2015; 2016; Silver et al., 2017), and improved robot learning (Gu et al., 2017) in navigation systems (Tai et al., 2017; Nagabandi et al., 2018).
However, most successful demonstrations of these DRL methods are usually trained and deployed under well-controlled situations.
In contrast, real-world use cases often encounter inevitable observational uncertainty (Grigorescu et al., 2020; Hafner et al., 2018; Moreno et al., 2018) from an external attacker (Huang et al., 2017) or noisy sensor (Fortunato et al., 2018; Lee et al., 2018).
For examples, playing online video games may experience sudden black-outs or frame-skippings due to network instabilities, and driving on the road may encounter temporary blindness when facing the sun.
Such an abrupt interference on the observation could cause serious issues for DRL algorithms.
Unlike other machine learning tasks that involve only a single mission at a time (e.g., image classiﬁcation), an RL agent has to deal with a dynamic (Schmidhuber, 1992) or even learn from latent states with generative models (Schmidhuber, 1991; Jaderberg et al., 2017; Ha & Schmidhuber, 2018; Hafner et al., 2018; Lynch et al., 2020) to anticipate future rewards in complex environments.
Therefore, DRL-based systems are likely to propagate and even enlarge risks (e.g., delay and noisy pulsed-signals on sensor-fusion (Yurtsever et al., 2020; Johansen et al., 2015)) induced from the uncertain interference.
In this paper, we investigate the resilience ability of an RL agent to withstand unforeseen, rare, adversarial and potentially catastrophic interferences, and to recover and adapt by improving itself in reaction to these events.
We consider a resilient generative RL framework with observational interferences as an auxiliary task.
At each time, the agent’s observation is subjected to a type of sudden interference at a predeﬁned possibility.
Whether or not an observation has interfered is referred to as the interference label.
Speciﬁcally, to train a resilient agent, we provide the agent with the interference labels during training.
For instance, the labels could be derived from some uncertain noise generators recording whether the agent observes an intervened state at the moment as a binary causation label.
By applying the labels as an intervention into the environment, the RL agent is asked to learn a binary causation label and embed a latent state into its model.
However, when the trained agent is deployed in the ﬁeld (i.e., the testing phase), the agent only receives the interfered observations but is agnostic to interference labels and needs to act resiliently against the interference.
For an RL agent to be resilient against interference, the agent needs to diagnose observations to make the correct inference about the reward information.
To achieve this, the RL agent has to reason about what leads to desired rewards despite the irrelevant intermittent interference.
To equip an RL agent with this reasoning capability, we exploit the causal inference framework.
Intuitively, a causal inference model for observation interference uses an unobserved confounder (Pearl, 2009; 2019; 1995b;
Saunders et al., 2018; Bareinboim et al., 2015; Zhang et al., 2020b; Khemakhem et al., 2021) to capture the effect of the interference on the rewards (outcomes) collected from the environment.
In recent works, RL is also showing additional beneﬁts incorporating generative causal modeling, such as providing interpretability (Madumal et al., 2020), treatment estimation (Zhang & Bareinboim, 2020), imitation learning (Zhang et al., 2020c), enhanced invariant prediction (Zhang et al., 2020a), and generative model for transfer learning (Killian et al., 2020).
When such a confounder is available, the RL agent can focus on the confounder for relevant reward information and make the best decision.
As illustrated in Figure 1, we propose a causal inference based
DRL algorithm termed causal inference Q-network (CIQ).
During training, when the interference labels are available, the CIQ agent will implicitly learn a causal inference model by embedding the confounder into a latent state.
At the same time, the CIQ agent will also train a Q-network on the latent state for decision making.
Then at testing, the CIQ agent will make use of the learned model to estimate the confounding latent state and the interference label.
The history of latent states is combined into a causal inference state, which captures the relevant information for the Q-network to collect rewards in the environment despite of the observational interference.
[Figure]
In this paper, we evaluate the performance of our method in four environments: 1) Cartpole-v0 – the continuous control environment (Brockman et al., 2016); 2) the 3D graphical Banana Collector (Juliani et al., 2018)); 3) an Atari environment LunarLander-v2 (Brockman et al., 2016), and 4) pixel Cartpole – visual learning from the pixel inputs of Cartpole.
For each of the environments, we consider four types of interference: (a) black-out, (b) Gaussian noise, (c) frozen screen, and (d) adversarial attack.
In the testing phase mimicking the practical scenario that the agent may have interfered observations but is unaware of the true interference labels (i.e., happens or not), the results show that our CIQ method can perform better and more resilience against all the four types of interference.
Furthermore, to benchmark the level of resilience of different RL models, we propose a new robustness measure, called CLEVER-Q, to evaluate the robustness of Q-network based RL algorithms.
The idea is to compute a lower bound on the observation noise level such that the greedy action from the Q-network will remain the same against any noise below the lower bound.
According to this robustness analysis, our CIQ algorithm indeed achieves higher CLEVER-Q scores compared with the baseline methods.
The main contributions of this paper include 1) a framework to evaluate the resilience of DRL methods under abrupt observational interferences; 2) the proposed CIQ architecture and algorithm towards training a resilient DRL agent, and 3) an extreme-value theory based robustness metric (CLEVER-Q) for quantifying the resilience of Q-network based RL algorithms.
R ELATED W ORKS
Causal Inference for Generative Reinforcement Learning: Causal inference (Greenland et al., 1999; Pearl, 2009; Pearl et al., 2016; Pearl, 2019; Robins et al., 1995) has been used to empower the learning process under noisy observation and have better interpretability on deep learning models (Shalit et al., 2017;
Louizos et al., 2017), also with efforts (Jaber et al., 2019; Forney et al., 2017; Bareinboim et al., 2015) on causal online learning and bandit methods.
Deﬁning causation and applying causal inference framework to DRL still remains relatively unexplored.
Recent works (Lu et al., 2018; Tennenholtz et al., 2019) study this problem by deﬁning action as one kind of intervention and estimating the causal effects.
In contrast, we introduce observational inference into generative
DRL by applying extra noisy and uncertain inventions.
Inspired by the treatment switching and representation learning models (Shalit et al., 2017; Louizos et al., 2017; Helwegen et al., 2020), we leverage the causal effect of observational interferences on states, and design an end-to-end structure for learning a causal-observational representation evaluating treatment effects on rewards.
Adversarial Perturbation: An intensifying challenge against deep neural network based systems is adversarial perturbation for making incorrect decisions.
Many gradient-based noise-generating methods (Goodfellow et al., 2015; Huang et al., 2017) have been conducted for misclassiﬁcation and mislead an agent’s output action.
As an example of using DRL model playing Atari games, an adversarial attacker (Lin et al., 2017; Yang et al., 2020c) could jam in a timely and barely detectable noise to maximize the prediction loss of a Q-network and cause massively degraded performance.
Partially Observable Markov Decision Processes (POMDPs): Our resilient RL framework can be viewed as a POMDP with interfered observations.
Belief-state methods are available for simple
POMDP problems (e.g., plan graph and the tiger problem (Kaelbling et al., 1998)), but no provably efﬁcient algorithm is available for general POMDP settings (Papadimitriou & Tsitsiklis, 1987; Gregor et al., 2018).
Recently, Igl et al.
(2018) have proposed a DRL approach for POMDPs by combining variational autoencoder and policy-based learning, but this kind of methods do not consider the interference labels available during training in our resilient RL framework.
R ESILIENT R EINFORCEMENT L EARNING
In this section, we formally introduce our resilient RL framework and provide an extreme-value theory based metric called CLEVER-Q for measuring the robustness of DQN-based methods.
We consider a sequential decision-making problem where an agent interacts with an environment.
At each time t , the agent gets an observation x t , e.g. a frame in a video environment.
As in many RL domains (e.g., Atari games), we view s t = ( x t − M +1 , . . .
, x t ) to be the state of the environment where
M is a ﬁxed number for the history of observations.
Given a stochastic policy π , the agent chooses an action a t ∼ π ( s t ) from a discrete action space based on the observed state and receives a reward r t from the environment.
For a policy π , deﬁne the Q-function Q π ( s, a )
=
E (cid:2) (cid:80) ∞ t =
γ t r t | s
=
s, a 0 = a, π (cid:3) where γ ∈ (0 , 1) is the discount factor.
The agent’s goal is to ﬁnd the optimal policy π ∗ that achieves the optimal Q-function given by Q ∗ ( s, a ) = max π Q π ( s, a ) .
3. R ESILIENCE BASE ON AN I NTERVENTIONAL P ERSPECTIVE
To evaluate the resilience ability of RL agents, we introduce additional interference as auxiliary information (as illustrated in Fig 1 ) as an empirical process (Pearl, 2009; Louizos et al., 2017) for observation.
Given a type of interference I , the agent’s observation becomes:
[Equation]
where i t ∈ { 0 , 1 } is the label indicating whether the observation is interfered at time t or not, and
I ( x t ) is the interfered observation.
We assume that interference labels i t follow an i.i.d.
Bernoulli process with a ﬁxed interference probability p
I as a noise level.
For example, when p I equals to 10%, each observational state has a 10% chance to be intervened under a perturbation.
In this work, we consider the original observations, as illustrated in Figure 2 (a), under four types of interference as described below.
Gaussian Noise.
Gaussian noise or white noise is a common interference to sensory data (Osband et al., 2019; Yurtsever et al., 2020).
The interfered observation becomes I ( x t ) =
x t + n t with a zero-mean Gaussian noise n t .
The noise variance is set to be the variance of all recorded states as illustrated in Figure 2 (b).
Adversarial Observation.
Following the standard adversarial RL attack setting, we use fast gradient sign method (FGSM)
(Szegedy et al., 2014) to generate adversarial patterns against the DQN loss (Huang et al., 2017) as illustrated in Figure S2 (c).
The observation is given by I ( x t )
= x t + (cid:15) sign ( ∇ x t Q ( x t , y ; θ )) where y is the optimal action by weighting over possible actions.
Observation Black-Out.
Off-the-shelf hardware can affect the entire sensor networks as a sensing background (Yurtsever et al., 2020) over-shoot with I ( x t )
=
(Yan et al., 2016).
This perturbation is realistic owing to overheat hardware and losing the observational information of sensors.
Frozen Frame.
Lagging and frozen frame(s) (Kalashnikov et al., 2018) often come from limited data communication bottleneck bandwidth.
A frozen frame is given by I ( x t ) =
x t − 1 .
If the perturbation is constantly present, the frame will remain the ﬁrst frozen frame since the perturbation happened.
[Figure]
perturbation and (c) adversarial perturbation Huang et al.
3. R ESILIENT R EINFORCEMENT L EARNING F RAMEWORK
With observational interference, instead of the actual state s t , the agent only observes s (cid:48) t
= ( x (cid:48)
t − M +1 , . . .
, x (cid:48) t ) .
The agent now needs to choose its actions a t ∼ π
( s (cid:48) t ) based on the interfered observation.
The resilient RL objective for the agent is to ﬁnd a policy π to maximize rewards in this environment under observational interference.
Under the resilient framework, the goal of a Q-learning based agent is to learn the relation between s (cid:48) t and Q t where
Q t ( a ) = max π E (cid:2) (cid:80) ∞ τ = t γ ( τ − t ) r τ | s (cid:48) t , a t = a, π (cid:3) denotes the Q-values given the interfered observation s (cid:48) t at time t .
From the RL model and the observation model of Eq.
(1), the relation among the observation s (cid:48) t ,
Q-values Q t , and interference i t can be described by a causal graphical model (CGM) in Figure 3.
In the CGM, z t = ( s t , i t − M +1 , . . .
, i t ) includes the actual state s t of the system together with the interference labels which casually affects all s (cid:48) t , Q t , and i t .
Note that z t is not observable to the agent due to the interference; z t could be viewed as a hidden confounder in causal inference.
Since only the interfered observation s (cid:48) t is available, the interference label i t is also non-observable in evaluating the resilience ability of an agent.
However, the interference information is often accessible in the training phase, such as the use of a navigation simulator recorded with noisy augmentation (Grigorescu et al., 2020) for simulating interference in the training environment.
We will discuss in the next subsection the beneﬁt of utilizing the interference labels to improve learning efﬁciency.
[Figure]
3. L EARNING WITH I NTERFERENCE L ABELS
The goal of a resilient RL agent is to learn P ( Q t | s (cid:48) t ) to infer the Q-value Q t based on the interfered observation s (cid:48) t .
Note that one can compute P ( Q t | s (cid:48) t ) by determining the joint distribution
P ( z t , s (cid:48) t , i t , Q t ) of all variables in the CGM in Figure 3.
Despite the presence of the hidden variable z t , similar to causal inference with hidden confounders (Louizos et al., 2017), estimating the joint distribution P ( z t , s (cid:48) t , i t , Q t ) could be done efﬁciently when the agent is provided the interference labels i t during training.
On the other hand, if only the observation s (cid:48) t is available, the agent can only directly estimate P ( Q t | s (cid:48) t ) , which is less efﬁcient in terms of training sample usage.
We provide the interference type I and the interference labels i t to efﬁciently train a resilient RL agent as shown in Figure 3(b); however, in the actual testing environment, the agent only has access to the interfered observations x (cid:48) t as in Figure 3(a).
3. C AUSAL I NFERENCE Q-N ETWORK
With the observable variables ( s (cid:48) t , i t , Q t ) in Figure 3(a) during training, we aim to learn a model to infer the Q-values by estimating the joint distribution P ( z t , s (cid:48) t , i t , Q t ) .
Despite the underlying dynamics in the RL system, when we view the interference as a treatment, the CGM in Figure 3(a) resembles some common causal inference models with binary treatment information and hidden confounders (Louizos et al., 2017).
In this kind of causal inference problems, by leveraging on the binary property for treatment information, TARNet (Shalit et al., 2017) and CEVAE (Louizos et al., 2017) introduced a binary switching neural architecture to efﬁciently learn latent models for causal inference.
Inspired by the switching mechanism for causal inference, we propose the causal inference Q-network, referred as CIQ, that maps the interfered observation s (cid:48) t into a latent state z t , makes proper inferences about the interference condition i t , and adjusts its policy based on the estimated interference.
[Figure]
We approximate the latent state by a neural network ˜ z t = f 1 ( x (cid:48) t ; θ 1 ) .
From the latent state, we generate the estimated interference label ˜
i t ∼ p (˜ i t | z t ) =
f I ( z t ; φ ) .
We denote s CIt =
(˜ z t − M +1 , ˜
i t − M +1 , . . . ,
˜ z t , ˜ i t ) to be the causal inference state.
As discussed in the previous sub- section, the causal inference state acts as a confounder between the interference and the reward.
Therefore, instead of using the interfered state s (cid:48) t , the causal inference state s CIt contains more relevant information for the agent to maximize rewards.
Using the causal inference state helps focus on meaningful and informative details even under interference.
With the causal inference state s CIt , the output of the Q-network Q ( s CIt ; θ ) is set to be switched between two neural networks f 2 ( s CIt ; θ 2 ) and f 3 ( s CIt ; θ 3 ) by the interference label.
Such a switching mechanism prevents our network from over-generalizing the causal inference state.
During training, switching between the two neural networks is determined by the training interference label i train t .
We assume that the true interference label is available in the training phase so i train t
= i t .
In the testing, when i t is not available, we use the predicted interference label ˜
i t as the switch to decide which of the two neural networks to use.
All the neural networks f 1 , f 2 , f 3 , f I have two fully connected layers 2 with each layer followed by the ReLU activation except for the last layer in f 2 , f 3 and f I .
The overall CIQ model is shown in
Figure 4 and θ = ( θ 1 , θ 2 , θ 3 , φ ) denotes all its parameters.
Note that, as common practice for discrete action spaces, the Q-network output Q ( s CIt ; θ ) is an A -dimensional vector where A is the size of the action space, and each dimension represents the value for taking the corresponding action.
Finally, we train the CIQ model Q ( s (cid:48)
t ; θ ) end-to-end by the DQN algorithm with an additional loss for predicting the interference label.
The overall CIQ objective function is deﬁned as:
[Equation]
where λ is a scaling constant and is set to 1 for simplicity.
Due to the design of the causal inference state and the switching mechanism, we will show that CIQ can perform resilient behaviors against the observation interferences.
Next, we introduce how to quantify the robustness of a Q-network under noisy observation in next subsection.
The entire CIQ training procedure is described by Algorithmin Appendix.
3. CLEVER-Q: A R OBUSTNESS E VALUATION M ETRIC FOR Q-N ETWORKS
Here we provide a comprehensive score (CLEVER-Q) for evaluating the robustness of a Q-network model by extending the CLEVER robustness score (Weng et al., 2018) designed for classiﬁcation tasks to Q-network based DRL tasks.
Consider an (cid:96) p -norm bounded ( p ≥ 1 ) perturbation δ to the state s t .
We ﬁrst derive a lower bound β L on the minimal perturbation to s t for altering the action with the top Q-value, i.e., the greedy action.
For a given s t and a Q-network, this lower bound β L provides a robustness guarantee that the greedy action at s t will be the same as that of any perturbed state s t + δ , as long as the perturbation level (cid:107) δ (cid:107) p ≤ β L .
Therefore, the larger the value β L is, the more resilience of the Q-network against perturbations can be guaranteed.
Our CLEVER-Q score uses the extreme value theory to evaluate the lower bound β L as a robustness metric for benchmarking different Q-network models.
The proof of Theorem 1. is available in appendix B.1.
Theorem 1.
Consider a Q-network Q ( s, a ) and a state s t .
Let A ∗ =
arg max a Q ( s t , a ) be the set of greedy (best) actions having the highest Q-value at s t according to the Q-network.
Deﬁne g a ( s t ) =
Q ( s t , A ∗ ) − Q ( s t , a ) for every action a , where Q ( s t , A ∗ ) denotes the best Q-value at s t .
Assume g a ( s t ) is locally Lipschitz continuous 3 with its local Lipschitz constant denoted by L aq , where 1 /p + 1 /q = 1 and p ≥ 1 .
For any p ≥ 1 , deﬁne the lower bound
[Equation]
Then for any δ such that (cid:107) δ (cid:107) p ≤ β L , we have arg max a Q ( s t , a ) =
arg max a Q ( s t + δ, a ) .
E XPERIMENTS 4. E NVIRONMENTS FOR DQN S
Our testing platforms were based on (a) OpenAI Gym (Brockman et al., 2016), (b) Unity-3D environments (Juliani et al., 2018), (c) a 2D gaming environment (Brockman et al., 2016), and (d) visual learning from pixel inputs of cart pole.
Our test environments cover some major application scenarios and feature discrete actions for training DQN agents with the CLEVER-Q analysis.
Vector Cartpole: Cartpole (Sutton et al., 1998) is a classical continuous control problem.
The deﬁned environment is manipulated by adding a force of +1 or − 1 to a moving cart.
A pendulum starts upright, and the goal is to balance and prevent it from falling over.
We use Cartpole-v from Gym (Brockman et al., 2016) with a targeted reward = 195 . 0 to solve the environment.
The observational vector-state consist of four physical parameters of cart position and angle velocities.
Banana Collector: The Banana collector shown in Figure 7 (a) is one of the Unity baseline (Juliani et al., 2018)
rendering by 3D engine.
Different from the MuJoCo (Todorov et al., 2012) simulators with continuous actions, the Banana collector is controlled by four discrete actions corresponding to moving directions.
The state-space has 37 dimensions included velocity and a ray-based perception of objects around the agent.
The targeted reward is 12 . 0 points by accessing correct bananas ( +1 ).
Lunar Lander: Similar to the Atari gaming environments, Lunar Lander-v2 (Figure 7 (c)) is a discrete action environment from OpenAI Gym (Brockman et al., 2016).
The state is an eightdimensional vector that records the lander’s position, velocity, angle, and angular velocities.
The episode ﬁnishes if the lander crashes or comes to rest, receiving a reward − 100 or +100 with a targeted reward of 200 .
Firing ejector costs − 0 .
3 each frame with +10 for each ground contact.
Pixel Cartpole:
To further evaluate our models, we conduct experiments from the pixel inputs in the cartpole environment as
4. B ASELINE M ETHODS
In the experiments, we compare our CIQ algorithm with two sets of DRL baselines to demonstrate the resilience capability of the proposed method.
We ensure all the models have the same number of 9.7 millions parameters with careful ﬁne-tuning to avoid model capacity issues.
Pure DQN: We use DQN as a baseline in our experiments.
The DQN agent is trained and tested on interfered state s (cid:48) t .
We also evaluate common DQN improvements in appendix C.1 and ﬁnd the improvements have no signiﬁcant effect against interference.
DQN with an interference classiﬁer (DQN-CF):
In the resilient reinforcement learning framework, the agent is given the true interference label i train t at training.
Therefore, we would like to provide this additional information to the DQN agent for a fair comparison.
During training, the interfered state s (cid:48) t is concatenated with the true label i train t as the input for the DQN agent.
Since the true label is not available at testing, we train an additional binary classiﬁer (CF) for the DQN agent.
The classiﬁer is trained to predict the interference label, and this predicted label will be concatenated with the interfered state as the input for the DQN agent during testing.
DQN with safe actions (DQN-SA): Inspired by shielding-based safe RL (Alshiekh et al., 2018), we consider a DQN baseline with safe actions (SA).
The DQN-SA agent will apply the DQN action if there is no interference.
However, if the current observation is interfered, it will choose the action used for the last uninterfered observation as the safe action.
This action-holding method is also a typical control approach when there are missing observations (Franklin et al., 1998).
Similar to
DQN-CF, a binary classiﬁer for interference is trained to provide predicted labels at testing.
DVRLQ and DVRLQ-CF:
Motivated by deep variational RL (DVRL) (Igl et al., 2018), we provide a version of DVRL as a POMDP baseline.
We call this baseline DVRLQ because we replace the
A2C-loss with the DQN loss.
Similar to DQN-CF, we also consider another baseline of DVRLQ with a classiﬁer, referred to as DVRLQ-CF, for a fair comparison using the interference labels. [Figure] [Table] Rate
CLEVER
[Table]
[Table]
[Table]
[Table]
[Table]
4. R ESILIENT RL ON A VERAGE R ETURNS
We run performance evaluation with six different interference probabilities ( p I in Sec. 3.1), including { 0% , 10% , 20% , 30% , 40% , 50% } .
We train each agent 50 times and highlight its standard deviation with lighter colors.
Each agent is trained until the target score (shown as the dashed black line) is reached or until 400 episodes.
We show the average returns for p I
= 20% under adversarial perturbation and black-out in Figure 5 and report the rest of the results in appendix C.1.
CIQ (green) clearly outperforms all the baselines under all types of interference, validating the effectiveness of our CIQ in learning to infer and gaining resilience against a wide range of observational interferences.
Pure DQN (yellow) cannot handle the interference with 20% noise level.
DQN-CF (orange) and DQN-SA (brown) have competitive performance in some environments against certain interferences, but perform poorly in others.
DVRLQ (blue) and DVRLQ-CF (purple) cannot achieve the target reward in most experiments and this might suggest the inefﬁciency of applying a general
POMDP approach in a framework with a speciﬁc structure of observational interference.
4. R OBUSTNESS M ETRICS BASED ON R ECORDING S TATES
We evaluate the robustness of DQN and CIQ by the proposed CLEVER-Q metric.
To make the test state environment consistent among different types and levels of interference, we record the interfered states, S N =
I ( S C ) , together with their clean states, S C .
We then calculate the average CLEVER-Q for DQN and CIQ based on the clean states S C using Eq.
3 over 50 times experiments for each agent.
We also consider a retrospective robustness metric, the action correction rate (AC-Rate).
Motivated by previous off-policy and error correction studies (Dulac-Arnold et al., 2012; Harutyunyan et al., 2016; Lin et al., 2017), AC-Rate is deﬁned as the action matching rate R Act = 1 T (cid:80) T − 1 t =0 1 { a t = a ∗ t } between a t and a ∗ t over an episode with length T .
Here a t denotes the action taken by the agent with interfered observations S N , and a ∗ t is the action of the agent if clean states S C were observed instead.
The roles of CLEVER-Q and AC-Rate are complementary as robustness metrics.
CLEVER-Q measures sensitivity in terms of the margin (minimum perturbation) required for a given state to change the original action.
AC-rate measures the utility in terms of action consistency.
Altogether, they provide a comprehensive resilience assessment.
Table 1 reports the two robustness metrics for DQN and CIQ under two types of interference.
CIQ attains higher scores than DQN in both CLEVER-Q and AC-Rate, reﬂecting better resilience in CIQ evaluations.
We provide more robustness measurements in appendix B.2 and E.
A DDITIONAL ANALYSIS
We also conduct the following analysis to better understand our CIQ model.
Environments with a dynamic noise level are evaluated.
Due to the space limit, see their details in appendix C to E.
Neural saliency map: We apply the perturbation-based saliency map for DRL (Greydanus et al., 2018) as shown in Figure 6 and appendix E.4 to visualize the saliency centers of CIQ and others.
Treatment effect analysis: We provide treatment effect analysis on each kind of interference to statistically verify the CGM with lowest errors on average treatment effect refutation in appendix D.
Ablation studies: We conduct ablation studies by comparing several CIQ variants, each without certain CIQ component and verify the importance of the proposed CIQ architecture in appendix E.
Test on different noise levels: We train CIQ under one noise level and test on another level, which shows that the difference in noise level does not affect much on the performance in appendix C.6.
Transferability in robustness: Based on CIQ, we study how well can the robustness of different interference types transfer between training and testing environments .
We evaluate two general settings (i) same interference type but different noise levels (appendix C.6) and (ii) different interference types (appendix E.5).
Multiple interference types: We also provide an generalized version of CIQ that deals with multiple interference types at training and testing environments.
The generalized CIQ is equipped with a common encoder and individual interference decoders to study multi-module conditional inference, with some additional discussion in appendix E [Figure] [Figure]
C ONCLUSION
Our experiments suggest that, although some DRL-based algorithms can achieve high scores under the normal condition, their performance can be severely degraded in the presence of interference.
In order to be resilient against interference, we propose CIQ, a novel causal-inference-driven DRL algorithm.
Evaluated on a wide range of environments and multiple types of interferences, the
CIQ results show consistently superior performance over several RL baseline methods.
We also validate the improved resilience of CIQ by CLEVER-Q and AC-Rate metrics.
We will provide CIQ implementations to the community in the future for further studies.
A A PPENDIX I NDEX
Our supplementary sections included:
• B. Proof of the CLEVER-Q Theorem and Additional Robustness Measurements • C. Implementation Details and Additional Results • D. Causal Relation Evaluation and Average Treatment Effects in CIQ Networks • E. Ablation Studies
B P ROOF OF THE CLEVER-Q T HEOREM AND A DDITIONAL R OBUSTNESS M EASUREMENTS B. P ROOF OF THE CLEVER-Q T HEOREM
Here we provide a comprehensive score (CLEVER-Q) for evaluating the robustness of a Q-network model by extending the CLEVER robustness score (Weng et al., 2018) designed for classiﬁcation tasks to Q-network based DRL tasks.
Consider an (cid:96) p -norm bounded ( p ≥ 1 ) perturbation δ to the state s t .
We ﬁrst derive a lower bound β L on the minimal perturbation to s t for altering the action with the top Q-value, i.e., the greedy action.
For a given s t and a Q-network, this lower bound β L provides a robustness guarantee that the greedy action at s t will be the same as that of any perturbed state s t + δ , as long as the perturbation level (cid:107) δ (cid:107) p ≤ β L .
Therefore, the larger the value β L is, the more resilience of the Q-network against perturbations can be guaranteed.
Our CLEVER-Q score uses the extreme value theory to evaluate the lower bound β L as a robustness metric for benchmarking different Q-network models.
Theorem 2.
Consider a Q-network Q ( s, a ) and a state s t .
Let A ∗ =
arg max a Q ( s t , a ) be the set of greedy (best) actions having the highest Q-value at s t according to the Q-network.
Deﬁne g a ( s t ) =
Q ( s t , A ∗ ) − Q ( s t , a ) for every action a , where Q ( s t , A ∗ ) denotes the best Q-value at s t .
Assume g a ( s t ) is locally Lipschitz continuous 4 with its local Lipschitz constant denoted by L aq , where 1 /p + 1 /q = 1 and p ≥ 1 .
Then for any p ≥ 1 , deﬁne the lower bound
[Equation]
Then for any δ such that (cid:107) δ (cid:107) p ≤ β L
[Equation]
Proof.
Because g a ( s t ) is locally Lipschitz continuous, by Holder’s inequality, we have
[Equation]
for any x, y within the R p -ball centered at s t .
Now let x = s t and y =
s t
+ δ , where δ is some perturbation.
Then
[Equation]
Note that if g a ( s t + δ ) ≥ 0 , then A ∗ still remains as the top Q-value action set at state s t + δ .
Moreover, g a ( s t ) − L aq ||
δ || p ≥ 0 implies g a ( s t + δ ) ≥ 0 .
Therefore,
[Equation]
provides a robustness guarantee that ensures Q ( s t + δ, A ∗ ) ≥ Q ( s t + δ, a ) for any δ satisfying Eq.
equation 4.
Finally, to provide a robustness guarantee that Q ( s t + δ, A ∗ ) ≥ Q ( s t + δ, a ) for any action
a / ∈
A ∗ , it sufﬁces to take the minimum value of the bound (for each a ) in Eq.
equation 4 over all actions other than a ∗ , which gives the lower bound
[Equation]
[Table]
For computing β L , while the numerator is easy to obtain, the local Lipschitz constant L aq cannot be directly computed.
In our implementation, by using the fact that L aq is equivalent to the local maximum gradient norm (in (cid:96) q norm), we use the same sampling technique from extreme value theory as proposed in (Weng et al., 2018) for estimating L aq .
B. A DDITIONAL R OBUSTNESS M EASUREMENTS
Following the discussion in Section 4.4 of the main content, we provide more experimental results related to CLEVER-Q measurement and use action correction rate (AC-Rate) mentioned in the main content as a reference.
Table S1.
reports the two robustness metrics for DQN, CIQ, DQN-CF (a DQN joint-training with an interference classiﬁer, denoted as Q-CF), DQN-SA (a DQN joint-training with safe-action replay, denoted as Q-SA), DVRLQ (a deep variational reinforcement learning framework (Igl et al., 2018) with a DQN-loss, denoted as V-Q), and DVRLQ-CF (a V-Q joint-training with an interference classiﬁer, denoted as V-CF) under two types of L n -norm (Weng et al., 2018) interference.
CIQ attains higher scores than DQN in both CLEVER-Q and AC-Rate, reﬂecting better resilience in CIQ evaluations.
The performance of the returns of each agent is shown in Table S2.
We observe that variational auto-encoding methods included V-Q and V-CF attaining a lower CLEVER-Q, Act-Rate, and average returns from Table S1 and S2.
From previous studies (Van Hoof et al., 2016), reasons would be difﬁculties (Van Hasselt et al., 2016) of estimation considering temporal information (Yang et al., 2020a) and the various state is hard to disentangle by a single network from counterfactual learning (Shalit et al., 2017; Louizos et al., 2017).
We also conduct an experiment on a DQN extension of TD-VAE (Gregor et al., 2018), but the performance of this extension becomes even lower in all metrics than the V-CF after carefully ﬁne-tuning.
We also ﬁnd that the DQNs would be a beneﬁt on the performance with a joint-trained interference classiﬁer shown in Table S1 and S [Table] [Table] CF
V-Q
V-CF
P%, I V-Q V-CF
V-Q
V-CF 10% 83.65% 84.32% 0.
[Figure]
C I MPLEMENTATION D ETAILS AND A DDITIONAL R ESULTS
Inputs
Initialize NoisyEnv while score do 4: i t = oracle NoisyEnv t 5: a t = Agent .act
s t , i t ) 6: s t
1 , r t , done
NoisyEnv
Agent learn a t r t s t +1 , i t ) 8: if then 9: score =
Agent evaluate
) 10: end if 11: if done then 12: s t =
NoisyEnv .reset() 13: else 14: s (cid:48) t
= s 15: end if 16: t = t +17: end while 18: Return Agent
C. B ACKGROUND AND T RAINING S ETTING
To scale to high-dimensional problems, one can use a parameterized deep neural network Q ( s, a ; θ ) to approximate the Q-function, and the network Q ( s, a ; θ ) is referred to as the deep Q-network (DQN).
The DQN algorithm Mnih et al. (2015) updates parameter θ according to the loss function:
[Equation]
where the transitions ( s t , a t , r t , s t +1 ) are uniformly sampled from the replay buffer D of previously observed transitions, and y DQN t =
r t + γ max a Q
( s t +1 , a ; θ − ) is the DQN target with θ − being the target network parameter periodically updated by θ .
Double DQN (DDQN) Van Hasselt et al.
(2016) further improves the performance by modifying the target to y DDQN t =
r t + γQ ( s t +1 , arg max a Q ( s t +1 , a ; θ ); θ − ) .
Prioritized replay is another DQN improvement which samples transitions ( s t , a t , r t , s t +1 ) from the replay buffer according to the probabilities p t proportional to their temporal difference (TD) error: p t ∝ | y DDQN t − Q ( s t , a t ; θ )
| α where α is a hyperparameter.
We use Pytorch 1.2 to design both DQN and causal inference Q (CIQ) networks in our experiments.
Our code can be found in the supplementary material.
We use Nvidia GeForce RTX 2080 Ti GPUs with CUDA 10.0 for our experiments.
We use the Quantile Huber loss (Dabney et al., 2018)
L κ for
DQN models with κ = 1 in Sup-Eq. 9, which allows less dramatic changes from Huber loss:
[Equation]
[Equation]
The quantile Huber loss (Dabney et al., 2018) is the asymmetric variant of the Huber loss for quantile τ ∈ [0 , 1] from Sup-Eq. 8:
[Equation]
After the a maximum update step in the temporal loss u in Sup-Eq. 8, we synchronize θ − i with θ i follow the implementation from the OpenAI baseline Dhariwal et al.
(2017) in Sup-Eq 10:
[Equation]

[Equation]

[Equation]
We use the soft-update Fox et al.
(2015) to update the DQN target network as in Sup-Eq 11: θ local =
τ × θ local + (1 − τ ) × θ target , (11) where θ target and θ local represent the two neural networks in DQN and τ is the soft update parameter depending on the task.
For each environment, in additional to the 5 baselines described in Section 4.2, we also evaluate the performance of common DQN improvements such as deep double Q-networks (DDQN) for DDQN with dueling (DDQN d ), DDQN with a prioritized replay (DDQN p ), DDQN with a joint-training interference classiﬁer (DDQN-CF), and DDQN with a safe action reply (DDQN-SA).
We test each model against four types of interference, Gaussian, Adversarial, Blackout, and Frozen Frame, with p I ∈
We also consider a non-stationary noise-level sampling from a cosine-wave in a range of [0%, 30%] for every ten steps.
Results in Table S3-S8 show a return averaged from the four types of noise in the Env 1 to Env 4 .
CIQ shows a better and continuous performance to solve the environments before the noise level attaining 40% and under the cosinenoise.
Compared to variational based DQNs methods, joint-trained DDQN-CF show a much obvious advantages when the noise levels are in the range of 40% to 50%.
C. E NV 1 : C ARTPOLE E NVIRONMENT .
We use a four-layer neural network, which included an input layer, two 32-unit wide ReLU hidden layers, and an output layer (2 dimensions).
The observation dimension of Cartpole-v1 Brockman et al.
(2016) is 4 and the input stacks 4 consecutive observations.
The dimension of the input layer is [ 4 × 4 ].
We design a replay buffer with a memory of 100,000, with a mini-batch size of 32, the discount factor γ is set to 0.99, the τ for a soft update of target parameter is 5 × 10 − 3 , a learning rate for Adam Kingma & Ba (2014) optimization is 5 × 10 − 4 , a regularization term for weight decay is 1 × 10 − 4 , the coefﬁcient α for importance sampling exponent is 0.6, the coefﬁcient of prioritization exponent is 0.4.
We train each model 1,000 times for each case and report the mean of the average ﬁnal performance (average over all types of interference) in Table S3.
Env 1 is often recognized as a simplest environment for DQN training.
However, we observe an stability issue of attaining reward over 190.0, when most DQN models attain an over 100.0 score in a 10% noise level.
CIQ perform best and competitive results without internal affects from over-parameterization
[Table] [Table]
M
[Table]
[Table] [Table]
[Table] [Table] [Table] [Table]
M [Table] [Table] [Table]
[Table] [Table] [Table] [Table]
ANANA C OLLECTOR E NVIRONMENT
[Table]
We utilize the Unity Machine Learning Agents Toolkit (Juliani et al., 2018), which is an opensource 5 and reproducible 3D rendering environment for the task of Banana Collector.
We use open-source graphic rendering version 6 with Unity backbone (Juliani et al., 2018) for reproducible
DQN experiments, which is designed to render the collector agent for both Linux and Windows [Table] systems.
A reward of +1 is provided for collecting a yellow banana, and a reward of − 1 is provided for collecting a blue banana.
We use a six-layer deep network, which includes an input layer, three 64-unit fully-connected ReLU hidden layers, and an output layer (2 dimensions).
We use [ 37 × 4 ] for our input layer, which composes from the observation dimension (37) and the stacked input ofconsecutive observations.
We design a replay buffer with a memory of 100,000, with a mini-batch size of 32, the discount factor γ is equal to 0.99, the τ for a soft update of target parameter is 10 − 3 , a learning rate for Adam Kingma & Ba (2014) optimization is 5 × 10 − 4 , a regularization term for weight decay is 1 × 10 − 4 , the coefﬁcient α for importance sampling exponent is 0.6, the coefﬁcient of prioritization exponent is 0.4.
We train each model 1,000 times for each case and report the mean of the average ﬁnal performance (average over all types of interference) in Table S5.
We report the DVRLQ-CF, which attains a higher performance among DVRLQ and DVRLQ-SA, to compare with DQN-CF, DDQN-CF.
CIQ still performs an overall best performance compared to the other baselines.
Interestingly, learning an interference improves general performance combined with the joint-training frameworks.
[Table]
training under four different noise type of noisy environments ( P = 20% ), which included Blackout, Adversarial,
Gaussian, and Frozen frame for Env 2 reported in the main content.
The minimal parameters of each model denote as Para.
in the Tab. 14. [Table] [Table] [Table]
[Table]
The lunar lander-v2 Brockman et al.
(2016) is one of the most challenging environments with discrete actions.
The observation dimension of Lunar Lander-v2 (Brockman et al., 2016) is
and the input stacks 10 consecutive observations.
The objective of the game is to navigate the lunar lander spaceship to a targeted landing spot without a collision.
A collection of six discrete actions controls two real-valued vectors ranging from -1 to +1.
The ﬁrst dimension controls the main engine on and off numerically, and the second dimension throttles from 50% to 100% power.
The following two actions represent for ﬁring left, and the last two actions represent for ﬁring the right engine.
The dimension of the input layer is [ 8 × 10 ].
We design a 7-layers neural network for this task, which includes 1 input layer, 2 layer of 32 unit wide fully-connected ReLU network, 2 layers deep 64-unit wide ReLU networks, (for all DQNs), 1 layer of 16 unit wide fully-connected ReLU network, and 1 output layer (4 dimensions).
The replay buffer size is 500,000; the minimum batch size is 64, the discount factor is 0.99, the τ for a soft update of target parameters is 10 − 3 , the learning rate is 5 × 10 − 4 , the minimal step for reset memory buffer is 50.
We train each model 1,000 times for each case and report the mean of the average ﬁnal performance (average over all types of interference) in
Table S7.
Env 3 is a challenging task owing to often receive negative reward during the training.
We thus consider a non-stationary noise-level sampling from a cosine-wave in a narrow range of [0%, 20%] for every ten steps.
Results suggest CIQ could still solve the environment before the noise-level going over to 30%.
For the various noisy test, CIQ attains a best performance over 200.0 the other
DQNs algorithms (skipping the table since only CIQ and DQN-CF have solved the environment over 200.0 training with adversarial and blackout interference.)
return in clean and ﬁve different noise level in Env 3 evaluated by an average of under uncertain perturbation included Gaussian, adversarial, blackout, and frozen frame.
All DQN models solve the environment with over 200.0 average returns in a clean state input (a.k.a.
no noise).
[Table]
E NV 4 : P IXEL C ARTPOLE E NVIRONMENT
To observe pixel inputs of Cartpole-v1 as states, we use a screen-wrapper with an original size of [400, 600, 3].
We ﬁrst resize the original frame into a single gray-scale channel, [100, 150] from the
RGN2GRAY function in the OpenCV.
The implementation details are shown in the "pixel_tool.py" and "cartpole_pixel.py", which could be refereed to the submitted supplementary code.
Then we stack 4 consecutive gray-scale frames as the input.
We design a 7-layer DQN model, which included input layer, the ﬁrst hidden layer convolves 32 ﬁlters of a [ 8 × 8 ] kernel with stride 4, the second hidden layer convolves 64 ﬁlters of a [ 4 × 4 ] kernel with stride 2, the third layer is a fully-connected layer with 128 units, from fourth to ﬁfth layers are fully-connected layer with 64 units, and the output layer (2 dimensions).
The replay buffer size is 500,000; the minimum batch size is 32, the discount factor is 0.99, the τ for a soft update of target parameters is 10 − 3 , the learning rate is 5 × 10 − 4 , the minimal step for reset memory buffer is 1000.
We train each model 1,000 times for each case and report the mean of the average ﬁnal performance (average over all types of interference) in Table S8.
C. T RAIN AND T EST ON D IFFERENT N OISE L EVEL
We consider settings with different training and testing noise levels for CIQ evaluation.
The (train, test)% case trains with train% noise then tests with test% noise.
Their results shown in Table S
[Table]
[Table]
[Table] DVRLQ [Table] are similar to the cases with the same training and testing noise level.
We observe that CIQ have the capability of learning transformable q-value estimation, which attain a succeed score of 195.
in the noise level 30 ± 10%.
Meanwhile, other DQNs methods included DDQN-CF, DVRLQ-CF,
DDQN-SA perform a general performance decay in the test on different noise level.
This result would be limited to the generalization of power and challenges (Bengio, 2013; Higgins et al., 2018) in as disentangle unseen state of a single parameterized deep network.
C. M ARKOVIAN N OISE
We also provide a dynamic noise study for CIQ training with i.i.d.
Gaussian interference, p I = 0 . 2 ; testing with Markov distribution P ( i t = 1 | i t − 1 = 1) = 0 .
55 , P ( i t = 1 | i t − 1 = 0) =
05 , stationary p
I = 0 .
1 testing in Env 1 and Env 2 .
This experiment shows the learning power against unseen
Markovian interference in Table 10, which further conﬁrms CIQ’s ability against unseen interference distribution and dynamics.
[Table] [Table]
C. A DVANTAGES OF T RAINING WITH I NTERFERENCE L ABELS
We provide an example to analytically demonstrate the learning advantage of having the interference labels during training.
Consider an environment of i.i.d.
Bernoulli states s t = x t with P ( x t = 1) =
P ( x t = 0) = 0 .
5 and two actions 0 and 1 .
There is no reward taking action a t = 0 .
When a t = 1 , the agent pays one unit to have a chance to win a two unit reward with probability q x at state x t = x ∈ { 0 , 1 } .
Therefore, P ( r t = 1 | x t = x, a t = 1) =
q x and P ( r t = − 1 | x t = x, a t = 1) =
1 − q x .
This simple environment is a contextual bandit problem where the optimal policy is to pick a t = 1 at state x t
= x if q x > 0 .
5 , and a t = 0 if q x ≤ 0 .
If the goal is to ﬁnd an approximately optimal policy, the agent should take action a t = 1 during training to learn the probabilities q 0 and q 1 .
Suppose the environment is subjected to observation black-out x (cid:48) t = 0 with p I = 0 .
2 when x t = 1 , and no interference when x t = 0 .
Assume q 0 =
(3 − q 1 ) / 5 .
Then we have P ( r t = 1 | x (cid:48) t = 1 , a t = 1) =
q 1 , and P ( r t = 1 | x (cid:48) t = 0 , a t = 1) =
q 0 P ( x t = 0 | x (cid:48) t = 0)
+ q 1 P ( x t = 1 | x (cid:48) t
= 0)
= 0 .
If the agent only has the interfered observation x (cid:48) t , the samples for x (cid:48) t = 0 are irrelevant to learning q 1 because rewards just randomly occur with probability half given x (cid:48) t
= 0 .
Therefore, the sample complexity bound is proportional to 1 /P
( x (cid:48) t = 1) because only samples with x (cid:48) t = 1 are relevant.
On the other hand, if the agent has access to the labels i t during training, even when observed x (cid:48) t = 0 , the agent can infer whether x t = 1 by checking i t = 1 or not.
Therefore, the causal relation allows the agent to learn q 1 by utilizing all samples with x t = 1 , and the sample complexity bound is proportional to 1 /P ( x t = 1) = 2 which is a 20% reduction from 1 /P
( x (cid:48) t = 1)
= 2 .
5 when the labels are not available.
Note that z t = ( x t , i t ) is a latent state for this example, and the latent state and its causal relation is very important to improving learning performance.
D C AUSAL E FFECTS
In a causal learning setting, evaluating treatment effects and conducting statistical refuting experiments are essential to support the underlying causal graphical model.
Through resilient reinforcement learning framework, we could interpret DQN by estimating the average treatment effect (ATE) of each noisy and adversarial observation.
We ﬁrst deﬁne how to calculate a treatment effect in the resilient RL settings and conduct statistical refuting tests including random common cause variable test ( T c ), replacing treatment with a random (placebo) variable ( T p ), and removing a random subset of data ( T s ).
The open-source causal inference package Dowhy (Sharma et al., 2019) is used for analysis.
D. A VERAGE T REATMENT E FFECT UNDER I NTERVENTION
We reﬁne a Q-network with discrete actions for estimating treatment effects based on Theorem 1 in (Louizos et al., 2017).
In particular, individual treatment effect (ITE) can be deﬁned as the difference between the two potential outcomes of a Q-network; and the average treatment effect (ATE) is the expected value of the potential outcomes over the subjects.
In a binary treatment setting, for a Q-value function Q t ( s t ) and the interfered state I ( s t ) , the ITE and ATE are calculated by:
[Equation]
where p t is the estimated inference label by the agent and T is the total time steps of each episode.
As expected, we ﬁnd that CIQ indeed attains a better ATE and its signiﬁcance can be informed by the refuting tests based on T c , T p and T s .
To evaluate the causal effect, we follow a standard refuting setting (Rothman & Greenland, 2005;
Pearl et al., 2016; Pearl, 1995b) with the causal graphical model in Fig.
3 of the main context to run three major tests, as reported in Tab. 13.
The code for the statistical test was conducted by
Dowhy Sharma et al.
(2019), which has been submitted as supplementary material.
(We intend to open source as a reproducible result.)
Pearl (Pearl, 1995a) introduces a "do-operator" to study this problem under intervention.
The do symbol removes the treatment tr , which is equal to interference I in the Eq.
(1) of the main content , from the given mechanism and sets it to a speciﬁc value by some external intervention.
The notation
P ( r t | do ( tr )) denotes the probability of reward r t with possible interventions on treatment at time t .
Following Pearl’s back-door adjustment formula (Pearl, 2009) and the causal graphical model in Figure 2 of the main content.
, it is proved in (Louizos et al., 2017) that the causal effect for a given binary treatment tr (denoted as a binary interference label i t in Eq.
(1) of the main content), a series of proxy variables X
= ( (cid:80) T t =1 x t ) ≡ S (cid:48) =
( (cid:80) T t =1 s (cid:48) t ), as s (cid:48) t in Eq.
(1) of the main content, a summation of accumulated reward R =
( (cid:80) T t =1 r t ) and a confounding variable Z can be evaluated by (similarly for tr = 0 ):
[Equation]
14) where equality (i) is by the rules of do-calculus (Pearl, 1995a
; Pearl et al., 2016) applied to the causal graph applied on Figure 3 (a) of the main content.
We extend to Eq.
14 on individual outcome study with DQNs, which is known by the Theorem 1.
from Louizos et.
al.
(Louizos et al., 2017) and
Chapter 3.2 of Pearl (Pearl, 2009).
D. R EFUTATION T EST :
A sampling plan for collecting samples refer to as subgroups (i=1, ..., k).
Common cause variation (T-c) is denoted as σ c , which is an estimate of common cause variation within the subgroups in terms of the standard deviation of the within subgroup variation:
[Equation]
where k denotes as the number of sample size.
We introduce intervention a error rate n , which is a probability to feed error interference (e.g., feed i t = 0 even under interference with a probability of n ) and results shown in Table 12.
The test (T-p) of replacing treatment with a random (placebo) variable is conducted by modifying the graphical relationship in the proposed probabilistic model in Fig.
3 of the main context.
The new assign variable will follow the placebo note but with a value sampling from a random Gaussian distribution.
The test of removing a random subset of data (T-r) is to randomly split and sampling the subset value to calculate an average treatment value in the proposed graphical model.
We use the ofﬁcial dowhy 7 implementation, which includes: (1) confounders effect on treatment: how the simulated confounder affects the value of treatment; (2) confounders effect on outcome: how the simulated confounder affects the value of outcome; (3) effect strength on treatment: parameter for the strength of the effect of simulated confounder on treatment, and (4) effect strength on outcome: parameter for the strength of the effect of simulated confounder on outcome.
Following the refutation experiment in the CEVAE paper, we conduct experiments shown in Tab.
S12 and S13 with 10 % to 50 % intervention noise on the binary treatment labels.
The results in Tab.
S12 show that proposed
CIQ maintains a lower rate compared with the benchmark methods included logistic regression and
CEVAE (refer to Fig.
4 (b) in (Louizos et al., 2017)).
Through Eq.
(9) to (10) and the corresponding correct action rate in the main context, we could interpret deep q-network by estimating the average treatment effect (ATE) of each noisy and adversarial observation.
ATE (Louizos et al., 2017; Shalit et al., 2017) is deﬁned as the expected value of the potential outcomes (e.g., disease) over the subjects (e.g., clinical features.)
For example, in navigation environments, we could rank the harmfulness of each noisy observation (Yang et al., 2019) against q-network from the autonomous driving agent.
E A BLATION S TUDIES E. T HE N UMBER OF M ODEL P ARAMETERS
We also spend efforts on a parameter-study on the results of average returns between different
DQN-based models, which included DQN, Double DQN (DDQN), DDQN with dueling, CIQ,
[Table] [Table] DDQN with a classiﬁer (DDQN-CF), DQN with a variational autoencoder (Kingma & Welling, 2013) (DQN-VAE), NoisyNet, and using the latent input of causal effect variational autoencoder for Q network (CEVAE-Q) prediction.
Overall, CEVAE-Q is with minimal-requested parameters with 14.4 M (in Env 1 ) as the largest model used in our experiments in Tab. 14.
CIQ remains roughly similar parameters as 9.7M compared with DDQN, DDQN d , and
Noisy Net.
Our ablation study in Tab.
14 indicates the advantages of CIQ are not owing to extensive features using in the model according to the size of parameters.
CIQ attains benchmark results in our resilient reinforcement learning setting compared to the other DQN models. [Table] -CF 10.7M
[Table] [Table] Noisy Nets (Fortunato et al., 2018) has been introduced as a benchmark whose parameters are perturbed by a parametric noise function.
We select Noisy Net in a DQN format as a noisy training baseline with interfered state s (cid:48) t concated with a interference label i t from a classiﬁer.
E. L ATENT R EPRESENTATIONS
We conduct an ablation study by comparing other latent representation methods to the proposed CIQ model.
DQN with an variational autoencoder (DQN-VAE): To learn important features from observations, many recent works leverage deep variational inference for accessing latent states for feeding into
DQN.
We provide a baseline on training a variational autoencoder (VAE) built upon the DQN baseline, denoted as DQN-VAE.
The DQN-VAE baseline is targeted to recover a potential noisy state and feed the bottleneck latent features into the Q-network.
CEVAE-Q Network: TARNet (Shalit et al., 2017;
Louizos et al., 2017) is a major class of neural network architectures for estimating outcomes of a binary treatment on linear data (e.g., clinical reports).
Our proposed CIQ uses an end-to-end approach to learn the interventional (causal) features.
We provide another baseline on using the latent features from a causal variational autoencoder (Louizos et al., 2017) (CEVAE) as latent features as state inputs followed the loss function in (Louizos et al., 2017).
To get the causal latent model in Q-network, we approximate the posterior distribution by a neural network z t ∼ p ( z t | ˜ x t ) =
φ (˜ x t ; θ 1 ) .
Then we train this neural network, CEVAE-Q, by variational inference using the generative model.
We conduct 10,000 times experiments and ﬁne-tuning on DQN-VAE and
CEVAE-Q.
The results in
Table 15 shows that the latent representation learned by CIQ provides better resilience than other representations. [Table]
[Table]
B1: CIQ w/o the concatenation
[Table]
B2: CIQ w/o the θ 3 network
[Table] B3: CIQ w/o providing grounded i t for training
[Table]
E. A RCHITECTURE A BLATION S TUDY ON CIQ
To study the importance of speciﬁc components in CIQ, we conducted additional ablation studies and constructed two new baseline models shown in Table 16 tested in Env 1 (Cartpole).
Baseline 1 (B1) - CIQ w/o the concatenation of ˜ i t in S CI .
This comparison shows the importance of using both the predicted confounder ˜
z t and the predicted label ˜
i t .
B1 uses label prediction to help latent representation but not using the predicted labels in decision-making.
The structure is motivated by a task-speciﬁc (depth-only information from a maze environment) DQN network from a previous study (Mirowski et al., 2016).
Baseline 2 (B2) - CIQ w/o the θ 3 network (for testing θ 3 ’s importance)
The structure (Humplik et al., 2019) is motivated by a meta-inference reinforcement learning proposed by.
Baseline 3 (B3) - CIQ w/o providing grounded i t for training, for testing the importance of the inference loss and joint loss propagation.
The superior performance of CIQ validates the proposed model is indeed crucial from the previous discussion in Section 3 of the main content.
The setting used for Table 16 is the same as the setting for the third column (noise level = 20%) in Table 5 and the third column (noise level = 20%) in Table 15, tested in Env 1 (Cartpole).
E. P ERTURBATION - BASED N EURAL S ALIENCY FOR DQN A GENTS
To better understand our CIQ model, we use the benchmark saliency method on DQN agent, perturbation-based saliency map, (Greydanus et al., 2018) to visualize the salient pixels, which are sensitive to the loss function of the trained DQNs.
We made a case study of an input frame under an adversarial perturbation, as shown in Fig.
We evaluate DQN agents included DQN, CIQ,
DQN-CF, DVRLQ-CF and record its weighted center from the neural saliency map, where saliency pixels of CIQ respond to ground true actions more frequent (96.2%) than the other DQN methods.
E. R OBUSTNESS T RANSFERABILITY AMONG D IFFERENT I NTERFERENCE T YPES
We conduct additional experiments to study robustness transferability of DQN and CIQ when training and testing under different kinds of interference types in Env 1 .
Note that both architectures would solve a clean environment successfully (over 195.0).
The reported numbers are averaged overindependent runs for each condition.
As shown in Table 17 and Table 18, CIQ agents consistently attain signiﬁcant performance improvement when compared with DQN agents, especially between
Gaussian and adversarial perturbation.
For example, CIQ succeeded to solve the environmenttimes out of 20 independent runs, with an average score of 165.2 in Gaussian (train)-Adversarial (test) adaptation.
n particular, for CIQ, 12 times out of 20 independent runs are successfully transfered from Gaussian to Adversarial perturbation.
Interestingly, augmenting adversarial perturbation does not always guarantee the best policy transfer when testing in the Blackout and Frozen conditions, which shows a slightly lower performance compared with training on Gaussian interference.
The reason could be attributed to the recent ﬁndings that adversarial training can undermine model generalization (Raghunathan et al., 2019;
Su et al., 2018)
[Table] [Table]
[Table]
[Table]
E. CIQ WITH M ULTI -I NTERFERENCE .
Here we show how the proposed CIQ model can be extended from the architecture shown in Figureto the multi-interference (MI) setting.
The design intuition is based on two-step inference by a common encoder, to infer a clean or noisy observation, followed by an individual decoder tied to an interference type, to infer noisy types and activate the corresponding Q-network (named θ 4 ).
Note that the two-step inference mechanism follows the RCM as two sequential potential outcome estimation models (Rubin, 1974; Imbens & Rubin, 2010), where interfered observation x (cid:48) t is determined by two labels i 1 ,t and i 2 ,t according to x (cid:48)
t
= i 1 ,t ( i 2 ,t I 1 ( x t )
+(1 − i 2 ,t )
I 2 ( x t ))
+(1 − i 1 ,t ) x t extended from Eq.(1), where i 1 ,t indicates the presence of interference and i 2 ,t indicates which interference type (here we show the case of two types).
As a proof of concept, we consider two interference types together, Gaussian noise and adversarial perturbation.
In this setting every observation (state) can possibly undergo an interference with either Gaussian noise or Adversarial perturbation.
From the results shown in Table.
19, we ﬁnd that the extended version of CIQ, CIQ-MI, is capable of making correct action to solve (over 195.0) the environment when training with mixed interference types (last row).
Another ﬁnding is that robustness tranferability (153.9/154.2) in CIQ-MI is slightly degraded compared to the results (162.8/165.2) in Table 18 with the same training episodes ( 500 ) and runs ( 20 ), which could be caused by the increased requirement of model capacity (Ammanabrolu & Riedl, 2019; Yang et al., 2020b) of
CIQ-MI
E. H ARDWARE S ETUP AND E NERGY C OST
We use Nvidia GPUs (2080-Ti and V100) for our experiments with Compute Uniﬁed Device Architecture (CUDA) version 10.1.
To conduct the results shown in the paper, it takes around 20 min to run 1,000 epochs (maximum) with a batch size 32 for each environment considering the hyperparameters tuning described in Section C.1 of the main paper.
In total, the experiments presented [Table] (four environment with four different types of noise and its ablation studies) in this paper took around 343 computing hours with a 300W power supplier.