C AUSAL I NFERENCE Q-N ETWORK : T OWARD R ESILIENT R EINFORCEMENT L EARNING
Anonymous authors
Paper under double-blind review
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 resilient DRL framework with observational interferences.
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.
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; Ecoffet et al., 2019; Silver et al., 2017; Mao 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) and encoded state (Schmidhuber, 1991;
Kaelbling et al., 1998) and to anticipate future rewards.
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 RL framework with observational interferences.
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
[Figure]
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) to capture the effect of the interference on the reward collected from the environment.
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.
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 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 calculating the treatment effects on the action.
In contrast, we introduce causation into DRL by applying extra noisy and uncertain inventions.
Different from the aforementioned approaches, 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., 2020) 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.
Safe Reinforcement Learning: Safe reinforcement learning (SRL) (Garcia & Fernández, 2012) seeks to learn a policy that maximizes the expected return, while satisfying speciﬁc safety constraints.
Previous approaches to SRL include reward-shaping (Saunders et al., 2018), noisy training (Fortunato et al., 2018), shielding-based SRL (Alshiekh et al., 2018), and policy optimization with conﬁdent lower-bound constraints (Thomas et al., 2015).
However, ﬁnding these policies in the ﬁrst place could need to reset the model at each time and be computationally challenging.
Our proposed resilient
RL framework can be viewed as an approach to achieve SRL (Alshiekh et al., 2018), but we focus on gaining resilience against abrupt observation interferences.
Another key difference between our framework and other SRL schemes is the novelty in proactively using available interference labels during training, which allows our agent to learn a causal inference model to make safer decisions.
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
We consider a resilient RL framework where the observations are subject to interference (as illustrated in Fig 1 (a)) as an empirical process in Rubin’s Causal Model (RCM)
(Kennedy, 2016; Holland, 1988; Balke & Pearl, 1997; Robins et al., 2003) for causal inference.
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 (under the potential outcome estimation (Rubin, 1974)), and I ( x t ) is the interfered observation.
The interfered state is then given by s (cid:48) t
= ( x (cid:48)
t − M +1 , . . .
, x (cid:48) t ) .
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 z t i t x (cid:48)
t r t z t , z t-1 ...
x t , x t-1 ... model outputs neural networks concatenate addition element-wisemultiplication p(i t |z t ), p(i t-1 |z t-1 ) ...
~ ~ i t train s CIt θϕ θθ
Q(s ; θ) t CI ~ ~ sample i t ~ ‘ ‘ ~ ~ a perturbation.
The agent now needs to choose its actions a t ∼ π
( s (cid:48) t ) based on the interfered state.
The resilient RL objective for the agent is to ﬁnd a policy π to maximize rewards in this environment under observation interference.
In this work, we consider 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.
Adversarial Observation.
Following the standard adversarial RL attack setting, we use the fast gradient sign method (FGSM) (Szegedy et al., 2014) to generate adversarial patterns against the
DQN prediction loss (Huang et al., 2017).
The adversarial observation is given by I ( x t )
= x t + (cid:15) sign ( ∇ x t Q ( x t , y ; θ )) where y is the optimal output action by weighting over all 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.
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 1 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 ) .
3. C AUSAL G RAPHICAL M ODEL AND THE B ENEFITS ON L EARNING P ERFORMANCE
The causal relation of observation, reward, and interference can be described by a causal graphical model (CGM) in Figure 2.
We use z t to denote the latent state which can be viewed as a confounder in causal inference.
Formally, we deﬁne z t = h ( x t , i t ) to be the hidden confounder.
Here h is a function which compresses ( x t , i t ) into a confounder such that the CGM holds.
It is clear from Eq.
(1) and the MDP deﬁnition that the CGM holds with h being the identity function, i.e., z t = ( x t , i t ) .
We assume that there exists some unknown compression function h such that z t is low-dimensional.
Similar to Louizos et al.
(2017), we aim to learn to predict this low-dimensional hidden confounder by a neural network.
[Table]
According to the CGM, different training settings correspond to different levels of Pearl’s causal hierarchy (Bareinboim et al., 2020; Shpitser & Pearl, 2008; Pearl, 2009) as shown in Table 1.
If only the observations are available, the training process corresponds to Level I of the causal hierarchy, which associates the outcome r t to the input observation x (cid:48) t directly by P ( r t | x (cid:48) t ) .
Regular DQN and other algorithms with only observations in training belong to this association level.
On the other hand, when interference type I and the interference labels i t are available during training, the learning problem is elevated to Level II of the causal hierarchy.
In particular, the interference model of Eq.
(1) can be viewed as the intervention logic with the interference label i t being the treatment information.
With these information, we can describe the causal inference problem by
[Equation]
with the do-operator (Pearl, 2019) in the intervention level of the causal hierarchy.
Based on the causal hierarchy Theorem (Pearl, 2009), we could answer causal questions in the higher Level II given the interference type I and the interference labels i t in the learning process.
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 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.
From the above discussion, we provide the interference type I the interference labels i t to efﬁciently train a resilient RL agent with the CGM; however, in the actual testing environment, the agent only has access to the interfered observations x (cid:48) t .
The CGM allows the agent to infer the latent state z t and utilize its causal relation with observation, interference and reward to learn resilient behaviors.
We will then show how we parameterize this model with a novel deep neural network.
3. C AUSAL I NFERENCE Q-N ETWORK
Based on the causal inference graphical model, we propose a causal inference Q-network, referred as
CIQ, that is able to map the interfered observation x (cid:48) t into a latent state z t , make proper inferences about the interference condition i t , and adjust our policy based on the estimated interference.
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 subsection, 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.
The design intuition of the inference mechanism is based on the potential outcome estimation theory (Rubin, 1974; Imbens & Rubin, 2010; Pearl, 2009) in RCM and modeling of the interference scenario as described in Eq.
Intuitively, the switching mechanism (counterfactual inference) from RCM could be considered as a method to disentangle a single deep network into two non-parameter-sharing networks to improve model generalization under uncertainty.
It has shown many advantages for representation learning in regression tasks (Shalit et al., 2017;
Louizos et al., 2017).
We provide more implementation details in appendix C.1.
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 2 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.
The entire CIQ training procedure is described by Algorithm 1.
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.
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.
1: Inputs: Agent , NoisyEnv , Oracle , max _ step , NoisyEnv _ test , target , eval _ steps 2: Initialize: t = 0 , score = 0 , s (cid:48) t
= NoisyEnv .reset() 3: while t < max _ step and score < target do 4: i t = oracle ( NoisyEnv , t ) 5: a t = Agent .act
( s (cid:48) t , i t ) 6: s (cid:48)
t +1 , r t , done =
NoisyEnv .step( a t ) 7:
Agent .learn( s (cid:48) t , a t , r t , s (cid:48)
t +1 , i t ) 8: if t ∈ eval _ steps then 9: score =
Agent .evaluate
( NoisyEnv _ test ) 10: if done then 11: s (cid:48) t =
NoisyEnv .reset() 12: else 13: s (cid:48) t =
s (cid:48) t + 14: t = t +15:
Return Agent
Banana Collector: The Banana collector shown in Figure 1 (b) 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 1 (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 a visual learning task.
The size of input state is 400 × 600 .
We use a max-pooling and a convolution layer to extract states as network inputs.
The environment includes two discrete actions { left, right } , which is identical to the Cartpole-v0 of the vector version.
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 comparision.
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.
[Figure]
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.
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 3 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.
2 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 2 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.
[Table] [Table]
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.
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.
The results 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.
The results show that the difference in noise level does not affect much on the performance in appendix
C.6.
Neural saliency map: We apply the perturbation-based saliency map for DRL (Greydanus et al., 2018) in appendix E.4 to visualize the saliency centers and actions of CIQ and other baseline agents.
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, as discussed in appendix E.6.
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 and will open source code.
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 3 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) δ
[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 5.
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 5 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 and the various state is hard to disentangle by a single network from counterfactual learning Shalit et al.
; Louizos et al.
We also conduct an experiment on a DQN extension of TD-VAE Gregor et al.
, 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]
C I MPLEMENTATION D ETAILS AND A DDITIONAL R ESULTS 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 =
[Equation] [Equation]
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
[Equation]
Q
[Equation]
) | α 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.
10, which allows less dramatic changes from Huber loss:
[Equation]
otherwise (9)
The quantile Huber loss (Dabney et al., 2018) is the asymmetric variant of the Huber loss for quantile τ ∈ [0 , 1] from Sup-Eq. 9:
[Equation]
After the a maximum update step in the temporal loss u in Sup-Eq. 9, we synchronize θ − i with θ i follow the implementation from the OpenAI baseline Dhariwal et al.
(2017) in Sup-Eq 11:
[Equation]
We use the soft-update Fox et al.
(2015) to update the DQN target network as in Sup-Eq 12: θ local = τ ×
[Equation]
12) 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 S4-S9 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 S4.
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]
experiments training under four different noise type of noisy environments ( P = 20% ), which included Blackout, Adversarial,
Gaussian, and Frozen frame for Env 1 reported in the main content.
The minimal parameters of each model denote as Para.
in the Tab. 14.
[Table]
C. E NV 2 : 3D B ANANA C OLLECTOR E NVIRONMENT .
We utilize the Unity Machine Learning Agents Toolkit Juliani et al.
(2018), which is an open-sourceand reproducible 3D rendering environment for the task of Banana Collector.
A reproducible source code, which is designed to render the collector agent, has been given in the supplementary for both
Linux and Windows 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, soft-attention layer Rao et al.
(2017) (for all DQNs), 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 of 4 consecutive 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 S6.
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.
C. E NV 3 : L UNAR L ANDER E NVIRONMENT .
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
[Table] [Table]
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, 1 soft-attention layer Rao et al.
(2017) (for all DQNs), and 1 output layer ( 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 S8.
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.)
C. 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, a soft-attention layer Rao et al.
(2017) (for all DQNs), and the output layer (2 dimensions).
The replay buffer size is
[Table] [Table]
[Table] [Table]
size is
[Table]
factor is
[Table] [Table]
target parameters is 10 −
[Table] [Table]
rate is 5 × 10 − 4 ,
[Table]
step 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 S9.
[Table] [Table]
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 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.
[Table]
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.
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]
[Equation]
where equality (i) is by the rules of do-calculus Pearl (1995a); Pearl et al.
(2016) applied to the causal graph applied on Figure 1 of the main content.
We extend to Eq.
15 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]
(16) 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 5 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.
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.
; Shalit et al.
(2017) is deﬁned as the expected value of the potential outcomes (e
[Table]
g., disease) over the subjects (e
[Table]
g., clinical features.)
For example, in navigation environments, we could rank the harmfulness of each noisy observation against q-network from the autonomous driving agent.
[Table] [Table]
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,
DQN with a classiﬁer (DQN-CF), DDQN with a classiﬁer (DDQN-CF), DQN with a variational autoencoder Kingma & Welling (2013) (DQN-VAE), NoisyNet
[Table]
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]
1M 161.
DQN-VAE 9.7M 151.
NoisyNet 9.7M 158.
CEVAE-Q 12.5M 39.
DVRLQ-CF 10.7M 107.
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.
[Figure]
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.,
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] 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.
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]
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) of CIQ-MI.
[Table]
Adversarial 153.
Gaussian + Adversarial 195.