CURE: A Pre-training Framework on Large-scale Patient Data for Treatment Effect Estimation

Ruoqi Liu, Pin-Yu Chen, Ping Zhang

TL;DR

CURE brings the modern pre-training and fine-tuning paradigm to treatment effect estimation (TEE) on longitudinal observational health data. By pre-training a Transformer on nearly 3 million unlabeled patient trajectories with custom hierarchical and temporal embeddings, CURE significantly outperforms existing neural causal inference methods—even when fine-tuned on only 5–10% of task-specific labeled data.

What Problem Does This Paper Address?

Randomized clinical trials (RCTs) are the gold standard for comparing medical treatments, but they are expensive, time-consuming, and frequently infeasible. Observational health records (like insurance claims) offer an abundant alternative, but estimating individual treatment effects (ITE) from them presents serious challenges:

  1. Confounding & Missing Counterfactuals: We only ever observe the factual outcome of the treatment a patient actually received; the counterfactual outcome under an alternative treatment is fundamentally missing.
  2. Small Labeled Cohorts: Most neural causal estimators train task-specific architectures from scratch on small, trial-specific labeled cohorts (typically 10K–20K patients), making models prone to overfitting and poor generalization.
  3. Complex Patient Trajectories: Unlike natural text, electronic health records (EHRs) are hierarchical (visits containing multiple diagnoses and prescriptions) and irregularly sampled over time. Existing language models cannot be directly applied without losing critical temporal context.

Methods

CURE adapts the BERT-style self-supervised learning workflow into a two-phase causal framework:

[Raw Longitudinal Claims] 
         │
         ▼
[Sequential Encoding] ──► Token + Visit Time + Physical Time + Covariate Type
         │
         ▼
[Self-Supervised Pre-Training] ──► 12-layer Transformer Encoder (Masked Language Modeling)
         │
         ▼
[Task-Specific Fine-Tuning] ──► Append [SEP] + Treatment Token ──► Linear Head (Predicts Factual Outcome)
         │
         ▼
[Causal Inference] ──► Estimate ITE / ATE: ŷ(Target) - ŷ(Comparator)
  • Chronological Sequence Serialization: Structured claims are converted into an aligned sequence of clinical tokens across all baseline visits prior to treatment index date.
  • Comprehensive Embedding Layer: Each token’s embedding $e_i$ is a four-way sum: $$e_i = w_{\text{token}} + t_{\text{type}} + v_{\text{visit}} + p_{\text{physical}}$$ where $t_{\text{type}}$ categorizes the token (demographic, medication, or diagnosis), $v_{\text{visit}}$ indexes the relative visit sequence, and $p_{\text{physical}}$ encodes elapsed calendar time in 30-day discrete windows relative to the treatment index date.

  • Unsupervised Pre-training: A 12-layer Transformer backbone ($\text{BERT}_{\text{base}}$) is trained on masked token recovery using Masked Language Modeling (MLM with a 15% masking rate).

  • Causal Fine-Tuning & Counterfactual Inference: For a downstream comparative effectiveness study, the model appends the chosen treatment token (e.g., valsartan) separated by a [SEP] delimiter. It optimizes a binary cross-entropy loss against observed factual outcomes. At inference time, counterfactual outcomes are simulated simply by swapping the appended treatment token and computing the difference $\hat{y}_{\text{target}} - \hat{y}_{\text{compared}}$.

Datasets

  • Pre-training Data: Drawn from the MarketScan Commercial Claims and Encounters (CCAE) database (2012–2017). The pre-training corpus contains 2,955,399 unlabeled patient trajectories diagnosed with Coronary Artery Disease (CAD), mapped to a unified vocabulary of 9,435 codes (282 Clinical Classifications Software diagnosis codes and 9,153 generic medication names).
  • Downstream Benchmarks: The authors systematically extracted 4 clinical trial settings from ClinicalTrials.gov for stroke reduction among CAD patients, yielding non-overlapping labeled cohorts (12K–29K patients each):
  • Rivaroxaban vs. Aspirin
  • Valsartan vs. Ramipril
  • Ticagrelor vs. Aspirin
  • Apixaban vs. Warfarin
  • Semi-Synthetic Benchmark: A dataset simulating treatment assignment and potential outcomes over real patient covariates with ground-truth causal effects.

Key Insights and Ideas

  • Temporal features matter more than type tags: Ablations demonstrate that adding physical and visit time embeddings provides far larger performance gains than code-type embeddings, confirming that modeling irregular clinical event intervals is central to adjusting for confounding.
  • Pre-training is a strong regularizer for causal balance: t-SNE visualizations reveal that pre-trained patient representations dramatically reduce the distribution shift between treated and untreated groups without requiring explicit adversarial domain discriminators.
  • Extreme sample efficiency in low-resource regimes: Pre-training acts as an inductive prior; fine-tuning CURE on just 5% to 10% of downstream labeled data matches or surpasses training baseline neural architectures on 100% of the labeled data from scratch.

Key Results

Across all four downstream real-world tasks, CURE outperformed 8 competitive baselines (including TARNet, DragonNet, DR-CFR, SNet, and TransTEE):

  • Predictive Performance: Achieved average absolute gains of +3.8% AUC (reaching up to 0.826) and +6.9% AUPR (reaching up to 0.588).
  • Causal Precision: Yielded a 15.7% absolute reduction in Influence Function-based PEHE (IF-PEHE) over the best baseline, indicating superior counterfactual estimation.
  • Semi-Synthetic Precision: Reduced PEHE from 0.689 (TransTEE) down to 0.596.
  • Agreement with Published RCTs: Treatment effect 95% confidence intervals derived from CURE correctly matched 3 out of 4 ground-truth randomized trial conclusions (compared to at most 2 out of 4 for existing methods).

Limitations and Future Work

  • Uncheckable Causal Assumptions: Like all observational estimators, CURE relies on strong ignorability (no unmeasured confounders). While large covariate sets mitigate bias, unobserved variables can still distort treatment estimates.
  • Restricted Problem Setup: Evaluated only on binary treatments and binary outcomes (stroke occurrence) within cardiovascular disease cohorts.
  • Future Directions: Expanding the pre-training paradigm to continuous-dosage treatments, multi-treatment comparisons, time-to-event (survival) outcomes, and diverse clinical domains beyond CAD.

Summary updated

BibTeX
@inproceedings{liu2023cure,
  author = {Ruoqi Liu and Pin-Yu Chen and Ping Zhang},
  title = {{CURE: A Pre-training Framework on Large-scale Patient Data for Treatment Effect Estimation}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=W0deqi42HD},
}
Figure