Title: Counterfactual Digital Twin: Generating What-If Trajectories with Uncertainty
Primary area: causal reasoning
Keywords: Causality, Digital twin, Kalman filter, Synthetic control, Transformer

Abstract: Answering \textit{what-if} questions is crucial in many decision-making domains, especially in time-sensitive areas such as healthcare, strategy, and policy. Generating counterfactual trajectories requires both predictions based on a unit's observed history and evidence from similar units exposed to the alternative conditions. Building upon this view, we develop an effective model called CounterTwin, which yields ensembles of all possible what-if trajectories and their posterior uncertainty. Specifically, CounterTwin learns how trajectories evolve from factual data using a transformer, and summarizes counterfactual evidence with synthetic control. These sources are then integrated through a Kalman filter, where the transformer serves as the prior belief and the synthetic control as a noisy measurement. This information fusion produces stable counterfactual rollouts with natural uncertainty. Extensive experiments on synthetic and real data show that CounterTwin achieves superior accuracy and robustness over existing methods. Code is available at \url{https://anonymous.4open.science/r/CounterTwin-44F8/}.

TL;DR: Counterfactual Digital Twin: Generating What-If Trajectories with Uncertainty