IVP-VAE: Modeling EHR Time Series with Initial Value Problem Solvers

Jingge Xiao, Leonie Basso, Wolfgang Nejdl, Niloy Ganguly, Sandipan Sikdar

TL;DR

IVP-VAE is a novel continuous-time generative model that handles irregularly sampled time series by replacing slow, sequential recurrent units with parallelized Initial Value Problem (IVP) solvers. By leveraging the inherent invertibility of these solvers, the model shares a single neural network for both encoding and decoding, achieving state-of-the-art performance with over an order of magnitude speedup and superior data efficiency.

What Problem Does This Paper Address?

Electronic Health Record (EHR) data is notoriously difficult to model. It consists of multivariate time series (like heart rate, lab results, and medication) that are irregularly sampled: measurements happen at unequal intervals, and many values are missing due to the nature of clinical workflows.

Existing continuous-time models, such as Neural ODEs, are natural fits for this data because they assume a continuous underlying process. However, most current implementations (like Latent-ODE) use a hybrid approach: they solve an ODE to bridge time gaps and then use a Recurrent Neural Network (RNN) to update the state. This creates a sequential bottleneck—you can't calculate the state at time $t_5$ without first calculating $t_1$ through $t_4$. This makes training slow, computationally expensive, and difficult to scale to long sequences.

Methods

The authors introduce IVP-VAE, which eliminates recurrent units entirely in favor of a purely continuous, parallelizable architecture.

  1. Parallel IVP Solving: Instead of sequential updates, IVP-VAE treats every observation as an independent starting point for an Initial Value Problem. In the encoder, each observation $x_i$ at time $t_i$ is mapped to a latent state $z_i$ and then "evolved" backward in time to $t_0$ to estimate the initial latent variable $z_0$. Because these calculations are independent, they can be performed in parallel.
  2. Bidirectional Evolving & Parameter Sharing: The core innovation lies in utilizing the invertibility of IVP solvers (like Neural ODEs or Neural Flows). The same neural network used to evolve states backward in the encoder is used to evolve them forward in the decoder.
  3. Encoder: Maps $x_i \to z_i$, then solves the IVP backward ($t_i \to t_0$) to find $z_0$.
  4. Decoder: Takes a sampled $z_0$, then solves the IVP forward ($t_0 \to t_i$) to reconstruct $z_i \to \hat{x}_i$.
  5. Variational Framework: The model is trained as a Variational Autoencoder (VAE), using a mixture distribution to integrate the estimates of $z_0$ from all time points into a single posterior distribution.
Figure 1: Modeling irregular time series with IVP-VAE. (Left) In the encoder, an embedding module maps data xi into latent state zi. The state is evolved backward in time: Take (zi, ti) as initial condition and calculate state z0 at t0 using an IVP solver. (Right) In the decoder, the latent state is evolved forward in time: Take (z0, t0) as initial condition and go opposite along the timeline to obtain state zi using the same IVP solver. A reconstruction module then maps zi back to data ˆxi.

Datasets

The model was evaluated on three major real-world EHR datasets:

  • MIMIC-IV: A massive dataset with 26,070 samples and 96 variables, featuring a high missingness rate of nearly 98%.
  • PhysioNet 2012: A standard benchmark for mortality prediction (4,000 samples).
  • eICU: A multi-center database with 12,312 samples.
  • Additional Benchmarks: The authors also tested on synthetic data, climate data, and human activity data to prove the model's generalizability beyond healthcare.

Key Insights and Ideas

  • Recurrence is Optional: The paper proves that temporal dependencies can be captured entirely through the dynamics of an IVP solver. You don't need a "memory" cell (like a GRU or LSTM) if your differential equation solver is expressive enough.
  • Symmetry Saves Parameters: By using the same solver for both encoding and decoding, the model is "lighter" (fewer parameters) and converges faster. This symmetry is a direct benefit of the mathematical properties of ODEs and Flows.
  • Robustness to Small Data: Because the model shares parameters and assumes a continuous process, it is exceptionally good at learning from limited data—a common scenario in rare disease research.

Key Results

  • Massive Speedup: IVP-VAE-Flow is approximately 42 times faster in forward passes and 28 times faster per epoch than its predecessor, Latent-Flow, on the MIMIC-IV dataset.
  • State-of-the-Art Performance: It consistently ranked in the top-2 across all datasets for both forecasting (measured by Mean Squared Error) and classification (measured by AUROC/AUPRC).
  • Data Efficiency: In experiments with limited training samples (e.g., 500 samples), IVP-VAE substantially outperformed all baselines, including mTAN and GRU-D.
Figure 2: Performance comparison on small datasets: (Left) MSE for forecasting and (right) AUROC for classification task. IVP-VAE based models consistently and substantially outperform all baseline approaches across all datasets with different number of samples.

Limitations and Future Work

While the paper demonstrates significant advances, a few areas remain for exploration:

  • Task Specificity: While IVP-VAE is a strong general-purpose model, some baselines designed specifically for one task (like classification) occasionally matched its performance.
  • Numerical Stability: The model relies on the numerical invertibility of solvers; extreme time horizons or highly stiff ODEs might present challenges not fully detailed in the clinical benchmarks.
  • Future Directions: The authors suggest extending the model to handle missing value imputation and time series regression tasks more explicitly.

Summary updated

BibTeX
@inproceedings{xiao2024ivp,
  author = {Jingge Xiao and Leonie Basso and Wolfgang Nejdl and Niloy Ganguly and Sandipan Sikdar},
  title = {{IVP-VAE: Modeling EHR Time Series with Initial Value Problem Solvers}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i14.29534},
}
Figure