Amortized Causal Discovery: Learning to Infer Causal Graphs from Time-Series Data
Bernhard Caroline Uhler
Zhang
Abstract
On time-series data, most causal discovery methods fit a new model whenever they encounter samples from a new underlying causal graph.
However, these samples often share relevant information which is lost when following this approach. Specifically, different samples may share the dynamics which describe the effects of their causal relations.
We propose Amortized Causal Discovery, a novel framework that leverages such shared dynamics to learn to infer causal relations from timeseries data.
This enables us to train a single, amortized model that infers causal relations across samples with different underlying causal graphs, and thus leverages the shared dynamics information.
We demonstrate experimentally that this approach, implemented as a variational model, leads to significant improvements in causal discovery performance, and show how it can be extended to perform well under added noise and hidden confounding.
1. Introduction
Inferring causal relations in observational time-series is central to many fields of scientific inquiry (Spirtes et al., 2000; Berzuini et al., 2012).
Suppose you want to analyze fMRI data, which measures the activity of different brain regions over time – how can you infer the (causal) influence of one brain region on another?
This question is addressed by the field of causal discovery (Glymour et al., 2019).
Methods within this field allow us to infer causal relations from observational data – when interventions (e.g. randomized trials) are infeasible, unethical or too expensive.
In time-series, the assumption that causes temporally precede their effects enables us to discover causal relations in observational data (Peters et al., 2017); with approaches relying on conditional independence tests (Entner and Hoyer, 2010), scoring functions (Chickering, 2002), or deep learning (Tank et al., 2018).
All of these methods assume that samples share a single underlying causal graph and refit a new model whenever this assumption does not hold.
However, samples with different underlying causal graphs may share relevant information, such as the dynamics describing the effects of causal relations.
For instance, we may want to infer synaptic connections (i.e. causal relations) between neurons based on their spiking behavior, from a set of recordings of neuronal
[Figure] firing. Despite recording different populations of neurons with different wiring, the dynamics of how neurons connected by synapses influence one another may stay the same. This principle occurs in a number of areas: fMRI test subjects may have varying brain connectivity but the same underlying neurochemistry; social networks may have differing structure but comparable interpersonal relationships; different stocks may relate differently to one another but obey similar market forces.
Despite a range of relevant applications, inferring causal relations across samples with different underlying causal graphs is as of yet largely unexplored.
In this paper, we propose a novel causal discovery framework for time-series that embraces this aspect: Amortized Causal Discovery (Fig. 1).
In this framework, we learn to infer causal relations across samples with different underlying causal graphs but shared dynamics.
We achieve this by separating the causal relation prediction from the modeling of their dynamics: an amortized encoder predicts the edges in the causal graph, and a decoder models the dynamics of the system under the predicted causal relations.
This setup allows us to pool statistical strength across samples and to achieve significant improvements in performance with additional training data.
It also allows us to infer causal relations in previously unseen samples without refitting our model.
Additionally, we show that Amortized Causal Discovery can improve robustness under hidden confounding by modeling the unobserved variables with the amortized encoder.
Our contributions are as follows:
• We formalize Amortized Causal Discovery (ACD), a novel framework for causal discovery in time-series, in which we learn to infer causal relations from samples with different underlying causal graphs but shared dynamics (Eq.
• We propose a variational model for ACD, applicable to multi-variate, non-linear data.
• We present experiments demonstrating the effectiveness of this model on a range of causal dis - covery datasets, in the fully observed setting, with added noise, and under hidden confounding.
2. Background: Granger Causality
Granger causality (Granger, 1969) is one of the most commonly used approaches to infer causal relations from observational time-series data.
Its central assumption is that causes precede their effects: if the prediction of the future of time-series Y can be improved by knowing past elements of time-series X , then X “Granger causes” Y .
Originally, Granger causality was defined for linear relations; we follow the more recent definition of Tank et al.
(2018) for non-linear Granger causality:
Definition 1 Non-Linear Granger Causality:
Given N stationary time-series x = { x 1 , ... x N } across time-steps t = { 1 , ..., T } and a non-linear autoregressive function g j , such that
[Equation]
where x ≤ t j = ( ..., x t − 1 j , x tj ) denotes the present and past of series j and ε t +1 j represents independent noise.
In this setup, time-series i Granger causes j , if g j depends on x ≤ t i , i.e. if ∃ [Equation]
t
[Equation]
Granger causal relations are equivalent to causal relations in the underlying directed acyclic graph (DAG)
if all relevant variables are observed and no instantaneous 1 connections exist (Peters et al., 2013, 2017, Theorem 10.1).
Many methods for Granger causal discovery, including vector autoregressive (Hyvärinen et al., 2010) and more recent deep learning-based approaches (Tank et al., 2018; Khanna and Tan, 2019;
Wu et al., 2020), can be encapsulated by a particular framework:
Define a function f θ (an MLP in Tank et al.
a linear model in Hyvärinen et al.
(2010)), which learns to predict the next time-step of a given test sequence x test .
Fit f θ to x test by minimizing some loss L : θ ⋆ = argmin θ L ( x test , f θ ) .
Apply some fixed function h (e g. thresholding) to the learned parameters to produce the Granger causal graph estimate for x test : ˆ G x test =
h ( θ ⋆ ) .
For instance, Tank et al.
(2018) infer the Granger causal relations through examination of the weights θ ⋆ : if all outgoing weights w ij between time-series i and j are zero, then i does not Granger-cause j .
The shortcoming of this approach is that, when we have S samples x 1 , . . .
, x S with different underlying causal graphs, the parameters θ must be optimized separately for each of them.
As a result, methods within this framework cannot take advantage of the information that might be shared between samples.
This motivates us to question: can we amortize this process?
3. Amortized Causal Discovery
We propose Amortized Causal Discovery (ACD), a framework in which we learn to infer causal relations across samples with different underlying causal graphs but shared dynamics.
To illustrate, we return to the example from Section 1: suppose you want to infer synaptic connections (i.e. causal relations) between neurons based on their spiking behavior.
You are given a set of S recordings (i.e. samples), each containing N time-series representing the firing of N individual neurons.
Even though you might record across different populations of neurons with different wiring, the dynamics of how neurons connected by synapses influence one another stays the same.
ACD takes advantage of such shared dynamics to improve the prediction of causal relations.
Given a training set X train and test sequence x test , it can be summarized as follows:
Define an encoding function f ϕ which learns to infer Granger causal relations of any sample x i in X train .
Define a decoding function f θ which learns to predict the next time-step of the samples under the inferred causal relations.
Fit f ϕ and f θ to X train by minimizing some loss L : f ϕ ⋆ , f θ ⋆ = argmin
f ϕ ,f θ L ( X train , f ϕ , f θ ) .
For a test sequence x test , simply output the Granger causal graph estimate ˆ G x test : ˆ G x test =
f ϕ ⋆ ( x test ) .
By dividing the model into two parts, an encoder and a decoder, ACD can use the activations of f ϕ ⋆ to infer causal structure.
This increases the flexibility of our approach greatly compared to methods that use the learned weights θ ⋆ such as the prior Granger causal discovery methods described in
Section 2.
In this section, we describe our framework in more detail, and provide a probabilistic implementation thereof.
We also extend our approach to model hidden confounders.
Preliminaries
We begin with a dataset X
= { x s } Ss =1 of S samples, where each sample x s consists of N stationary time-series x s = { x s, 1 , . . .
, x s,N } across time-steps t = { 1 , ..., T } .
We denote the t -th time-step of the i -th time-series of x s as x ts,i (sometimes omitting s for brevity).
We assume there is an associated directed acyclic graph G 1: T s = {V 1: T s , E 1: T s } underlying the generative process of each sample.
This is a structural causal model (SCM) (Pearl, 2009).
Its endogenous (observed) variables are vertices v ts,i ∈ V 1: T s for each time-series i and each time-step t .
Every set of incoming edges to an endogenous variable defines inputs to a deterministic function g ts,i which determines that variable’s value 2 .
The edges are defined by ordered pairs of vertices E 1: T s =
{ ( v ts,i , v t ′ s,j ) } , which we make two assumptions about:
No edges are instantaneous ( t = t ′ ) or go back in time.
Thus, t < t ′ for all edges.
Edges are invariant to time.
Thus, if ( v ts,i , v t + k s,j ) ∈ E 1: T s , then ∀ 1 ≤ t ′ ≤ T − k : ( v t ′ s,i , v t ′ + k s,
j ) ∈ E 1: T s .
The associated structural equations g t s,i are invariant to time as well, i.e. g t s,i =
g t ′ s,i ∀ t, t ′ .
The first assumption states that causes temporally precede their effects and makes causal relations identifiable from observational data, when no hidden confounders are present (Peters et al., 2013, 2017, Theorem 10.1).
The second simplifies modeling: it is a fairly general assumption that allows us to define dynamics that govern all time-steps (Eq.
Throughout this paper, we are interested in discovering the summary graph G s =
{V s , E s } (Peters et al., 2017).
It consists of vertices v s,i ∈
V s for each time-series i in sample s , and has directed edges whenever they exist in E 1: T s at any time-step,
i.e. E s =
( v s,i , v s,j ) | ∃ t, t ′ : ( v ts,i , v t ′ s,j ) ∈
E 1: T s } .
Note that while G 1: T s is acyclic (due to the first assumption above), the summary graph G s may contain (self-)cycles.
Amortized Causal Discovery
The key assumption for Amortized Causal Discovery is that there exists some fixed function g that describes the dynamics of all samples x s ∈ X given their past observations x ≤ t s and their underlying causal graph G s :
[Equation]
There are two variables in this data-generating process that we would like to model: the causal graph G s that is specific to sample x s , and the dynamics g that are shared across all samples.
This separation between the causal graph and the dynamics allows us to divide our model accordingly: we introduce an amortized causal discovery encoder f ϕ which learns to infer a causal graph G s given the sample x s , and a dynamics decoder f θ that learns to approximate g :
[Equation]
We formalize Amortized Causal Discovery (ACD) as follows.
Let G be the domain of all possible summary graphs on x s : G s ∈ G .
Let X be the domain of any single step, partial or full, observed sequence: x ts , x ≤ t s , x s ∈ X .
The model consists of two components: a causal discovery encoder f ϕ : X → G which infers a causal graph for each input sample, and a decoder f θ : X × G → X which models the dynamics.
This model is optimized with a sample-wise loss ℓ :
X × X → R which scores how well the decoder models the true dynamics of x s , and a regularization term r : G → R on the inferred graphs.
For example, this function r may enforce sparsity by penalizing graphs with more edges.
Note, that our formulation of the graph prediction problem is unsupervised: we do not have access to the true underlying graph G s .
Then, given some dataset X train with S samples, we optimize:
[Equation]
where L ( X train , ϕ, θ ) =
S (cid:88)
[Equation]
Once we have completed optimization, we can perform causal graph prediction on any new input test sample x test in two ways – we can feed x test into the amortized encoder and take its output as the predicted edges (Eq. 6); or we can instantiate our estimate ˆ G test ∈ G which will be our edge predictions, and find the edges which best explain the observed sequence x test by minimizing the (learned) decoding loss with respect to ˆ G test , which we term Test-Time Adaptation (TTA) (Eq. 7):
[Equation]
By separating the prediction of causal relations from the modeling of their dynamics, ACD yields a number of benefits.
ACD can learn to infer causal relations across samples with different underlying causal graphs, and it can infer causal relations in previously unseen test samples without refitting (Eq.
By generalizing across samples, it can improve causal discovery performance with increasing training data size.
We can replace either f ϕ or f θ with ground truth annotations, or simulate the outcome of counterfactual causal relations.
Additionally, ACD can be applied in the standard causal discovery setting, where only a single causal graph underlies all samples, by replacing the amortized encoder f ϕ with an estimated graph ˆ G (or distribution over G ) in Eq.
3.1. A Probabilistic Implementation of ACD
We take a probabilistic approach to ACD and model the functions f ϕ and f θ using variational inference (Fig. 2).
We amortize the encoder f ϕ with an encoding function q ϕ ( z | x ) , which outputs a distribution over z representing the predicted edges ˆ E Enc in the causal graph; and we learn a decoder p θ ( x | z ) which probabilistically models the dynamics of the time-series under the predicted causal relations.
We choose a negative log-likelihood for the decoder loss ℓ and a KL-Divergence to a prior distribution over G for the regularizer r .
As a result, our loss function L is a variational lower bound:
[Equation]
Encoder
The encoder q ϕ ( z | x ) applies a graph neural network f enc ,ϕ
(Scarselli et al., 2008; Li et al., 2016;
Gilmer et al., 2017; Kipf and Welling, 2017) to the input, which propagates information across a fully connected graph G = {V , E} .
This graph includes vertices v i ∈ V for each time-series i , and each pair of vertices ( v i , v j ) is connected by an edge.
[Equation]
[Equation]
To enable us to backpropagate through the samples of the discrete distribution q ϕ ( z ij | x ) , during training, we relax it by adding Gumbel distributed noise g (Maddison et al., 2017; Jang et al., 2017):
[Equation]
The output z ij of the encoder represents the predicted edges ˆ E Enc in the causal graph ˆ G Enc .
We consider the possibility that there are n E different edge-types expressing causal relationships; for instance, inhibitory or excitatory synaptic connections.
Then, more specifically, z ij,e = 1 expresses that there is a directed edge of type e from time-series i to j , where e ∈ { 1 , . . . , n E } .
Decoder
The decoder p θ ( x | z ) models the dynamics of the time-series under the predicted causal relations.
It uses both the predicted causal relations z ij and the feature vectors of the time-series at the current time-step t , x t = { x t 1 , ... x tN } as its input.
First, it propagates information along the predicted edges by applying a neural network f e , using the zero function for f 0 :
[Equation]
Then, the decoder accumulates the incoming messages to each node and applies a neural network f v to predict the change between the current and the next time-step:
[Equation]
In other words, the decoder predicts ∆ˆ x t , which is added to the current value of the time-series to yield the prediction for the next time-step ˆ x t +1 = x t + ∆ˆ x t .
Note that this approach assumes the existence of self-edges: that is, the value of x tj always affects the value of x t +1 j .
Prediction of Causal Relations
In order to align our model with the philosophy of Granger
Causality, we include a “no edge”-type edge function: If the encoder predicts the “no edge”-type edge e = 0 by setting z ij, 0 = 1 , the decoder uses the zero function and no information is propagated from time-series i to j (Eq.
Due to this, time-series i will Granger cause the decoder-predicted time-series j only when the edge is predicted to exist (see Appendix A).
Hence, by the same logic that justifies prior Granger causal work (Section 2), we expect the predicted edges to correspond to Granger causal relations.
Finally, since we assume no hidden confounders and no instantaneous edges, these Granger causal relations will correspond to relations in the underlying SCM (Peters et al., 2017, Theorem 10.3).
3.2. Hidden Confounding
Hidden confounders are a critical problem in the time-series context: when they exist, Granger causality is not guaranteed to correspond to the true causal graph anymore (Peters et al., 2017,
Theorem 10.3) 3 .
Inspired by proxy-based methods from causal inference (e.g. Louizos et al.
(2017), see Section 4), we present a method for applying ACD to the hidden confounding setting.
First, we extend the amortized encoder q ϕ ( z | x ) to predict an additional variable.
Then, we encourage this variable to model the hidden confounder by applying a structural bias – depending on the type of unobserved variable that we want to model, its predicted value is utilized differently by the remaining model.
The decoder remains responsible for modeling the dynamics, and now also processes the predictions for the unobserved variable.
While this setup might not allow us to identify the hidden confounders, and it is still true that the predicted Granger causal relations may not correspond to the underlying SCM, the data-driven approach underlying ACD can benefit our model: by training across samples with different underlying causal graphs, our model has access to substantially more information about the causal dynamics at hand
and we show empirically that it can learn to mitigate the effects of the hidden confounders.
We consider two types of hidden confounders which were chosen to cover a wide range of potential confounders as one might encounter in practice.
First, we introduce a temperature variable that confounds all observed variables by influencing the strength of their causal relations.
This temperature is sampled separately for each sample, and remains constant throughout each sample.
This is a realistic example of a global variable that may influence physical dynamics.
Second, we introduce a hidden variable that behaves just like the observed variables, i.e. it may affect or be affected by the observed variables through the same causal relations, and its value changes across time.
This confounder is inspired by the introductory example where one wants to infer the causal relations between neurons based on their spiking pattern.
In this scenario, it is virtually impossible to record all relevant neurons.
The resulting unobserved neurons behave and influence the observed neurons in a similar fashion as the unobserved time-series confounder introduced here.
In both scenarios, we extend the encoder to predict this hidden variable, and feed that prediction into the decoder.
We provide more details in Section 5.2.
4. Related Work
A range of approaches to causal discovery in both temporal and non-temporal data exist (Heinze-Deml et al., 2018; Spirtes et al., 2000; Peters et al., 2017).
One common class is constraint-based , relying on conditional independence testing to uncover an underlying DAG structure or equivalence class (Spirtes et al., 2000).
These methods predict a single graph ˆ G (or equivalence class) for all samples.
There is no notion of fitting a dynamics model for time-series methods in this class (Entner and Hoyer, 2010).
Another common class of methods for causal discovery is score-based (Chickering, 2002;
Bengio et al., 2019).
Here, a score function h is chosen, and the methods perform a search through graph space to optimize this score, i.e. ˆ G = argmin G h ( G ) .
Our proposed decoder-based inference (Eq.
(7)) can be seen as score-based causal discovery with a learned score function L ◦ f θ ⋆ .
A third class of methods fits a (possibly regularized) dynamics model f and then analyzes its form to produce a causal graph estimate, by using linear dynamics (Hyvärinen et al., 2010), recurrent models (Tank et al., 2018; Khanna and Tan, 2019; Nauta et al., 2019), or other deep-learning based approaches (Wu et al., 2020; Lachapelle et al., 2019; Zheng et al., 2020).
See Section 2 for discussion.
The range of approaches to causal discovery relevant to ours include Li et al. (2018), who propose to learn a linear mixed effects model across samples; concurrent work explores amortized deep learning of differing types of causal structure (Li et al., 2020; Ke et al., 2020) and the relationship between GNNs and causal effect inference (Zeˇcevi´c et al., 2021).
Additionally relevant are other approaches for temporal data: works such as Peters et al. (2013) or Eichler (2012) use independence or additivity assumptions.
Another adjacent category of causal discovery work explores the idea of jointly learned causal structure across examples, including in the setting where a number of related datasets are collected (Dhir and Lee, 2020;
Huang et al., 2019, 2020b; Shimizu, 2012; Tillman and Eberhardt, 2014; Huang et al., 2020a).
There is little systematic study of hidden confounding in the time-series setting.
Some empirical work in the non-temporal domain shows that encoder-based models with enough proxies (variables caused by hidden confounders) can improve causal inference under hidden confounding (Louizos et al., 2017; Parbhoo et al., 2020), and theoretical work proves the identifiability of latent variables from proxies under some assumptions (Kruskal, 1977; Allman et al., 2009).
Several works have used graph neural networks (Battaglia et al., 2016;
Santoro et al., 2017; Kipf et al., 2018) or attention mechanisms (Vaswani et al., 2017; Fuchs et al., 2019; Goyal et al., 2019; Van Steenkiste et al., 2018) to infer relations between time-series.
Alet et al.
(2019) propose a meta-learning algorithm to additionally model unobserved variables.
While these approaches [Figure] model object relations in a number of ways, they are not explicitly designed to infer causal graphical structure.
The probabilistic implementation of ACD is based on the Neural Relational Inference (NRI) model (Kipf et al., 2018).
We extend this work by new inference methods using test-time adaptation and new algorithms to handle hidden confounders.
Moreover, we provide a proof that relates the zero-edge function to Granger causality, which allows for a causal interpretation of the inferred edges.
Subsequently, we apply our model to a different problem than NRI, namely (Granger) causal discovery, and show that it outperforms the current state of the art for this type of problem.
Last but not least, we show that our model achieves strong causal discovery performance even under noise and hidden confounding, an accomplishment that is – to the best of our knowledge – new in this field.
5. Experiments Implementation
We measure causal discovery performance by the area under the receiver operator curve (AUROC) of predicted edge probabilities over test samples.
We compare to recurrent models (Tank et al.
; Khanna and Tan (2019)), a mutual-information (MI) based model by Wu et al.
(2020) and several baselines implemented by those authors, including MI (unmodified), transfer entropy (Schreiber, 2000), and linear Granger causality.
More details in Appendix B, our code is available at github.com/loeweX/AmortizedCausalDiscovery .
5.1. Fully Observed Amortized Causal Discovery
We test ACD on three datasets: two fully-observed physics simulations (Kuramoto and Particles) and the Netsim dataset of simulated fMRI data (Smith et al., 2011).
Note, in contrast to the physics simulations used in Kipf et al.
(2018), we generate data with asymmetric connectivity matrices to represent causal relations.
First, we test our method on the Kuramoto dataset , which contains five 1-D time-series of phase-coupled oscillators (Kuramoto, 1975).
We find that ACD greatly outperforms all approaches for Granger causal discovery that we compare against (Table 1).
In contrast to these approaches, ACD achieves this result without fitting to the test samples.
[Table] Additionally, we find that ACD can indeed utilize samples with different underlying causal graphs – its performance improves steadily with increasing training data size (Fig. 3).
Nonetheless, it is also applicable to the lowdata regime: when applying ACD with testtime adaptation (TTA), it requires less thantraining samples to outperform all previous approaches.
We note that the baseline performance here is worse than presented elsewhere in the literature – this is because we do not evaluate the prediction of self-connectivity, which is the easiest connectivity to predict.
In our second experiment, we apply ACD to the particles dataset .
This dataset models five particles that move around a two-dimensional space, with some particles influencing others unidirectionally by pulling them with a spring.
Since all previous methods were intended for onedimensional time-series, we were unable to evaluate them in this domain.
ACD, on the other hand, is readily applicable to higher-dimensional data, and performs almost perfectly on this dataset with 0.999 AUROC .
In both experiments, causal relation prediction with the learned encoder (Enc - Eq.
(6)) performs best in the high-data regime, while test-time adaptation (TTA - Eq.
(7)) improves the performance in low-data settings (Fig. 3).
This benefit of TTA can be largely attributed to two effects.
First,
TTA closes the amortization gap of the encoder (Cremer et al., 2018).
Second, TTA overcomes the encoder’s overfitting on the training data (as seen in the training curves in Appendix B.2) by adapting to the individual test samples.
On the particles dataset, initializing TTA with the encoder’s prediction (Enc+TTA) improves over a random initialization (TTA) as the encoder improves; but we do not observe this effect on the Kuramoto dataset.
[Table]
Finally, we apply ACD to the Netsim dataset (Smith et al., 2011) of simulated fMRI data.
Here, the task is to infer the underlying connectivity between 15 brain regions across 50 samples.
A single graph underlies all samples, allowing us to demonstrate ACD’s applicability to the classical setting.
We replace the amortized encoder q ϕ ( z | x ) with a global latent distribution q ( z ) , optimize it through the decoder, and then use test-time adaptation (TTA).
Even though our model cannot benefit from its data-driven design here, it performs comparably to methods that are intended for use in the single-graph setting (Table 2).
5.1.1. N OISY D ATA
Handling noisy data is a key challenge in causal discovery.
Here, we show that ACD is robust to a certain amount of observational noise in both the Particles and Kuramoto tasks. [Figure] [Figure] [Figure]
A UR
O C 0.
Noise [Figure] A UR O C
[Figure]
ACD with a latent variable outperforms a baseline which imputes a mean temperature, and a learned fixed-temperature decoder ( None ).
#time-series influenced by unobserved one
[Figure]
Observed
Supervised
[Figure]
As more time-series are influenced by the unobserved one (x-axis), the benefit of using an additional latent variable for modeling its effects grows.
We test ACD’s performance for different levels of observation noise added to the Particles and
Kuramoto datasets (see Fig. 8 in the Appendix for visual examples).
We sample this additive noise from a zero-mean normal distribution with standard deviations varying between 0.0 and 0.2.
For comparison, the input samples in both the Particles and Kuramoto datasets have a standard deviation of 0.6.
For each dataset and each standard deviation, we train across five random seeds.
In Fig.
4, we show the average AUROC on a test set with the same noise scheme applied.
ACD’s performance degrades gracefully when stronger observation noise is added.
In the highest noise scenario, when the noise is sampled from a normal distribution with a standard deviation of 0.2, the performance of
ACD matches the performance of the baselines from Table 1 on noiseless data.
5.2. Amortized Causal Discovery under Hidden Confounding 5.2.1. L ATENT T EMPERATURE
In this experiment, we use the particles dataset and vary an unobserved temperature variable, which modulates how strongly the particles exert force on each other – higher temperatures result in stronger forces and a more chaotic system.
For each x s , we sample an independent temperature c ∼ Categorical ([ α 2 , α, 2 α ]) from a categorical distribution with α ∈ R and equal probabilities.
We predict this unobserved temperature by extending the amortized encoder with an additional latent variable, which models a uniform distribution.
Then, we add a KL-Divergence between this posterior and a uniform prior on the interval [0 , 4 α ] to our variational loss.
To allow for learning in this setting, we introduce an inductive bias: we use a decoder which matches the true dynamics g given the predicted temperature and causal relations.
See Appendix C.1 for more details and additional results.
Results
Fig.
5 shows the causal discovery results across different values of α .
ACD enhanced with an additional latent variable ( Latent ) outperforms both tested baselines across all temperatures:
Mean , which uses the same ground-truth decoder as Latent and fixes the decoder temperature to be the mean of the categorical distribution, and None , which does not model c explicitly and trains
an
MLP decoder.
Additionally, this method achieves high predictive performance on the unobserved temperature variable: for α = 2, temperature prediction obtains 0.888 R 2 , 0.966 AUROC and 0.
accuracy.
These results indicate that we can model an unobserved temperature variable, and thus improve robustness under hidden confounding.
5.2.2. U NOBSERVED T IME -S ERIES
Here, we treat one of the original time-series in the particles dataset as unobserved.
It exhibits the same dynamics as the observed time-series, evolving and causally influencing others the same way as before.
This challenging setting has received little attention in the literature; Alet et al.
(2019) tackled it with mixed success.
We model the unobserved time-series by extending the amortized encoder with an additional latent variable and applying a suitable structural bias: the latent prediction z t u for timesteps t = { 1 , ..., T } is treated in the same way as the observed time-series x .
Its entire trajectory is used by the encoder to predict causal relations, and its value at the current time-step is fed into the decoder.
See Appendix C.2 for more details and additional results.
Results
Fig.
6 shows how the causal discovery AUROC depends on the number of observed time-series directly influenced by the unobserved one.
When this number is zero, all tested approaches perform the same.
With growing numbers of influenced time-series, the baselines that either ignore the missing time-series ( None ) or impute its value with the average of the observed time-series over time ( Mean ) deteriorate strongly.
In contrast, the proposed ACD with a Latent variable stays closer to the performance of the fully Observed baseline.
As shown in Fig.
7, it also improves the future trajectory prediction of the observed time-series.
A Supervised baseline, that uses the (usually unavailable) ground-truth trajectories to optimize the prediction of the unobserved time-series, improves only slightly over our approach.
These results indicate that ACD can use latent variables to improve robustness to unobserved time-series.
6. Conclusion
We introduce ACD, a framework for causal discovery in time-series data which can leverage the information that is shared across samples.
We provide a probabilistic implementation of this framework, and demonstrate significant performance gains over the existing literature when predicting causal relations, both in the fully observed setting and with noise and hidden confounding.
Despite this improvement in performance over previous work, several limitations remain.
Our assumptions from Sec.
3 regarding shared dynamics and edges in the graph, are not verifiable in practice; however, this is standard in causal inference, which frequently relies on untestable assumptions such as ignorability or consistency.
We conducted all our experiments on simulated data; as a result, they are not particularly realistic: real-world data is more complex and potentially misspecified.
This limitation is in line with the data used in related works (e.g. Khanna and Tan (2019)), and it remains an exciting direction for future work to improve modeling and experimentation in more realistic settings.
Finally, our contribution is primarily empirical: we propose and attack a novel version of the causal discovery problem – where samples have different underlying causal graphs but shared dynamics – and demonstrate that ACD outperforms prior methods by a large margin in this setting.
It remains an important future direction of inquiry to understand the conditions under which ACD, as well as other Granger causal discovery approaches that inspired ACD (e.g. Tank et al.
Khanna and Tan (2019)), can be guaranteed to identify the correct causal structures. Acknowledgments
Thanks to Thomas Kipf for helpful discussions and to Sara Magliacane, Marco Federici, Gabriele
Bani, Joop Pascha, Patrick Forre, Pascal Esser, Maja Rudolph, Elliot Creager, Taylor Killian, and Renjie Liao for their feedback on the manuscript.
David Madras was supported by an NSERC Alexander
Graham Bell Canada Graduate Scholarship-Doctoral (CGS-D).
Resources used in preparing this research were provided, in part, by the Province of Ontario, the Government of Canada through CIFAR, and companies sponsoring the Vector Institute ( www.vectorinstitute.ai/#partners) .