Skip to main content
QUICK REVIEW

[Paper Review] Causal Recurrent Variational Autoencoder for Medical Time Series Generation

Hongming Li, Shujian Yu|arXiv (Cornell University)|Jan 16, 2023
Machine Learning in HealthcareComputer Science3 citations
TL;DR

This paper proposes the Causal Recurrent Variational Autoencoder (CR-VAE), a novel generative model that integrates Granger causality into a recurrent VAE framework by using a multi-head decoder with sparsity-inducing weight penalties to learn a sparse causal graph. The model enables faithful time series generation and causal discovery, outperforming state-of-the-art methods in both tasks on synthetic and real medical time series data (EEG and fMRI).

ABSTRACT

We propose causal recurrent variational autoencoder (CR-VAE), a novel generative model that is able to learn a Granger causal graph from a multivariate time series x and incorporates the underlying causal mechanism into its data generation process. Distinct to the classical recurrent VAEs, our CR-VAE uses a multi-head decoder, in which the $p$-th head is responsible for generating the $p$-th dimension of $\mathbf{x}$ (i.e., $\mathbf{x}^p$). By imposing a sparsity-inducing penalty on the weights (of the decoder) and encouraging specific sets of weights to be zero, our CR-VAE learns a sparse adjacency matrix that encodes causal relations between all pairs of variables. Thanks to this causal matrix, our decoder strictly obeys the underlying principles of Granger causality, thereby making the data generating process transparent. We develop a two-stage approach to train the overall objective. Empirically, we evaluate the behavior of our model in synthetic data and two real-world human brain datasets involving, respectively, the electroencephalography (EEG) signals and the functional magnetic resonance imaging (fMRI) data. Our model consistently outperforms state-of-the-art time series generative models both qualitatively and quantitatively. Moreover, it also discovers a faithful causal graph with similar or improved accuracy over existing Granger causality-based causal inference methods. Code of CR-VAE is publicly available at https://github.com/hongmingli1995/CR-VAE.

Motivation & Objective

  • To develop a generative model for multivariate time series that simultaneously learns the joint distribution and transition dynamics while enabling causal discovery.
  • To address the limitation of existing deep generative models in capturing latent factors and modeling temporal dependencies through a probabilistic, structured approach.
  • To integrate Granger causality principles into a variational autoencoder framework to ensure the generation process respects causal order and reveals underlying causal structures.
  • To improve training stability and performance by introducing a two-stage learning strategy that separates sparsity induction from refinement of non-zero weights.
  • To evaluate the model on real-world medical datasets (EEG and fMRI) and demonstrate its superiority in both time series generation and causal graph reconstruction.

Proposed method

  • The model employs a single encoder GRU to infer a latent representation from observed time series, followed by a multi-head decoder where each head generates one dimension of the multivariate time series.
  • A sparsity-inducing ℓ1 penalty is applied to the decoder’s weight matrix to encourage a sparse adjacency matrix that encodes Granger causal relationships between time series dimensions.
  • The causal structure is enforced by ensuring that only past values of cause variables influence the generation of effect variables, aligning with Granger causality principles.
  • An error-compensation module is introduced to model instantaneous influences not captured by lagged dependencies, improving modeling fidelity.
  • A two-stage training strategy is used: first, train with ℓ1 regularization to induce sparsity; second, fix zero weights and fine-tune remaining weights using SGD to improve generation quality.
  • The model is trained end-to-end using a variational inference objective that maximizes the evidence lower bound (ELBO) on the log-likelihood of observed sequences.

Experimental results

Research questions

  • RQ1Can a deep generative model for time series be designed to simultaneously learn the data distribution and infer causal relationships between variables?
  • RQ2Can Granger causality be effectively embedded into a recurrent VAE architecture to ensure that the generation process respects causal temporal order?
  • RQ3Does the use of a multi-head decoder with structured sparsity improve both generation quality and causal graph accuracy compared to standard VAEs?
  • RQ4Can a two-stage training strategy mitigate the performance degradation caused by ℓ1 regularization while preserving sparsity in the causal graph?
  • RQ5How does the proposed CR-VAE compare to state-of-the-art methods in time series generation and causal discovery on real medical time series?

Key findings

  • The CR-VAE outperforms state-of-the-art time series generative models in both qualitative and quantitative evaluation, as measured by MMD, TSTR, and t-SNE visualization on synthetic and real datasets.
  • On the fMRI dataset, the two-stage training strategy led to a significant drop in training loss and improved generation quality, as shown by t-SNE projections where synthetic samples better overlapped with real data.
  • The model discovered a causal graph with accuracy comparable to or better than existing Granger causality-based methods, particularly on synthetic Hénon and Lorenz 96 sequences.
  • PCA visualization revealed limitations in PCA for time series evaluation, as it showed poor alignment with other metrics like t-SNE and MMD, highlighting the need for more robust evaluation methods.
  • The CR-VAE achieved superior performance on EEG and fMRI datasets, with synthetic time series closely matching the distribution and dynamics of real data.
  • The code for CR-VAE is publicly available on GitHub, enabling reproducibility and further research in causal time series modeling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.