Abstract
Balanced representation learning methods have been applied successfully to counterfactual inference from observational data. However, approaches that account for survival outcomes are relatively limited. Survival data are frequently encountered across diverse medical applications, i.e., drug development, risk profiling, and clinical trials, and such data are also relevant in fields like manufacturing (e.g., for equipment monitoring). When the outcome of interest is a time-to-event, special precautions for handling censored events need to be taken, as ignoring censored outcomes may lead to biased estimates. We propose a theoretically grounded unified framework for counterfactual inference applicable to survival outcomes. Further, we formulate a nonparametric hazard ratio metric for evaluating average and individualized treatment effects. Experimental results on real-world and semi-synthetic datasets, the latter of which we introduce, demonstrate that the proposed approach significantly outperforms competitive alternatives in both survival-outcome prediction and treatment-effect estimation.
Keywords: survival analysis, time-to-event, counterfactual inference, hazard ratio, causal survival analysis, representation learning
1. INTRODUCTION
Survival analysis or time-to-event studies focus on modeling the time of a future event, such as death or failure, and investigate its relationship with covariates or predictors of interest. Specifically, we may be interested in the causal effect of a given intervention or treatment on survival time. A typical question may be: will a given therapy increase the chances of survival of an individual or population? Such causal inquiries on survival outcomes are common in the fields of epidemiology and medicine [22, 47, 65]. As an important current example, the COVID-19 pandemic is creating a demand for methodological development to address such questions, specifically, when evaluating the effectiveness of a potential vaccine or therapeutic outside randomized controlled trial settings.
Traditional causal survival analysis is typically carried out in the context of a randomized controlled trial (RCT), where the treatment assignment is controlled by researchers. Though they are the gold standard for causal inference, RCTs are usually long-term engagements, expensive and limited in sample size. Alternatively, the availability of observational data with comprehensive information about patients, such as electronic health records (EHRs), constitutes a more accessible but also more challenging source for estimating causal effects [24, 33]. Such observational data may be used to augment and verify an RCT, after a particular treatment is approved and in use [20, 21, 40]. Moreover, the wealth of information from observational data also allows for the estimation of the individualized treatment effect (ITE), namely, the causal effect of an intervention at the individual level. In this work, we develop a novel framework for counterfactual time-to-event prediction to estimate the ITE for survival or time-to-event outcomes from observational data.
Estimating the causal effect for survival outcomes in observational data manifests two principal challenges. First, the treatment assignment mechanism is not known a priori. Therefore, there may be variables, known as confounders, affecting both the treatment and survival time, which lead to selection bias [4], i.e., that the distributions across treatment groups are not the same. In this work, we focus on selection biases due to confounding, but other sources may also be considered. For instance, patients who are severely ill are likely to receive more aggressive therapy, however, their health status may also inevitably influence survival. Traditional survival analysis neglects such bias, leading to incorrect causal estimation. Second, the exact time-to-event is not always observed, i.e., sometimes we only know that an event has not occurred up to a certain point in time. This is known as the censoring problem. Moreover, censoring might be informative depending on the characteristics of the individuals and their treatment assignments, thus proper adjustment is required for accurate causal estimation [13, 19].
Traditional causal survival-analysis approaches typically model the effect of the treatment or covariates (not time or survival) in a parametric manner. Two commonly used models are the Cox proportional hazards (CoxPH) model [15] and the accelerated failure time (AFT) model [62], which presume a linear relationship between the covariates and survival probability. Further, proper weighting for each individual has been employed to account for confounding bias from these models [1, 2, 27]. For instance, probability weighting schemes that account for both selection bias and covariate dependent censoring have been considered for adjusted survival curves [13, 19]. Moreover, such probability weighting schemes have been applied to causal survival-analysis under time-varying treatment and confounding [26, 47]. See Hernán and Robins [28], Tsiatis [57], van der Laan and Robins [58], Van der Laan and Rose [59] for an overview. Such linear specification makes these models interpretable but compromises their flexibility, and makes it difficult to adapt them for high-dimensional data or to capture complex interactions among covariates. Importantly, these methods lack a counterfactual prediction mechanism, which is key for ITE estimation (see Section 2).
Fortunately, recent advances in machine learning, such as representation learning or generative modeling, have enabled causal inference methods to handle high-dimensional data and to characterize complex interactions effectively. For instance, there has been recent interest in tree-based [12, 61] and neural-network-based [51, 66] approaches. For pre-specified time-horizons, the nonparametric Random Survival Forest (RSF) [32] and Bayesian Additive regression trees (BART) [12] have been extended to causal survival analysis. RSF has been applied to causal survival forests with weighted bootstrap inference [17, 52] while a BART is extended to account for survival outcomes in Surv-BART [54], and AFT-BART [25]. See [31] for an extensive investigation of the causal survival tree-based methods.
Alternatively, when estimating the ITE, neural-network-based methods propose to regularize the transformed covariates or representations for an individual to have balanced distributions across treatment groups, thus accounting for the confounding bias and improving ITE prediction. However, most approaches employing representation learning techniques for counterfactual inference deal with continuous or binary outcomes, instead of time-to-event outcomes with censoring (informative or non-informative). Moreover, while recent neural-network-based survival analysis methods [3, 10, 37, 38, 42, 44, 45, 64] have improved survival predictions when censoring is non-informative, they lack mechanisms for accounting for informative censoring or confounding biases. Hence, a principled generalization to the context of counterfactual survival analysis is needed.
In this work we leverage balanced (latent) representation learning to estimate ITEs via counterfactual prediction of survival outcomes in observational studies. We develop a framework to predict event times from a low-dimensional transformation of the original covariate space. To address the specific challenges associated with counterfactual survival analysis, we make the following contributions:
We develop an optimization objective incorporating adjustments for informative censoring, as well as a balanced regularization term bounding the generalization error for ITE prediction. For the latter, we repurpose a recently proposed bound [51] for our time-to-event scenario.
We propose a generative model for event times to relax restrictive survival linear and parametric assumptions, thus allowing for more flexible modeling. Our approach can also provide non-parametric uncertainty quantification for ITE predictions.
We provide survival-specific evaluation metrics, including a new nonparametric hazard ratio estimator, and discuss how to perform model selection for survival outcomes. The proposed model demonstrates superior performance relative to the commonly used baselines in real-world and semi-synthetic datasets.
We introduce a survival-specific semi-synthetic dataset and demonstrate an approach for leveraging prior randomized experiments in longitudinal studies for model validation.
2. PROBLEM FORMULATION
We first introduce the basic setup for performing causal survival analysis in observational studies. Suppose we have units, with units being treated and in the control group . For each unit (individual), we have covariates , which can be heterogeneous, e.g., a mixture of categorical and continuous covariates which, in the context of medicine, may include labs, vitals, procedure codes, etc. We also have a treatment indicator , where for the controls and for the treated, as well as the outcome (event) of interest . Under the potential-outcomes framework [49], let and be the potential event times for a given subject under control and treatment, respectively. In practice we only observe one realization of the potential outcomes, i.e., the factual outcome , while the counterfactual outcome is unobserved.
In survival analysis, the problem becomes more difficult because we do not always observe the exact event time for each individual, but rather the time up to which we are certain that the event has not occurred; specifically, we have a (right) censoring problem, most likely due to the loss of follow-up. We denote the censoring time as and censoring indicator as . The actual observed time is , i.e., the outcome is observed (non-censored) if and .
In this work, we are interested in the expected difference between the and conditioned on for a given unit (individual), which is commonly known as the individualized treatment effect (ITE). Specifically, we wish to perform inference on the conditional distributions of and , i.e., and , respectively, as shown in Figure 1a. In practice, we observe realizations of for observed time, censoring indicator, covariates and treatment indicator, respectively; hence, from an observational study the dataset takes the form . Below, we discuss several common choices of estimands in survival analysis.
Figure 1:

(a) Illustration of the proposed counterfactual survival analysis (CSA). Covariates are mapped into latent representation via deterministic mapping . The potential outcomes are sampled from for via stochastic mapping , where stochasticity is induced with a planar-flow-based transformation, , of a simple distribution , i.e., uniform or Gaussian. (b) and (c) show the proposed causal graphs for non-informative and informative censoring, respectively.
2.1. Estimands of Interest
We begin by considering survival analysis in the absence of an intervening treatment choice, . Let be the cumulative distribution function of the event (failure) time, , given a realization of the covariates, . Survival analysis is primarily concerned with characterization of the survival function conditioned on covariates , and the hazard function or risk score, , defined below. is a monotonically decreasing function indicating the probability of survival up to time . The hazard function measures the instantaneous probability of the event occurring between given and . From standard definitions [36], the relationship between cumulative and hazard function is formulated as
| (1) |
From (1) we see that , is the conditional event time density function [36].
Given the binary treatment , we are interested in its impact on the survival time. For ITE estimation, we are also interested in the difference between the two potential outcomes . Let and denote the survival and hazard functions for the potential outcomes , i.e., and . Several common estimands of interest include [56, 67]:
Difference in expected lifetime: .
Difference in survival function: .
Hazard ratio: .
The inference difficulties associated with the above estimands from observational data are two-fold. First, there are confounders affecting both the treatment assignment and outcomes, which stem from selection bias, i.e., the treatment and control covariate distributions are not necessarily the same. Also, we do not have direct knowledge of the conditional treatment assignment mechanism, i.e., , also known as the propensity score. Let denote statistical independence. For estimands to be identifiable from observational data, we make two assumptions: (i) , i.e., no unobserved confounders or ignorability, and (ii) overlap in the covariate support almost surely if . Second, the censoring mechanism is also unknown and may lead to bias without proper adjustment. We consider two censoring mechanisms in our work, (i) conditionally independent or informative censoring: , and (ii) random or non-informative censoring: . Note that for informative censoring, we also have to consider potential censoring times and and their conditionals and , respectively. Figure 1 shows causal graphs illustrating these modeling assumptions.
3. MODELING
To overcome the above challenges and adjust for observational biases, we propose a unified framework for counterfactual survival analysis (CSA). Specifically, we repurpose the counterfactual bound in Shalit et al. [51] for our time-to-event scenario and introduce a nonparametric approach for stochastic survival outcome predictions. Below we formulate a theoretically grounded and unified approach for estimating (i) the encoder function , which deterministically maps covariates to their corresponding latent representation , and (ii) two stochastic time-to-event generative functions, , to implicitly draw samples from both potential outcome conditionals , for , and where indicates the sample from is for . Further, we formulate a general extension that accounts for informative censoring by introducing two stochastic censoring generative functions, , to draw samples for potential censoring times . The model-specifying functions, , are parameterized via neural networks. See the Supplementary Material (SM) for details. Figure 1a summarizes our modeling approach.
3.1. Accounting for selection bias
We wish to estimate the potential outcomes, i.e., event times, which are sampled by distributions parameterized by functions , i.e.,
| (2) |
| (3) |
We obtain (3) from (2) via the strong ignorability assumption, i.e., (consistent with the causal graphs in Figure 1b and 1c) and , and the consistency assumption, i.e., . A similar argument can be made for informative censoring based on Figure 1c, so we can also write . Given (3), model functions and for informative censoring can be learned by leveraging standard statistical optimization approaches, that minimize a loss hypothesis given samples from the empirical distribution , i.e., from dataset . Specifically, we write as
| (4) |
where is a loss function that measures the agreement of (and for informative censoring) with ground truth , the observed time and censoring indicator, respectively.
For some parametric formulations of event time distribution , e.g., exponential, Weibull, log-Normal, etc., and provided the censoring mechanism is non-informative, is the closed form log likelihood. Specifically, , which implies that the conditional event time density and survival functions can be calculated in closed form from transformations of . See the SM for parametric examples of (4) accounting for informative censoring.
We further define the expected loss for a given realization of covariates and treatment assignment over observed times (censored and non-censored), and the censoring indicator as as in Shalit et al. [51]. For a given subject with covariates and treatment assignment , we wish to minimize both the factual and counterfactual losses, and , respectively, by decomposing as follows
| (5) |
Let denote the marginal probability of treatment assignment. We can readily decompose the losses in (5) according to treatment assignments. The decomposed factual , and similarly, the decomposed counterfactual . In practice, only factual outcomes are observed, hence, for a non-randomized non-controlled experiment, we cannot obtain an unbiased estimate of from data due to selection bias (or confounding). Therefore, we bound and below following Shalit et al. [51].
Corollary 1. Assume is an invertible map, and , where is a family of functions, is the latent distribution for group , and is a constant. Then, we have:
| (6) |
The integral probability metric (IPM) [43, 55] measures the distance between two probability distributions and defined over , i.e., the latent space of . Formally, , where , represents a class of real-valued bounded measurable functions on [51]. Therefore, model functions can be learned by minimizing the upper bound in (6) consisting of (i) only factual losses under both treatment assignments and (ii) an IPM regularizer enforcing latent distributional equivalence between the treatment groups. Note that if the data originates from a RCT it follows (by construction) that .
3.2. Accounting for censoring bias
Below we formulate an approach for estimating functions and for synthesizing (sampling) non-censored and censored times, respectively. While some parametric assumptions for yield easy-to-evaluate closed forms for that can be used as likelihood for censored observations, they are restrictive, and have been shown to generate unrealistic high variance samples [10]. So motivated, we seek a nonparametric likelihood-based approach that can model a flexible family of distributions, with an easy-to-sample approach for event times . We model the event time generation process with a source of randomness, , e.g. Gaussian or uniform, which is obtained from a neural-network-based nonlinear transformation. In the experiments we use a planar flow formulation parameterized by [46], however, other specifications can also be used. Note that [42] has previously leveraged normalizing flows for survival analysis, however, our approach is very different in that it focuses on i) formulating a counterfactual survival analysis framework that accounts for informative or non-informative censoring mechanisms and confounding, and ii) modeling event times as a continuous variable instead of discretizing them. Specifically, we transform the source of randomness, , using a single layer specification as follows
| (7) |
where is the dimensionality of the planar flow; each component of is drawn independently from , and may be viewed as a skip connection with stochasticity in . Further, and are time-to-event generative and encoding functions, respectively, parameterized as neural networks. For simplicity, the dimensions of and are set to , however, they can be set independently if desired. In practice, we are interested in generating realistic event-time samples; therefore, we account for both censored and non-censored observations by adopting the objective from Chapfuwa et al. [10], formulated as
| (8) |
where the first term encourages sampled event times to be close to , the ground truth for observed events, i.e., , while penalizing for being smaller than the censoring time when . Further, the expectation is taken over samples (a minibatch) from empirical distribution .
Informative censoring.
We model informative censoring similar to (8) but mirroring the censoring indicators to encourage accurate censoring time samples for , while penalizing for being smaller than for (observed events). Specifically, we set an independent source of randomness like in (7) but parameterized by and censoring generative functions , parameterized as neural networks, where formulated as
| (9) |
Further, we introduce an additional time-order-consistency loss that enforces the correct order of the observed time relative to the censoring indicator, i.e., if and if , thus
| (10) |
Note that does not depend on the observed event times but only on the censoring indicators. Finally, we write the consolidated CSA loss for informative censoring (CSA-INFO) by aggregating (8), (9) and (10) as
| (11) |
3.3. Learning
Model functions are learned by minimizing the bound (6), via stochastic gradient descent on minibatches from , with for non-informative censoring and for informative censoring. Further, for the IPM regularization loss in (6), we optimize the dual formulation of the Wasserstein distance, via the regularized optimal transport [18, 60]. Consequently, we only require to be 1-Lipschitz [51] and is selected by grid search on the validation set using only factual data (details below).
4. METRICS
We propose a comprehensive evaluation approach that accounts for both factual and causal metrics. Factual survival outcome predictions are evaluated according to standard survival metrics that measure diverse performance characteristics, such as concordance index (C-Index) [23], mean coefficient of variation (COV) and calibration slope (C-slope) [9]. See the SM for more details on these metrics. For causal metrics, defined below, we introduce a nonparametric hazard ratio (HR) between treatment outcomes, and adopt the conventional precision in estimation of heterogeneous effect (PEHE) and average treatment effect (ATE) performance metrics [29]. Note that PEHE and ATE require ground truth counterfactual event times, which is only possible for (semi-)synthetic data. For HR, we compare our findings with those independently reported in the literature from gold-standard RCT data.
Nonparametric Hazard Ratio.
In medical settings, the population hazard ratio between treatment groups is considered informative thus has been widely used in drug development and RCTs [41, 65]. For example, , > 1, or ≈ 1 indicate population positive, negative and neutral treatment effects at time , respectively. Moreover, naturally accounts for both censored and non-censored outcomes. Standard approaches for computing rely on the restrictive proportional hazard assumption from CoxPH [15], which is constituted as a semi-parametric linear model . However, the constant covariate (time independent) effect is often violated in practice (see Figure 2b). For CoxPH, the marginal HR between treatment and control can be obtained from regression coefficient learned via maximum likelihood without the need for specifying the baseline hazard :
| (12) |
So motivated, we propose a nonparametric, model-free approach for computing , in which we do not assume a parametric form for the event time distribution or the proportional hazard assumption from CoxPH. This approach only relies on samples from the conditional event time density functions, and , via from (7).
Figure 2:

(a) Inferred population compared against ground truth (EMP) on actg-Synthetic data. CSA-INFO-based (b) cluster-specific average curves and (c) estimated density of median values on the test set of the Framingham dataset. Clusters assignment were obtained via hierarchical clustering of individualized traces.
Definition 1. We define the nonparametric marginal Hazard Ratio and its approximation, , as
| (13) |
where for we leveraged (1) to obtain (13) and . The nonparametric assumption for makes the computation of challenging. Provided that is a monotonically decreasing function, for simplicity, we fit a linear function , and set . Note that the linear model is only used for estimating from the nonparametric estimation of . Bias from can be reduced by considering more complex function approximations for , e.g., polynomial or spline. For the nonparametric estimation of we leverage the model-free population point-estimate-based nonparametric Kaplan-Meier [34] estimator of the survival function in [9] to marginalize both factual and counterfactual predictions given covariates . The approximated hazard ratio, , is thus obtained by combining the approximations and . A similar formulation for the conditional, , can also be derived. See the SM for full details on the evaluation of and . Note that for some AFT- or CoxPH-based parametric formulations, , can be readily evaluated because and are available in closed form.
In the experiments, we will use to compare different approaches against results reported in RCTs (see Tables 1 and 2). Further, we will use to illustrate stratified treatment effects (see Figure 2). Note that though a neural-network-based survival recommender system [35] has been previously used to estimate , their approach does not account for confounding or informative censoring thus it is susceptible to bias.
Table 1:
Performance comparisons on actg-Synthetic data, with 95% confidence interval. The ground truth, test set, hazard ratio is .
| Method | Causal metrics | Factual metrics | ||||
|---|---|---|---|---|---|---|
| C-Index | Mean COV | C-Slope | ||||
| CoxPH-Uniform | NA | NA | 0.97(0.86,1.09) | NA | NA | NA |
| CoxPH-IPW | NA | NA | 0.48(0.03,7.21) | NA | NA | NA |
| CoxPH-OW | NA | NA | 0.60(0.53,0.68) | NA | NA | NA |
| Surv-BART | 352.07 | 77.89 | 0.0(0.0, 0.0) | (0.706, 0.686) | 0.001 | (0.398, ∞) |
| AFT-Weibull | 367.92 | 133.93 | 0.47(0.47,0.47) | (0.21, 0.267) | 6.209 | (0.707, 0.729) |
| AFT-log-Normal | 377.76 | 157.64 | 0.47(0.47,0.47) | (0.675, 0.556) | 6.971 | (0.707, 0.729) |
| SR | 369.47 | 88.55 | 0.38(0.33,0.65) | (0.791, 0.744) | 0 | (0.985, 1.027) |
| CSA (proposed) | 358.72 | 0.8 | 0.45(0.39,0.65) | (0.787, 0.767) | 0.131 | (0.985, 1.026) |
| CSA-INFO (proposed) | 344.3 | 31.19 | 0.53 (0.41,0.67) | (0.78, 0.764) | 0.13 | (0.999, 1.029) |
Table 2:
Performance comparisons on Framingham data, with 95% confidence interval. Test set NN assignment of and yields biased , while previous large scale longitudinal RCT studies estimated [65].
| Method | Causal metric | Factual metrics | ||
|---|---|---|---|---|
| C-Index | Mean COV | C-Slope | ||
| CoxPH-Uniform | 1.69(1.38,2.07) | NA | NA | NA |
| CoxPH-IPW | 1.09(0.76,1.57) | NA | NA | NA |
| CoxPH-OW | 0.88(0.73,1.08) | NA | NA | NA |
| Surv-BART | 14.99(14.9,14.9e8) | (0.629, 0.630) | 0.003 | (0.232, 0.084) |
| AFT-Weibull | 1.09(1.09,1.09) | (0.734, 0.395) | 8.609 | (0.857, 0.89) |
| AFT-log-Normal | 1.55(1.46,1.55) | (0.68, 0.56) | 10.415 | (0.979, 0.732) |
| SR | 0.58(0.53,0.71) | (0.601, 0.57) | 0 | (0.491, 0.63) |
| CSA (proposed) | 1.04(1.00,1.09) | (0.763, 0.728) | 0.161 | (0.891, 0.81) |
| CSA-INFO (proposed) | 0.81 (0.77,0.83) | (0.752, 0.651) | 0.156 | (0.907, 0.881) |
Precision in Estimation of Heterogeneous Effect (PEHE).
A general individualized estimation error is formulated as
where is the ground truth, and is a deterministic transformation. In our experiments, is the average over samples from . Alternative estimands, e.g., thresholding survival times , can also be considered as described in Section 2.1.
Average Treatment Effect (ATE).
The population treatment effect estimation error is defined as
where (ground truth) and .
Note that both PEHE and ATE require ground truth (population and individual) treatment effects to be available, which is only possible in synthetic and semi-synthetic data (benchmarking) scenarios.
5. EXPERIMENTS
We describe the baselines and datasets that will be used to evaluate the proposed counterfactual survival analysis methods (CSA and CSA-INFO). Detailed architecture information of the proposed methods (CSA and CSA-INFO) and baselines (AFT-log-Normal, AFT-Weibull, Semi-supervised Regression(SR)) are provided in the SM. Pytorch code to replicate experiments can be found at https://github.com/paidamoyo/counterfactual_survival_analysis. Throughout the experiments, we use the standard for CoxPH based methods in (12) and (13) for all others. The bound in (6) is sensitive to , thus we propose approximating proxy counterfactual outcomes for the validation set, according to the covariate Euclidean nearest-neighbour (NN) from the training set. We select the that minimizes the validation loss from the set (0, 0.1, 1, 10, 100).
Baselines.
We consider the following competitive baseline approaches: (i) propensity weighted CoxPH [7, 48, 50]; (ii) IPM (6) regularized AFT (log-Normal and Weibull) models; (iii) an IPM (6) regularized deterministic semi-supervised regression (SR) model with accuracy objective from [10], as a contrast for the proposed stochastic predictors (CSA and CSA-INFO); and (iv) survival Bayesian additive regression trees (Surv-BART) [54]. For CoxPH, we consider three normalized weighting schemes: (i) inverse probability weighting (IPW) [8, 30], where ; ii) overlapping weights (OW) [16, 39], where ; and iii) the standard RCT uniform assumption. A simple linear logistic model , is used as an approximation, , to the unknown propensity score . See the SM for more details of the baselines.
Datasets.
We consider the following datasets summarized in Table 3: (i) Framingham, is an EHR-based longitudinal cardiovascular cohort study that we use to evaluate the effect of statins on future coronary heart disease outcomes [6]; (ii) actg, is a longitudinal RCT study comparing monotherapy with Zidovudine or Didanosine with combination therapy in HIV patients [22]; and (iii) actg-Synthetic, is a semi-synthetic dataset based on actg covariates. We simulate potential outcomes according to a Gompertz-Cox distribution [5] with selection bias from a simple logistic model for and AFT-based censoring mechanism. The generative process is detailed in the SM. Table 3 summarizes the datasets according to (i) covariates of size ; (ii) proportion of non-censored events, treated units, and missing entries in the covariate matrix; and (iii) time range for both censored and non-censored events. Missing entries are imputed with the median or mode if continuous or categorical, respectively.
Table 3:
Summary statistics of the datasets.
| Framingham | actg | actg-synthetic | |
|---|---|---|---|
| Events (%) | 26.0 | 26.9 | 48.9 |
| Treatment (%) | 10.4 | 49.5 | 55.9 |
| 3,435 | 1,054 | 2,139 | |
| 32 | 23 | 23 | |
| Missing (%) | 0.23 | 1.41 | 1.38 |
| (days) | 7,279 | 1,231 | 1,313 |
Quantitative Results.
Experimental results for two data-sets in Tables 1 and 2, illustrate that AFT-based methods have high variance, inferior in calibration and C-Index than accuracy-based methods (SR, CSA, CSA-INFO). Surv-BART is the least calibrated but low variance method. CSA-INFO and CSA outperform all methods across all factual metrics, whereas CSA-INFO is better calibrated, has low variance but slightly lower C-Index than CSA. Note that we fit CoxPH using the entire dataset; since it does not support counterfactual inference, we do not present factual metrics. By properly adjusting for both informative censoring and selection bias, CSA-INFO significantly outperforms all methods in treatment effect estimation according to and , across non-RCT datasets, while remaining comparable to AFT-Weibull on the RCT dataset (see the SM). Further, RCT-based results on actg data in the SM illustrate comparable across all models except for AFT-log-Normal and Surv-BART, which overestimate, and SR, which underestimates risk. For non-RCT datasets (actg-Synthentic and framingham), CoxPH-OW has a clear advantage over all CoxPH based methods, mostly credited to the well-behaved bounded propensity weights ∈ [0, 1]. Interestingly, the Framingham observational data exhibits a common paradox, where without proper adjustment of selection and censoring bias, naive approaches would result in a counter-intuitive treatment effect from statins. However, there is severe confounding from covariates such as age, BMI, diabetes, CAD, PAD, MI, stroke, etc., that influence both treatment likelihood and survival time. Table 2, demonstrates that CSA-INFO is clearly the best performing approach. Specifically, its , reverses the biased observational treatment effect, to demonstrate positive treatment from statins, which is consistent with prior large RCT longitudinal findings [65]. Consequently, our experiments are comprehensive and we are confident that the CSA-INFO performance benefits are attributed to (i) accounting for informative censoring bias; (ii) accounting for selection bias (optimal IPM regularizer with ); and (iii) flexible and non-parametric generative modeling of event times from the stochastic planar flow.
Qualitative Results.
Figure 2a demonstrates that CSA-INFO matches the ground truth population hazard, , better than alternative methods on actg-Synthetic data. See the SM for actg and framingham. Figure 2b shows sub-population log hazard ratios for four patient clusters obtained via hierarchical clustering on the individual log hazard ratios, , of the test set of Framingham data. Interestingly, these clusters stratify treatment effects into: positive (2), negative (1 and 3), and neutral (4) sub-populations. Moreover, the estimated density of median values in Figure 2c illustrates that nearly 70% of the testing set individuals have , thus may benefit from taking statins. Further, we isolated the extreme top and bottom quantiles, and , respectively, of the median values for the test set of Framingham, as shown in Figure 2c. After comparing their covariates, we found that individuals with the following characteristics may benefit from taking statins: young, male, diabetic, without prior history (CAD, PAD, stroke or MI), high BMI, cholesterol, triglycerides, fasting glucose, and low high-density lipoprotein. Note that individuals with contrasting covariates experience may not benefit from taking statins. There seem to be consensus that diabetics and high-cholesterol patients benefit from statins [11, 63]. See SM for additional results.
6. CONCLUSIONS
We have proposed a unified counterfactual inference framework for survival analysis. Our approach adjusts for bias from two sources, namely, confounding (covariates influence both the treatment assignment and the outcome) and censoring (informative or non-informative). Relative to competitive alternatives, we demonstrate superior performance for both survival-outcome prediction and treatment-effect estimation, across three diverse datasets, including a semi-synthetic dataset which we introduce. Moreover, we formulate a model-free nonparametric hazard ratio metric for comparing treatment effects or leveraging prior randomized real-world experiments in longitudinal studies. We demonstrate that the proposed model-free hazard-ratio estimator can be used to identify or stratify heterogeneous treatment effects. Finally, this work will serve as an important baseline for future work in real-world counterfactual survival analysis. In future work, we plan to understand the sensitivity of our estimates to unobserved confounding [14] and the effect of both censoring bias and selection bias on causal identifiability.
Supplementary Material
CCS CONCEPTS.
Computing methodologies → Machine learning algorithms; Machine learning; Machine learning approaches; Learning latent representations;
ACKNOWLEDGMENTS
The authors would like to thank the anonymous reviewers for their insightful comments. This work was supported by NIH/NIBIB R01-EB025020 and NIH/NINDS 1R61NS120246-01.
Contributor Information
Paidamoyo Chapfuwa, Duke University, USA.
Serge Assaad, Duke University, USA.
Shuxi Zeng, Duke University, USA.
Michael J. Pencina, Duke University, USA
Lawrence Carin, Duke University, USA.
Ricardo Henao, Duke University, USA.
REFERENCES
- [1].Austin Peter C. 2007. Propensity-score matching in the cardiovascular surgery literature from 2004 to 2006: a systematic review and suggestions for improvement. The Journal of Thoracic and Cardiovascular Surgery (2007). [Google Scholar]
- [2].Austin Peter C. 2014. The use of propensity score methods with survival or time-to-event outcomes: reporting measures of effect similar to those used in randomized experiments. Statistics in Medicine (2014). [Google Scholar]
- [3].Avati Anand, Duan Tony, Zhou Sharon, Jung Kenneth, Shah Nigam H, and Ng Andrew Y. 2020. Countdown regression: sharp and calibrated survival predictions. In Uncertainty in Artificial Intelligence. [Google Scholar]
- [4].Bareinboim Elias and Pearl Judea. 2012. Controlling selection bias in causal inference. In AISTATS. [Google Scholar]
- [5].Bender Ralf, Augustin Thomas, and Blettner Maria. 2005. Generating survival times to simulate Cox proportional hazards models. Statistics in medicine (2005). [Google Scholar]
- [6].Benjamin Emelia J, Levy Daniel, Vaziri Sonya M, D’Agostino Ralph B, Belanger Albert J, and Wolf Philip A. 1994. Independent risk factors for atrial fibrillation in a population-based cohort: the Framingham Heart Study. Jama (1994). [Google Scholar]
- [7].Buchanan Ashley L, Hudgens Michael G, Cole Stephen R, Lau Bryan, Adimora Adaora A, and Women’s Interagency HIV Study. 2014. Worth the weight: using inverse probability weighted Cox models in AIDS research. AIDS research and human retroviruses (2014). [Google Scholar]
- [8].Cao Weihua, Tsiatis Anastasios A, and Davidian Marie. 2009. Improving efficiency and robustness of the doubly robust estimator for a population mean with incomplete data. Biometrika (2009). [Google Scholar]
- [9].Chapfuwa P, Tao C, Li C, Khan I, Chandross KJ, Pencina MJ, Carin L, and Henao R. 2020. Calibration and Uncertainty in Neural Time-to-Event Modeling. IEEE Transactions on Neural Networks and Learning Systems (2020). [Google Scholar]
- [10].Chapfuwa Paidamoyo, Tao Chenyang, Li Chunyuan, Page Courtney, Goldstein Benjamin, Carin Lawrence, and Henao Ricardo. 2018. Adversarial time-to-event modeling. In ICML. [Google Scholar]
- [11].Cheung Bernard MY, Lauder Ian J, Lau Chu-Pak, and Kumana Cyrus R. 2004. Meta-analysis of large randomized controlled trials to evaluate the impact of statins on cardiovascular outcomes. British journal of clinical pharmacology (2004). [Google Scholar]
- [12].Chipman Hugh A, George Edward I, McCulloch Robert E, et al. 2010. BART: Bayesian additive regression trees. The Annals of Applied Statistics (2010). [Google Scholar]
- [13].Cole Stephen Rand Hernán Miguel A. 2004. Adjusted survival curves with inverse probability weights. Computer methods and programs in biomedicine (2004). [Google Scholar]
- [14].Cornfield Jerome, Haenszel William, Hammond E Cuyler, Lilienfeld Abraham M, Shimkin Michael B, and Wynder Ernst L. 1959. Smoking and lung cancer: recent evidence and a discussion of some questions. Journal of the National Cancer institute (1959). [Google Scholar]
- [15].Cox David R. 1972. Regression models and life-tables. Journal of the Royal Statistical Society: Series B (Methodological) (1972). [Google Scholar]
- [16].Crump Richard K, Hotz V Joseph, Imbens Guido W, and Mitnik Oscar A. 2006. Moving the goalposts: Addressing limited overlap in the estimation of average treatment effects by changing the estimand. Technical Report. National Bureau of Economic Research. [Google Scholar]
- [17].Cui Yifan, Kosorok Michael R, Wager Stefan, and Zhu Ruoqing. 2020. Estimating heterogeneous treatment effects with right-censored data via causal survival forests. arXiv (2020). [Google Scholar]
- [18].Cuturi Marco. 2013. Sinkhorn distances: Lightspeed computation of optimal transport. In NeurIPS. [Google Scholar]
- [19].Díaz Iván. 2019. Statistical inference for data-adaptive doubly robust estimators with survival outcomes. Statistics in Medicine (2019). [Google Scholar]
- [20].Frankovich Jennifer, Longhurst Christopher A, and Sutherland Scott M. 2011. Evidence-based medicine in the EMR era. N Engl J Med (2011). [Google Scholar]
- [21].Gombar Saurabh, Callahan Alison, Califf Robert, Harrington Robert, and Shah Nigam H. 2019. It is time to learn from patients like mine. NPJ digital medicine (2019). [Google Scholar]
- [22].Hammer Scott M, Katzenstein David A, Hughes Michael D, Gundacker Holly, Schooley Robert T, Haubrich Richard H, Henry W Keith, Lederman Michael M, Phair John P, Niu Manette, et al. 1996. A trial comparing nucleoside monotherapy with combination therapy in HIV-infected adults with CD4 cell counts from 200 to 500 per cubic millimeter. New England Journal of Medicine (1996). [Google Scholar]
- [23].Harrell Frank E Jr, Lee Kerry L, Califf Robert M, Pryor David B, and Rosati Robert A. 1984. Regression modelling strategies for improved prognostic prediction. Statistics in medicine (1984). [Google Scholar]
- [24].Häyrinen Kristiina, Saranto Kaija, and Nykänen Pirkko. 2008. Definition, structure, content, use and impacts of electronic health records: a review of the research literature. International Journal of Medical Informatics (2008). [Google Scholar]
- [25].Henderson Nicholas C, Louis Thomas A, Rosner Gary L, and Varadhan Ravi. 2020. Individualized treatment effects with censored data via fully nonparametric Bayesian accelerated failure time models. Biostatistics (2020). [Google Scholar]
- [26].Hernán Miguel Ángel, Brumback Babette, and Robins James M. 2000. Marginal structural models to estimate the causal effect of zidovudine on the survival of HIV-positive men. Epidemiology (2000). [Google Scholar]
- [27].Hernán Miguel A, Cole Stephen R, Margolick Joseph, Cohen Mardge, and Robins James M. 2005. Structural accelerated failure time models for survival analysis in studies with time-varying treatments. Pharmacoepidemiology and Drug Safety (2005). [Google Scholar]
- [28].Hernán Miguel A and Robins James M. 2020. Causal inference: what if. Boca Raton: Chapman & Hill/CRC; (2020). [Google Scholar]
- [29].Hill Jennifer L. 2011. Bayesian nonparametric modeling for causal inference. Journal of Computational and Graphical Statistics (2011). [Google Scholar]
- [30].Horvitz Daniel Gand Thompson Donovan J. 1952. A generalization of sampling without replacement from a finite universe. Journal of the American statistical Association (1952). [Google Scholar]
- [31].Hu Liangyuan, Ji Jiayi, and Li Fan. 2020. Estimating heterogeneous survival treatment effect in observational data using machine learning. arXiv (2020). [Google Scholar]
- [32].Ishwaran Hemant, Kogalur Udaya B, Blackstone Eugene H, Lauer Michael S, et al. 2008. Random survival forests. The annals of applied statistics (2008). [Google Scholar]
- [33].Jha Ashish K, DesRoches Catherine M, Campbell Eric G, Donelan Karen, Rao Sowmya R, Ferris Timothy G, Shields Alexandra, Rosenbaum Sara, and Blumenthal David. 2009. Use of electronic health records in US hospitals. New England Journal of Medicine (2009). [Google Scholar]
- [34].Kaplan Edward L and Meier Paul. 1958. Nonparametric estimation from incomplete observations. Journal of the American statistical association (1958). [Google Scholar]
- [35].Katzman Jared L, Shaham Uri, Cloninger Alexander, Bates Jonathan, Jiang Tingting, and Kluger Yuval. 2018. DeepSurv: personalized treatment recommender system using a Cox proportional hazards deep neural network. BMC medical research methodology (2018). [Google Scholar]
- [36].Kleinbaum David G and Klein Mitchel. 2010. Survival analysis. Springer. [Google Scholar]
- [37].Lee Changhee, Zame William R, Alaa Ahmed M, and van der Schaar Mihaela. 2019. Temporal Quilting for Survival Analysis. In AISTATS. [Google Scholar]
- [38].Lee Changhee, Zame William R, Yoon Jinsung, and van der Schaar Mihaela. 2018. Deephit: A deep learning approach to survival analysis with competing risks. In AAAI. [Google Scholar]
- [39].Li Fan, Morgan Kari Lock, and Zaslavsky Alan M. 2018. Balancing covariates via propensity score weighting. J. Amer. Statist. Assoc (2018). [Google Scholar]
- [40].Longhurst Christopher A, Harrington Robert A, and Shah Nigam H. 2014. A ‘green button’for using aggregate patient data at the point of care. Health affairs (2014). [Google Scholar]
- [41].Mihaylova B, Emberson J, Blackwell L, Keech A, Simes J, Barnes EH, Voysey M, Gray 3A, Collins R, and Baigent C. 2012. The effects of lowering LDL cholesterol with statin therapy in people at low risk of vascular disease: meta-analysis of individual data from 27 randomised trials.
- [42].Miscouridou Xenia, Perotte Adler, Elhadad Noémie, and Ranganath Rajesh. 2018. Deep survival analysis: Nonparametrics and missingness. In Machine Learning for Healthcare Conference. [Google Scholar]
- [43].Müller Alfred. 1997. Integral probability metrics and their generating classes of functions. Advances in Applied Probability (1997). [Google Scholar]
- [44].Nagpal Chirag, Li Xinyu Rachel, and Dubrawski Artur. 2021. Deep survival machines: Fully parametric survival regression and representation learning for censored data with competing risks. IEEE Journal of Biomedical and Health Informatics (2021). [Google Scholar]
- [45].Ranganath Rajesh, Perotte Adler, Elhadad Noémie, and Blei David. 2016. Deep survival analysis. In Machine Learning for Healthcare Conference. [Google Scholar]
- [46].Rezende Danilo Jimenez and Mohamed Shakir. 2015. Variational inference with normalizing flows. In ICML. [Google Scholar]
- [47].Robins James. 1986. A new approach to causal inference in mortality studies with a sustained exposure period–application to control of the healthy worker survivor effect. Mathematical modelling (1986). [Google Scholar]
- [48].Rosenbaum Paul R and Rubin Donald B. 1983. The central role of the propensity score in observational studies for causal effects. Biometrika (1983). [Google Scholar]
- [49].Rubin Donald B. 2005. Causal Inference Using Potential Outcomes. J. Amer. Statist. Assoc (2005). [Google Scholar]
- [50].Schemper Michael, Wakounig Samo, and Heinze Georg. 2009. The estimation of average hazard ratios by weighted Cox regression. Statistics in medicine (2009). [Google Scholar]
- [51].Shalit Uri, Johansson Fredrik D, and Sontag David. 2017. Estimating individual treatment effect: generalization bounds and algorithms. In ICML. [Google Scholar]
- [52].Shen Jincheng, Wang Lu, Daignault Stephanie, Spratt Daniel E, Morgan Todd M, and Taylor Jeremy MG. 2018. Estimating the optimal personalized treatment strategy based on selected variables to prolong survival via random survival forest with weighted bootstrap. Journal of biopharmaceutical statistics (2018). [Google Scholar]
- [53].Silverman Bernard W. 1986. Density estimation for statistics and data analysis. CRC press. [Google Scholar]
- [54].Sparapani Rodney A, Logan Brent R, McCulloch Robert E, and Laud Purushottam W. 2016. Nonparametric survival analysis using Bayesian additive regression trees (BART). Statistics in medicine (2016). [Google Scholar]
- [55].Sriperumbudur Bharath K, Fukumizu Kenji, Gretton Arthur, Schölkopf Bernhard, Lanckriet Gert RG, et al. 2012. On the empirical estimation of integral probability metrics. Electronic Journal of Statistics (2012). [Google Scholar]
- [56].Trinquart Ludovic, Jacot Justine, Conner Sarah C, and Porcher Raphaël. 2016. Comparison of treatment effects measured by the hazard ratio and by the ratio of restricted mean survival times in oncology randomized controlled trials. Journal of Clinical Oncology (2016). [Google Scholar]
- [57].Tsiatis Anastasios. 2007. Semiparametric theory and missing data. Springer Science & Business Media. [Google Scholar]
- [58].van der Laan Mark J and Robins James M. 2003. Unified Approach for Causal Inference and Censored Data. In Unified Methods for Censored Longitudinal Data and Causality. Springer. [Google Scholar]
- [59].Van der Laan Mark J and Rose Sherri. 2011. Targeted learning: causal inference for observational and experimental data. Springer Science & Business Media. [Google Scholar]
- [60].Villani Cédric. 2008. Optimal transport: old and new. Springer Science & Business Media. [Google Scholar]
- [61].Wager Stefan and Athey Susan. 2018. Estimation and inference of heterogeneous treatment effects using random forests. J. Amer. Statist. Assoc (2018). [Google Scholar]
- [62].Wei Lee-Jen. 1992. The accelerated failure time model: a useful alternative to the Cox regression model in survival analysis. Statistics in medicine (1992). [Google Scholar]
- [63].Wilt Timothy J, Bloomfield Hanna E, MacDonald Roderick, Nelson David, Rutks Indulis, Ho Michael, Larsen Gregory, McCall Anthony, Pineros Sandra, and Sales Anne. 2004. Effectiveness of statin therapy in adults with coronary heart disease. Archives of internal medicine (2004). [Google Scholar]
- [64].Xiu Zidi, Tao Chenyang, and Henao Ricardo. 2020. Variational learning of individual survival distributions. In Proceedings of the ACM Conference on Health, Inference, and Learning. [Google Scholar]
- [65].Yusuf Salim, Bosch Jackie, Dagenais Gilles, Zhu Jun, Xavier Denis, Liu Lisheng, Pais Prem, López-Jaramillo Patricio, Leiter Lawrence A, Dans Antonio, et al. 2016. Cholesterol lowering in intermediate-risk persons without cardiovascular disease. New England Journal of Medicine (2016). [Google Scholar]
- [66].Zhang Yao, Bellot Alexis, and van der Schaar Mihaela. 2020. Learning Overlapping Representations for the Estimation of Individualized Treatment Effects. In AISTATS. [Google Scholar]
- [67].Zhao Lihui, Tian Lu, Uno Hajime, Solomon Scott D, Pfeffer Marc A, Schindler Jerald S, and Wei Lee Jen. 2012. Utilizing the integrated difference of two survival functions to quantify the treatment contrast for designing, monitoring, and analyzing a comparative clinical study. Clinical trials (2012). [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
