N EURAL C AUSAL D ISCOVERY WITH L EARNABLE I NPUT N OISE
Anonymous authors
Paper under double-blind review
A BSTRACT
Learning causal relations from observational time series with nonlinear interactions and complex causal structures is a key component of human intelligence, and has a wide range of applications.
Although neural nets have demonstrated their effectiveness in a variety of ﬁelds, their application in learning causal relations has been scarce.
This is due to both a lack of theoretical results connecting risk minimization and causality (enabling function approximators like neural nets to apply), and a lack of scalability in prior causal measures to allow for expressive function approximators like neural nets to apply.
In this work, we propose a novel causal measure and algorithm using risk minimization to infer causal relations from time series.
We demonstrate the effectiveness and scalability of our algorithms to learn nonlinear causal models in synthetic datasets as comparing to other methods, and its effectiveness in inferring causal relations in a video game environment and real-world heart-rate vs. breath-rate and rat brain EEG datasets.
I NTRODUCTION
From an early age, humans have a remarkable ability to infer causal relations from pure observations (White & Milne (1997);
Scholl & Tremoulet (2000); Buchsbaum et al.
By observing that a left dot moving towards a right dot and the right dot moves correspondingly (the launching effect, see
Michotte (1963)), a human can quickly infer that the left dot causes the right dot to move (Scholl &
Tremoulet (2000)).
In fact, much of our way of thinking is via cause and effect.
Causal analysis also permits counterfactual reasoning, answering what would have happened if the cause had happened differently.
The learning of causality also constitutes much of the scientiﬁc endeavor, for example ﬁnding the cause of a certain cancer (Bosch et al.
or discovering gene regulatory networks (Lozano et al.
In addition, causality plays a key role in neuroscience (Neves et al.
Seth et al. (2015)), economics (e.g. Granger (1969); Stock & Watson (1989)) and ﬁnance (Hiemstra & Jones (1994); Granger et al.
The study of causality has a long history, yet the application of neural nets to learning causal relations has been scarce.
There have been various works that propose methods to infer causal structures with limited model space (e.g. Granger (1969)) which may not be able to model complex nonlinear causal relations, or propose measures to quantify causal strength (e.g. Schreiber (2000); Janzing et al.
that may not scale to high-dimensional data.
For these, the use of universal function approximators like neural nets may be beneﬁcial in inferring causality, which motivate us to propose causal measures that are not only theoretically founded, but also amenable to the learning of function approximators.
On the other hand, in the deep learning community, the learning of causal models has not been prevalent, in part due to the lack of theoretical understanding between learning a prediction model and learning a causal model.
This also motivates us to propose causal measures, obtained via learning a prediction model, that can deduce causality in a stringent sense.
The contributions of this work are as follows:
• We propose a novel measure to quantify causality from observational data, and an effective algorithm, Causal Inference with Learnable Noise (CILN), to estimate it.
It is based on minimizing a learnable noise risk of a prediction model, allowing function approximators such as neural nets to learn complex causal relationships.
• We demonstrate on nonlinear synthetic datasets that our method outperforms other causal measures by a large margin, and can scale to a larger number of time series.
We also demonstrate that our models are effective on real-world datasets.
R ELATED WORK
The study of causality has a long history, and has been approached from different perspectives.
Pearl (e.g. Pearl (2002; 2009); Pearl et al. (2009)) deﬁnes causality in terms of intervention and structural dependence, under the structural equation models (SEM).
Granger (Granger (1969); Granger & Newbold (1986)) deﬁnes causality via prediction: if the prediction of Y via a linear model can be improved by including the information of X, then X causes Y in the Granger sense.
Since its proposal, Granger causality has been widely applied in economics (e.g. Joerding (1986)) and neuroscience (e.g. Deshpande et al.
(2009); Seth et al.
To learn nonlinear causal relations, later works also extend Granger causality to kernel methods (Ancona et al.
; Marinazzo et al.
(2008a;b); Sindhwani et al.
To clear up the relations between these two notions of causality,
White et al.
(2011) provide conditions under which Granger causality can deduce direct structural causality in a general settable system framework (White & Chalak (2009)), with direct structural causality as a natural extension of Pearl causality in settable systems.
Our method also utilizes the high-level idea of inferring causal relations via prediction, and building on the work of White et al.
(2011) we propose a novel measure that can theoretically deduce direct structural causality under certain conditions.
In addition, various measures have been proposed to quantify causality.
Schreiber (2000) proposes transfer entropy as measure for causality.
It measures the mutual information between the current
Y and the past of X, conditioned on the past of Y, to quantify the directional information transfer.
As noted in Marinazzo et al.
(2008a)
, Granger causality as deﬁned in Granger & Newbold (1986) implies nonzero transfer entropy.
Janzing et al.
(2013) analyze several causal measures, and conclude that they are unsatisfactory measures of causal strength.
They then propose causal inﬂuence, deﬁned via the KL-divergence between the original joint distribution and the distribution with a set of causal arrows broken.
We note that both the calculation of transfer entropy and causal inﬂuence requires density estimation of the full joint distributions of the input and output, which could easily become difﬁcult in high dimensions.
This motivates us to propose new causal measures based on risk minimization, which is much easier with high input dimensions.
Another class of causal discovery methods are constraint-based methods, for example PC algorithm
(Spirtes et al.
rankPC algorithm (Harris & Drton (2013)), IC algorithm (Pearl (2002)), and FCI (Spirtes et al.
(2000)), which requires repetitive conditional independence tests.
In comparison, our method may simultaneously discover multiple variables that directly cause the variable of interest.
Besides, various other works have also proposed methods to infer causal structure under some speciﬁc conditions, for example, causal additive noise models (Hoyer et al.
(2009)), information-geometric causal inference (Daniusis et al.
; Janzing et al.
dynamic causal modeling (Friston et al.
(2003)), etc.
There has also been works that approach causality from a machine learning perspective, or have architectures that put causality to mind.
Lopez-Paz et al.
(2015) study causal inference as a supervised learning problem, where the pairwise causal directions are given as labels for training.
Louizos et al.
(2017) utilize a variational autoencoder (VAE) structure to estimate the unknown latent space summarizing the confounders and the causal effect.
Kipf et al.
(2018) propose a neural relational inference architecture, which simultaneously infers the interactions and learning the dynamics from observational data.
Designing causal inference into the model architecture can also be beneﬁcial in certain applications.
For example, Kansky et al.
(2017) propose a Schema Network that allows regression planning from a goal through causal chains, and demonstrates zero-shot learning in a suite of variations of Atari Breakout games.
M ETHOD 3. P ROBLEM D EFINITION
Although causal data can be inferred from observations at individual time points, we are primarily concerned with time series.
Time series have extra structure that is particularly useful for causal inference: causes must precede their effects.
Therefore, we consider N time series x (1) , x (2) , ...
x ( N ) , where each time series x ( i ) =
( x ( i ) 1 , x ( i ) 2 , ...
x ( i ) t , ... ) and each x ( i ) t 2 R M is an M -dimensional vector.
Denote X ( i ) t  1 = ( x ( i ) t  K , x ( i ) t  K +1 , ...
x ( i ) t  1 ) with maximum time horizon of K , and X t [-− 
-] 1 =
X ( i ) t  1 } , i = 1 , 2 , ...N .
We also denote X (ˆ j ) t  1 =
X t  1 \ X ( j ) t  1 , i.e. X t  1 excluding X ( j ) t  1 , to notationally differentiate with the variable of interest X ( j ) t  1 .
We assume that the time series is generated by a canonical settable system (White et al.
We adopt the settable system (White & Chalak (2009)) paradigm due to the following reasons: (1) as a natural extension to
SEMs, it facilitates optimization, equilibrium, and learning; (2) it can formally link Granger causality with Pearl causality; (3) it is general enough to encompass a large number of practical scenarios, including time series.
Intuitively, each variable in a settable system can either be determined by direct setting (which formalizes interventions), or by a response function on the settings of other variables.
A canonical settable system is a settable system where each variable’s setting equals its response, allowing the system to evolve naturally without intervention, formalizing time series.
In this paper, we also assume causal sufﬁciency (Peters et al.
, i.e., each time series x ( i ) can only be structurally caused by the time series from x (1) , x (2) , ...
x ( N ) , and generated by stationary response functions
h i that are unknown to the learner:
[Equation]
for t =
K + 1 , K + 2 , ... .
Here u i 2 R M , i = 1 , 2 , ...
N are noise variables that are mutually independent, are independent of any X ( i ) t  1 , x ( i ) t , i 2 { 1 , 2 , ...N } , and are effective arguments of the response functions
h i .
Also in this paper, we only consider “causality in mean", i.e. the causal relations, if exists, inﬂuence the mean value of other variables.
For any i, j 2 { 1 , 2 , ...N } , we assume that the variables ( X (ˆ j ) t  1 , X ( j ) t  1 , x ( i ) t ) have probability density function P ( X (ˆ j ) t  1 , X ( j ) t  1 , x ( i ) t ) .
We will leave time series with hidden variables (therefore confounding can occur) for future work.
We note that even without considering hidden variables, Eq. 1 is very general and already encompasses a wide range of scenarios.
In order to state the goal of the learner who wants to learn causality from the observations x (1) , x (2) , ...x ( N ) , we need to rigorously deﬁne causality.
Here, we restate the deﬁnitions of direct structural causality (White et al.
and Granger causality (Granger & Newbold (1986)) using our notations of the system Eq.
1, the former being a natural extension to Pearl causality (Pearl (2009)) in the settable systems.
Direct structural causality (White et al.
We say X ( j ) t  1 , j {+
+} =
i does not directly structurally cause x ( i ) t , if for all possible values of X (ˆ j ) t  1 and u l , l 2 1 , 2 , ...
N , the function X ( j ) t  1 ! h i ( X t  1 , u i ) is constant in X ( j ) t  1 .
Otherwise, we say X ( j ) t  1 directly structurally causes x ( i ) t .
Granger (1969) deﬁnes causality in terms of conditional expectations.
Later, Granger & Newbold (1986) deﬁne it using conditional distributions.
We use the latter deﬁnition, since it is more general, and also facilitates connection with direct structural causality, and the algorithms proposed in this paper.
In this work, we only consider causality between different time series, i.e. requiring j {+
+}
=
i as default.
Granger causality (Granger & Newbold (1986))
We say X ( j ) t  1 , j {+
+}
=
i does not Granger-cause x ( i ) t , if P ( x ( i ) t | X ( j ) t  1 , X (ˆ j ) t  1 ) =
P ( x ( i ) t | X (ˆ j ) t  1 ) , i.e. the conditional distribution function of x ( i ) t given
X ( j ) t  1 , X (ˆ j ) t  1 is identical to the conditional distribution function of x ( i ) t given X (ˆ j ) t  1 .
Otherwise, we say X ( j ) t  1 Granger-causes x ( i ) t .
The goal of the learner is, given only x (1) , x (2) , ...
x ( N ) , determine for any x ( i ) t , whether X ( j ) t  1 directly structurally causes x ( i ) t for each j = 1 , 2 , ...N .
3. G RANGER CAUSALITY IMPLIES DIRECT STRUCTURAL CAUSALITY IN E Q . (1)
For our system Eq.
(1), applying the results by White et al.
(2011), we have that Granger causality is a sufﬁcient condition for direct structural causality.
See Appendix A for the detailed theorem and proof.
For system Eq. 1, for any i, j 2 { 1 , 2 , ...N } , i 6 =
j , if X ( j ) t  1 Granger-causes x ( i ) t , then X ( j ) t  1 directly structurally causes x ( i ) t .
The reason that here Granger causality can deduce direct structural causality is in part due to the fact that for system Eq.
(1), conditional exogeneity (White et al.
(2011)) is automatically satisﬁed by the assumptions of the system.
Note that the reverse of the statement is not true, i.e. Granger non-causality does not necessarily imply direct structural non-causality (White & Lu (2010) give several examples).
They also note that these instances are exceptional, in that mild perturbations to their structures destroy the Granger non-causality.
3. O UR METHOD
Based on section 3.2, if we have an algorithm that can deduce Granger causality in system Eq.
(1), then we can immediately deduce direct structural causality.
In general, a direct test of Granger causality is difﬁcult.
In particular, when the number of time series is large or the dimension M of each time series is large, density or mutual information-based methods like transfer entropy ( I ( x ( i ) t ; X ( j ) t  1 | X (ˆ j ) t  1 ) , see Schreiber (2000)), may not give a good estimate.
Alternatively, various works have resorted to testing whether the prediction of x ( i ) t given X ( j ) t  1 , X (ˆ j ) t  1 is better than given only X (ˆ j ) t  1 , under some limited functional space.
For example, in his original work, Granger (1969) investigates causality with linear function predictors.
Later works have extended it to kernel methods, e.g., Ancona et al.
; Marinazzo et al.
(2008a;b); Sindhwani et al.
(2012), which essentially estimate linear Granger causality on the feature space of the kernel.
To enable causal learning with potentially highly nonlinear response functions, it may be desirable to use universal function approximators (Hornik (1991)) such as neural nets.
As the main contribution of this paper, we will provide a novel causal measure and corresponding algorithm to estimate it.
The measure is based on optimizing an objective containing a function approximator, thus allowing neural nets to apply.
Our algorithm is inspired by asking a counterfactual question during the learning of a prediction model.
Speciﬁcally, it asks:
How much noise can I add to X ( j ) t  1 , without making the best prediction of x ( i ) t worse?
To give a quantitative answer to this question, we deﬁne a learnable noise risk :
[Equation]
where ˜ X ( ⌘ ) t
[Equation] [Equation] X [Equation]
+ ⌘  ✏ (or element-wise, ˜ X ( j
[Equation]
⌘ j ) t := X ( j ) t  1 + ⌘ j · ✏ j , j = 1 , 2 , ...N ) is the noise-corrupted inputs with learnable noise amplitudes ⌘ j 2 R KM , and ✏ j ⇠ N ( 0 , I ) .
>is a positive hyperparameter for the mutual information
I ( · , · ) .
Intuitively, the minimization of the second term I ( ˜ X ( j )( ⌘ j ) t ; X ( j ) t  1 ) requires the noise amplitude
⌘ j to go up.
The minimization of the ﬁrst term requires the noise amplitude ⌘ j to go down, and the larger causal strength from X ( j ) t  1 to
Require x ( i ) t , X t  1 , for i 2 { 1 , 2 , ...N } , t 2 T =
{ K + 1 , K + 2 , ... } .
Require ⌘ 0 : a small value for initialization of ⌘ .
Require  : coefﬁcient for the mutual information term.
1: for i in { 1 , 2 , ...N } do: 2:
Initialize function approximator f ✓ .
Initialize ⌘ = ( ⌘ 1 , ⌘ 2 , ... ⌘ N ) = ( ⌘ 0 1 , ⌘ 0 1 , ... ⌘ 0 1 ) , where each element ⌘ 0 1 is a KM  dimensional vector, same dimension as X ( j ) t  1 .
4: ( f ✓ ⇤ , ⌘ ⇤ )
Minimize ( f ✓ , ⌘ ) ˆ R X ,x ( i ) , ✏ [ f ✓ , ⌘ ] (Eq. 4) with e.g. gradient descent 5:
W ji
I ( ˜ X ( j )( ⌘ ⇤ j ) t ; X ( j ) t  1 ) , for j = 1 , 2 , ...N .
6: end for 7: return W x ( i ) t , the larger this force.
The minimization of the two terms strikes a balance, at which point the
I ( ˜ X ( j )( ⌘ j ) t ; X ( j ) t  1 ) measures how many bits of information does time series j need to provide to the learner, without making the prediction worsened.
Thus, we propose to use
[Equation]
[Equation]
) as another measure for causality, where ( f ✓ ⇤ , ⌘ ⇤ )
= argmin ( f ✓ , ⌘ ) R X ,x ( i ) [ f ✓ , ⌘ ] 1 .
In Appendix B, we analyze the qualitative and quantitative properties of the learnable noise risk, and give intuitions why it is likely to select the variables that directly structurally causes x ( i ) t .
Empirically, we minimize the following empirical risk:
[Equation]
In general, it may be difﬁcult to estimate the mutual information I ( ˜ X ( j )( ⌘ j ) t ; X ( j ) t  1 ) with large dimension of X ( j ) t  1 such that the expression is also differentiable w.r.t.
⌘ j .
Utilizing the property of Gaussian channels, in Appendix C we prove that I ( ˜ X ( j )( ⌘ j ) t
[Equation]
[Equation]
, where l denotes the l th element of a vector, and Var ( X ( j ) t  1 ,l ) is the variance of X ( j ) t  1 ,l across t .
Therefore, in practice to improve efﬁciency, we can optimize an upper bound of the learnable noise risk:
[Equation]
When the dimension of X ( j ) t  1 is large, differentiable estimate of the mutual information, such as
MINE (Belghazi et al.
(2018)), can be applied.
We provide Algorithm 1 to empirically estimate
W ji , which we term Causal Inference with Learnable Noise (CILN).
E XPERIMENTS
To demonstrate that our proposed method works, we test it on both synthetic and real datasets.
We ﬁrst use synthetic datasets, where we know the underlying causal structure and compare with previous causal measures.
We then test whether our algorithm can infer causal structure from watching an agent playing video games.
Finally, we apply our algorithm to real-world heart-rate vs. breath-rate and rat EEG datasets to test its effectiveness.
We use the ˆ R upper X ,x ( i ) , ✏ [ f ✓ , ⌘ ] (Eq. 5) for optimization for all experiments.
The metrics we use are the standard metrics of area under the precision-recall curve (AUC-PR) (Davis & Goadrich (2006)), and area under the ROC curve (AUC-ROC).
4. S YNTHETIC EXPERIMENT WITH LOG - NORMAL CAUSAL STRENGTHS
In this experiment, we evaluate our method together with other methods with a nonlinear synthetic dataset generated to have a known causal structure (hidden to the methods being compared).
We study how they perform with varying number N of time series, with N up to 30 .
To generate the data, we let each x ( i ) t have dimension M = 1 , and also set the maximum time horizon K = 3 , so each X ( j ) t  1 is a K ⇥ M = 3 ⇥ 1 matrix.
We use the following realization of the response function h i in Eq.
[Equation]
where u t ⇠ N ( 0 , I ) 2 R M ,  denoting element-wise multiplication, and H 1 and H 2 are two nonlinear functions to make the response functions nonlinear.
In this experiment, we use H 1 ( x ) =
softplus ( x ) = log (1 + e x ) , and H 2 ( x ) =
tanh ( x ) , we also ﬁnd similar performance with other choices of nonlinear functions.
B j is a K ⇥ M random matrix, whose element is sampled from
U [  1 , 1] .
A ji is a K ⇥ M matrix, with 0.5 probability of being a zero matrix and 0.5 probability of being a nonzero random matrix, characterizing the underlying causal strength from j to i .
Crucially, to reﬂect that the causal strength may span different orders of magnitude, if A ji is sampled to be a nonzero matrix, then the amplitude of each of its element is sampled from a log-normal distribution with µ = 1 ,  = 0 , their sign sampling from U {  1 , 1 } .
Denote A indi as the 0-1 indicator matrix of causality ( A indi,ji = 1 if | A ji | > 0; 0 otherwise).
The goal of each algorithm being evaluated is to produce an N ⇥ N causal matrix ˜ A , where each entry ˜
A ji characterizes the causal strength from j to i .
Then the ﬂattened ˜ A is evaluated against the ﬂattened A indi (excluding diagonal elements of the matrices), producing the metrics of AUC-PR and AUC-ROC.
In general, for a large N , the number of possible causal graphs grows double exponentially: there are 2 N 2 possible matrix of A indi .
To give an estimate, for N = 3 , 4 , 5 , 8 , 10 , 20 , 30 , there are 512 , 6 . 6 ⇥ 10 4 , 3 . 3 ⇥ 10 7 , 1 . 8 ⇥ 10 19 , 1 . 2 ⇥ 10 30 , 2 . 6 ⇥ 10 120 , 8 . 5 ⇥ 10 270 number of possible graphs, respectively.
Therefore, estimating the causal graph is in general a non-trivial task when N is large.
We compare our algorithm, with previous methods including transfer entropy (Schreiber (2000)), causal inﬂuence (Janzing et al.
, linear Granger causality (Granger (1969);
Ding et al.
(2006)), and a baseline of mutual information ˜
A ji = I ( X ( j ) t  1 ; x ( i ) t ) (which gives ˜ A ji = ˜
A ij ).
The implementation details for each method and each experiment are provided in Appendix D and
Appendix E, respectively.
Table 1 and 2 shows the average AUC-PR and AUC-ROC with each N , each with four random initializations of the true underlying causal matrix A and dataset.
N        method Ours 0. [Table] We see that not only does our method outperform other methods by a large margin across all N s, it also shows good performance when N is as large as 30, demonstrating our method’s capability and scalability to infer complex causal structures from interacting time series.
For the Causal Inﬂuence [Table] method, although it has very good mathematical properties, it may be impractical in practice, as is also shown in the table.
This is due to that it is deﬁned as the KL-divergence between ( X t  1 , x ( i ) t  1 ) and ( X (˜ j ) t  1 , x ( i ) t  1 ) , each of which is an ( NK + 1) M  dimensional vector, which can quickly go to high dimensions, where density estimation required to calculate KL-divergence is in general data-hungry and difﬁcult.
In comparison, our method that estimates causal strength via minimizing prediction errors is comparatively easier in high dimensions (only have to predict a M dimensional vector conditioned on the inputs), which contributes to a better performance when N is large.
Since in practice, we do not know the underlying causal structure a priori , it presents a greater challenge to select the model capacity for f ✓ , as compared with supervised learning method where we can do cross-validation.
To see how the capacity of the function approximator f ✓ inﬂuences our method, we vary the number of layers and the number of neurons in each layer at N = 10 .
Table 3 summarizes the result.
We see that our method’s performance here is hardly inﬂuenced by the model capacity, with only a slight degradation at very low capacity.
This shows that our method is quite tolerant and stable with model capacity variations.
[Table]
4. E XPERIMENTS WITH V IDEO GAMES
To see how our method can infer causal relations in real videos games, and potentially helping reinforcement learning (RL) or imitation learning, we apply our method to the causal inference between the trajectories of different objects from a trained CNN RL-agent playing Atari Breakout games (Bellemare et al.
, implementation details see Appendix F).
Fig 1 shows the inferred
W ji matrix, with the ( j, i ) th element denoting the inferred causal strength from j to i .
We see that there is a prominent causal direction from the ball’s y position to the reward, which correctly summarizes that the ball’s y position has a large inﬂuence on the reward.
Additionally, the other discovered causal directions with causal strength greater than 1 include: brick !
reward, ball-y !
brick, reward !
paddle, ball-x ! action, ball-y ! action.
The former two correctly summarize causal chains from ball-y !
brick !
reward, the latter two show that the ball’s x and y positions also have big causal inﬂuences on the trained agent’s action: in order that the ball does not fall to the bottom, the agent has to position itself at the right position depending on the x and y positions of the ball.
It will be an interesting future research direction in how we can leverage the inferred causal matrix to help an RL agent learn faster. For example, this may be possible by reasoning with a causal chain backwards from the reward to actions, and by searching over policies that can maximally inﬂuence the entities in the backward causal chain.
4. HEART - RATE VS . BREATH - RATE AND RAT BRAIN EEG DATASETS
Now we test our algorithm with real-world datasets.
As a common dataset studied in previous causal works, we use the time-series of the breathing rate and instantaneous heart rate of a sleeping patient suffering from sleep apnea (samples 2350-3550 of data set B from Santa Fe Institute time series contest held in 1991, available in PhysioNet).
We apply our method to infer the causal strength between the breathing rate and heart rate, with different maximum time horizon K .
The result is shown in Fig.
The causal strength from heart to breath is signiﬁcantly higher than the reverse direction, consistent with the results from previous causal inference methods (Schreiber (2000);
Ancona et al.
; Marinazzo et al.
(2008a)) as are also shown in Fig.
Notably, the causal strength remains at roughly the same level for different K s, showing a merit of our method in estimating causal strength across different time-horizons, aided by the ﬂexibility of f ✓ in extracting the right information to predict the future.
The implementation details in this section is provided in
Appendix G.
As a second real-world example, we apply our algorithm in estimating the causal strength of the
EEG signals between the right and left cortical intracranial electrodes (Quiroga), also studied in
Ancona et al.
; Quiroga et al.
; Marinazzo et al.
(2008a).
Figure 3 (left) shows the inferred causal strength W ji for the EEG signals of a normal rat.
We see that there is only a slight asymmetry, with the right channel having a slightly stronger inﬂuence on the left channel than the reverse direction.
Figure 3 (right) shows W ji for the EEG signals with unilateral lesion in the rostral pole of the reticular thalamic nucleus.
We see that there is stronger causal inﬂuence from the left to the right channels, in consistent with previous analysis in Ancona et al. ; Quiroga et al.
; Marinazzo et al.
(2008a).
The above two applications demonstrate our method’s capability in inferring the causal relations from noisy, real-world data.
C ONCLUSION
In this paper, we have addressed causal inference by proposing a novel causal measure, deﬁned via a novel learnable noise risk , that allows function approximators like neural nets to learn complex causal relations via the Causal Inference with Learnable Noise (CILN) algorithm.
We proved that under certain conditions, the positiveness of our measure implies direct structural causality, providing a solid theoretical bridge between risk minimization and causal inference.
We demonstrated in synthetic nonlinear datasets that our method outperforms previous methods by a large margin in inferring causal relations with complex structures, can scale to a large number of time series, and
[Figure]
is hardly inﬂuenced by the capacity of the function approximator.
Our method also correctly infers the causal arrows by watching a trained CNN playing Breakout, and give causal directions consistent with prior works in real-world heart-rate vs. breath-rate and rat EEG datasets.
We believe our work can pave the way for future exciting advancements in enabling machine learning models to understand causality, a key component of human intelligence.
A T HEOREM 1 AND PROOF
Here, we formally propose a theorem corresponding to the statement in section 3.2, and provide proof afterwords.
Theorem 1.
For system Eq. 1, for any i, j 2 { 1 , 2 , ...N } , i 6 =
j , if X ( j ) t  1 Granger-causes x ( i ) t , then
X ( j ) t  1 directly structurally causes x ( i ) t .
Proof.
We base the proof on the Theorem 5.6 in White et al.
Firstly, by deﬁnition, the system
Eq.
(1) belongs to the canonical settable system (Def. 3.3 in White et al.
(2011)), on which their
Theorem 5.6 is based.
To prove that in our system Granger causality can deduce direct structural causality, we only have to prove that the assumption A.1 and assumption A.2 in White et al.
(2011) are satisﬁed by our system.
If we identify our x ( i ) t with their Y 1 ,t , our X t  1 with their Y t  1 , our x ( j ) t with their Y 2 ,t , our u i,t (our u i at time t ) with their U 1 ,t , our u j,t with their U 2 ,t , their Z t = ? , W t = ? , then our system Eq.
(1) satisﬁes their Assumption A.1.
Additionally, by deﬁnition, our u i 2 R M , i = 1 , 2 , ...N are random variables that are mutually independent, and also independent of any X ( i ) t  1 , x ( i ) t , i 2 { 1 , 2 , ...N } .
Therefore, our system satisﬁes their strict exogeneity ( Y t  1 , Z t ) ?? U 1 ,t (in our representation ( X t  1 , ? ) ?? u i,t ), which is a sufﬁcient condition for Assumption A.2.
Therefore, both their Assumption A.1 and Assumption A.2 are satisﬁed by our system Eq.
Applying their Theorem 5.6, we prove Theorem 1.
⌅
B A NALYZING THE PROPERTY OF THE LEARNABLE NOISE RISK
Firstly we state the assumption that will be used throughout this section:
Assumption 1.
Assume that f ✓ 2 F is a continuous function and has enough capacity so that it can approximate any
[Equation]
Let j {+
+}
=
i and assume that P ( X ( j ) t  1 ) has support with intrinsic dimension of KM .
Also we emphasize that in this paper, the expected risks (with symbol R ) are w.r.t.
the distributions, and the empirical risks (with symbol ˆ R ) are w.r.t.
a dataset drawn from the distribution, with ﬁnite number of examples.
The theorems in this paper are all proved w.r.t.
distributions (assuming inﬁnite number of examples).
Sample complexity results will be left for future work.
The structure of this section is as follows.
First in subsection B.1 and B.2, we prove three lemmas that will be helpful for the following analysis.
Then in subsection B.3, we analyze the property of the learnable noise risk both qualitatively and quantitatively, and argue why the learnable noise risk is likely to select the variables that directly structurally causes x ( i ) t .
B. P ROVING A LEMMA
Here we prove Lemmas 1.1.
Lemma 1.1.
Suppose that Assumption 1 holds, we have
[Equation]
and
[Equation]
In other words, for the MSE risk, its minimum is attained when f ✓ ( X t  1 ) is the expectation of x ( i ) t
Proof.
The proof of the lemma is adapted from Papoulis (1985).
The risk
[Equation]
Note that here ( x ( i ) t  f ✓ ( X t  1 )) 2 ⌘
[Equation]
↵ is an inner product in
R M .
For any X t  1 , treating f ✓ ( X t  1 ) 2 R M as a vector, let’s calculate its value such that the integral
F ( f ✓ ( X t  1 )) :
= [Equation] attains its minimum.
Let
[Equation]
⌘ we have
[Equation]
Therefore, for any X t  1 , f ✓ ( X t  1 ) = [Equation]
is the only stationary point for
F ( f ✓ ( X t  1 )) .
Taking the second derivative, we have
[Equation]
where I is an M ⇥ M identity matrix, which is always positive deﬁnite.
Therefore, for any X t  1 , f ✓ ( X t  [Equation] = [Equation]
is the only global minimum of
F ( f ✓ ( X t  1 )) w.r.t.
f ✓ ( X t  1 ) .
Since
[Equation]
The minimum of the risk R X ,x ( i ) [ f ✓ ] is attained iff F ( f ✓ ( X t  1 ))
attains minimum at every X t  1 , i.e.,
[Equation]
is true for any X t  1 .
Given Assumption 1, we know that f ✓ 2 F has enough capacity such that it can approximate any [Equation]
Therefore,
[Equation]
and
[Equation]
B. M INIMUM MSE WITH DIFFERENT VARIABLES
Lemma 1.2.
Suppose that Assumption 1 holds, and X ( U ) t  1 , X ( V ) t  1 , X ( W ) t  1 ⇢ X t  1 are mutually exclusive sets of variables satisfying
[Equation]
Then min
[Equation]
Proof.
Since Assumption 1 holds
[Equation]
according to Lemma [Equation] [Equation] Lemma 1.2 is equivalent to
[Equation]
We have
[Equation]
# =
Z dX ( U ) t  1 dX ( W ) t  1 dx ( i ) t P
( X ( U ) t  1 , X ( W ) t  1 , x ( i ) t )
✓ x ( i ) t
[Equation]
Z dx ( i ) t P ( x ( i ) t | X ( U ) t  1 , X ( W ) t  1 ) x ( i ) t ◆ = Z dX ( U ) t  1 dX ( V ) t  1 dX ( W ) t  1 dx ( i ) t P ( X ( U ) t
[Equation]
X ( V ) t
[Equation]
X ( W ) t
[Equation]
( i ) t )
✓ x ( i ) t
[Equation]
Z dx ( i ) t P ( x ( i ) t | X ( U ) t  1 , X ( W ) t  1 ) x
( i ) t ◆ =
Z
[Equation]
[Equation]
) t
[Equation]
[Equation]
) t
[Equation]
[Equation]
[Equation]
( U ) t
[Equation]
[Equation]
( V ) t  1 )
[Equation]
[Equation]
( W ) t
[Equation]
[Equation]
( U ) t
[Equation]
X ( V ) t  1 ) ·
Z
[Equation]
( i )
[Equation]
i
[Equation]
U )
[Equation]
) t
[Equation]
( i )
[Equation]
Z dx ( i ) t
[Equation]
( x ( i ) t
[Equation]
U )
[Equation]
[Equation] ) t  [Equation] i
[Equation] ◆ >
Z
[Equation]
The third equality (the one before the inequality) is due to that X ( W ) t  1 ??
x ( i ) t | X ( U ) t  1 , X ( V ) t  1 , leading to P ( X ( U ) t  1 , X ( V ) t  1 , X [Equation] W ) [Equation]
1 , x [Equation] i [Equation]
P
[Equation]
[Equation]
[Equation]
( V ) t  1 ) .
The inequality step ﬁrst uses the setting in Eq.
(1) that the noise variables u
i are effective arguments of the response functions
h i , and that each h i is “causality in mean".
Therefore,
[Equation] ( i ) t .
Using Lemma 1.1, we have f ✓ ( X ( U ) t  1 , X ( V ) t  1 ) = R dx ( i ) t P ( x ( i ) t | X ( U ) t  1 , X ( V ) t  1 ) x
( i ) t minimizes
R dx ( i ) t P ( x ( i ) t | X ( U ) t  1 , X ( V ) t  1 ) ⇣ x ( i ) t  f ✓ ( X ( U ) t  1 , X ( V ) t  1 ) ⌘ 2 , hence the inequality. ⌅
Lemma 1.3.
Suppose that Assumption 1 holds, and X ( D ) t  1 ✓ X t  1 are the set of variables that directly structurally causes x ( i ) t .
Then 8 X ( S ) t  1 ✓ X t  1 with X ( S ) t  1 {+
+}
= X ( D ) t  1 , we have
[Equation]
Speciﬁcally, we have
[Equation]
where X ( ˆ D ) t  1 =
X t  1 \ X ( D [Equation]  1 .
Proof.
For any X ( S ) t  1 , let X ( U ) t  1 =
X ( D ) t  1 \ X ( S ) t  1 , X ( V ) t  1 =
X ( D ) t  1 \ X ( S ) t  1 , X ( W ) t  1 = X ( S ) t  1 \ X ( D ) t  1 .
Then
X ( U ) t  1 , X ( V ) t  1 , X ( W ) t  1 are mutually exclusive, and X ( D ) t  1 = X ( U ) t  1 [ X ( V ) t  1 , X ( S ) t  1 =
X ( U ) t  1 [ X ( W ) t  1 .
Now we prove that 8 X ( S ) t  1 ✓ X t  1 with X ( S ) t  1 {+
+}
= X ( D ) t  1 , the corresponding X ( U ) t  1 , X ( V ) t  1 , X ( W ) t  1 , x ( i ) t satisfy the condition for Lemma 1.2.
Since X ( D ) t  1 are the set of variables that directly structurally causes x ( i ) t , there does not exist a X ( S ) t  1 such that the corresponding X ( V ) t  1 ?? x ( i ) t | X ( U ) t  1 , X ( W ) t  1 (otherwise it violates the deﬁnition of direct structural causality).
Thus X ( V ) t  1 6?? x ( i ) t | X ( U ) t  1 , X ( W ) t  1 .
To prove
X ( W ) t  1 ?? x ( i ) t | X ( U ) t  1 , X ( V ) t  1 , note that X ( W ) t  1 does not directly structurally cause x ( i ) t , then by Theorem 1, X ( W ) t  1 does not Granger-cause x ( i ) t , i.e. P ( x ( i ) t | X ( U ) t  1 , X ( V ) t  1 ) =
P ( x ( i ) t | X ( U ) t  1 , X ( V ) t  1 , X ( W ) t  1 ) , which is equivalent to X ( W ) t  1 ?? x ( i ) t | X ( U ) t  1 , X ( V ) t  1 .
The special case of X ( ˆ D ) t  1 follows directly that X ( ˆ D ) t
[Equation]
= X [Equation]
\ X ( [Equation] ) t
[Equation]
6 = X ( D ) t  1 and letting X ( S ) t  1 =
X ( ˆ D ) t  1 .
⌅ B. Q UALITATIVE AND QUANTITATIVE BEHAVIORS OF THE LEARNABLE NOISE RISK
In this section, we analyze the qualitative and quantitative behaviors of the learnable noise risk (Eq. 2), with varying noise levels ⌘ j .
For each variable X ( j ) t  1 2 X t  1 , j = 1 , 2 , ...N , deﬁne ⇢ j = tanh ⇣ I ( X ( j ) t  1 ; ˜ X ( j )( ⌘ j ) t ) ⌘[0 , 1] as a “rescaled" mutual information between X ( j ) t  1 and ˜ X ( j )( ⌘ j ) t .
When ⌘ j =
so that ˜ X ( j )( ⌘ j ) t = X ( j ) t  1 , ⇢ j = 1 .
When all elements of ⌘ j ! 1 , ⇢ j = 0 .
Denoting ⇢ = ( ⇢ 1 , ⇢ 2 , ... ⇢ N ) , we can then rewrite the learnable noise risk (Eq. 2) as
[Equation]
[Equation]
where MMSE ( i ) ( ⇢ ) = min ⌘ ,f ✓ E X t  1 ,x ( i ) t , ✏  ⇣ x ( i ) t
[Equation]
f ✓ ( ˜
[Equation]
( ⌘ ) t  1 ) ⌘  subject to ⇢ j = tanh
[Equation]
Let X ( D ) t  1 ✓ X t  1 be the set of variables that directly structurally causes x ( i ) t , and denote the corresponding set of ⇢ j as ⇢ ( D ) .
Denote
[Equation]  1 =
X t  1 \ X ( D ) t  1 and the corresponding set of ⇢ j as ⇢ ( ˆ D ) .
For any i = 1 , 2 , ...
N , we have the following properties:
MMSE ( i ) ( ⇢ ) attains maximum at ⇢ = 0 .
MMSE ( i ) ( ⇢ ) is monotonically decreasing w.r.t.
each ⇢ j . 3.
MMSE ( i ) ( ⇢ )  ⇢ ( D ) = 1 , ⇢ ( ˆ D ) = 0 < MMSE ( i ) ( ⇢ )
⇢ ( D ) = 0 , ⇢ ( ˆ D ) =
1 (using Lemma 1.3).
MMSE ( i ) ( ⇢ ) attains minimum at ⇢ ( D ) = 1 . MMSE ( i ) ( ⇢ )  ⇢ ( D ) = 1 is constant w.r.t.
⇢ ( ˆ D ) .
To get a better intuition of the landscape of R X ,x ( i )
[ f ✓ , ⇢ ] , let’s investigate a simple example.
Let the response function be:
[Equation]
where u 1 , u 2 , u 3 are independent unit Gaussian variables, and X t  1 =
( X (1) t  1 , X (2) t  1 , X (3) t  1 ) =
⇣ ( x (1) t  2 , x (1) t  1 ) , ( x (2) t  2 , x (2) t  1 ) , ( x (3) t  2 , x (3) t  1 ) ⌘ .
For R X ,x (3) [ f ✓ , ⇢ ] =
MMSE (3) ( ⇢ ) +  ·
P 3 j =1 arctanh ( ⇢ j ) , since only x (1) t  2 and x (2) t  1 are d-connected to x (3) t , at the minimization of
R X ,x (3) [ f ✓ , ⇢ ] , only x (1) t  2 and x (2) t  1 may have a ﬁnite ⌘ ⇤ j,l (the other ⌘ ⇤ j,l are all inﬁnite).
Therefore, setting the ⌘ j,l not corresponding to x (1) t  2 and x (2) t  1 as inﬁnity, and let ˜ x
(1) t  2 = x (1) t  2 + ⌘ x · ✏ x , ˜ x (2) t  1 = x (2) t  1 + ⌘ y · ✏ y , ✏ x and ✏ x being independent unit Gaussian variables.
Let f ✓ ( x (1) t  2 , x [Equation]
2) t  1 ) = a · x (1) t  2 + b · x (2) t  1 , then we can get an analytic expression for R X ,x (3)
[ f ✓ , ⌘ x , ⌘ y ] :
R X ,x (3) [ f ✓ , ⌘ x , ⌘ y ]
[Equation]
Minimizing R X ,x (3) [ f ✓ , ⌘ x , ⌘ y ] w.r.t.
a and b , we get
[Equation]
Substituting into R X ,x (3) [ f ✓ , ⌘ x , ⌘ y ] , we have
[Equation]
◆
Here we have neglected the constant ⌦ y .
To obtain R X ,x (3) [ ⇢ ] , let ⇢ 1 = tanh ⇣ 12 log ⇣ 1 + ⌃ x ⌘
[Equation]
⌘⌘ , ⇢ 2 = tanh ⇣ [Equation] ⇣
[Equation] ⌘⌘ , we have ⌘ 2 x = 1  ⇢ 1 [-
 ρ-]2 ⇢ 1 ⌃ x , ⌘ 2 y = 1  ⇢ 2 2 ⇢ 2 ( ⌃ x + ⌦ x ) .
Substituting, we have
R X ,x
[Equation]
[ ⇢ ] =
MMSE
[Equation]
·
[Equation]
x
[Equation]
[Equation]
Fig.
4 shows the landscape of MMSE (3) ( ⇢ ) and R X ,x (3) [ ⇢ ] , for ⌃ x = 1 , ⌦ x = 2 ,  = 1 .
We see that
MMSE (3) ( ⇢ ) satisﬁes the above mentioned four properties.
Particularly, MMSE (3) ( ⇢ ) [Equation]
MMSE (3) ( ⇢ )  ⇢ 1 =0 , ⇢ 2 =1 .
After adding  · arctanh ( ⇢ 1 ) +  · arctanh ( ⇢ 2 ) , the R X ,x (3) [ ⇢ ] has global minimum along ⇢ 1 = 0 largely due to this property.
Therefore, for this particular example, when
R X ,x (3) [ ⇢ ] is minimized, ⇢ 1 = 0 , i.e. I ( x (1) t  2 , ˜ x (1)( ⌘ ⇤ 1 ) t ) = 0 .
[Figure]
By varying the value of  , we can tune the relative inﬂuence of the two terms MMSE (3) ( ⇢ ) and P 2 j =1 arctanh ( ⇢ j ) .
The landscape corresponding to  = 0 .
5 , 2 , 10 are plotted in Fig.
We see that when  ⌧ 1 , the MMSE term dominates, and it is possible that the global minimum of R X ,x (3) [ ⇢ ] is not at ⇢ 1 = 0 .
This is similar to the effect of a L1 regularization, where if the coefﬁcient  for the L1 is vanishingly small, the L1 regularization will barely inﬂuence the loss landscape.
When  is not vanishingly small, as in Fig.
5 (b), we see that the global minimum of
R X ,x (3) [ ⇢ ] lies on ⇢ 1 = 0 .
When  ! + 1 , the P 2 j =1 arctanh ( ⇢ j ) term dominates and the global minimum is at ⇢ 1 = 0 , ⇢ 2 = 0 .
In general, we expect R X ,x
( i ) [ ⇢ ] behave qualitatively similar.
When  ! + 1 , the global minimum for R X ,x ( i ) [ ⇢ ] is at ⇢ ⇤ = 0 .
As we ramp down  , the dimension that has largest inﬂuence on MMSE will ﬁrst host the global minimum with nonzero ⇢ ⇤ j , which is most likely the variable that directly structurally causes x ( i ) i .
When  is further ramping down, we expect that the variables that host the global minimum with nonzero ⇢ j will more likely be those that directly structurally causes x ( i ) i , due to the landscape inﬂuenced by the four properties of MMSE.
This can justify the learnable noise risk as a good objective for causal discovery/variable selection.
The experiments in the paper will empirically test the performance of the learnable noise risk.
C U PPER BOUND FOR THE LEARNABLE NOISE RISK
In this section, we prove that I ( ˜ X ( j )( ⌘ j ) t
[Equation]
j,l ◆ .
We formally state the theorem as follows:
Theorem 2.
Let ˜ X
( j )( ⌘ j ) t := X ( j ) t  1 + ⌘ j · ✏ j , j = 1 , 2 , ...
N be the noise-corrupted inputs with learnable noise amplitudes ⌘ j 2 R KM , and ✏ j ⇠ N ( 0 , I ) .
We have
[Equation]
where l is the l th element of a vector, std ( X ( j ) t  1 ,l ) is the standard deviation of X ( j ) t  1 ,l across t .
The equality is reached when X ( j ) t  1 obeys a multivariate Gaussian distribution with diagonal covariance matrix ⌃ satisfying ⌃ l,l = Var ( X ( j ) t  1 ,l ) + ⌘ 2 j,l .
[Figure]
Proof.
We have
[Equation]
Here H ( · ) is differential entropy.
For ˜ X ( j )( ⌘ j ) t , its variance at the l th dimension is
[Equation]
The second equality is due to that X ( j ) t  1 is independent of ✏ j .
Using the principle of maximum entropy, the distribution that maximizes H ( ˜ X ( j )( ⌘ j ) t ) subject to the constraint of Var ( ˜ X ( j )( ⌘ j ) t  1 ,l ) =
Var ( X ( j ) t  1 ,l ) + ⌘ 2 j,l , l = 1 , 2 , ...
KM is a Gaussian distribution whose diagonal covariance matrix ⌃ satisﬁes ⌃ l,l
= Var ( X ( j ) t  1 ,l )+ ⌘ 2 j,l .
Its entropy is H ( ˜ X ( j )( ⌘ j ) t )
[Equation]
[Equation]
[Equation] ⌘ 2 j
[Equation]
l
[Equation]
Var ( X ( j ) t  1 ,l )) .
Therefore,
[Equation]
The equality is reached when X ( j ) t  1 obeys a multivariate Gaussian distribution with diagonal covariance matrix ⌃ satisfying ⌃ l,l = Var ( X ( j ) t  1 ,l ) + ⌘ 2 j,l .
⌅
D I MPLEMENTATION DETAILS FOR THE METHODS
Here we state the implementation details for our method, as well as other methods being compared.
Throughout this paper, unless otherwise speciﬁed, we use the standard technique in Kraskov et al.
(2004) to estimate the KL-divergence and mutual information, which is used in our implementations of Mutual information, Transfer Entropy and Causal Inﬂuence.
D. O UR METHOD
Without stating otherwise, our method (Algorithm 1) as a default uses a three layer neural net, with two hidden layers having 8 neurons and SELU (Klambauer et al.
(2017)) activation, and the last layer having linear activation.
Adam (Kingma & Ba (2014)) optimizer with learning rate = 10  4 is used as default throughout this paper.
We set ⌘ 0 = 0 .
01 and  = 0 .
We use 10000 epochs, with earlystopping such that if the best validation loss does not go down for 40 monitoring points (we monitor the validation loss every 20 epochs), do early-stop.
It also has a 400 epoch warm-up period where the mutual information term is turned off, to allow f ✓ to ﬁnd a good initial model as a start.
We use the approximation I ( ˜ X ( j )( ⌘ ⇤ j ) t  [Equation] X [Equation]
[Equation]
P [Equation] l =1 log (1 + 1 /  2 j,l ) in the risk and also in estimating W ji , as discussed in the main text in 3.3.
Here  j,l = ⌘ j,l std ( X ( j ) t  [Equation] ,l ) is the relative noise scale w.r.t.
the standard deviation of each element, l denoting the l th element of the KM -dimensional vector.
In this work, we ﬁx  j,l to be the same for each j , and let  j be a single parameter instead of a vector.
This simpliﬁes the risk calculation, and also to a ﬁrst order invariant to the reparameterizaiton of each time series X ( j ) t  1 .
D. T RANSFER E NTROPY
We use the deﬁnition of transfer entropy as deﬁned in Schreiber (2000).
In that work the transfer entropy is deﬁned for two time series.
To deal with multiple time series, we let X (ˆ j ) t  1 also include other time series, similar to the extension of transfer entropy as in Lizier et al.
D. C AUSAL I NFLUENCE
For causal inﬂuence, we use the same network architecture as in our method, to learn a prediction model.
Then the KL divergence is estimated via the technique in Kraskov et al.
D. L INEAR G RANGER
We use the deﬁnition of linear Granger causality (Eq.
(7) and (8) in Ding et al.
to calculate linear Granger causality.
Speciﬁcally, we estimate the variance of the residue of a linear predictor of x ( i ) t  1 with and without X ( j ) t  1 (also conditioned on X (ˆ j ) t  1 ), using Levinson-Whittle(-Wiggins) and
Robinson algorithm (Morf et al.
Then the linear Granger causality equals the log of the ratio of the two variances.
E I MPLEMENTATION DETAILS FOR SYNTHETIC EXPERIMENTS
For all experiments in this section, each metrics is obtained by performing the experiments (including generation of the dataset and the training) four times with seed = 0 , 30 , 60 , 90 and averaging the resulting metrics.
For the ground-truth causal tensor A , each element
A ji is a K ⇥ M matrix, with 0.5 probability of being an all-zero matrix, and 0.5 probability of being a nonzero matrix.
If
A ji is a nonzero matrix, its each element is sampled from a log-normal distribution with µ = 0 and  = 1 .
For B , each B j is also a K ⇥ N matrix, with each element sampling from U [  1 , 1] .
We use H 1 ( x ) =
softplus ( x ) = log (1 + e x ) , and H 2 ( x ) =
tanh ( x ) in equation (6).
As a default,time series each with length of 22 are generated from Eq.
(6), each of which is wrapped into( X t  1 , x ( i ) t ) pairs (since K = 3 ), so there are in total 500 ⇥ 19 = 9500 examples for each dataset.
The train-test-split is 4:1 for all experiments in this paper.
F D ETAILS FOR THE VIDEO GAME DATASET
Here, we implement a custom Atari Breakout game in the OpenAI Gym (Brockman et al.
environment, mimicking the original game, where we can access the state of the ball, paddle and bricks, etc.
This representation is also used in the OO-MDP
(Diuk et al.
(2008)) paradigm for a more efﬁcient representation of the environment state.
We use the DQN algorithm, the same CNN architecture as in Mnih et al.
(2015) to train an RL agent.
Then we let it play the game forsteps, obtaining a dataset with time-length of 20000 steps (if the agent dies, we restart the game) and 6 time series: action, paddle’s x position, ball’s x position, ball’s y position, number of bricks and reward.
We then feed the time series (each time series normalized to mean of 0 and variance of 1) to our method, the same procedure as performed in the synthetic experiment, to let it produce an inferred causal matrix W ji , which is shown in Fig.
All the datasets used in this paper and code will be open-sourced upon publication of the paper.
G I MPLEMENTATION DETAILS FOR THE REAL - WORLD DATASET
For the two real-world datasets, we obtain the data with the same procedure as in Ancona et al.
Then the data (each time series normalized to mean of 0 and variance of 1) are fed into our algorithm to infer the causal strength W ji with the default settings as described in Appendix D and
E.
For each K = 1 , 2 , ... 20 , the experiments are run for 50 times with seed from 0 to 49, and Fig.and Fig.