Interpretable Models for Granger Causality Using Self-explaining Neural Networks

1 INTRODUCTION . Granger causality ( GC ) ( Granger , 1969 ) is a popular practical approach for the analysis of multivariate time series and has become instrumental in exploratory analysis ( McCracken , 2016 ) in various disciplines , such as neuroscience ( Roebroeck et al. , 2005 ) , economics ( Appiah , 2018 ) , and climatology ( Charakopoulos et al. , 2018 ) . Recently , the focus of the methodological research has been on inferring GC under nonlinear dynamics ( Tank et al. , 2018 ; Nauta et al. , 2019 ; Wu et al. , 2020 ; Khanna & Tan , 2020 ; Löwe et al. , 2020 ) , causal structures varying across replicates ( Löwe et al. , 2020 ) , and unobserved confounding ( Nauta et al. , 2019 ; Löwe et al. , 2020 ) . To the best of our knowledge , the latest powerful techniques for inferring GC do not target the effect sign detection ( see Section 2.1 for a formal definition ) or exploration of effect variability with time and , thus , have limited interpretability . This drawback defeats the purpose of GC analysis as an exploratory statistical tool . In some nonlinear interactions , one variable may have an exclusively positive or negative effect on another if it consistently drives the other variable up or down , respectively . Negative and positive causal relationships are common in many real-world systems , for example , gene regulatory networks feature inhibitory effects ( Inoue et al. , 2011 ) or in metabolomics , certain compounds may inhibit or promote synthesis of other metabolites ( Rinschen et al. , 2019 ) . Differentiating between the two types of interactions would allow inferring and understanding such inhibition and promotion relationships in real-world dynamical systems and would facilitate a more comprehensive and insightful exploratory analysis . Therefore , we see a need for a framework capable of inferring nonlinear GC which is more amenable to interpretation than previously proposed methods ( Tank et al. , 2018 ; Nauta et al. , 2019 ; Khanna & Tan , 2020 ) . To this end , we introduce a novel method for detecting nonlinear multivariate Granger causality that is interpretable , in the sense that it allows detecting effect signs and exploring influences among variables throughout time . The main contributions of the paper are as follows : 1 . We extend self-explaining neural network models ( Alvarez-Melis & Jaakkola , 2018 ) to time series analysis . The resulting autoregressive model , named generalised vector autore- gression ( GVAR ) , is interpretable and allows exploring GC relations between variables , signs of Granger-causal effects , and their variability through time . 2 . We propose a framework for inferring nonlinear multivariate GC that relies on a GVAR model with sparsity-inducing and time-smoothing penalties . Spurious associations are mitigated by finding relationships that are stable across original and time-reversed ( Winkler et al. , 2016 ) time series data . 3 . We comprehensively compare the proposed framework and the powerful baseline methods of Tank et al . ( 2018 ) , Nauta et al . ( 2019 ) , and Khanna & Tan ( 2020 ) on a range of synthetic time series datasets with known Granger-causal relationships . We evaluate the ability of the methods to infer the ground truth GC structure and effect signs . 2 BACKGROUND AND RELATED WORK . 2.1 GRANGER CAUSALITY . Granger-causal relationships are given by a set of directed dependencies within multivariate time series . The classical definition of Granger causality is given , for example , by Lütkepohl ( 2007 ) . Below we define nonlinear multivariate GC , based on the adaptation by Tank et al . ( 2018 ) . Consider a time series with p variables : { xt } t∈Z+ = { ( x1t x 2 t ... x p t ) > } t∈Z+ . Assume that causal relationships between variables are given by the following structural equation model : xit : = gi ( x11 : ( t−1 ) , ... , x j 1 : ( t−1 ) , ... , x p 1 : ( t−1 ) ) + εit , for 1 ≤ i ≤ p , ( 1 ) where xj1 : ( t−1 ) is a shorthand notation for x j 1 , x j 2 , ... , x j t−1 ; ε i t are additive innovation terms ; and gi ( · ) are potentially nonlinear functions , specifying how the future values of variable xi depend on the past values of x . We then say that variable xj does not Granger-cause variable xi , denoted as xj 6−→ xi , if and only if gi ( · ) is constant in xj1 : ( t−1 ) . Depending on the form of the functional relationship gi ( · ) , we can also differentiate between positive and negative Granger-causal effects . In this paper , we define the effect sign as follows : if gi ( · ) is increasing in all xj1 : ( t−1 ) , then we say that variable x j has a positive effect on xi , if gi ( · ) is decreasing in xj1 : ( t−1 ) , then x j has a negative effect on xi . Note that an effect may be neither positive nor negative . For example , xj can ‘ contribute ’ both positively and negatively to the future of xi at different delays , or , for instance , the effect of xj on xi could depend on another variable . Granger-causal relationships can be summarised by a directed graph G = ( V , E ) , referred to as summary graph ( Peters et al. , 2017 ) , where V = { 1 , ... , p } is a set of vertices corresponding to variables , and E = { ( i , j ) : xi −→ xj } is a set of edges corresponding to Granger-causal relationships . Let A ∈ { 0 , 1 } p×p denote the adjacency matrix of G. The inference problem is then to estimateA from observations { xt } Tt=1 , where T is the length of the time series observed . In practice , we usually fit a time series model that explicitly or implicitly infers dependencies between variables . Consequently , a statistical test for GC is performed . A conventional approach ( Lütkepohl , 2007 ) used to test for linear Granger causality is the linear vector autoregression ( VAR ) ( see Appendix A ) . 2.2 RELATED WORK . 2.2.1 TECHNIQUES FOR INFERRING NONLINEAR GRANGER CAUSALITY . Relational inference in time series has been studied extensively in statistics and machine learning . Early techniques for inferring undirected relationships include time-varying dynamic Bayesian networks ( Song et al. , 2009 ) and time-smoothed , regularised logistic regression with time-varying coefficients ( Kolar et al. , 2010 ) . Recent approaches to inferring Granger-causal relationships leverage the expressive power of neural networks ( Montalto et al. , 2015 ; Wang et al. , 2018 ; Tank et al. , 2018 ; Nauta et al. , 2019 ; Khanna & Tan , 2020 ; Wu et al. , 2020 ; Löwe et al. , 2020 ) and are often based on regularised autoregressive models , reminiscent of the Lasso Granger method ( Arnold et al. , 2007 ) . Tank et al . ( 2018 ) propose using sparse-input multilayer perceptron ( cMLP ) and long short-term memory ( cLSTM ) to model nonlinear autoregressive relationships within time series . Building on this , Khanna & Tan ( 2020 ) introduce a more sample efficient economy statistical recurrent unit ( eSRU ) architecture with sparse input layer weights . Nauta et al . ( 2019 ) propose a temporal causal discovery framework ( TCDF ) that leverages attention-based convolutional neural networks to test for GC . Appendix B contains further details about these and other relevant methods . Approaches discussed above ( Tank et al. , 2018 ; Nauta et al. , 2019 ; Khanna & Tan , 2020 ) and in Appendix B ( Marinazzo et al. , 2008 ; Ren et al. , 2020 ; Montalto et al. , 2015 ; Wang et al. , 2018 ; Wu et al. , 2020 ; Löwe et al. , 2020 ) focus almost exclusively on relational inference and do not allow easily interpreting signs of GC effects and their variability through time . In this paper , we propose a more interpretable inference framework , building on self explaining-neural networks ( Alvarez-Melis & Jaakkola , 2018 ) , that , as shown by experiments , performs on par with the techniques described herein . 2.2.2 STABILITY-BASED SELECTION PROCEDURES . The literature on stability-based model selection is abundant ( Ben-Hur et al. , 2002 ; Lange et al. , 2003 ; Meinshausen & Bühlmann , 2010 ; Sun et al. , 2013 ) . For example , Ben-Hur et al . ( 2002 ) propose measuring stability of clustering solutions under perturbations to assess structure in the data and select an appropriate number of clusters . Lange et al . ( 2003 ) propose a somewhat similar approach . Meinshausen & Bühlmann ( 2010 ) introduce the stability selection procedure applicable to a wide range of high-dimensional problems : their method guides the choice of the amount of regularisation based on the error rate control . Sun et al . ( 2013 ) investigate a similar procedure in the context of tuning penalised regression models . 2.2.3 SELF-EXPLAINING NEURAL NETWORKS . Alvarez-Melis & Jaakkola ( 2018 ) introduce self-explaining neural networks ( SENN ) – a class of intrinsically interpretable models motivated by explicitness , faithfulness , and stability properties . A SENN with a link function g ( · ) and interpretable basis concepts h ( x ) : Rp → Rk follows the form f ( x ) = g ( θ ( x ) 1h ( x ) 1 , ... , θ ( x ) kh ( x ) k ) , ( 2 ) where x ∈ Rp are predictors ; and θ ( · ) is a neural network with k outputs . We refer to θ ( x ) as generalised coefficients for data point x and use them to ‘ explain ’ contributions of individual basis concepts to predictions . In the case of g ( · ) being sum and concepts being raw inputs , Equation 2 simplifies to f ( x ) = p∑ j=1 θ ( x ) jxj . ( 3 ) Appendix C lists additional properties SENNs need to satisfy , as defined by Alvarez-Melis & Jaakkola ( 2018 ) . A SENN is trained by minimising the following gradient-regularised loss function , which balances performance with interpretability : Ly ( f ( x ) , y ) + λLθ ( f ( x ) ) , ( 4 ) where Ly ( f ( x ) , y ) is a loss term for the ground classification or regression task ; λ > 0 is a regularisation parameter ; and Lθ ( f ( x ) ) = ∥∥∇xf ( x ) − θ ( x ) > Jhx ( x ) ∥∥2 is the gradient penalty , where Jhx is the Jacobian of h ( · ) w.r.t . x . This penalty encourages f ( · ) to be locally linear . 3 METHOD . We propose an extension of SENNs ( Alvarez-Melis & Jaakkola , 2018 ) to autoregressive time series modelling , which is essentially a vector autoregression ( see Equation 11 in Appendix A ) with generalised coefficient matrices . We refer to this model as generalised vector autoregression ( GVAR ) . The GVAR model of order K is given by xt = K∑ k=1 Ψθk ( xt−k ) xt−k + εt , ( 5 ) where Ψθk : Rp → Rp×p is a neural network parameterised by θk . For brevity , we omit the intercept term here and in following equations . No specific distributional assumptions are made on the additive innovation terms εt . Ψθk ( xt−k ) is a matrix whose components correspond to the generalised coefficients for lag k at time step t. In particular , the component ( i , j ) of Ψθk ( xt−k ) corresponds to the influence of xjt−k on x i t. In our implementation , we use K MLPs for Ψθk ( · ) with p input units and p2 outputs each , which are then reshaped into an Rp×p matrix . Observe that the model defined in Equation 5 takes on a form of SENN ( see Equation 3 ) with future time series values as the response , past values as basis concepts , and sum as a link function . Relationships between variables x1 , ... , xp and their variability throughout time can be explored by inspecting generalised coefficient matrices . To mitigate spurious inference in multivariate time series , we train GVAR by minimising the following penalised loss function with the mini-batch gradient descent : 1 T −K T∑ t=K+1 ‖xt − x̂t‖22 + λ T −K T∑ t=K+1 R ( Ψt ) + γ T −K − 1 T−1∑ t=K+1 ‖Ψt+1 −Ψt‖22 , ( 6 ) where { xt } Tt=1 is a single observed replicate of a p-variate time series of length T ; x̂t =∑K k=1 Ψθ̂k ( xt−k ) xt−k is the one-step forecast for the t-th time point by the GVAR model ; Ψt is a shorthand notation for the concatenation of generalised coefficient matrices at the t-th time point : [ Ψθ̂K ( xt−K ) Ψθ̂K−1 ( xt−K+1 ) ... Ψθ̂1 ( xt−1 ) ] ∈ Rp×Kp ; R ( · ) is a sparsity-inducing penalty term ; and λ , γ ≥ 0 are regularisation parameters . The loss function ( see Equation 6 ) consists of three terms : ( i ) the mean squared error ( MSE ) loss , ( ii ) a sparsity-inducing regulariser , and ( iii ) the smoothing penalty term . Note , that in presence of categorically-valued variables the MSE term can be replaced with e.g . the cross-entropy loss . The sparsity-inducing term R ( · ) is an appropriate penalty on the norm of the generalised coefficient matrices . Examples of possible penalties for the linear VAR are provided in Table 4 in Appendix A . These penalties can be easily adapted to the GVAR model . In the current implementation , we employ the elastic-net-style penalty term ( Zou & Hastie , 2005 ; Nicholson et al. , 2017 ) R ( Ψt ) = α ‖Ψt‖1 + ( 1− α ) ‖Ψt‖ 2 2 , with α = 0.5 . The smoothing penalty term , given by 1T−K−1 ∑T−1 t=K+1 ‖Ψt+1 −Ψt‖ 2 2 , is the average norm of the difference between generalised coefficient matrices for two consecutive time points . This penalty term encourages smoothness in the evolution of coefficients w.r.t . time and replaces the gradient penalty Lθ ( f ( x ) ) from the original formulation of SENN ( see Equation 4 ) . Observe that if the term is constrained to be 0 , then the GVAR model behaves as a penalised linear VAR on the training data : coefficient matrices are invariant across time steps . for the loss function in Appendix D .

Summary: This paper primarily deals with learning Granger-causal relationships in multivariate time series in the nonlinear dynamics setting. The core method uses vector autoregressive modeling with sparsity inducing regularizers (elastic net and smoothness based fused lasso) along with the recently proposed with self-explaining neural networks (for interpretability). The authors also augment the framework by learning Granger-causal structures that are stable on original and time-reversed data. Exhaustive empirical analysis is done with recent GC baselines.  Some of my concerns with the paper are the following