Causal discovery from conditionally stationary time-series 

Causal discovery , i.e. , inferring underlying cause-effect relationships from observations of a scene or system , is an inherent mechanism in human cognition , but has been shown to be highly challenging to automate . The majority of approaches in the literature aiming for this task consider constrained scenarios with fully observed variables or data from stationary time-series . In this work we aim for causal discovery in a more general class of scenarios , scenes with non-stationary behavior over time . For our purposes we here regard a scene as a composition objects interacting with each other over time . Nonstationarity is modeled as stationarity conditioned on an underlying variable , a state , which can be of varying dimension , more or less hidden given observations of the scene , and also depend more or less directly on these observations . We propose a probabilistic deep learning approach called State-Dependent Causal Inference ( SDCI ) for causal discovery in such conditionally stationary time-series data . Results in two different synthetic scenarios show that this method is able to recover the underlying causal dependencies with high accuracy even in cases with hidden states . 1 INTRODUCTION . The ability of deep learning approaches to discover and reason about causal relationships in data has become a prominent direction of work over the recent years ( Yi et al. , 2020 ; Girdhar & Ramanan , 2020 ; Sauer & Geiger , 2021 ) . Despite the recent success of deep learning methods in related tasks such as classification , localization , and segmentation , causal discovery and reasoning , an inherent mechanism in human cognition ( Spelke & Kinzler , 2007 ) allowing reasoning about counterfactuals and understanding the reasons of events , still poses an considerable challenge . Causal discovery involves uncovering the underlying logic , temporal and causal structure of the observed processes in the data . Current approaches ( see Section 2 ) commonly address quite constrained scenarios with a stationary behavior over time . In the present paper , we extend the current work by addressing scenarios with conditional stationarity , where the dynamics of the observed system changes with the value of underlying variables . This is the case in almost all real-world scenarios , e.g . with people who behave differently and take different decisions depending on underlying factors such as mood , previous experience , and the actions of other agents . We propose a method ( see Section 3 ) for causal discovery from time-series observations of systems where the underlying causal graph changes depending on a state variable . The causal discovery task from such conditionally stationary time-series poses different challenges depending on the observability of the underlying state variable . Four scenario classes can be seen : 1 . The first class concerns a simplified version of the problem , where the state variable is observed and not dependent on other observed time-series data . 2 . In the second class of scenarios , the state is not directly observed , but directly dependent on and continuously inferable from an observed variable . A real-life example is a traffic scenario where taxis ( visually distinguishable by the sign on their roof ) follow slightly different rules than normal cars , i.e . are allowed to drive in bus lanes . 3 . A more challenging scenario class is when the state depends on earlier events , and thus is not continuously observable . A real-life example is a chain of events in a football game , where the action of one player is triggered by an earlier action by another player . 4 . Finally , a large share of scenarios in the real world are governed by underlying state variables that are not fully inferable from the observations from the scenario over time . In such scenarios , the state is an unknown confounder to the observed time-series , and causal discovery from such scenarios is inherently ill-defined . We evaluate the method ( see Section 4 ) in two different synthetic scenarios , where we vary the complexity of system dynamics and observability of the underlying state variable covering the first three scenario classes above . Finally we conclude and discuss directions for future work ( see Section 5 ) . 2 RELATED WORK . Causal discovery approaches aim to identify causal relationships over a set of variables from observational data . These methods can basically be classified into three different types ( Glymour et al. , 2019 ) : 1 ) Constraint-based ; 2 ) Score-based ; 3 ) Functional causal model based methods . Constraint-based methods rely on conditional independence tests to recover the underlying DAG structure of the data , such as the PC algorithm ( Spirtes et al. , 2000 ) , which assumes faithfulness and causal Markov condition and considers i.i.d . sampling and no latent confounders . There exists a great variety of variations of PC . One of them is the Fast Causal Inference ( FCI ) ( Spirtes , 2001 ) , which is able to cope with the unknown confounders and selection bias ; furthermore , it can be adapted for time-series data , such as such as tsFCI ( Entner & Hoyer , 2010 ) . Score-based methods define score functions of causal graph structures and then optimize score functions by performing a search to identify the underlying causal structure , such as the Greedy Equivalence Search ( GES ) ( Chickering , 2002 ) . Notice that searching in the graph space poses a combinatorial optimization problem . Recent approaches try to avoid this by reformulating it as a continuous optimization problem which introduces a score function h for measuring the acyclicity of the graph ( Zheng et al. , 2018 ) . Regarding time-series data , these methods are reformulated as learning dynamic Bayesian Networks ( DBNs ) from data ( Murphy et al. , 2002 ) . Among these algorithms we recently find DYNOTEARS ( Pamfil et al. , 2020 ) , which aims to simultaneously estimate instantaneous and time-lagged relationships between variables in a time-series . Functional causal model-based methods represent the effect as a function of its direct causes and their independent immeasurable noise ( Glymour et al. , 2019 ) . For non-temporal data , there are linear non-Gaussian acyclic models ( Shimizu et al. , 2006 ) , additive noise models ( Peters et al. , 2014 ) , post-nonlinear models ( Zhang & Hyvärinen , 2009 ) , etc . For temporal data , these approaches fit a dynamics model , which is often regularized in terms of its sparsity , and its form is analyzed to identify the underlying causal connections in the data . Granger causal analysis falls into this category , since we first model the dynamics and some analysis is performed to extract the latent causal structure ( Granger , 1969 ) . Causal discovery is , in general , a challenging task and its study arises a great amount of practical issues . The problem is ill-posed when considering linearity and Gaussian disturbances , since it can be proved that the underlying causal model is not identifiable , while under proper assumptions , such as non-Gaussianity , it becomes identifiable ( Shimizu et al. , 2006 ) . When considering non-linear transformations , the symmetry between observed variables disappears , allowing the identification of causal relations in the context of Gaussian disturbances ( Hoyer et al. , 2008 ) . Other practical issues consist on the existence of latent confounders ( Ranganath & Perotte , 2018 ) , the presence of measurement error ( Zhang et al. , 2017 ) or considering observations with missing data ( Tu et al. , 2019 ) . In order to avoid these common problems , simplifications of the problem need to be applied . In fact , the assumptions we make in this work are : ( i ) all the instances belonging to the causal graph are observed , ( ii ) we have no missing data selection bias , and ( iii ) no latent confounders exist . The work most related to ours are the approaches by ( Löwe et al. , 2020 ; Li et al. , 2020 ) ; we extend these by allowing the causal model of the underlying process to vary depending on a state variable . Our method can in the future be applied to a wider class of non-stationary visual scenarios where the interacting objects are only partially and noisily observed as semantically segmented visual regions , or by tracked image keypoints ( Löwe et al. , 2020 ) . This would allow addressing challenging tasks such as scene understanding , counterfactual reasoning , etc . The recent work by ( Sauer & Geiger , 2021 ) also uses the concept of causality for a similar task , generation of counterfactual images . 3 STATE-DEPENDENT CAUSAL INFERENCE . In this section , we introduce our formulation to extract causal graphs from time-series data where their dynamics are altered by means of a categorical variable , referred to as their state . We refer to our method as State-Dependent Causal Inference ( SDCI ) . 3.1 PROBLEM FORMULATION . The input consists of a set of N time-series which not only obey some dynamics that might change over time but also undergo different states along the sequence . These states are responsible for the changes in the dynamics of the sample . We observe the sequence for a total of T frames and we denote the sample x as x = { { x1i } Ni=1 , ... , { xTi } Ni=1 } , xti = { pti , sti } , ( 1 ) where { s1 : Ti } Ni=1 represents the hidden states and { p1 : Ti } Ni=1 are the observed quantities of interest . For simplicity , we drop the subscript when referring to all the elements in a single time-step ( e.g . xt , pt , st , etc ) . In a causal graph , the observed quantities are represented by the vertices and the edge of the causal graph represents the interaction type between vertices . We denote the amount of possible interaction types by n . Assumptions . In this work , we assume that the data generation process obeys a structural causal model ( SCM ) ( Pearl , 2009 ) , G1 : T , and that the model satisfies the first-order Markov property . Moreover , according to the definitions of causality ( Granger , 1969 ) , we assume that edges of a causal graph can not go back in time . The first assumption follows related works concerning samples where the generative process also follows an SCM ( Löwe et al. , 2020 ; Li et al. , 2020 ) . Although we assume the first-order Markov property , one can extend to the more general p − th order Markov property in a more complex scenario . State-dependent causal inference . Based on the assumptions we mainly focus on the nonstationary causal graph , which means that we can find different edge-types at different times . As for an edge between two vertices , the edge-type interaction between two vertices changes according to the state of the variable which is the source of the interaction . The main focus of our method consists on extracting a causal summary graph G ( also denoted as such by Li et al . ( 2020 ) and Löwe et al . ( 2020 ) ) . Previous approaches aiming for this task assume stationary time-series data and therefore , this causal summary graph is constant . Nonetheless , since we condition the stationarity of the samples on the states , our causal summary graph is expressed by means of this categorical variable . In other words , our method will extract K summary graphs , one per state considered . The edge-type interaction can be then queried at each time-step t as follows : ztij = Gij ( s t i ) ( 2 ) where ztij ∈ { 0 , ... , n − 1 } denotes the edge-type interaction from i to j at time-step t. Figure 1 illustrates this task . In general , this causal summary graph is specific to the input sample and hidden from the model . Therefore , not only we require to design a parametrizable function to infer the latent causal structure , but also to evaluate how this inference fits to the actual dynamics observed in the input sequence . Let us denote the first step of extracting the latent causal structure G ( s ) = fφ ( p1 : T , s1 : T ) ( 3 ) where fφ denotes a parameterizable function that receives all the observed sequence as input . The next step is to fit this extracted latent sturcture into our assumed first-order Markov dynamics . ( p̃t+1 , s̃t+1 ) = fψ ( xt , G ( st ) ) ( 4 ) where the parameterizable function fψ represents a one-step computation of the dynamics starting from the observed values at time-step t. In this expression , we have defined fψ to predict the value of the states at the next time-step as well . However , in our experiments we will also consider settings where the states are observed at all times and modelling the dynamics is only performed with respect to the quantity p1 : T . To allow for this setting , one only needs to exclude the state variable from supervision . We provide more details in the next section . Objective . Both the causal inference and dynamics modelling modules can be optimized by minimizing some objective defined for the parameterizable functions fφ and fψ . min φ , ψ T−1∑ t=1 L ( xt+1 , fψ ( xt , G ( st ) ) ) +R ( G ( · ) ) , G ( st ) = fφ ( x ) ( 5 ) where R ( · ) is a regularizer on the extracted graph structure , which can be applied to enforce a preferred interaction type .

Summary: This paper aims to solve the problem of causal summary graph extraction and time series reconstruction at the same time. They propose a conditional VAE based model. The model is conditioned on state variables $s$, which makes it different from a normal VAE. Experiments on two datasets show the method outperforms ACD on linear data and its performance drops as number of states increase with spring data.