Sequential Counterfactual Inference for Temporal Clinical Data: Addressing the Time Traveler Dilemma
2026-02-24 • Machine Learning
Machine Learning
AI summaryⓘ
The authors created a new way to ask "what if" questions about patient health over time, especially using data from electronic health records. Their method respects that some health features can't change (like chronic diseases) and that other features (like lab results) can be influenced and affect future health. They found that older methods might suggest impossible changes in people with chronic conditions. Using their approach, they revealed a chain of heart and kidney problems that happen in sequence, which older methods missed. This helps doctors understand how earlier treatments might impact patient outcomes later in a realistic way.
Counterfactual InferenceLongitudinal DataElectronic Health RecordsTemporal DependenciesChronic DiagnosesLab ValuesCardiorenal SyndromeCOVID-19Heart FailureIntervention Propagation
Authors
Jingya Cheng, Alaleh Azhir, Jiazi Tian, Hossein Estiri
Abstract
Counterfactual inference enables clinicians to ask "what if" questions about patient outcomes, but standard methods assume feature independence and simultaneous modifiability -- assumptions violated by longitudinal clinical data. We introduce the Sequential Counterfactual Framework, which respects temporal dependencies in electronic health records by distinguishing immutable features (chronic diagnoses) from controllable features (lab values) and modeling how interventions propagate through time. Applied to 2,723 COVID-19 patients (383 Long COVID heart failure cases, 2,340 matched controls), we demonstrate that 38-67% of patients with chronic conditions would require biologically impossible counterfactuals under naive methods. We identify a cardiorenal cascade (CKD -> AKI -> HF) with relative risks of 2.27 and 1.19 at each step, illustrating temporal propagation that sequential -- but not naive -- counterfactuals can capture. Our framework transforms counterfactual explanation from "what if this feature were different?" to "what if we had intervened earlier, and how would that propagate forward?" -- yielding clinically actionable insights grounded in biological plausibility.