Bayesian Neural Controlled Differential Equations for Treatment Effect Estimation

Konstantin Hess, Valentyn Melnychuk, Dennis Frauen, Stefan Feuerriegel · DOI

Abstract

Estimating treatment effects in continuous time is critical for personalized medicine, where patient data is often irregularly sampled. While existing methods provide point estimates, they lack rigorous uncertainty quantification (UQ). We present Bayesian Neural Controlled Differential Equations (BNCDE), the first framework to combine Neural CDEs with Neural Stochastic Differential Equations (SDEs) for treatment effect estimation. BNCDE provides faithful credible intervals, allowing clinicians to assess model confidence alongside predicted outcomes.

Introduction

In clinical settings, the timing of interventions and observations is rarely uniform. Traditional machine learning models often rely on discrete-time assumptions, which fail to capture the nuances of continuous-time medical trajectories. While continuous-time models like the Treatment Effect Neural Controlled Differential Equation (TE-CDE) can handle irregular sampling, they typically offer only single-point predictions. For high-stakes medical decisions, understanding the range of potential outcomes and the model's certainty is as important as the prediction itself. BNCDE addresses this gap by integrating UQ into a continuous-time framework.

Methodology: BNCDE Architecture

BNCDE utilizes an encoder-decoder architecture that leverages two advanced mathematical frameworks: Neural Controlled Differential Equations (CDEs) and Neural Stochastic Differential Equations (SDEs).

The BNCDE encoder-decoder architecture, illustrating the flow from input data through stochastic latent paths to the posterior predictive distribution.

The Encoder processes patient history—including outcomes, covariates, and past treatments—as a continuous path using a Neural CDE. Crucially, the weights of this CDE are modeled as stochastic processes via a latent Neural SDE, enabling variational Bayesian inference. The Decoder then projects a future hidden trajectory based on planned treatments. Finally, a Prediction Head generates the expected outcome (mean) and the associated uncertainty (variance). The model is optimized by maximizing the Evidence Lower Bound (ELBO), balancing predictive performance with the complexity of the weight distributions.

Experimental Evaluation

The performance of BNCDE was evaluated across three diverse scenarios:

  1. Tumor Growth Simulation: A pharmacokinetic-pharmacodynamic model for lung cancer, enabling counterfactual analysis.
  2. MIMIC-III ICU Data: Real-world data used to predict diastolic blood pressure based on physiological signals and vasopressor treatments.
  3. Semi-Synthetic Data: A hybrid approach using real patient covariates with simulated outcomes to provide ground-truth treatment effects for rigorous evaluation.

Key Results and Insights

A primary advantage of BNCDE is its "faithfulness"—the degree to which its predicted credible intervals (CrIs) match empirical reality. Many existing UQ methods, such as MC Dropout, tend to be overconfident, producing narrow intervals that frequently exclude the true outcome.

Comparison of CrI minus empirical coverage across different prediction horizons (Δ). BNCDE (blue) remains closer to the zero-line (ideal calibration) compared to the overconfident TE-CDE baseline (red).

As shown in Figure 5, BNCDE's coverage is significantly more reliable than the TE-CDE baseline. For a 95% CrI, BNCDE captures the true outcome approximately 95% of the time. Furthermore, BNCDE produces "sharper" (narrower) intervals when data is abundant, demonstrating that its accuracy does not come at the cost of being overly vague. Even in terms of point-estimate accuracy (Mean Squared Error), BNCDE outperforms state-of-the-art methods, particularly over longer prediction horizons.

Discussion and Limitations

While BNCDE represents a significant advancement, it faces typical deep learning challenges. Its "black-box" nature limits direct clinical explainability. Additionally, while it can be combined with representation balancing techniques, it does not inherently solve for unobserved confounders. Finally, the computational cost of solving high-dimensional SDEs remains higher than simpler discrete-time alternatives, though the authors demonstrate linear scaling.

Conclusion

BNCDE is the first method to provide reliable uncertainty quantification for treatment effect estimation in continuous time. By modeling network weights as stochastic processes, it offers a principled way for medical AI to communicate its confidence, a vital step toward the safe deployment of machine learning in clinical practice.

Summary updated

BibTeX
@inproceedings{hess2024bayesian,
  author = {Konstantin Hess and Valentyn Melnychuk and Dennis Frauen and Stefan Feuerriegel},
  title = {{Bayesian Neural Controlled Differential Equations for Treatment Effect Estimation}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=uwO71a8wET},
}
Figure