NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Clairvoyance: A Pipeline Toolkit for Medical Time Series

Daniel Jarrett, Jinsung Yoon, Ioana Bica, Zhaozhi Qian, Ari Ercole, Mihaela van der Schaar

TL;DR

Clairvoyance is an open-source, end-to-end pipeline toolkit specifically engineered for medical time-series machine learning. It bridges the gap between academic ML algorithms and real-world clinical utility by unifying data preprocessing, imputation, feature selection, prediction, treatment-effect estimation, active sensing, uncertainty estimation, and model interpretation under a standardized API. Crucially, it introduces an interface for temporal AutoML that optimizes models and pipelines across both components and time steps.

What Problem Does This Paper Address?

Despite the surge in clinical ML research, a severe translational gap prevents state-of-the-art models from reaching actual clinical decision support. Real-world medical time-series modeling suffers from three core bottlenecks:

  1. Engineering overhead: Over 95% of mature ML project lifecycles are spent wrangling complex software workflows (e.g., missing data, irregularly sampled streams, static vs. dynamic features) rather than answering clinical questions.
  2. Evaluation and context dependencies: A downstream model's performance is tightly bound to upstream pipeline steps (like imputation). Isolated "all-else-equal" benchmarking obscures reproducibility and holistic assessment.
  3. Efficiency and optimization complexity: Deep learning and temporal pipelines introduce massive hyperparameter and structural search spaces. Additionally, clinical time series suffer from temporal distribution shifts, making static pipeline configurations sub-optimal over time.

Methods

Clairvoyance establishes a modular, fit-transform-predict standard conforming to the standard Entity-Attribute-Value (EAV) clinical schema:

  • Three Integrated Patient Pathways:
  • Personalized Prediction: Forecasting one-shot targets (e.g., mortality) or online rolling-window targets (e.g., biomarker trajectory) using models like GRU, LSTM, Temporal CNNs, and Transformers.
  • Individualized Treatment Effects (ITE): Estimating counterfactual outcomes under time-varying interventions (e.g., Counterfactual Recurrent Networks [CRN], Recurrent Marginal Structural Networks [R-MSN]).
  • Active Sensing / Dynamic Monitoring: Determining which clinical features to measure next under resource and acquisition budget constraints (e.g., ASAC, DeepSensing).
  • End-to-End Pipeline Composition: Combines static and temporal imputation (e.g., GAIN, M-RNN, MissForest), instance-wise feature selection (INVASE), uncertainty quantification (ensembles, MC Dropout), and output calibration (Platt scaling, isotonic regression).
  • Temporal AutoML Interface: Clairvoyance extends standard Combined Algorithm Selection and Hyperparameter optimization (CASH) and Pipeline Selection and Configuration (PSC) along the temporal dimension into Stepwise Algorithm Selection and Hyperparameter optimization (SASH) and Stepwise Pipeline Selection and Configuration (SPSC) via Deep Kernel Learning (DKL) to adaptively optimize configurations over time steps.

Datasets

The toolkit was evaluated across three real-world medical environments representing diverse care settings:

  • UK Cystic Fibrosis Registry (UKCF) (Outpatient): ~5,800 adult patients; 11 static, 79 temporal features measured semi-annually over an average trajectory of ~5.3 years. Task: 6-month-ahead forced expiratory volume ($\text{FEV}_1$) prediction.
  • Ronald Reagan UCLA Medical Center (WARDS) (General Wards): ~6,300 hospitalized patients; 8 static, 37 physiological time streams measured every 4–24 hours over an average stay of ~9.1 days. Task: Predicting deterioration / transfer to ICU after 48 hours.
  • MIMIC-III (Intensive Care Unit): ~23,100 ICU patients; 11 static, 40 temporal variables measured hourly over an average stay of ~85.4 hours. Task 1: 4-hour-ahead need for mechanical ventilation. Task 2 (~6,000 patient subset): Estimating 1-, 2-, and 3-day treatment effects of antibiotic administration on mechanical ventilation.

Key Insights and Ideas

  • The "Pipeline" is the Central Object: Treating data imputation, feature selection, and model training as isolated units hides major downstream compounding errors. Abstracting the entire workflow makes clinical ML reproducible, modular, and cleanly bench-markable.
  • Time is an Optimization Dimension: In clinical settings, patient dynamics shift over time (e.g., from initial shock to ward stabilization). Automating model and hyperparameter selection across individual time steps (via DKL-powered SASH) consistently outperforms fixing a single static model architecture across the entire patient stay.
  • Co-locating Prediction, Treatment, and Sensing: The clinical journey involves not only predicting what will happen, but choosing what intervention to give and deciding what test to order next. Standardizing all three into a single toolkit removes the friction of stitching together separate, incompatible codebases.

Key Results

  • Predictive Performance: In online $\text{FEV}_1$ regression (UKCF), SASH achieved the lowest RMSE ($0.059 \pm 0.001$) and MAE ($0.030 \pm 0.001$), outperforming standard LSTMs, Transformers, and GRUs. In MIMIC ventilation prediction, SASH scored 0.917 AUC / 0.809 APR, improving over the best standalone base model (RNN-LSTM: 0.901 AUC / 0.776 APR).
  • Treatment Effects Estimation: For predicting counterfactual mechanical ventilation 1 day ahead under antibiotics, SASH achieved 0.871 AUC / 0.902 APR, beating standalone CRN (0.865 AUC / 0.892 APR) and RMSN (0.860 AUC / 0.889 APR).
  • Active Sensing Under Budget Constraints: When selecting only 50% of possible lab measurements on ward patients, SASH achieved 0.725 AUC / 0.248 APR, exceeding ASAC (0.714 AUC) and DeepSensing (0.707 AUC). At a 90% sensing budget, SASH reached 0.849 AUC / 0.420 APR.

Limitations and Future Work

  • Scope Exclusions: Clairvoyance purposefully does not solve initial cohort extraction, data governance, algorithmic fairness, patient privacy, or federated hospital deployment.
  • Not an Exhaustive Repository: While standard baselines are built in, Clairvoyance is not a library of every time-series algorithm; users rely on provided wrapper classes to bring arbitrary external algorithms (e.g., classical ARIMA or custom models).
  • Computational Cost: End-to-end Bayesian optimization and deep pipeline tuning require significant GPU time (~24–72 hours per multi-step experiment on a single GTX 1080 Ti), pointing to the need for more sample-efficient temporal AutoML algorithms.

Summary updated

BibTeX
@inproceedings{jarrett2021clairvoyance,
  author = {Daniel Jarrett and Jinsung Yoon and Ioana Bica and Zhaozhi Qian and Ari Ercole and Mihaela van der Schaar},
  title = {{Clairvoyance: A Pipeline Toolkit for Medical Time Series}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=xnC8YwKUE3k},
}
Figure