Time Series Deconfounder: Estimating Treatment Effects over Time in the Presence of Hidden Confounders

Ioana Bica, Ahmed Alaa, Mihaela van der Schaar

Abstract

The estimation of treatment effects is a pervasive problem in medicine. Existing methods for estimating treatment effects from longitudinal observational data assume that there are no hidden confounders, an assumption that is not testable in practice and, if it does not hold, leads to biased estimates. In this paper, we develop the Time Series Deconfounder, a method that leverages the assignment of multiple treatments over time to enable the estimation of treatment effects in the presence of multi-cause hidden confounders. The Time Series Deconfounder uses a novel recurrent neural network architecture with multitask output to build a factor model over time and infer latent variables that render the assigned treatments conditionally independent; then, it performs causal inference using these latent variables that act as substitutes for the multi-cause unobserved confounders. We provide a theoretical analysis for obtaining unbiased causal effects of time-varying exposures using the Time Series Deconfounder. Using both simulated and real data we show the effectiveness of our method in deconfounding the estimation of treatment responses over time.

Introduction

In medical research, determining the individualized response to treatments over time is essential. However, observational data like Electronic Health Records (EHR) often suffer from hidden confounding—unobserved variables that influence both the treatment choice and the patient outcome. Standard causal inference methods rely on the "no hidden confounders" assumption (sequential strong ignorability), which is untestable and frequently violated in clinical practice. The Time Series Deconfounder (TSD) introduces a framework to estimate unbiased treatment effects by leveraging the dependencies between multiple treatments assigned over time to infer "substitute" variables for these hidden confounders.

Methodology

The TSD framework extends the "Deconfounder" theory to the time-series domain through a three-step process:

  1. The Factor Model: A recurrent neural network (RNN) with an LSTM architecture is employed to model the treatment assignment process. This model uses a multitask output to predict multiple treatments simultaneously. The hidden state of this RNN serves as a latent variable ($Z_t$) that captures the underlying patterns of treatment assignment.
  2. Predictive Checks: Since hidden confounders are unobserved, the model's validity is verified through a surrogate: the ability to accurately replicate the distribution of assigned treatments in a validation set. If the factor model passes these predictive checks (measured via p-values), the inferred latent variables are considered reliable substitutes for hidden confounders.
  3. The Outcome Model: The inferred substitutes ($Z_t$) are integrated as additional observed covariates into standard causal models, such as Marginal Structural Models (MSMs) or Recurrent Marginal Structural Networks (R-MSNs), to estimate individualized treatment responses.
The RNN architecture for the factor model uses multitask output to infer latent variables from multiple treatments.

The core innovation is the "Blessing of Multiple Causes." By observing how clinicians balance multiple treatments (e.g., antibiotics and ventilation), the model can reverse-engineer the hidden patient states that prompted those specific combinations, provided the hidden factor affects multiple causes.

Experimental Results

The authors evaluated TSD using simulated autoregressive data, a tumor growth simulation, and real-world ICU data from MIMIC-III.

In synthetic benchmarks with high confounding, TSD significantly reduced the Root Mean Squared Error (RMSE) of treatment effect estimates compared to models that ignored hidden variables. As shown in the performance analysis, the deconfounded model performs nearly as well as an "Oracle" model that has access to the ground-truth hidden data, even as the degree of confounding increases.

RMSE of treatment effect estimates for Recurrent Marginal Structural Networks across varying degrees of confounding.

On the MIMIC-III dataset, which included over 6,000 patients and treatments like vasopressors and mechanical ventilation, the TSD improved the predictive accuracy of outcome models. For instance, using TSD substitutes reduced the error in predicting blood pressure responses from 10.29 to 9.20 (RMSE $\times 10^2$).

Discussion and Limitations

The TSD shifts the causal inference burden from an untestable assumption to a testable predictive check. However, it is limited by the "no single-cause hidden confounders" requirement; if a hidden variable affects only one treatment and the outcome, the factor model cannot capture it. Future work may involve using proxy variables to further strengthen theoretical guarantees and exploring the bias-variance tradeoff inherent in using substitute confounders, which reduces bias but may increase estimate variance.

Summary updated

Abstract

The estimation of treatment effects is a pervasive problem in medicine. Existing methods for estimating treatment effects from longitudinal observational data assume that there are no hidden confounders, an assumption that is not testable in practice and, if it does not hold, leads to biased estimates. In this paper, we develop the Time Series Deconfounder, a method that leverages the assignment of multiple treatments over time to enable the estimation of treatment effects in the presence of multi-cause hidden confounders. The Time Series Deconfounder uses a novel recurrent neural network architecture with multitask output to build a factor model over time and infer latent variables that render the assigned treatments conditionally independent; then, it performs causal inference using these latent variables that act as substitutes for the multi-cause unobserved confounders. We provide a theoretical analysis for obtaining unbiased causal effects of time-varying exposures using the Time Series Deconfounder. Using both simulated and real data we show the effectiveness of our method in deconfounding the estimation of treatment responses over time.
BibTeX
@inproceedings{bica2020time,
  author = {Ioana Bica and Ahmed Alaa and Mihaela van der Schaar},
  title = {{Time Series Deconfounder: Estimating Treatment Effects over Time in the Presence of Hidden Confounders}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=ZOsAaLZCv9},
}
Figure