SyncTwin: Treatment Effect Estimation with Longitudinal Outcomes

1 Introduction . Estimating the causal individual treatment effect ( ITE ) using observational data has become increasingly common in the medical literature due to the popularization of electronic health records ( EHR ) . The EHR is a longitudinal collection of records : it contains repeated measurements of a patient ’ s health condition over irregular time intervals . Although the treatments may also vary over time , many studies consider a point treatment , where the treatment allocation is performed at some observed time and stays fixed during the study [ 12 , 44 , 34 , 5 , 51 ] . Point treatment is widely applicable to problems involving one-off treatments ( e.g . surgical operations ) or treatments that do not change frequently ( e.g . long term medication for chronic disease ) . We will refer to the setting above as Longitudinal and Irregularly sampled data with Point treatment setting , or LIP . The LIP setting will be the focus of this work ( Figure 1 A ) . The LIP setting is different from the conventional settings in causal inference . This is because we observe the pre-treatment outcome yt over time leading to the treatment allocation . These pretreatment outcomes may unveil the inherent temporal structure in the outcome time series ( e.g . trend and seasonality ) , leading to better ITE estimation over time . In contrast , the conventional settings 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . only consider the outcomes after treatment initiation [ 54 , 52 , 36 , 43 , 6 ] . This is true even for works that deal with dynamic treatment allocations [ 40 , 35 , 11 ] . A naive way to incorporate pre-treatment outcomes into the standard ITE methods is to treat them as additional covariates . This approach is viable but inadequate : the pre-treatment outcomes are arguably much more closely linked to the outcomes after treatment than the covariates — they hence deserve special considerations , e.g . modifying the architecture or loss function to reflect their importance . Without such modification , the ITE methods will not incorporate our prior belief on the importance of the pre-treatment outcomes , which may lead to worse performance . To bridge this gap , we propose SyncTwin , a novel ITE estimation method tailored for the LIP setting . We assume that the temporal outcomes are generated by individualized latent factors and timevarying latent trends . This assumption is similar to the “ factor model ” assumption commonly used in Econometrics [ 1 ] and allows us to achieve the right balance between the parametric assumption and modeling flexibility . Figure 1 B illustrates the schematics of SyncTwin using an example with two treatment options ( treated and control ) . SyncTwin first uncovers the individualized latent factors using representation learning . For a target individual , SyncTwin selects and weights a few contributors based on their latent factors and a sparsity constraint . It proceeds to construct a synthetic twin whose temporal outcomes are the weighted average of the contributors . Finally , the ITE is estimated as the difference between the target individual and the synthetic twin ’ s outcomes . Unlike conventional methods , SyncTwin does not use the learned latent factors to directly predict the outcomes ; instead it uses these variables to find the contributors and their importance weights so as to construct the synthetic twin . This approach brings two bonus features ; both are important to medical applications . ( 1 ) We can calculate an individualized estimation error bound based on the actual and the synthetic outcomes before treatment . In practice , the clinician can accept the recommended treatment when the error bound is below a threshold and resort to expert knowledge otherwise . ( 2 ) We can identify the most important contributors to an estimate as the ones who receive the highest weights . The clinician can further examine these contributors ( e.g . whether they are indeed similar to the target individual ) to validate and interpret the estimate . Contributions . ( 1 ) We develop SyncTwin to leverage the temporal structure in the outcomes for better ITE estimation . ( 2 ) We provide theoretical justifications for each step involved in SyncTwin and prove an individualized error bound that can be used to identify untrustworthy estimates . ( 3 ) In addition to extensive simulations , we conduct an observational study using real EHR data and successfully reproduced the findings of a randomized controlled clinical trial with SyncTwin . 2 Problem setting . We consider an observational study with N individuals indexed by i ∈ [ N ] = { 1 , . . . , N } . Let ai ∈ { 0 , 1 } be the treatment indicator with ai = 1 if i received the treatment at some time and ai = 0 otherwise1 . We realign the time steps such that all treatments were initiated at time t = 0 . Let I1 = { i ∈ [ N ] | ai = 1 } and I0 = { i ∈ [ N ] | ai = 0 } be the set of the treated and the control individuals respectively . Denote N0 = |I0| and N1 = |I1| as the sizes of the groups . Let Xi = [ xis ] s∈ [ Si ] be the temporal covariates consisting of a sequence of observations xis ∈ RD . Let Mi = [ mis ] s∈ [ Si ] be the sequence of binary masking vectors mis ∈ { 0 , 1 } D , where [ mis ] d = 1 indicates the dth element of xis is measured and [ mis ] d = 0 otherwise . The entire sequence Xi contains Si ∈ N observations taken before treatment at times Ti = [ tis ] s∈ [ Si ] , tis < 0 . The maximum sequence length S = maxi ( Si ) . The outcome yit ∈ R is observed at time t ∈ T − ∪ T + . Let T − = { −M , . . . , −1 } and T + = { 0 , . . . , H − 1 } be the observation times before and after treatment allocation . We arrange the outcomes after treatment into a H-dimensional vector denoted as yi = [ yit ] t∈T + ∈ RH . Similarly define pre-treatment outcome vector y−i = [ yit ] t∈T − ∈ RM . Using the potential outcome framework [ 41 ] , let yit ( ai ) ∈ R denote the potential outcome at time t in a world where i received the treatment as indicated by ai . Let yi ( 1 ) = [ yit ( 1 ) ] t∈T + ∈ RH , and y−i ( 1 ) = [ yit ( 1 ) ] t∈T − ∈ RM . Similarly , let yi ( 0 ) = [ yit ( 0 ) ] t∈T + and y − i ( 0 ) = [ yit ( 0 ) ] t∈T − . The individual treatment effect ( ITE ) is defined as τi = yi ( 1 ) − yi ( 0 ) ∈ RH . 3 ITE estimation via SyncTwin . SyncTwin estimates the ITE by predicting both potential outcomes yi ( 1 ) and yi ( 0 ) and take the difference . Note that for an individual in the dataset i ∈ [ N ] , it is only necessary to predict the counterfactual outcome yi ( 1− ai ) because the factual outcome yi ( ai ) = yi is observed ( under the consistency assumption to be discussed later ) . Without loss of generality , we will use estimating yi ( 0 ) as an example in the following sections . One can estimate yi ( 1 ) using the same method . 3.1 Assumptions . SyncTwin relies on three assumptions . ( 1 ) Stable Unit Treatment Value Assumption [ 41 ] : yit ( ai ) = yit , ∀i ∈ [ N ] , t ∈ T − ∪ T + . ( 2 ) No anticipation , also known as causal systems [ 4 ] : yit = yit ( 1 ) = yit ( 0 ) , ∀t ∈ T − , i ∈ [ N ] . ( 3 ) Data generating process ( DGP ) . The DGP assumption involves two parts . First , the causal directed acyclic graph ( DAG ) is specified in Figure 2 [ 37 ] , which involves a latent factor ci ∈ RK . Secondly , we assume the potential outcomes have a parametric form : yit ( 0 ) = q > t ci + ξit , ∀t ∈ T − ∪ T + , ( 1 ) where qt ∈ RK , K < min ( M , H ) is a weight vector and ξit is the white noise . Equation 1 is commonly referred to as a latent factor model with ci as the individualized latent factor and qt as the time-varying latent trend [ 10 ] . Without loss of generality , we require the weight vectors ||qt|| = 1 , ∀t ∈ T − ∪ T + [ 50 ] . Discussion . SyncTwin differs from the nonparametric ITE estimation methods [ 27 ] because it assumes the parametric form in Equation 1 . In essence , it means that we can fully separate the time effect from the individual effect . We would like to highlight two aspects of this assumption . First , the latent factor ci does not change over time . It provides a constant link between the pre-treatment outcomes and the post-treatment outcomes . Secondly , the time-varying latent trend qt is common to all individuals . Together , they ensure that any linear combination of different individuals ’ outcomes will automatically preserve qt , i.e . ∑ i biyit ( 0 ) = q > t ∑ i bici + ∑ i biξit , for any weights bi ∈ R , ∀i ∈ [ N ] . For this reason , SyncTwin bypasses qt and directly finds the weights bi ’ s to issue counterfactual predictions . As we will show later , doing so allows us to derive various theoretical results to inform the design of SyncTwin . It also leads to a checking procedure to validate estimation quality and improvements in interpretability . 1SyncTwin can model more than two treatment options , but we focus on binary treatments for illustration . The DAG in Figure 2 is different from the one commonly used in the static setting [ 41 ] . We assume the latent factor ci captures the physiological factors that impact both the outcome and the covariates . Here , the covariates xis is a “ confounder ” in a general sense because it opens up a backdoor path from treatment to outcome , i.e . ai → xis → ci → yis [ 37 ] . Based on the backdoor criterion [ 37 ] , adjusting for the covariates xis is sufficient to identify the treatment effect from observational data . We compare our assumptions with those used in the related works in Appendix A.2 . In particular , we show that our assumption is weaker than the one used by Synthetic Control , a widely-applied method in Econometrics [ 2 ] . In Appendix A.5 , we further demonstrate the plausibility of our assumptions in real-world scenarios . In the simulation study ( Section 5.1 ) we show experimentally that SyncTwin performs well even when the data is not generated from the assumed DGP exactly but instead from a set of differential equations . Finally , and perhaps most importantly , we show that based on our assumptions , SyncTwin is able to reproduce the findings of a large-scale randomized controlled trial using observational data ( Section 5.2 ) .

Summary: The paper proposes a representation learning approach to model counterfactuals in longitudinal data with point interventions over time. Their approach, SyncTwin is thus suited to situations where an intervention is made on a temporal dataset at an instance of time or as a continuous exposure by treating all points post the intervention as the potential outcomes under treatment.   They compare the performance of their model against several counterfactual estimation baselines originally proposed to model static observational data with interventions.